fansunited-widget-poll 2.16.0 → 2.18.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
 
@@ -353,7 +353,15 @@ const labels = {
353
353
  translationErrorMessage: 'An error occurred while translating.',
354
354
  clonePollTitle: 'Clone Poll',
355
355
  clone: 'Clone',
356
- 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',
363
+ brandingTemplateLabel: 'Select branding',
364
+ brandingTemplatePlaceholder: 'Choose existing branding'
357
365
  };
358
366
 
359
367
  const App = () => {
@@ -646,9 +654,30 @@ Here is all information about **`LabelsModel`**:
646
654
  | `clonePollMessage` | Toast successful message when cloning Poll | You have successfully cloned Poll |
647
655
  | `clonePollErrorMessage` | Toast error message when cloning Poll fails | There was a problem cloning Poll. Please try again |
648
656
  | `translationErrorMessage` | Toast error message when translation fails during cloning | An error occurred while translating. |
657
+ | `configureRulesDisplayOptions` | Label for configure rules display options switch | Configure rules display options |
658
+ | `configureRulesDisplayOptionsDisabledMessage` | Info tooltip message when configure rules display options is disabled | Rules display options are only available when poll has rules configured |
659
+ | `rulesDisplayType` | Label for rules display type select | Display type |
660
+ | `rulesDisplayUrl` | Label for rules display URL input | URL |
661
+ | `rulesDisplayUrlInfoMessage` | Info tooltip message for rules display URL input | URL to open when the rules UI element is clicked |
662
+ | `rulesDisplayTarget` | Label for rules display target select | Target |
663
+ | `brandingTemplateLabel` | Label for branding menu selection | Select branding |
664
+ | `brandingTemplatePlaceholder` | Placeholder for branding menu selection | Choose existing branding |
649
665
 
650
666
  ## Changelog
651
667
 
668
+ ### 2.18.0 - 2026-01-08
669
+
670
+ - **Changed**:
671
+ - Branding is now configured by a dropdown menu
672
+ - All current branding controls are in read only view
673
+
674
+ ### 2.17.0 - 2025-12-22
675
+ - **Added**:
676
+ - New controls in Widget Embed code - rules display options
677
+ - **Fixed**:
678
+ - Avoid remapping keys to snake or camel case for custom_fields and labels properties
679
+ - Show only spinner on main view when switching between views
680
+
652
681
  ### 2.16.0 - 2025-11-26
653
682
 
654
683
  - **Added**:
@@ -5,7 +5,6 @@ export default class PollFactory {
5
5
  createNewRequestBody: (requestBody: RequestBody | null) => RequestBody;
6
6
  finalizeNewRequestBody: (requestBody: RequestBody, config: Features) => RequestBody;
7
7
  private reconstructImages;
8
- private reconstructBranding;
9
8
  private reconstructContext;
10
9
  createImagesModel: () => {
11
10
  main: string;
@@ -271,5 +271,13 @@ export default class LabelsModel {
271
271
  clonePollTitle: string;
272
272
  clone: string;
273
273
  translationOptions: string;
274
+ configureRulesDisplayOptions: string;
275
+ configureRulesDisplayOptionsDisabledMessage: string;
276
+ rulesDisplayType: string;
277
+ rulesDisplayUrl: string;
278
+ rulesDisplayUrlInfoMessage: string;
279
+ rulesDisplayTarget: string;
280
+ brandingTemplateLabel: string;
281
+ brandingTemplatePlaceholder: string;
274
282
  constructor(labels?: LabelsModel);
275
283
  }
@@ -58,6 +58,7 @@ export default class RequestBody {
58
58
  ad_content: string;
59
59
  labels: Record<string, string>;
60
60
  branding: IBrandingRequestById;
61
+ branding_id: string | null;
61
62
  embed_code: string;
62
63
  custom_fields: Record<string, string>;
63
64
  images: ImagesModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-widget-poll",
3
- "version": "2.16.0",
3
+ "version": "2.18.0",
4
4
  "main": "poll-manager.es.js",
5
5
  "author": "Fans United",
6
6
  "description": "",