fansunited-widget-poll 2.12.3 → 2.14.0-RC1

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 CHANGED
@@ -275,13 +275,23 @@ const labels = {
275
275
  campaignNameInfoMessage: 'A label for your campaign that will appear in the reports. You can use anything here. Example: "Adidas (December 2025)"',
276
276
  copyToClipboard: 'Copy to clipboard',
277
277
  divElementTextInfo: "The generated embed code can be copied directly into your website's HTML. For comprehensive implementation details, visit our documentation: ",
278
- widgetEmbedCodeNotAvailable: 'To configure embed code you need to first create your poll.'
279
- enableMultipleChoice: 'Enable multiple choice'
280
- enableMultipleChoiceDescription: 'When enabled, users can select multiple options in the poll.'
281
- maximumOptions: 'Maximum options'
282
- maximumOptionsDescription: 'Set the maximum number of options a user can select in a multiple choice poll.'
283
- votesTooltipContent: 'Total number of votes received in poll'
284
- participationsTooltipContent: 'Number of unique users who have participated in poll'
278
+ widgetEmbedCodeNotAvailable: 'To configure embed code you need to first create your poll.',
279
+ layoutTemplate: 'Layout template',
280
+ layoutTemplateDescription: `Standard: image takes 30% width with configurable position. Split: image takes 50% width on the left. Overlay: image as background with content overlay.`,
281
+ imagePosition: 'Image position',
282
+ imagePositionDescription: 'Position of the image relative to the main content (only available for Standard layout).',
283
+ signInLabel: 'Label',
284
+ signInLabelInfoMessage: `Custom text displayed on the sign-in button. If empty, defaults to "Sign in to vote".`,
285
+ authenticationHandler: 'Authentication handler',
286
+ authenticationHandlerInfoMessage: 'JavaScript function code that executes when users click the sign-in button. To evaluate the function, provide only the function name. Example: showLoginModal() or window.openAuth(). The function is required otherwise the sign-in button will just log dummy message in the console.',
287
+ configureSignIn: 'Configure sign-in options',
288
+ configureSignInDisabledMessage: `Configure sign-in options is enabled only when the authentication requirement is set to “Registered”.`,
289
+ enableMultipleChoice: 'Enable multiple choice',
290
+ enableMultipleChoiceDescription: 'When enabled, users can select multiple options in the poll.',
291
+ maximumOptions: 'Maximum options',
292
+ maximumOptionsDescription: 'Set the maximum number of options a user can select in a multiple choice poll.',
293
+ votesTooltipContent: 'Total number of votes received in poll',
294
+ participationsTooltipContent: 'Number of unique users who have participated in poll',
285
295
  profilePreferencesMapping: 'Profile preferences mapping',
286
296
  profilePreferencesMappingEnabledDescription: 'Allows to create polls that collect user preference data. Users answer polls while you gather insights about their brand, product, and lifestyle preferences.',
287
297
  profilePreferencesMappingDisabledDescription: 'The "profile preferences" feature is disabled! To enabled it, contact the Fans United team.',
@@ -290,7 +300,24 @@ const labels = {
290
300
  maxAttempts: 'Maximum attempts',
291
301
  maxAttemptsDescription: `Set the maximum number of attempts a user can make in the poll. When set to -1, there is no limit. When it's different from 1, the poll CAN'T be set with multiple choice`,
292
302
  externalActivity: "External activity",
293
- externalActivityDescription: "SKU identifier required for users to vote in paid poll. Must not contain special characters. Cannot be changed once poll has votes."
303
+ externalActivityDescription: "SKU identifier required for users to vote in paid poll. Must not contain special characters. Cannot be changed once poll has votes.",
304
+ createWithAi: 'Create with AI',
305
+ generateFootballPostMatchLabel: '⚽ Football Post-Match',
306
+ generateFootballPostMatchModalTitle: 'Football Post-Match Poll',
307
+ teamsSelectionPlaceholder: 'Search teams by name...',
308
+ searchTeamsErrorMessage: 'There was a problem searching teams.',
309
+ targetLanguageDescription: 'Select the language in which the AI will create the entity.',
310
+ searchMatch: 'Search match',
311
+ useFramingGuidelinesLabel: 'Use "Framing guidelines". This way, the last selected team\'s name will be replaced with "we/us/our" in questions and by first-person pronouns in options.',
312
+ onEntityGenerateErrorMessage: 'Failed to generate AI content. Please try again',
313
+ noPreviewAvailable: 'No preview available. Click Regenerate or select a different match.',
314
+ engagementScore: 'Engagement score',
315
+ noMatchesFound: 'No matches found for the selected filters.',
316
+ page: 'Page',
317
+ of: 'of',
318
+ total: 'total',
319
+ generate: 'Generate',
320
+ regenerate: 'Regenerate'
294
321
  };
295
322
 
296
323
  const App = () => {
@@ -505,6 +532,16 @@ Here is all information about **`LabelsModel`**:
505
532
  | `copyToClipboard` | Div text button tooltip text in embed code acordion | Copy to clipboard |
506
533
  | `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: |
507
534
  | `widgetEmbedCodeNotAvailable` | Paragraph when trying to configure widget embed code for not created Poll | To configure embed code you need to first create your poll. |
535
+ | `layoutTemplate` | Label for layout template select | Layout template |
536
+ | `layoutTemplateDescription` | Description for layout template select | Standard: image takes 30% width with configurable position. Split: image takes 50% width on the left. Overlay: image as background with content overlay. |
537
+ | `imagePosition` | Label for image position select | Image position |
538
+ | `imagePositionDescription` | Description for image position select | Position of the image relative to the main content (only available for Standard layout). |
539
+ | `signInLabel` | Label for sign in label input | Label |
540
+ | `signInLabelInfoMessage` | Info tooltip message for sign in label input | Custom text displayed on the sign-in button. If empty, defaults to "Sign in to vote". |
541
+ | `authenticationHandler` | Label for authentication handler | Authentication handler |
542
+ | `authenticationHandlerInfoMessage` | Info tooltip message for authentication handler | JavaScript function code that executes when users click the sign-in button. To evaluate the function, provide only the function name. Example: showLoginModal() or window.openAuth(). The function is required otherwise the sign-in button will just log dummy message in the console. |
543
+ | `configureSignIn` | Label for configure sign in switch | Configure sign-in options |
544
+ | `configureSignInDisabledMessage` | Info tooltiup message when configure sign in is disabled | Configure sign-in options is enabled only when the authentication requirement is set to “Registered”. |
508
545
  | `enableMultipleChoice` | Label for enable multiple choice toggle switch | Enable multiple choice |
509
546
  | `enableMultipleChoiceDescription` | Description paragraph for enable multiple choice toggle switch | When enabled, users can select multiple options in the poll. |
510
547
  | `maximumOptions` | Label for maximum options number input | Maximum options |
@@ -516,7 +553,24 @@ Here is all information about **`LabelsModel`**:
516
553
  | `profilePreferencesMappingDisabledDescription` | Description when "profile preference" feature is disabled | The "profile preferences" feature is disabled! To enabled it, contact the Fans United team. |
517
554
  | `preferenceMapping` | Label for autocomplete preference mapping input | Preference mapping |
518
555
  | `uncategorized` | Label for category preference option when preference doesn't have any category specified | Uncategorized |
519
- | `maxAttempts` | Label for max attempts number input | Max attempts |
556
+ | `maxAttempts` | Label for max attempts number input | Maximum attempts |
520
557
  | `maxAttemptsDescription` | Description for max attempts number input | Set the maximum number of attempts a user can make in the poll. When set to -1, there is no limit. When it's different from 1, the poll CAN'T be set with multiple choice |
521
- | `maxAttempts` | Label for external activity input | External activity |
522
- | `maxAttemptsDescription` | Description for external activity input | SKU identifier required for users to vote in paid poll. Must not contain special characters. Cannot be changed once poll has votes. |
558
+ | `externalActivity` | Label for external activity input | External activity |
559
+ | `externalActivityDescription` | Description for external activity input | SKU identifier required for users to vote in paid poll. Must not contain special characters. Cannot be changed once poll has votes. |
560
+ | `createWithAi` | Label for create with AI button | Create with AI |
561
+ | `generateFootballPostMatchLabel` | Label for AI creation option | ⚽ Football Post-Match |
562
+ | `generateFootballPostMatchModalTitle` | Title for AI football post-match poll generation modal | Football Post-Match Poll |
563
+ | `teamsSelectionPlaceholder` | Placeholder for teams selection input in AI generation modal | Search teams by name... |
564
+ | `searchTeamsErrorMessage` | Error message when searching teams fails in AI generation | There was a problem searching teams. |
565
+ | `targetLanguageDescription` | Description for target language selection in AI generation | Select the language in which the AI will create the entity. |
566
+ | `searchMatch` | Label for search match functionality in AI generation | Search match |
567
+ | `useFramingGuidelinesLabel` | Label for framing guidelines checkbox in AI generation | Use "Framing guidelines". This way, the last selected team's name will be replaced with "we/us/our" in questions and by first-person pronouns in options. |
568
+ | `onEntityGenerateErrorMessage` | Error message when AI entity generation fails | Failed to generate AI content. Please try again |
569
+ | `noPreviewAvailable` | Message when no preview is available in AI generation | No preview available. Click Regenerate or select a different match. |
570
+ | `engagementScore` | Label for engagement score in AI generation | Engagement score |
571
+ | `noMatchesFound` | Message when no matches are found in AI generation | No matches found for the selected filters. |
572
+ | `page` | Label for page in pagination | Page |
573
+ | `of` | Label for "of" in pagination (e.g., "Page 1 of 5") | of |
574
+ | `total` | Label for total in pagination | total |
575
+ | `generate` | Label for generate button in AI generation | Generate |
576
+ | `regenerate` | Label for regenerate button in AI generation | Regenerate |
@@ -1,11 +1,11 @@
1
1
  import { default as React, Dispatch, SetStateAction } from 'react';
2
2
  import { default as PollFiltersModel } from '../../models/Filters/PollFiltersModel';
3
- import { default as SelectOption } from '../../models/Select/SelectOption';
3
+ import { default as GroupSelectOption } from 'fansunited-management-components/src/models/select/GroupSelectOption';
4
4
  type FiltersProps = {
5
5
  filters: PollFiltersModel;
6
- options: SelectOption[];
6
+ options: GroupSelectOption[];
7
7
  showStatusFilter?: boolean;
8
- setOptions: Dispatch<SetStateAction<SelectOption[]>>;
8
+ setOptions: Dispatch<SetStateAction<GroupSelectOption[]>>;
9
9
  setFilters: Dispatch<SetStateAction<PollFiltersModel>>;
10
10
  handleResetData: () => void;
11
11
  };
@@ -22,234 +22,6 @@ export declare const initialBranding: {
22
22
  additional_image: string;
23
23
  };
24
24
  };
25
- export declare const supportedLanguages: {
26
- ar: {
27
- key: string;
28
- name: string;
29
- };
30
- bg: {
31
- key: string;
32
- name: string;
33
- };
34
- da: {
35
- key: string;
36
- name: string;
37
- };
38
- de: {
39
- key: string;
40
- name: string;
41
- };
42
- en: {
43
- key: string;
44
- name: string;
45
- };
46
- el: {
47
- key: string;
48
- name: string;
49
- };
50
- es: {
51
- key: string;
52
- name: string;
53
- };
54
- fr: {
55
- key: string;
56
- name: string;
57
- };
58
- hi: {
59
- key: string;
60
- name: string;
61
- };
62
- hu: {
63
- key: string;
64
- name: string;
65
- };
66
- it: {
67
- key: string;
68
- name: string;
69
- };
70
- nl: {
71
- key: string;
72
- name: string;
73
- };
74
- pt: {
75
- key: string;
76
- name: string;
77
- };
78
- 'pt-br': {
79
- key: string;
80
- name: string;
81
- };
82
- ro: {
83
- key: string;
84
- name: string;
85
- };
86
- sk: {
87
- key: string;
88
- name: string;
89
- };
90
- sr: {
91
- key: string;
92
- name: string;
93
- };
94
- sv: {
95
- key: string;
96
- name: string;
97
- };
98
- sw: {
99
- key: string;
100
- name: string;
101
- };
102
- };
103
- export declare const languagesMap: {
104
- ar: {
105
- key: string;
106
- name: string;
107
- };
108
- 'ar-dz': {
109
- key: string;
110
- name: string;
111
- };
112
- 'ar-bh': {
113
- key: string;
114
- name: string;
115
- };
116
- 'ar-eg': {
117
- key: string;
118
- name: string;
119
- };
120
- 'ar-iq': {
121
- key: string;
122
- name: string;
123
- };
124
- 'ar-jo': {
125
- key: string;
126
- name: string;
127
- };
128
- 'ar-kw': {
129
- key: string;
130
- name: string;
131
- };
132
- 'ar-lb': {
133
- key: string;
134
- name: string;
135
- };
136
- 'ar-ly': {
137
- key: string;
138
- name: string;
139
- };
140
- 'ar-ma': {
141
- key: string;
142
- name: string;
143
- };
144
- 'ar-om': {
145
- key: string;
146
- name: string;
147
- };
148
- 'ar-qa': {
149
- key: string;
150
- name: string;
151
- };
152
- 'ar-sa': {
153
- key: string;
154
- name: string;
155
- };
156
- 'ar-sy': {
157
- key: string;
158
- name: string;
159
- };
160
- 'ar-tn': {
161
- key: string;
162
- name: string;
163
- };
164
- 'ar-ae': {
165
- key: string;
166
- name: string;
167
- };
168
- 'ar-ye': {
169
- key: string;
170
- name: string;
171
- };
172
- bg: {
173
- key: string;
174
- name: string;
175
- };
176
- da: {
177
- key: string;
178
- name: string;
179
- };
180
- de: {
181
- key: string;
182
- name: string;
183
- };
184
- en: {
185
- key: string;
186
- name: string;
187
- };
188
- 'en-gb': {
189
- key: string;
190
- name: string;
191
- };
192
- 'en-us': {
193
- key: string;
194
- name: string;
195
- };
196
- el: {
197
- key: string;
198
- name: string;
199
- };
200
- es: {
201
- key: string;
202
- name: string;
203
- };
204
- fr: {
205
- key: string;
206
- name: string;
207
- };
208
- hi: {
209
- key: string;
210
- name: string;
211
- };
212
- hu: {
213
- key: string;
214
- name: string;
215
- };
216
- it: {
217
- key: string;
218
- name: string;
219
- };
220
- nl: {
221
- key: string;
222
- name: string;
223
- };
224
- pt: {
225
- key: string;
226
- name: string;
227
- };
228
- 'pt-br': {
229
- key: string;
230
- name: string;
231
- };
232
- ro: {
233
- key: string;
234
- name: string;
235
- };
236
- sk: {
237
- key: string;
238
- name: string;
239
- };
240
- sr: {
241
- key: string;
242
- name: string;
243
- };
244
- sv: {
245
- key: string;
246
- name: string;
247
- };
248
- sw: {
249
- key: string;
250
- name: string;
251
- };
252
- };
253
25
  export declare enum AdditionalFields {
254
26
  SHOW_DESCRIPTION = "show_description",
255
27
  SHOW_IMAGES = "show_images",
@@ -17,4 +17,5 @@ export default class Features {
17
17
  languageConfig: ILanguageConfig;
18
18
  authRequirement: string;
19
19
  preferences: IProfilePreferences;
20
+ fullCoverageCompetitions: string[];
20
21
  }
@@ -203,6 +203,16 @@ export default class LabelsModel {
203
203
  copyToClipboard: string;
204
204
  divElementTextInfo: string;
205
205
  widgetEmbedCodeNotAvailable: string;
206
+ layoutTemplate: string;
207
+ layoutTemplateDescription: string;
208
+ imagePosition: string;
209
+ imagePositionDescription: string;
210
+ signInLabel: string;
211
+ signInLabelInfoMessage: string;
212
+ authenticationHandler: string;
213
+ authenticationHandlerInfoMessage: string;
214
+ configureSignIn: string;
215
+ configureSignInDisabledMessage: string;
206
216
  enableMultipleChoice: string;
207
217
  enableMultipleChoiceDescription: string;
208
218
  maximumOptions: string;
@@ -218,5 +228,22 @@ export default class LabelsModel {
218
228
  maxAttemptsDescription: string;
219
229
  externalActivity: string;
220
230
  externalActivityDescription: string;
231
+ noPreviewAvailable: string;
232
+ createWithAi: string;
233
+ generateFootballPostMatchLabel: string;
234
+ generateFootballPostMatchModalTitle: string;
235
+ teamsSelectionPlaceholder: string;
236
+ searchTeamsErrorMessage: string;
237
+ targetLanguageDescription: string;
238
+ searchMatch: string;
239
+ useFramingGuidelinesLabel: string;
240
+ onEntityGenerateErrorMessage: string;
241
+ engagementScore: string;
242
+ noMatchesFound: string;
243
+ page: string;
244
+ of: string;
245
+ total: string;
246
+ generate: string;
247
+ regenerate: string;
221
248
  constructor(labels?: LabelsModel);
222
249
  }
@@ -1,3 +1,4 @@
1
+ import { default as RelatedRelationshipRequest } from 'fansunited-management-components/src/models/related/RelatedEntityRelationship';
1
2
  import { default as ImagesModel } from 'fansunited-sdk-esm/Core/Global/Models/Images/ImagesModel';
2
3
  import { default as ContextModel } from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
3
4
  export interface IBrandingRequestById {
@@ -55,16 +56,16 @@ export default class RequestBody {
55
56
  total_votes: number;
56
57
  rules: string;
57
58
  ad_content: string;
58
- labels: Object;
59
+ labels: Record<string, string>;
59
60
  branding: IBrandingRequestById;
60
61
  embed_code: string;
61
- custom_fields: Object;
62
+ custom_fields: Record<string, string>;
62
63
  images: ImagesModel;
63
64
  status: string;
64
65
  flags: string[];
65
66
  context: ContextModel;
66
67
  options: IPollOption[];
67
- related: IRelation[];
68
+ related: RelatedRelationshipRequest[];
68
69
  multiple_choice: boolean;
69
70
  max_multiple_choice_options: number | null;
70
71
  participation_count: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-widget-poll",
3
- "version": "2.12.3",
3
+ "version": "2.14.0-RC1",
4
4
  "main": "poll-manager.es.js",
5
5
  "author": "Fans United",
6
6
  "description": "",