@athome-solution/feedjet 2.7.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/dist/index.d.cts CHANGED
@@ -1,48 +1,119 @@
1
1
  declare const fr: {
2
- issue: {
3
- tab: string;
4
- form: {
5
- title: string;
6
- description: string;
7
- field: {
8
- title: string;
9
- description: string;
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
- thanks: {
13
- title: string;
14
- description: string;
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
- form: {
20
- title: string;
21
- description: string;
22
- field: {
23
- title: string;
24
- description: string;
25
- };
26
- };
27
- thanks: {
28
- title: string;
29
- description: string;
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
- description: string;
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
- empty: string;
37
- error: string;
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
- card: {
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
- anonymous: string;
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
- sub_title: string;
87
- declined: {
88
- title: string;
89
- sub_title: string;
90
- };
167
+ text: string;
168
+ };
169
+ declined: {
170
+ title: string;
171
+ text: string;
91
172
  };
92
173
  };
93
- integration_test: {
174
+ integration: {
175
+ label: string;
94
176
  pending: {
95
- button: string;
96
- feedback: {
97
- title: string;
98
- text: string;
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
- button: string;
108
- feedback_text: string;
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
- button: string;
195
+ copy: string;
196
+ copied: string;
197
+ retry: string;
120
198
  };
121
- };
122
- error: {
123
- communication: {
199
+ expired: {
124
200
  title: string;
125
- description: string;
201
+ text: string;
202
+ close: string;
126
203
  };
127
- no_subscription: {
128
- title: string;
129
- description: string;
204
+ steps: {
205
+ project: string;
206
+ api: string;
207
+ subscription: string;
130
208
  };
131
- };
132
- consent: {
133
- feedback: {
134
- label: string;
135
- tooltip: string;
209
+ state: {
210
+ ok: string;
211
+ run: string;
212
+ err: string;
213
+ wait: string;
136
214
  };
137
- screen: {
138
- label: string;
139
- tooltip: string;
140
- };
141
- attachment: {
142
- button: string;
143
- no_file: string;
144
- tooltip: string;
145
- file_too_large: string;
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;
@@ -183,6 +244,8 @@ interface UserType {
183
244
  profile?: string;
184
245
  }
185
246
 
247
+ type FeedbackType = 'issue' | 'enhancement';
248
+ type Tab = FeedbackType | 'decision';
186
249
  type MaybeHTMLElement = HTMLElement | null | undefined;
187
250
  type TargetType = MaybeHTMLElement | {
188
251
  feedback?: MaybeHTMLElement;
@@ -198,49 +261,101 @@ interface FeedbackOptions {
198
261
  }
199
262
  declare class Feedback {
200
263
  private readonly options;
201
- private get theme();
202
- private form;
203
- private submitError;
204
- private submitErrorKey;
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;
205
273
  private hasConsentFeedback;
206
274
  private hasConsentScreenFeedback;
207
275
  private hasConsentAttachment;
208
- private feedbackButton;
209
- private createdButtonWrapper;
210
- private opening;
211
- private readonly onFeedbackButtonClick;
212
- private submitHandler;
213
- private state;
214
- private readonly abortController;
215
- private destroyed;
216
- private previouslyFocusedElement;
217
- private integrationTest;
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;
218
291
  private decisions;
219
292
  private decisionsStatus;
293
+ private filter;
294
+ private newIds;
295
+ private decisionsViewed;
220
296
  constructor(options: FeedbackOptions);
221
- destroy(): void;
297
+ private static emptyCapture;
298
+ private get theme();
299
+ private get user();
300
+ private get canFollow();
301
+ private get tabs();
222
302
  private get draftKey();
223
- private restoreDraft;
224
- private saveDraft;
303
+ private get seenKey();
304
+ private get updatesKey();
305
+ destroy(): void;
306
+ showThanks(type?: Tab): void;
307
+ private readonly onLauncherClick;
225
308
  private init;
226
- private createFeedbackButton;
309
+ private setLauncherOpen;
310
+ private renderLauncherBadge;
311
+ private refreshUpdates;
227
312
  private startFeedback;
313
+ private openModal;
314
+ private onClosed;
315
+ private resetForm;
316
+ private dropCapture;
317
+ private restoreDraft;
318
+ private saveDraft;
228
319
  private loadConsents;
229
- private loadDecisions;
230
- private refreshDecisionView;
231
- showThanks(type?: 'issue' | 'enhancement' | 'decision'): void;
232
- private render;
233
320
  private renderForm;
234
- private updateFormContent;
235
- private renderThanks;
236
- private renderTabs;
321
+ private renderTab;
322
+ private renderView;
323
+ private drawView;
324
+ private renderHead;
325
+ private renderFoot;
237
326
  private renderFields;
238
- private renderDecisionList;
239
- private renderDecisionCard;
327
+ private invalid;
328
+ private fieldMessage;
329
+ private renderCategories;
330
+ private renderCapture;
240
331
  private renderConsent;
241
- private attachFormEvents;
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;
242
357
  private submit;
243
- private formatDecisionDate;
358
+ private toFormData;
244
359
  }
245
360
 
246
361
  interface FeedbotOptions {
@@ -252,25 +367,52 @@ interface FeedbotOptions {
252
367
  theme?: Theme;
253
368
  }
254
369
  declare class Feedbot {
255
- private options;
256
- private get theme();
257
- private form;
258
- private ratingError;
259
- private submitError;
260
- private submitErrorKey;
261
- private survey;
262
- private apiUrl;
263
- private previouslyFocusedElement;
264
- private integrationTest;
370
+ private readonly options;
371
+ private readonly apiUrl;
265
372
  private readonly abortController;
373
+ private readonly surface;
374
+ private readonly modal;
375
+ private readonly integrationTest;
266
376
  private destroyed;
267
- get user(): UserType | undefined;
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;
268
388
  constructor(options: FeedbotOptions);
389
+ private get theme();
390
+ get user(): UserType | undefined;
269
391
  destroy(): void;
270
392
  showThanks(declined?: boolean): void;
271
- private render;
272
393
  increment(): Promise<void>;
273
- submit(): Promise<void>;
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;
274
416
  }
275
417
 
276
418
  export { Feedback, Feedbot, Locales, messages };