fansunited-widget-poll 2.9.0 → 2.10.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 +23 -1
- package/components/Management/Options/Option.d.ts +1 -0
- package/components/Management/Options/Options.d.ts +2 -0
- package/components/Management/Options/PreferenceMappings.d.ts +9 -0
- package/factories/PollFactory.d.ts +1 -0
- package/models/Features/Features.d.ts +2 -0
- package/models/Labels/LabelsModel.d.ts +11 -0
- package/models/Preferences/ProfilePreferences.d.ts +14 -0
- package/models/RequestBody/RequestBody.d.ts +8 -0
- package/package.json +1 -1
- package/poll-manager.es.js +31719 -26672
- package/poll-manager.umd.js +1245 -255
package/README.md
CHANGED
|
@@ -274,6 +274,17 @@ const labels = {
|
|
|
274
274
|
copyToClipboard: 'Copy to clipboard',
|
|
275
275
|
divElementTextInfo: "The generated embed code can be copied directly into your website's HTML. For comprehensive implementation details, visit our documentation: ",
|
|
276
276
|
widgetEmbedCodeNotAvailable: 'To configure embed code you need to first create your poll.'
|
|
277
|
+
enableMultipleChoice: 'Enable multiple choice'
|
|
278
|
+
enableMultipleChoiceDescription: 'When enabled, users can select multiple options in the poll.'
|
|
279
|
+
maximumOptions: 'Maximum options'
|
|
280
|
+
maximumOptionsDescription: 'Set the maximum number of options a user can select in a multiple choice poll.'
|
|
281
|
+
votesTooltipContent: 'Total number of votes received in poll'
|
|
282
|
+
participationsTooltipContent: 'Number of unique users who have participated in poll'
|
|
283
|
+
profilePreferencesMapping: 'Profile preferences mapping',
|
|
284
|
+
profilePreferencesMappingEnabledDescription: 'Allows to create polls that collect user preference data. Users answer polls while you gather insights about their brand, product, and lifestyle preferences.',
|
|
285
|
+
profilePreferencesMappingDisabledDescription: 'The "profile preferences" feature is disabled! To enabled it, contact the Fans United team.',
|
|
286
|
+
preferenceMapping: 'Preference mapping',
|
|
287
|
+
uncategorized: 'Uncategorized',
|
|
277
288
|
};
|
|
278
289
|
|
|
279
290
|
const App = () => {
|
|
@@ -485,4 +496,15 @@ Here is all information about **`LabelsModel`**:
|
|
|
485
496
|
| `campaignNameInfoMessage` | Tooltip info text for campaign name input field | A label for your campaign that will appear in the reports. You can use anything here. Example: "Adidas (December 2025)" |
|
|
486
497
|
| `copyToClipboard` | Div text button tooltip text in embed code acordion | Copy to clipboard |
|
|
487
498
|
| `divElementTextInfo` | Helper text for div content in embed code acordion | The generated embed code can be copied directly into your website's HTML. For comprehensive implementation details, visit our documentation: |
|
|
488
|
-
| `widgetEmbedCodeNotAvailable` | Paragraph when trying to configure widget embed code for not created Poll | To configure embed code you need to first create your poll. |
|
|
499
|
+
| `widgetEmbedCodeNotAvailable` | Paragraph when trying to configure widget embed code for not created Poll | To configure embed code you need to first create your poll. |
|
|
500
|
+
| `enableMultipleChoice` | Label for enable multiple choice toggle switch | Enable multiple choice |
|
|
501
|
+
| `enableMultipleChoiceDescription` | Description paragraph for enable multiple choice toggle switch | When enabled, users can select multiple options in the poll. |
|
|
502
|
+
| `maximumOptions` | Label for maximum options number input | Maximum options |
|
|
503
|
+
| `maximumOptionsDescription` | Description paragraph for maximum options number input | Set the maximum number of options a user can select in a multiple choice poll. |
|
|
504
|
+
| `votesTooltipContent` | Tooltip info content for votes table header | Total number of votes received in poll |
|
|
505
|
+
| `participationsTooltipContent` | Tooltip info content for participations table header | Number of unique users who have participated in poll |
|
|
506
|
+
| `profilePreferencesMapping` | Label for toggle switch for enabling profile preferences mapping | Profile preferences mapping |
|
|
507
|
+
| `profilePreferencesMappingEnabledDescription` | Description when "profile preference" feature is enabled | Allows to create polls that collect user preference data. Users answer polls while you gather insights about their brand, product, and lifestyle preferences. |
|
|
508
|
+
| `profilePreferencesMappingDisabledDescription` | Description when "profile preference" feature is disabled | The "profile preferences" feature is disabled! To enabled it, contact the Fans United team. |
|
|
509
|
+
| `preferenceMapping` | Label for autocomplete preference mapping input | Preference mapping |
|
|
510
|
+
| `uncategorized` | Label for category preference option when preference doesn't have any category specified | Uncategorized |
|
|
@@ -3,8 +3,10 @@ import { IPollOption } from '../../../models/RequestBody/RequestBody';
|
|
|
3
3
|
type OptionsProps = {
|
|
4
4
|
isEditMode: boolean;
|
|
5
5
|
isPollVoted: boolean;
|
|
6
|
+
isPollProfilePreferencesEnabled: boolean;
|
|
6
7
|
options: IPollOption[];
|
|
7
8
|
onChange: (options: IPollOption[]) => void;
|
|
9
|
+
onChangePreferencesEnabled: (preferencesEnabled: boolean) => void;
|
|
8
10
|
};
|
|
9
11
|
declare const Options: React.FC<OptionsProps>;
|
|
10
12
|
export default Options;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IPreferenceMapping } from '../../../models/RequestBody/RequestBody';
|
|
3
|
+
type PreferenceMappingsProps = {
|
|
4
|
+
isPollProfilePreferencesEnabled: boolean;
|
|
5
|
+
preferenceMappings: IPreferenceMapping[];
|
|
6
|
+
onChange: (preferenceMappings: IPreferenceMapping[]) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const PreferenceMappings: React.FC<PreferenceMappingsProps>;
|
|
9
|
+
export default PreferenceMappings;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IProfilePreferences } from '../Preferences/ProfilePreferences';
|
|
1
2
|
export interface IType {
|
|
2
3
|
id: string;
|
|
3
4
|
label: string;
|
|
@@ -15,4 +16,5 @@ export default class Features {
|
|
|
15
16
|
types: IType[];
|
|
16
17
|
languageConfig: ILanguageConfig;
|
|
17
18
|
authRequirement: string;
|
|
19
|
+
preferences: IProfilePreferences;
|
|
18
20
|
}
|
|
@@ -201,5 +201,16 @@ export default class LabelsModel {
|
|
|
201
201
|
copyToClipboard: string;
|
|
202
202
|
divElementTextInfo: string;
|
|
203
203
|
widgetEmbedCodeNotAvailable: string;
|
|
204
|
+
enableMultipleChoice: string;
|
|
205
|
+
enableMultipleChoiceDescription: string;
|
|
206
|
+
maximumOptions: string;
|
|
207
|
+
maximumOptionsDescription: string;
|
|
208
|
+
votesTooltipContent: string;
|
|
209
|
+
participationsTooltipContent: string;
|
|
210
|
+
profilePreferencesMapping: string;
|
|
211
|
+
profilePreferencesMappingEnabledDescription: string;
|
|
212
|
+
profilePreferencesMappingDisabledDescription: string;
|
|
213
|
+
preferenceMapping: string;
|
|
214
|
+
uncategorized: string;
|
|
204
215
|
constructor(labels?: LabelsModel);
|
|
205
216
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Category {
|
|
2
|
+
id: string;
|
|
3
|
+
display_name: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Preference {
|
|
6
|
+
id: string;
|
|
7
|
+
display_name: string;
|
|
8
|
+
categories: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface IProfilePreferences {
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
preferences: Preference[];
|
|
13
|
+
categories: Category[];
|
|
14
|
+
}
|
|
@@ -27,6 +27,9 @@ export interface IBrandingImages {
|
|
|
27
27
|
mobile_background_image: string;
|
|
28
28
|
additional_image: string;
|
|
29
29
|
}
|
|
30
|
+
export interface IPreferenceMapping {
|
|
31
|
+
preference_id: string;
|
|
32
|
+
}
|
|
30
33
|
export interface IPollOption {
|
|
31
34
|
id: string;
|
|
32
35
|
title: string;
|
|
@@ -34,6 +37,7 @@ export interface IPollOption {
|
|
|
34
37
|
images: ImagesModel;
|
|
35
38
|
votes: number;
|
|
36
39
|
embed_code: string | null;
|
|
40
|
+
preferences_mapping: IPreferenceMapping[];
|
|
37
41
|
}
|
|
38
42
|
export interface IRelation {
|
|
39
43
|
entity_id: string;
|
|
@@ -61,4 +65,8 @@ export default class RequestBody {
|
|
|
61
65
|
context: ContextModel;
|
|
62
66
|
options: IPollOption[];
|
|
63
67
|
related: IRelation[];
|
|
68
|
+
multiple_choice: boolean;
|
|
69
|
+
max_multiple_choice_options: number | null;
|
|
70
|
+
participation_count: number;
|
|
71
|
+
preferences_enabled: boolean;
|
|
64
72
|
}
|