@athome-solution/feedjet 2.1.7 → 2.1.8
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 +4 -0
- package/dist/index.d.ts +5 -80
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -14,6 +14,10 @@ Widgets to collect user feedback (Feedback) and survey responses (Feedbot).
|
|
|
14
14
|
npm install @athome-solution/feedjet
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
### Requirements
|
|
18
|
+
|
|
19
|
+
TypeScript projects must use **TypeScript 3.8 or later**. The published type declarations rely on `import type` / `export type` syntax introduced in TS 3.8. Plain JavaScript projects have no version requirement.
|
|
20
|
+
|
|
17
21
|
## Quick Start
|
|
18
22
|
|
|
19
23
|
**Feedback**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,80 +1,5 @@
|
|
|
1
|
-
type Locale
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
fullName?: string;
|
|
7
|
-
profile?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
type MaybeHTMLElement = HTMLElement | null | undefined;
|
|
11
|
-
type TargetType = MaybeHTMLElement | {
|
|
12
|
-
feedback?: MaybeHTMLElement;
|
|
13
|
-
};
|
|
14
|
-
interface FeedbackOptions {
|
|
15
|
-
target: TargetType;
|
|
16
|
-
projectId: string;
|
|
17
|
-
apiUrl?: string;
|
|
18
|
-
baseApiUrl?: string;
|
|
19
|
-
user?: MaybeFunction<UserType | undefined>;
|
|
20
|
-
locale?: Locale;
|
|
21
|
-
}
|
|
22
|
-
declare class Feedback {
|
|
23
|
-
private readonly options;
|
|
24
|
-
private form;
|
|
25
|
-
private submitError;
|
|
26
|
-
private hasConsentFeedback;
|
|
27
|
-
private hasConsentScreenFeedback;
|
|
28
|
-
private hasConsentAttachment;
|
|
29
|
-
private isFeedbackButtonInitialized;
|
|
30
|
-
private submitHandler;
|
|
31
|
-
private previouslyFocusedElement;
|
|
32
|
-
private integrationTest;
|
|
33
|
-
private decisions;
|
|
34
|
-
private decisionsLoading;
|
|
35
|
-
constructor(options: FeedbackOptions);
|
|
36
|
-
private init;
|
|
37
|
-
private createFeedbackButton;
|
|
38
|
-
private startFeedback;
|
|
39
|
-
private loadConsents;
|
|
40
|
-
private fetchDecisions;
|
|
41
|
-
showThanks(type?: 'issue' | 'enhancement' | 'decision'): void;
|
|
42
|
-
private render;
|
|
43
|
-
private renderForm;
|
|
44
|
-
private updateFormContent;
|
|
45
|
-
private renderThanks;
|
|
46
|
-
private renderTabs;
|
|
47
|
-
private renderFields;
|
|
48
|
-
private renderDecisionList;
|
|
49
|
-
private renderDecisionCard;
|
|
50
|
-
private renderConsent;
|
|
51
|
-
private attachFormEvents;
|
|
52
|
-
private submit;
|
|
53
|
-
private formatDecisionDate;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
interface FeedbotOptions {
|
|
57
|
-
apiUrl?: string;
|
|
58
|
-
baseApiUrl?: string;
|
|
59
|
-
surveyId: string;
|
|
60
|
-
user?: MaybeFunction<UserType | undefined>;
|
|
61
|
-
locale?: Locale;
|
|
62
|
-
}
|
|
63
|
-
declare class Feedbot {
|
|
64
|
-
private options;
|
|
65
|
-
private form;
|
|
66
|
-
private ratingError;
|
|
67
|
-
private submitError;
|
|
68
|
-
private survey;
|
|
69
|
-
private apiUrl;
|
|
70
|
-
private previouslyFocusedElement;
|
|
71
|
-
private integrationTest;
|
|
72
|
-
get user(): UserType | undefined;
|
|
73
|
-
constructor(options: FeedbotOptions);
|
|
74
|
-
showThanks(declined?: boolean): void;
|
|
75
|
-
private render;
|
|
76
|
-
increment(): Promise<void>;
|
|
77
|
-
submit(): Promise<void>;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export { Feedback, Feedbot, type Locale };
|
|
1
|
+
import type { Locale } from './i18n';
|
|
2
|
+
import { Feedback } from './feedback';
|
|
3
|
+
import { Feedbot } from './feedbot';
|
|
4
|
+
export { Feedback, Feedbot };
|
|
5
|
+
export type { Locale };
|