@athome-solution/feedjet 3.0.0-rc.0 → 3.0.0-rc.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/dist/index.d.cts CHANGED
@@ -6,7 +6,7 @@ declare const fr: {
6
6
  };
7
7
  form: {
8
8
  tablist: string;
9
- version: string;
9
+ credit: string;
10
10
  cancel: string;
11
11
  close: string;
12
12
  sending: string;
@@ -99,6 +99,10 @@ declare const fr: {
99
99
  updates: string;
100
100
  updates_one: string;
101
101
  new_status: string;
102
+ new_reply: string;
103
+ reply: string;
104
+ more: string;
105
+ less: string;
102
106
  sent_on: string;
103
107
  type: {
104
108
  issue: string;
@@ -258,8 +262,16 @@ interface FeedbackOptions {
258
262
  user?: MaybeFunction<UserType | undefined>;
259
263
  locale?: Locale;
260
264
  theme?: Theme;
265
+ removeCredit?: boolean;
266
+ onOpen?: () => void;
267
+ onClose?: () => void;
268
+ onSubmit?: (feedback: {
269
+ type: FeedbackType;
270
+ }) => void;
271
+ onUpdates?: (count: number) => void;
261
272
  }
262
273
  declare class Feedback {
274
+ private i18n;
263
275
  private readonly options;
264
276
  private readonly abortController;
265
277
  private readonly surface;
@@ -291,9 +303,11 @@ declare class Feedback {
291
303
  private decisions;
292
304
  private decisionsStatus;
293
305
  private filter;
306
+ private expanded;
294
307
  private newIds;
295
308
  private decisionsViewed;
296
309
  constructor(options: FeedbackOptions);
310
+ private launcherFace;
297
311
  private static emptyCapture;
298
312
  private get theme();
299
313
  private get user();
@@ -304,10 +318,18 @@ declare class Feedback {
304
318
  private get updatesKey();
305
319
  destroy(): void;
306
320
  showThanks(type?: Tab): void;
321
+ open(tab?: Tab): Promise<void>;
322
+ close(): Promise<void>;
323
+ setLocale(locale: Locale): void;
324
+ setTheme(theme: Theme): void;
325
+ setUser(user: FeedbackOptions['user']): void;
326
+ private rerender;
307
327
  private readonly onLauncherClick;
308
328
  private init;
329
+ private readonly placeLauncherLabel;
309
330
  private setLauncherOpen;
310
331
  private renderLauncherBadge;
332
+ private setUpdatesCount;
311
333
  private refreshUpdates;
312
334
  private startFeedback;
313
335
  private openModal;
@@ -365,8 +387,16 @@ interface FeedbotOptions {
365
387
  user?: MaybeFunction<UserType | undefined>;
366
388
  locale?: Locale;
367
389
  theme?: Theme;
390
+ removeCredit?: boolean;
391
+ onOpen?: () => void;
392
+ onClose?: () => void;
393
+ onAnswer?: (answer: {
394
+ status: AnswerStatus;
395
+ }) => void;
368
396
  }
397
+ type AnswerStatus = 'SENT' | 'DECLINED';
369
398
  declare class Feedbot {
399
+ private i18n;
370
400
  private readonly options;
371
401
  private readonly apiUrl;
372
402
  private readonly abortController;
@@ -393,10 +423,19 @@ declare class Feedbot {
393
423
  increment(): Promise<void>;
394
424
  private get questions();
395
425
  private showBubble;
426
+ private get snoozeKey();
427
+ private get snoozed();
428
+ private snooze;
396
429
  private hideBubble;
430
+ open(): boolean;
431
+ close(): Promise<void>;
432
+ setLocale(locale: Locale): void;
433
+ setTheme(theme: Theme): void;
434
+ setUser(user: FeedbotOptions['user']): void;
397
435
  private openSurvey;
398
436
  private resetAnswers;
399
437
  private get answered();
438
+ private get progressPercent();
400
439
  private renderProgress;
401
440
  private renderSurvey;
402
441
  private error;
@@ -416,4 +455,4 @@ declare class Feedbot {
416
455
  }
417
456
 
418
457
  export { Feedback, Feedbot, Locales, messages };
419
- export type { Locale, Translations };
458
+ export type { Tab as FeedbackTab, Locale, Translations };
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ declare const fr: {
6
6
  };
7
7
  form: {
8
8
  tablist: string;
9
- version: string;
9
+ credit: string;
10
10
  cancel: string;
11
11
  close: string;
12
12
  sending: string;
@@ -99,6 +99,10 @@ declare const fr: {
99
99
  updates: string;
100
100
  updates_one: string;
101
101
  new_status: string;
102
+ new_reply: string;
103
+ reply: string;
104
+ more: string;
105
+ less: string;
102
106
  sent_on: string;
103
107
  type: {
104
108
  issue: string;
@@ -258,8 +262,16 @@ interface FeedbackOptions {
258
262
  user?: MaybeFunction<UserType | undefined>;
259
263
  locale?: Locale;
260
264
  theme?: Theme;
265
+ removeCredit?: boolean;
266
+ onOpen?: () => void;
267
+ onClose?: () => void;
268
+ onSubmit?: (feedback: {
269
+ type: FeedbackType;
270
+ }) => void;
271
+ onUpdates?: (count: number) => void;
261
272
  }
262
273
  declare class Feedback {
274
+ private i18n;
263
275
  private readonly options;
264
276
  private readonly abortController;
265
277
  private readonly surface;
@@ -291,9 +303,11 @@ declare class Feedback {
291
303
  private decisions;
292
304
  private decisionsStatus;
293
305
  private filter;
306
+ private expanded;
294
307
  private newIds;
295
308
  private decisionsViewed;
296
309
  constructor(options: FeedbackOptions);
310
+ private launcherFace;
297
311
  private static emptyCapture;
298
312
  private get theme();
299
313
  private get user();
@@ -304,10 +318,18 @@ declare class Feedback {
304
318
  private get updatesKey();
305
319
  destroy(): void;
306
320
  showThanks(type?: Tab): void;
321
+ open(tab?: Tab): Promise<void>;
322
+ close(): Promise<void>;
323
+ setLocale(locale: Locale): void;
324
+ setTheme(theme: Theme): void;
325
+ setUser(user: FeedbackOptions['user']): void;
326
+ private rerender;
307
327
  private readonly onLauncherClick;
308
328
  private init;
329
+ private readonly placeLauncherLabel;
309
330
  private setLauncherOpen;
310
331
  private renderLauncherBadge;
332
+ private setUpdatesCount;
311
333
  private refreshUpdates;
312
334
  private startFeedback;
313
335
  private openModal;
@@ -365,8 +387,16 @@ interface FeedbotOptions {
365
387
  user?: MaybeFunction<UserType | undefined>;
366
388
  locale?: Locale;
367
389
  theme?: Theme;
390
+ removeCredit?: boolean;
391
+ onOpen?: () => void;
392
+ onClose?: () => void;
393
+ onAnswer?: (answer: {
394
+ status: AnswerStatus;
395
+ }) => void;
368
396
  }
397
+ type AnswerStatus = 'SENT' | 'DECLINED';
369
398
  declare class Feedbot {
399
+ private i18n;
370
400
  private readonly options;
371
401
  private readonly apiUrl;
372
402
  private readonly abortController;
@@ -393,10 +423,19 @@ declare class Feedbot {
393
423
  increment(): Promise<void>;
394
424
  private get questions();
395
425
  private showBubble;
426
+ private get snoozeKey();
427
+ private get snoozed();
428
+ private snooze;
396
429
  private hideBubble;
430
+ open(): boolean;
431
+ close(): Promise<void>;
432
+ setLocale(locale: Locale): void;
433
+ setTheme(theme: Theme): void;
434
+ setUser(user: FeedbotOptions['user']): void;
397
435
  private openSurvey;
398
436
  private resetAnswers;
399
437
  private get answered();
438
+ private get progressPercent();
400
439
  private renderProgress;
401
440
  private renderSurvey;
402
441
  private error;
@@ -416,4 +455,4 @@ declare class Feedbot {
416
455
  }
417
456
 
418
457
  export { Feedback, Feedbot, Locales, messages };
419
- export type { Locale, Translations };
458
+ export type { Tab as FeedbackTab, Locale, Translations };