@athome-solution/feedjet 2.1.5 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -202
- package/dist/css/feedback.css +1 -1
- package/dist/css/feedback.css.map +1 -1
- package/dist/css/feedbot.css +1 -1
- package/dist/css/feedbot.css.map +1 -1
- package/dist/css/integration-test.css +3 -0
- package/dist/css/integration-test.css.map +1 -0
- package/dist/feedback.d.ts +8 -7
- package/dist/feedbot.d.ts +8 -8
- package/dist/i18n.d.ts +5 -0
- package/dist/index.d.ts +17 -16
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/integration-test.d.ts +33 -0
- package/dist/utils.d.ts +1 -0
- package/package.json +8 -4
package/dist/feedback.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Locale } from './i18n';
|
|
1
2
|
import type { MaybeFunction, UserType } from './types';
|
|
2
3
|
type MaybeHTMLElement = HTMLElement | null | undefined;
|
|
3
4
|
type TargetType = MaybeHTMLElement | {
|
|
@@ -5,9 +6,11 @@ type TargetType = MaybeHTMLElement | {
|
|
|
5
6
|
};
|
|
6
7
|
interface FeedbackOptions {
|
|
7
8
|
target: TargetType;
|
|
8
|
-
projectId
|
|
9
|
+
projectId: string;
|
|
9
10
|
apiUrl?: string;
|
|
11
|
+
baseApiUrl?: string;
|
|
10
12
|
user?: MaybeFunction<UserType | undefined>;
|
|
13
|
+
locale?: Locale;
|
|
11
14
|
}
|
|
12
15
|
export declare class Feedback {
|
|
13
16
|
private readonly options;
|
|
@@ -18,8 +21,8 @@ export declare class Feedback {
|
|
|
18
21
|
private hasConsentAttachment;
|
|
19
22
|
private isFeedbackButtonInitialized;
|
|
20
23
|
private submitHandler;
|
|
21
|
-
private
|
|
22
|
-
private
|
|
24
|
+
private previouslyFocusedElement;
|
|
25
|
+
private integrationTest;
|
|
23
26
|
private decisions;
|
|
24
27
|
private decisionsLoading;
|
|
25
28
|
constructor(options: FeedbackOptions);
|
|
@@ -27,14 +30,12 @@ export declare class Feedback {
|
|
|
27
30
|
private createFeedbackButton;
|
|
28
31
|
private startFeedback;
|
|
29
32
|
private loadConsents;
|
|
30
|
-
private checkConnectivity;
|
|
31
33
|
private fetchDecisions;
|
|
34
|
+
showThanks(type?: 'issue' | 'enhancement' | 'decision'): void;
|
|
32
35
|
private render;
|
|
33
36
|
private renderForm;
|
|
37
|
+
private updateFormContent;
|
|
34
38
|
private renderThanks;
|
|
35
|
-
private closeModal;
|
|
36
|
-
private renderError;
|
|
37
|
-
private renderPendingTest;
|
|
38
39
|
private renderTabs;
|
|
39
40
|
private renderFields;
|
|
40
41
|
private renderDecisionList;
|
package/dist/feedbot.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { Locale } from './i18n';
|
|
1
2
|
import type { MaybeFunction, UserType } from './types';
|
|
2
3
|
interface FeedbotOptions {
|
|
3
|
-
|
|
4
|
+
apiUrl?: string;
|
|
5
|
+
baseApiUrl?: string;
|
|
4
6
|
surveyId: string;
|
|
5
7
|
user?: MaybeFunction<UserType | undefined>;
|
|
8
|
+
locale?: Locale;
|
|
6
9
|
}
|
|
7
10
|
export declare class Feedbot {
|
|
8
11
|
private options;
|
|
@@ -10,17 +13,14 @@ export declare class Feedbot {
|
|
|
10
13
|
private ratingError;
|
|
11
14
|
private submitError;
|
|
12
15
|
private survey;
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
+
private apiUrl;
|
|
17
|
+
private previouslyFocusedElement;
|
|
18
|
+
private integrationTest;
|
|
16
19
|
get user(): UserType | undefined;
|
|
17
20
|
constructor(options: FeedbotOptions);
|
|
21
|
+
showThanks(declined?: boolean): void;
|
|
18
22
|
private render;
|
|
19
23
|
increment(): Promise<void>;
|
|
20
|
-
private checkConnectivity;
|
|
21
|
-
private closeModal;
|
|
22
|
-
private renderError;
|
|
23
|
-
private renderPendingTest;
|
|
24
24
|
submit(): Promise<void>;
|
|
25
25
|
}
|
|
26
26
|
export {};
|
package/dist/i18n.d.ts
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
+
export type Locale = 'fr' | 'en' | 'es';
|
|
2
|
+
export declare function setLocale(locale: Locale): void;
|
|
3
|
+
export declare function getLocale(): Locale;
|
|
1
4
|
export declare function t(key: string): string;
|
|
5
|
+
export declare function tf(key: string, params: Record<string, string | number>): string;
|
|
6
|
+
export declare function requiredMark(cssClass?: string): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
type Locale = 'fr' | 'en' | 'es';
|
|
2
|
+
|
|
1
3
|
type MaybeFunction<T> = T | (() => T);
|
|
2
4
|
interface UserType {
|
|
3
5
|
id: string;
|
|
@@ -11,9 +13,11 @@ type TargetType = MaybeHTMLElement | {
|
|
|
11
13
|
};
|
|
12
14
|
interface FeedbackOptions {
|
|
13
15
|
target: TargetType;
|
|
14
|
-
projectId
|
|
16
|
+
projectId: string;
|
|
15
17
|
apiUrl?: string;
|
|
18
|
+
baseApiUrl?: string;
|
|
16
19
|
user?: MaybeFunction<UserType | undefined>;
|
|
20
|
+
locale?: Locale;
|
|
17
21
|
}
|
|
18
22
|
declare class Feedback {
|
|
19
23
|
private readonly options;
|
|
@@ -24,8 +28,8 @@ declare class Feedback {
|
|
|
24
28
|
private hasConsentAttachment;
|
|
25
29
|
private isFeedbackButtonInitialized;
|
|
26
30
|
private submitHandler;
|
|
27
|
-
private
|
|
28
|
-
private
|
|
31
|
+
private previouslyFocusedElement;
|
|
32
|
+
private integrationTest;
|
|
29
33
|
private decisions;
|
|
30
34
|
private decisionsLoading;
|
|
31
35
|
constructor(options: FeedbackOptions);
|
|
@@ -33,14 +37,12 @@ declare class Feedback {
|
|
|
33
37
|
private createFeedbackButton;
|
|
34
38
|
private startFeedback;
|
|
35
39
|
private loadConsents;
|
|
36
|
-
private checkConnectivity;
|
|
37
40
|
private fetchDecisions;
|
|
41
|
+
showThanks(type?: 'issue' | 'enhancement' | 'decision'): void;
|
|
38
42
|
private render;
|
|
39
43
|
private renderForm;
|
|
44
|
+
private updateFormContent;
|
|
40
45
|
private renderThanks;
|
|
41
|
-
private closeModal;
|
|
42
|
-
private renderError;
|
|
43
|
-
private renderPendingTest;
|
|
44
46
|
private renderTabs;
|
|
45
47
|
private renderFields;
|
|
46
48
|
private renderDecisionList;
|
|
@@ -52,9 +54,11 @@ declare class Feedback {
|
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
interface FeedbotOptions {
|
|
55
|
-
|
|
57
|
+
apiUrl?: string;
|
|
58
|
+
baseApiUrl?: string;
|
|
56
59
|
surveyId: string;
|
|
57
60
|
user?: MaybeFunction<UserType | undefined>;
|
|
61
|
+
locale?: Locale;
|
|
58
62
|
}
|
|
59
63
|
declare class Feedbot {
|
|
60
64
|
private options;
|
|
@@ -62,18 +66,15 @@ declare class Feedbot {
|
|
|
62
66
|
private ratingError;
|
|
63
67
|
private submitError;
|
|
64
68
|
private survey;
|
|
65
|
-
private
|
|
66
|
-
private
|
|
67
|
-
private
|
|
69
|
+
private apiUrl;
|
|
70
|
+
private previouslyFocusedElement;
|
|
71
|
+
private integrationTest;
|
|
68
72
|
get user(): UserType | undefined;
|
|
69
73
|
constructor(options: FeedbotOptions);
|
|
74
|
+
showThanks(declined?: boolean): void;
|
|
70
75
|
private render;
|
|
71
76
|
increment(): Promise<void>;
|
|
72
|
-
private checkConnectivity;
|
|
73
|
-
private closeModal;
|
|
74
|
-
private renderError;
|
|
75
|
-
private renderPendingTest;
|
|
76
77
|
submit(): Promise<void>;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
export { Feedback, Feedbot };
|
|
80
|
+
export { Feedback, Feedbot, type Locale };
|