fansunited-widget-poll 2.12.2 → 2.13.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
@@ -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.',
@@ -505,6 +515,16 @@ Here is all information about **`LabelsModel`**:
505
515
  | `copyToClipboard` | Div text button tooltip text in embed code acordion | Copy to clipboard |
506
516
  | `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
517
  | `widgetEmbedCodeNotAvailable` | Paragraph when trying to configure widget embed code for not created Poll | To configure embed code you need to first create your poll. |
518
+ | `layoutTemplate` | Label for layout template select | Layout template |
519
+ | `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. |
520
+ | `imagePosition` | Label for image position select | Image position |
521
+ | `imagePositionDescription` | Description for image position select | Position of the image relative to the main content (only available for Standard layout). |
522
+ | `signInLabel` | Label for sign in label input | Label |
523
+ | `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". |
524
+ | `authenticationHandler` | Label for authentication handler | Authentication handler |
525
+ | `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. |
526
+ | `configureSignIn` | Label for configure sign in switch | Configure sign-in options |
527
+ | `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
528
  | `enableMultipleChoice` | Label for enable multiple choice toggle switch | Enable multiple choice |
509
529
  | `enableMultipleChoiceDescription` | Description paragraph for enable multiple choice toggle switch | When enabled, users can select multiple options in the poll. |
510
530
  | `maximumOptions` | Label for maximum options number input | Maximum options |
@@ -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
  };
@@ -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;
@@ -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,20 +56,20 @@ 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;
71
72
  preferences_enabled: boolean;
72
- max_attempts: number;
73
+ max_attempts: number | null;
73
74
  external_activity: string;
74
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-widget-poll",
3
- "version": "2.12.2",
3
+ "version": "2.13.0",
4
4
  "main": "poll-manager.es.js",
5
5
  "author": "Fans United",
6
6
  "description": "",