@inploi/plugin-feedback 6.0.0 → 6.1.1
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/cdn/index.js +13 -13
- package/dist/components/feedback-widget.test.d.ts +1 -0
- package/dist/feedback.d.ts +14 -0
- package/dist/i18n.d.ts +18 -0
- package/dist/plugin-feedback.cjs +373 -241
- package/dist/plugin-feedback.js +373 -241
- package/dist/style/tokens.d.ts +8 -1
- package/dist/style/tokens.test.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/feedback.d.ts
CHANGED
|
@@ -18,16 +18,28 @@ export type FeedbackPluginParams = {
|
|
|
18
18
|
corners: 'rounded' | 'soft' | 'sharp';
|
|
19
19
|
highlights: 'stroke' | 'fill';
|
|
20
20
|
accent: PaletteParams;
|
|
21
|
+
/**
|
|
22
|
+
* Paint the solid accent fill (the submit button) in this exact CSS colour, with `text` on it, instead of the
|
|
23
|
+
* palette shade generated from `accent`. Text and focus rings keep the palette's shades; `accent` still tints the
|
|
24
|
+
* neutrals. Both values must each be a single CSS colour (as `getComputedStyle` returns for a custom property).
|
|
25
|
+
*/
|
|
26
|
+
exactAccent?: {
|
|
27
|
+
color: string;
|
|
28
|
+
text: string;
|
|
29
|
+
};
|
|
21
30
|
positive: PaletteParams;
|
|
22
31
|
negative: PaletteParams;
|
|
23
32
|
};
|
|
24
33
|
terms: Partial<FeedbackTranslationTerms>;
|
|
34
|
+
locale?: string;
|
|
25
35
|
size: 'sm' | 'md' | 'lg';
|
|
26
36
|
onLeaveComment?: () => void;
|
|
27
37
|
onRate?: (rate: 0 | 1 | -1) => void;
|
|
28
38
|
};
|
|
29
39
|
export interface FeedbackPluginRenderParams extends FeedbackPluginParams {
|
|
30
40
|
host?: HTMLElement;
|
|
41
|
+
/** Explicit render target for widgets that share the same analytics key. */
|
|
42
|
+
target?: HTMLElement;
|
|
31
43
|
}
|
|
32
44
|
export declare const createFeedbackDomManager: (logger: Logger) => {
|
|
33
45
|
getRenderTargetElement: (key: string) => Element;
|
|
@@ -51,6 +63,8 @@ export declare const feedbackPlugin: () => ({ apiClient, logger, analytics }: {
|
|
|
51
63
|
}>;
|
|
52
64
|
/** Renders the Job Alerts Plugin inside the container element. */
|
|
53
65
|
render: (params: FeedbackPluginRenderParams) => Promise<void>;
|
|
66
|
+
/** Release components, portals and document listeners when an owning widget unmounts. */
|
|
67
|
+
destroy: () => void;
|
|
54
68
|
'~brand': "@inploi/plugin-feedback";
|
|
55
69
|
};
|
|
56
70
|
export type FeedbackPlugin = ReturnType<typeof feedbackPlugin>;
|
package/dist/i18n.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const TranslationProvider: (props: {
|
|
2
2
|
terms?: Partial<import('@inploi/i18n/translation').TranslationDict<{
|
|
3
3
|
readonly a11y_label: "How was your experience?";
|
|
4
|
+
readonly positive_label: "Good";
|
|
5
|
+
readonly negative_label: "Bad";
|
|
4
6
|
readonly positive_heading: "Thanks!";
|
|
5
7
|
readonly negative_heading: "We’re sorry to hear that";
|
|
6
8
|
readonly positive_text: "Would you like to tell us more about your experience?";
|
|
@@ -10,11 +12,14 @@ export declare const TranslationProvider: (props: {
|
|
|
10
12
|
readonly skip: "No, thanks";
|
|
11
13
|
readonly submitted_heading: "Thank you!";
|
|
12
14
|
readonly submitted_text: "Your feedback has been sent and will be used to improve our products.";
|
|
15
|
+
readonly comment_minimum: "Please type more characters in the comment box";
|
|
13
16
|
}>> | undefined;
|
|
14
17
|
locale: string | undefined;
|
|
15
18
|
children?: import('preact').ComponentChildren;
|
|
16
19
|
}) => import("preact").JSX.Element, createTFunction: <T extends {
|
|
17
20
|
readonly a11y_label: "How was your experience?";
|
|
21
|
+
readonly positive_label: "Good";
|
|
22
|
+
readonly negative_label: "Bad";
|
|
18
23
|
readonly positive_heading: "Thanks!";
|
|
19
24
|
readonly negative_heading: "We’re sorry to hear that";
|
|
20
25
|
readonly positive_text: "Would you like to tell us more about your experience?";
|
|
@@ -24,8 +29,11 @@ export declare const TranslationProvider: (props: {
|
|
|
24
29
|
readonly skip: "No, thanks";
|
|
25
30
|
readonly submitted_heading: "Thank you!";
|
|
26
31
|
readonly submitted_text: "Your feedback has been sent and will be used to improve our products.";
|
|
32
|
+
readonly comment_minimum: "Please type more characters in the comment box";
|
|
27
33
|
} = {
|
|
28
34
|
readonly a11y_label: "How was your experience?";
|
|
35
|
+
readonly positive_label: "Good";
|
|
36
|
+
readonly negative_label: "Bad";
|
|
29
37
|
readonly positive_heading: "Thanks!";
|
|
30
38
|
readonly negative_heading: "We’re sorry to hear that";
|
|
31
39
|
readonly positive_text: "Would you like to tell us more about your experience?";
|
|
@@ -35,9 +43,12 @@ export declare const TranslationProvider: (props: {
|
|
|
35
43
|
readonly skip: "No, thanks";
|
|
36
44
|
readonly submitted_heading: "Thank you!";
|
|
37
45
|
readonly submitted_text: "Your feedback has been sent and will be used to improve our products.";
|
|
46
|
+
readonly comment_minimum: "Please type more characters in the comment box";
|
|
38
47
|
}>(options: {
|
|
39
48
|
overrides: Partial<import('@inploi/i18n/translation').TranslationDict<{
|
|
40
49
|
readonly a11y_label: "How was your experience?";
|
|
50
|
+
readonly positive_label: "Good";
|
|
51
|
+
readonly negative_label: "Bad";
|
|
41
52
|
readonly positive_heading: "Thanks!";
|
|
42
53
|
readonly negative_heading: "We’re sorry to hear that";
|
|
43
54
|
readonly positive_text: "Would you like to tell us more about your experience?";
|
|
@@ -47,10 +58,13 @@ export declare const TranslationProvider: (props: {
|
|
|
47
58
|
readonly skip: "No, thanks";
|
|
48
59
|
readonly submitted_heading: "Thank you!";
|
|
49
60
|
readonly submitted_text: "Your feedback has been sent and will be used to improve our products.";
|
|
61
|
+
readonly comment_minimum: "Please type more characters in the comment box";
|
|
50
62
|
}>>;
|
|
51
63
|
locale: string | undefined;
|
|
52
64
|
}) => import('@inploi/i18n/translation').TFn<T>, useTranslation: <T extends {
|
|
53
65
|
readonly a11y_label: "How was your experience?";
|
|
66
|
+
readonly positive_label: "Good";
|
|
67
|
+
readonly negative_label: "Bad";
|
|
54
68
|
readonly positive_heading: "Thanks!";
|
|
55
69
|
readonly negative_heading: "We’re sorry to hear that";
|
|
56
70
|
readonly positive_text: "Would you like to tell us more about your experience?";
|
|
@@ -60,8 +74,11 @@ export declare const TranslationProvider: (props: {
|
|
|
60
74
|
readonly skip: "No, thanks";
|
|
61
75
|
readonly submitted_heading: "Thank you!";
|
|
62
76
|
readonly submitted_text: "Your feedback has been sent and will be used to improve our products.";
|
|
77
|
+
readonly comment_minimum: "Please type more characters in the comment box";
|
|
63
78
|
} = {
|
|
64
79
|
readonly a11y_label: "How was your experience?";
|
|
80
|
+
readonly positive_label: "Good";
|
|
81
|
+
readonly negative_label: "Bad";
|
|
65
82
|
readonly positive_heading: "Thanks!";
|
|
66
83
|
readonly negative_heading: "We’re sorry to hear that";
|
|
67
84
|
readonly positive_text: "Would you like to tell us more about your experience?";
|
|
@@ -71,6 +88,7 @@ export declare const TranslationProvider: (props: {
|
|
|
71
88
|
readonly skip: "No, thanks";
|
|
72
89
|
readonly submitted_heading: "Thank you!";
|
|
73
90
|
readonly submitted_text: "Your feedback has been sent and will be used to improve our products.";
|
|
91
|
+
readonly comment_minimum: "Please type more characters in the comment box";
|
|
74
92
|
}>() => {
|
|
75
93
|
t: import('@inploi/i18n/translation').TFn<T>;
|
|
76
94
|
locale: string | undefined;
|