@athome-solution/feedjet 2.6.0 → 3.0.0-rc.0
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 +22 -1
- package/dist/css/feedback.css +1 -3
- package/dist/css/feedbot.css +1 -3
- package/dist/css/integration-test.css +1 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +288 -141
- package/dist/index.d.ts +288 -141
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -2
- package/dist/css/feedback.css.map +0 -1
- package/dist/css/feedbot.css.map +0 -1
- package/dist/css/integration-test.css.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,48 +1,119 @@
|
|
|
1
1
|
declare const fr: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
launcher: {
|
|
3
|
+
label: string;
|
|
4
|
+
updates: string;
|
|
5
|
+
updates_one: string;
|
|
6
|
+
};
|
|
7
|
+
form: {
|
|
8
|
+
tablist: string;
|
|
9
|
+
version: string;
|
|
10
|
+
cancel: string;
|
|
11
|
+
close: string;
|
|
12
|
+
sending: string;
|
|
13
|
+
required: string;
|
|
14
|
+
optional: string;
|
|
15
|
+
counter: string;
|
|
16
|
+
summary: string;
|
|
17
|
+
summary_one: string;
|
|
18
|
+
summary_focus: string;
|
|
19
|
+
consent: {
|
|
20
|
+
label: string;
|
|
21
|
+
more: string;
|
|
22
|
+
detail: string;
|
|
23
|
+
error: string;
|
|
11
24
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
25
|
+
tech: {
|
|
26
|
+
label: string;
|
|
27
|
+
hint: string;
|
|
28
|
+
more: string;
|
|
29
|
+
};
|
|
30
|
+
capture: {
|
|
31
|
+
on: string;
|
|
32
|
+
on_hint: string;
|
|
33
|
+
off: string;
|
|
34
|
+
off_hint: string;
|
|
35
|
+
pending: string;
|
|
36
|
+
failed: string;
|
|
37
|
+
toggle: string;
|
|
38
|
+
hide: string;
|
|
39
|
+
show: string;
|
|
40
|
+
};
|
|
41
|
+
attachment: {
|
|
42
|
+
add: string;
|
|
43
|
+
drop: string;
|
|
44
|
+
hint: string;
|
|
45
|
+
hint_short: string;
|
|
46
|
+
remove: string;
|
|
47
|
+
too_large: string;
|
|
48
|
+
invalid_type: string;
|
|
15
49
|
};
|
|
16
50
|
};
|
|
17
51
|
enhancement: {
|
|
18
52
|
tab: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
53
|
+
title: string;
|
|
54
|
+
subtitle: string;
|
|
55
|
+
field_title: string;
|
|
56
|
+
placeholder_title: string;
|
|
57
|
+
hint_title: string;
|
|
58
|
+
field_description: string;
|
|
59
|
+
placeholder_description: string;
|
|
60
|
+
error_title: string;
|
|
61
|
+
error_description: string;
|
|
62
|
+
submit: string;
|
|
63
|
+
thanks_title: string;
|
|
64
|
+
thanks_text: string;
|
|
65
|
+
thanks_text_anonymous: string;
|
|
66
|
+
};
|
|
67
|
+
issue: {
|
|
68
|
+
tab: string;
|
|
69
|
+
title: string;
|
|
70
|
+
subtitle: string;
|
|
71
|
+
category: string;
|
|
72
|
+
categories: {
|
|
73
|
+
broken: string;
|
|
74
|
+
display: string;
|
|
75
|
+
slow: string;
|
|
76
|
+
error_message: string;
|
|
77
|
+
other: string;
|
|
30
78
|
};
|
|
79
|
+
field_title: string;
|
|
80
|
+
placeholder_title: string;
|
|
81
|
+
hint_title: string;
|
|
82
|
+
field_description: string;
|
|
83
|
+
placeholder_description: string;
|
|
84
|
+
error_title: string;
|
|
85
|
+
error_description: string;
|
|
86
|
+
submit: string;
|
|
87
|
+
thanks_title: string;
|
|
88
|
+
thanks_text: string;
|
|
89
|
+
thanks_text_anonymous: string;
|
|
31
90
|
};
|
|
32
91
|
decision: {
|
|
33
92
|
tab: string;
|
|
34
|
-
|
|
93
|
+
title: string;
|
|
94
|
+
subtitle: string;
|
|
95
|
+
filter: string;
|
|
96
|
+
all: string;
|
|
97
|
+
ideas: string;
|
|
98
|
+
issues: string;
|
|
99
|
+
updates: string;
|
|
100
|
+
updates_one: string;
|
|
101
|
+
new_status: string;
|
|
102
|
+
sent_on: string;
|
|
103
|
+
type: {
|
|
104
|
+
issue: string;
|
|
105
|
+
enhancement: string;
|
|
106
|
+
};
|
|
35
107
|
loading: string;
|
|
36
|
-
|
|
37
|
-
|
|
108
|
+
empty_title: string;
|
|
109
|
+
empty_text: string;
|
|
110
|
+
empty_filtered: string;
|
|
111
|
+
propose: string;
|
|
112
|
+
report: string;
|
|
113
|
+
error_title: string;
|
|
114
|
+
error_text: string;
|
|
38
115
|
retry: string;
|
|
39
|
-
|
|
40
|
-
type: {
|
|
41
|
-
issue: string;
|
|
42
|
-
enhancement: string;
|
|
43
|
-
};
|
|
44
|
-
date_prefix: string;
|
|
45
|
-
};
|
|
116
|
+
see: string;
|
|
46
117
|
status: {
|
|
47
118
|
enhancement: {
|
|
48
119
|
loved: string;
|
|
@@ -61,52 +132,57 @@ declare const fr: {
|
|
|
61
132
|
out_of_scope: string;
|
|
62
133
|
};
|
|
63
134
|
};
|
|
64
|
-
form: {
|
|
65
|
-
title: string;
|
|
66
|
-
description: string;
|
|
67
|
-
field: {
|
|
68
|
-
title: string;
|
|
69
|
-
description: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
thanks: {
|
|
73
|
-
title: string;
|
|
74
|
-
description: string;
|
|
75
|
-
};
|
|
76
135
|
};
|
|
77
136
|
feedbot: {
|
|
78
|
-
|
|
137
|
+
region: string;
|
|
138
|
+
bubble_default: string;
|
|
139
|
+
questions: string;
|
|
140
|
+
questions_one: string;
|
|
141
|
+
open: string;
|
|
142
|
+
later: string;
|
|
143
|
+
close_bubble: string;
|
|
144
|
+
progress: string;
|
|
145
|
+
progress_one: string;
|
|
146
|
+
progress_label: string;
|
|
147
|
+
rating_low: string;
|
|
148
|
+
rating_high: string;
|
|
149
|
+
rating_value: string;
|
|
150
|
+
rating_labels: {
|
|
151
|
+
1: string;
|
|
152
|
+
2: string;
|
|
153
|
+
3: string;
|
|
154
|
+
4: string;
|
|
155
|
+
5: string;
|
|
156
|
+
};
|
|
157
|
+
star_label: string;
|
|
79
158
|
rating_error: string;
|
|
159
|
+
choice_error: string;
|
|
160
|
+
quality_error: string;
|
|
161
|
+
anonymous: string;
|
|
162
|
+
anonymous_hint: string;
|
|
80
163
|
cancel: string;
|
|
81
164
|
submit: string;
|
|
82
|
-
bubble_default: string;
|
|
83
|
-
star_label: string;
|
|
84
165
|
thanks: {
|
|
85
166
|
title: string;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
167
|
+
text: string;
|
|
168
|
+
};
|
|
169
|
+
declined: {
|
|
170
|
+
title: string;
|
|
171
|
+
text: string;
|
|
91
172
|
};
|
|
92
173
|
};
|
|
93
|
-
|
|
174
|
+
integration: {
|
|
175
|
+
label: string;
|
|
94
176
|
pending: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
};
|
|
100
|
-
feedbot: {
|
|
101
|
-
title: string;
|
|
102
|
-
text: string;
|
|
103
|
-
};
|
|
177
|
+
title: string;
|
|
178
|
+
text: string;
|
|
179
|
+
later: string;
|
|
180
|
+
start: string;
|
|
104
181
|
};
|
|
105
182
|
checking: {
|
|
106
183
|
title: string;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
feedbot_text: string;
|
|
184
|
+
text: string;
|
|
185
|
+
cancel: string;
|
|
110
186
|
};
|
|
111
187
|
ok: {
|
|
112
188
|
title: string;
|
|
@@ -116,52 +192,37 @@ declare const fr: {
|
|
|
116
192
|
ko: {
|
|
117
193
|
title: string;
|
|
118
194
|
text: string;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
error: {
|
|
123
|
-
communication: {
|
|
124
|
-
title: string;
|
|
125
|
-
description: string;
|
|
195
|
+
copy: string;
|
|
196
|
+
copied: string;
|
|
197
|
+
retry: string;
|
|
126
198
|
};
|
|
127
|
-
|
|
199
|
+
expired: {
|
|
128
200
|
title: string;
|
|
129
|
-
|
|
201
|
+
text: string;
|
|
202
|
+
close: string;
|
|
130
203
|
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
tooltip: string;
|
|
204
|
+
steps: {
|
|
205
|
+
project: string;
|
|
206
|
+
api: string;
|
|
207
|
+
subscription: string;
|
|
136
208
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
209
|
+
state: {
|
|
210
|
+
ok: string;
|
|
211
|
+
run: string;
|
|
212
|
+
err: string;
|
|
213
|
+
wait: string;
|
|
140
214
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
invalid_type: string;
|
|
215
|
+
details: {
|
|
216
|
+
project: string;
|
|
217
|
+
api: string;
|
|
218
|
+
domain: string;
|
|
219
|
+
subscription: string;
|
|
147
220
|
};
|
|
148
221
|
};
|
|
149
222
|
global: {
|
|
150
|
-
date_at: string;
|
|
151
|
-
cancel: string;
|
|
152
|
-
send: string;
|
|
153
223
|
close: string;
|
|
154
|
-
sending: string;
|
|
155
224
|
submit_error: string;
|
|
156
225
|
rate_limited: string;
|
|
157
|
-
required: string;
|
|
158
|
-
required_field: string;
|
|
159
|
-
required_choice: string;
|
|
160
|
-
required_consent: string;
|
|
161
|
-
};
|
|
162
|
-
a11y: {
|
|
163
|
-
feedback_button: string;
|
|
164
|
-
feedbot_bubble: string;
|
|
165
226
|
};
|
|
166
227
|
};
|
|
167
228
|
type Translations = typeof fr;
|
|
@@ -176,12 +237,15 @@ type Locale = typeof Locales[keyof typeof Locales];
|
|
|
176
237
|
declare const messages: Readonly<Record<Locale, Translations>>;
|
|
177
238
|
|
|
178
239
|
type MaybeFunction<T> = T | (() => T);
|
|
240
|
+
type Theme = 'light' | 'dark' | 'auto';
|
|
179
241
|
interface UserType {
|
|
180
242
|
id: string;
|
|
181
243
|
fullName?: string;
|
|
182
244
|
profile?: string;
|
|
183
245
|
}
|
|
184
246
|
|
|
247
|
+
type FeedbackType = 'issue' | 'enhancement';
|
|
248
|
+
type Tab = FeedbackType | 'decision';
|
|
185
249
|
type MaybeHTMLElement = HTMLElement | null | undefined;
|
|
186
250
|
type TargetType = MaybeHTMLElement | {
|
|
187
251
|
feedback?: MaybeHTMLElement;
|
|
@@ -193,51 +257,105 @@ interface FeedbackOptions {
|
|
|
193
257
|
baseApiUrl?: string;
|
|
194
258
|
user?: MaybeFunction<UserType | undefined>;
|
|
195
259
|
locale?: Locale;
|
|
260
|
+
theme?: Theme;
|
|
196
261
|
}
|
|
197
262
|
declare class Feedback {
|
|
198
263
|
private readonly options;
|
|
199
|
-
private
|
|
200
|
-
private
|
|
201
|
-
private
|
|
264
|
+
private readonly abortController;
|
|
265
|
+
private readonly surface;
|
|
266
|
+
private readonly modal;
|
|
267
|
+
private readonly integrationTest;
|
|
268
|
+
private destroyed;
|
|
269
|
+
private launcher;
|
|
270
|
+
private launcherSurface;
|
|
271
|
+
private opening;
|
|
272
|
+
private updatesCount;
|
|
202
273
|
private hasConsentFeedback;
|
|
203
274
|
private hasConsentScreenFeedback;
|
|
204
275
|
private hasConsentAttachment;
|
|
205
|
-
private
|
|
206
|
-
private
|
|
207
|
-
private
|
|
208
|
-
private
|
|
209
|
-
private
|
|
210
|
-
private
|
|
211
|
-
private
|
|
212
|
-
private
|
|
213
|
-
private
|
|
214
|
-
private
|
|
276
|
+
private view;
|
|
277
|
+
private tab;
|
|
278
|
+
private sentType;
|
|
279
|
+
private title;
|
|
280
|
+
private description;
|
|
281
|
+
private category;
|
|
282
|
+
private consent;
|
|
283
|
+
private file;
|
|
284
|
+
private fileError;
|
|
285
|
+
private capture;
|
|
286
|
+
private errors;
|
|
287
|
+
private submitError;
|
|
288
|
+
private sending;
|
|
289
|
+
private startedAt;
|
|
290
|
+
private disclosure;
|
|
215
291
|
private decisions;
|
|
216
292
|
private decisionsStatus;
|
|
293
|
+
private filter;
|
|
294
|
+
private newIds;
|
|
295
|
+
private decisionsViewed;
|
|
217
296
|
constructor(options: FeedbackOptions);
|
|
218
|
-
|
|
297
|
+
private static emptyCapture;
|
|
298
|
+
private get theme();
|
|
299
|
+
private get user();
|
|
300
|
+
private get canFollow();
|
|
301
|
+
private get tabs();
|
|
219
302
|
private get draftKey();
|
|
220
|
-
private
|
|
221
|
-
private
|
|
303
|
+
private get seenKey();
|
|
304
|
+
private get updatesKey();
|
|
305
|
+
destroy(): void;
|
|
306
|
+
showThanks(type?: Tab): void;
|
|
307
|
+
private readonly onLauncherClick;
|
|
222
308
|
private init;
|
|
223
|
-
private
|
|
309
|
+
private setLauncherOpen;
|
|
310
|
+
private renderLauncherBadge;
|
|
311
|
+
private refreshUpdates;
|
|
224
312
|
private startFeedback;
|
|
313
|
+
private openModal;
|
|
314
|
+
private onClosed;
|
|
315
|
+
private resetForm;
|
|
316
|
+
private dropCapture;
|
|
317
|
+
private restoreDraft;
|
|
318
|
+
private saveDraft;
|
|
225
319
|
private loadConsents;
|
|
226
|
-
private loadDecisions;
|
|
227
|
-
private refreshDecisionView;
|
|
228
|
-
showThanks(type?: 'issue' | 'enhancement' | 'decision'): void;
|
|
229
|
-
private render;
|
|
230
320
|
private renderForm;
|
|
231
|
-
private
|
|
232
|
-
private
|
|
233
|
-
private
|
|
321
|
+
private renderTab;
|
|
322
|
+
private renderView;
|
|
323
|
+
private drawView;
|
|
324
|
+
private renderHead;
|
|
325
|
+
private renderFoot;
|
|
234
326
|
private renderFields;
|
|
235
|
-
private
|
|
236
|
-
private
|
|
327
|
+
private invalid;
|
|
328
|
+
private fieldMessage;
|
|
329
|
+
private renderCategories;
|
|
330
|
+
private renderCapture;
|
|
237
331
|
private renderConsent;
|
|
238
|
-
private
|
|
332
|
+
private renderFile;
|
|
333
|
+
private renderDecisions;
|
|
334
|
+
private sortedDecisions;
|
|
335
|
+
private renderCard;
|
|
336
|
+
private renderStatus;
|
|
337
|
+
private renderThanks;
|
|
338
|
+
private bindShell;
|
|
339
|
+
private selectTab;
|
|
340
|
+
private bindView;
|
|
341
|
+
private bindDecisions;
|
|
342
|
+
private bindCapture;
|
|
343
|
+
private refreshCapture;
|
|
344
|
+
private takeCapture;
|
|
345
|
+
private bindFile;
|
|
346
|
+
private setFile;
|
|
347
|
+
private clearError;
|
|
348
|
+
private focusFirstField;
|
|
349
|
+
private fetchDecisions;
|
|
350
|
+
private loadDecisions;
|
|
351
|
+
private refreshDecisions;
|
|
352
|
+
private refreshTabBadge;
|
|
353
|
+
private findNew;
|
|
354
|
+
private readSeen;
|
|
355
|
+
private markSeen;
|
|
356
|
+
private validate;
|
|
239
357
|
private submit;
|
|
240
|
-
private
|
|
358
|
+
private toFormData;
|
|
241
359
|
}
|
|
242
360
|
|
|
243
361
|
interface FeedbotOptions {
|
|
@@ -246,26 +364,55 @@ interface FeedbotOptions {
|
|
|
246
364
|
surveyId: string;
|
|
247
365
|
user?: MaybeFunction<UserType | undefined>;
|
|
248
366
|
locale?: Locale;
|
|
367
|
+
theme?: Theme;
|
|
249
368
|
}
|
|
250
369
|
declare class Feedbot {
|
|
251
|
-
private options;
|
|
252
|
-
private
|
|
253
|
-
private ratingError;
|
|
254
|
-
private submitError;
|
|
255
|
-
private submitErrorKey;
|
|
256
|
-
private survey;
|
|
257
|
-
private apiUrl;
|
|
258
|
-
private previouslyFocusedElement;
|
|
259
|
-
private integrationTest;
|
|
370
|
+
private readonly options;
|
|
371
|
+
private readonly apiUrl;
|
|
260
372
|
private readonly abortController;
|
|
373
|
+
private readonly surface;
|
|
374
|
+
private readonly modal;
|
|
375
|
+
private readonly integrationTest;
|
|
261
376
|
private destroyed;
|
|
262
|
-
|
|
377
|
+
private survey;
|
|
378
|
+
private bubble;
|
|
379
|
+
private toast;
|
|
380
|
+
private toastTimer;
|
|
381
|
+
private rating;
|
|
382
|
+
private quality;
|
|
383
|
+
private closed;
|
|
384
|
+
private anonymous;
|
|
385
|
+
private errors;
|
|
386
|
+
private submitError;
|
|
387
|
+
private sending;
|
|
263
388
|
constructor(options: FeedbotOptions);
|
|
389
|
+
private get theme();
|
|
390
|
+
get user(): UserType | undefined;
|
|
264
391
|
destroy(): void;
|
|
265
392
|
showThanks(declined?: boolean): void;
|
|
266
|
-
private render;
|
|
267
393
|
increment(): Promise<void>;
|
|
268
|
-
|
|
394
|
+
private get questions();
|
|
395
|
+
private showBubble;
|
|
396
|
+
private hideBubble;
|
|
397
|
+
private openSurvey;
|
|
398
|
+
private resetAnswers;
|
|
399
|
+
private get answered();
|
|
400
|
+
private renderProgress;
|
|
401
|
+
private renderSurvey;
|
|
402
|
+
private error;
|
|
403
|
+
private renderRating;
|
|
404
|
+
private renderRatingHelp;
|
|
405
|
+
private renderQuality;
|
|
406
|
+
private renderClosed;
|
|
407
|
+
private bindSurvey;
|
|
408
|
+
private updateStars;
|
|
409
|
+
private updateProgress;
|
|
410
|
+
private clearError;
|
|
411
|
+
private validate;
|
|
412
|
+
private send;
|
|
413
|
+
private toJson;
|
|
414
|
+
private showToast;
|
|
415
|
+
private hideToast;
|
|
269
416
|
}
|
|
270
417
|
|
|
271
418
|
export { Feedback, Feedbot, Locales, messages };
|