fansunited-widget-poll 2.15.0 → 2.17.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 CHANGED
@@ -64,7 +64,7 @@ Fans United Poll Management Widget depends on [Fans United JS SDK](https://docs.
64
64
 
65
65
  - `fansUnitedLanguage` - for our sports APIs FansUnited platform supports different languages. For now they are **Bulgarian** (bg), **English** (en), **Romanian** (ro), **Greek** (el), **Slovak** (sk), **Serbian** (sr) and **Hungarian** (hu). If no value given it will be set to **English** (en).
66
66
 
67
- - `fansUnitedEnvironment` - You can run the widget in the following environments: **staging**, **production**, **watg** and **yolo**. If no value given it will be set to **production** (prod).
67
+ - `fansUnitedEnvironment` - You can run the widget in the following environments: **staging** and **production**. If no value given it will be set to **production** (prod).
68
68
 
69
69
  - `labels` - you can easily translate all labels, UI messages, descriptions, placeholders and etc. with this prop. By default, Fans United Poll Management Widget is available in **English** so if no value is given, the widget will be translated in English.
70
70
 
@@ -293,6 +293,23 @@ const labels = {
293
293
  signInLabelInfoMessage: `Custom text displayed on the sign-in button. If empty, defaults to "Sign in to vote".`,
294
294
  authenticationHandler: 'Authentication handler',
295
295
  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.',
296
+ signInUrl: 'URL',
297
+ signInUrlInfoMessage: 'URL that users are redirected to when clicking the sign-in button.',
298
+ signInTarget: 'Target',
299
+ optionsLayout: 'Options layout',
300
+ optionsLayoutDescription: 'Configure the visual arrangement of answer options (2x2 grid, single row, or single column). By default the standard and overlay variants are set to single row and the split variant is set 2x2 grid view.',
301
+ syncWithProfile: 'Sync with profile',
302
+ syncWithProfileDescription: 'When enabled, the lead form data is synced with the user's profile data.',
303
+ configureAdditionalCta: 'Configure additional CTA',
304
+ configureAdditionalCtaTooltip: 'The additional CTA is shown after the user submits their answer.',
305
+ additionalCtaLabel: 'Label',
306
+ additionalCtaLabelInfoMessage: 'Custom text displayed on the additional CTA button.',
307
+ additionalCtaHandler: 'Handler',
308
+ additionalCtaHandlerInfoMessage: 'JavaScript function code that executes when users click the additional CTA button. To evaluate the function, provide only the function name. Example: redirectToHomePage().',
309
+ additionalCtaUrl: 'URL',
310
+ additionalCtaUrlInfoMessage: 'URL that users are redirected to when clicking the additional CTA button.',
311
+ additionalCtaTarget: 'Target',
312
+ copiedToClipboard: 'HTML div element copied to clipboard!',
296
313
  configureSignIn: 'Configure sign-in options',
297
314
  configureSignInDisabledMessage: `Configure sign-in options is enabled only when the authentication requirement is set to “Registered”.`,
298
315
  enableMultipleChoice: 'Enable multiple choice',
@@ -336,7 +353,13 @@ const labels = {
336
353
  translationErrorMessage: 'An error occurred while translating.',
337
354
  clonePollTitle: 'Clone Poll',
338
355
  clone: 'Clone',
339
- translationOptions: 'Translate to:'
356
+ translationOptions: 'Translate to:',
357
+ configureRulesDisplayOptions: 'Configure rules display options',
358
+ configureRulesDisplayOptionsDisabledMessage: 'Rules display options are only available when poll has rules configured',
359
+ rulesDisplayType: 'Display type',
360
+ rulesDisplayUrl: 'URL',
361
+ rulesDisplayUrlInfoMessage: 'URL to open when the rules UI element is clicked',
362
+ rulesDisplayTarget: 'Target'
340
363
  };
341
364
 
342
365
  const App = () => {
@@ -568,6 +591,23 @@ Here is all information about **`LabelsModel`**:
568
591
  | `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". |
569
592
  | `authenticationHandler` | Label for authentication handler | Authentication handler |
570
593
  | `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. |
594
+ | `signInUrl` | Label for sign in URL input | URL |
595
+ | `signInUrlInfoMessage` | Info tooltip message for sign in URL input | URL that users are redirected to when clicking the sign-in button. |
596
+ | `signInTarget` | Label for sign in target select | Target |
597
+ | `optionsLayout` | Label for options layout select | Options layout |
598
+ | `optionsLayoutDescription` | Description for options layout select | Configure the visual arrangement of answer options (2x2 grid, single row, or single column). By default the standard and overlay variants are set to single row and the split variant is set 2x2 grid view. |
599
+ | `syncWithProfile` | Label for sync with profile toggle switch | Sync with profile |
600
+ | `syncWithProfileDescription` | Description for sync with profile toggle switch | When enabled, the lead form data is synced with the user's profile data. |
601
+ | `configureAdditionalCta` | Label for configure additional CTA toggle switch | Configure additional CTA |
602
+ | `configureAdditionalCtaTooltip` | Tooltip for configure additional CTA toggle switch | The additional CTA is shown after the user submits their answer. |
603
+ | `additionalCtaLabel` | Label for additional CTA label input | Label |
604
+ | `additionalCtaLabelInfoMessage` | Info tooltip message for additional CTA label input | Custom text displayed on the additional CTA button. |
605
+ | `additionalCtaHandler` | Label for additional CTA handler input | Handler |
606
+ | `additionalCtaHandlerInfoMessage` | Info tooltip message for additional CTA handler input | JavaScript function code that executes when users click the additional CTA button. To evaluate the function, provide only the function name. Example: redirectToHomePage(). |
607
+ | `additionalCtaUrl` | Label for additional CTA URL input | URL |
608
+ | `additionalCtaUrlInfoMessage` | Info tooltip message for additional CTA URL input | URL that users are redirected to when clicking the additional CTA button. |
609
+ | `additionalCtaTarget` | Label for additional CTA target select | Target |
610
+ | `copiedToClipboard` | Toast info message when embed code is copied to clipboard | HTML div element copied to clipboard! |
571
611
  | `configureSignIn` | Label for configure sign in switch | Configure sign-in options |
572
612
  | `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”. |
573
613
  | `enableMultipleChoice` | Label for enable multiple choice toggle switch | Enable multiple choice |
@@ -612,9 +652,27 @@ Here is all information about **`LabelsModel`**:
612
652
  | `clonePollMessage` | Toast successful message when cloning Poll | You have successfully cloned Poll |
613
653
  | `clonePollErrorMessage` | Toast error message when cloning Poll fails | There was a problem cloning Poll. Please try again |
614
654
  | `translationErrorMessage` | Toast error message when translation fails during cloning | An error occurred while translating. |
655
+ | `configureRulesDisplayOptions` | Label for configure rules display options switch | Configure rules display options |
656
+ | `configureRulesDisplayOptionsDisabledMessage` | Info tooltip message when configure rules display options is disabled | Rules display options are only available when poll has rules configured |
657
+ | `rulesDisplayType` | Label for rules display type select | Display type |
658
+ | `rulesDisplayUrl` | Label for rules display URL input | URL |
659
+ | `rulesDisplayUrlInfoMessage` | Info tooltip message for rules display URL input | URL to open when the rules UI element is clicked |
660
+ | `rulesDisplayTarget` | Label for rules display target select | Target |
615
661
 
616
662
  ## Changelog
617
663
 
664
+ ### 2.17.0 - 2025-12-22
665
+ - **Added**:
666
+ - New controls in Widget Embed code - rules display options
667
+ - **Fixed**:
668
+ - Avoid remapping keys to snake or camel case for custom_fields and labels properties
669
+ - Show only spinner on main view when switching between views
670
+
671
+ ### 2.16.0 - 2025-11-26
672
+
673
+ - **Added**:
674
+ - New controls in Widget embed code accordion - additional cta options, new options in sign in, options layout and sync with profile in leads options
675
+
618
676
  ### 2.15.0 - 2025-01-01
619
677
 
620
678
  - **Added:**
@@ -211,6 +211,23 @@ export default class LabelsModel {
211
211
  signInLabelInfoMessage: string;
212
212
  authenticationHandler: string;
213
213
  authenticationHandlerInfoMessage: string;
214
+ signInUrl: string;
215
+ signInUrlInfoMessage: string;
216
+ signInTarget: string;
217
+ optionsLayout: string;
218
+ optionsLayoutDescription: string;
219
+ syncWithProfile: string;
220
+ syncWithProfileDescription: string;
221
+ configureAdditionalCta: string;
222
+ configureAdditionalCtaTooltip: string;
223
+ additionalCtaLabel: string;
224
+ additionalCtaLabelInfoMessage: string;
225
+ additionalCtaHandler: string;
226
+ additionalCtaHandlerInfoMessage: string;
227
+ additionalCtaUrl: string;
228
+ additionalCtaUrlInfoMessage: string;
229
+ additionalCtaTarget: string;
230
+ copiedToClipboard: string;
214
231
  configureSignIn: string;
215
232
  configureSignInDisabledMessage: string;
216
233
  enableMultipleChoice: string;
@@ -254,5 +271,11 @@ export default class LabelsModel {
254
271
  clonePollTitle: string;
255
272
  clone: string;
256
273
  translationOptions: string;
274
+ configureRulesDisplayOptions: string;
275
+ configureRulesDisplayOptionsDisabledMessage: string;
276
+ rulesDisplayType: string;
277
+ rulesDisplayUrl: string;
278
+ rulesDisplayUrlInfoMessage: string;
279
+ rulesDisplayTarget: string;
257
280
  constructor(labels?: LabelsModel);
258
281
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-widget-poll",
3
- "version": "2.15.0",
3
+ "version": "2.17.0",
4
4
  "main": "poll-manager.es.js",
5
5
  "author": "Fans United",
6
6
  "description": "",