fansunited-widget-poll 2.14.0 → 2.16.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 +67 -1
- package/components/Modals/ClonePollModal.d.ts +10 -0
- package/components/Polls/ActionsMenu.d.ts +1 -1
- package/models/Labels/LabelsModel.d.ts +23 -0
- package/package.json +1 -1
- package/poll-manager.es.js +21203 -20566
- package/poll-manager.umd.js +319 -307
package/README.md
CHANGED
|
@@ -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',
|
|
@@ -330,7 +347,13 @@ const labels = {
|
|
|
330
347
|
generate: 'Generate',
|
|
331
348
|
regenerate: 'Regenerate',
|
|
332
349
|
createAndContinue: 'Create and Continue',
|
|
333
|
-
createAndGoTo: 'Create and Go To Poll'
|
|
350
|
+
createAndGoTo: 'Create and Go To Poll',
|
|
351
|
+
clonePollMessage: 'You have successfully cloned Poll',
|
|
352
|
+
clonePollErrorMessage: 'There was a problem cloning Poll. Please try again',
|
|
353
|
+
translationErrorMessage: 'An error occurred while translating.',
|
|
354
|
+
clonePollTitle: 'Clone Poll',
|
|
355
|
+
clone: 'Clone',
|
|
356
|
+
translationOptions: 'Translate to:'
|
|
334
357
|
};
|
|
335
358
|
|
|
336
359
|
const App = () => {
|
|
@@ -562,6 +585,23 @@ Here is all information about **`LabelsModel`**:
|
|
|
562
585
|
| `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". |
|
|
563
586
|
| `authenticationHandler` | Label for authentication handler | Authentication handler |
|
|
564
587
|
| `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. |
|
|
588
|
+
| `signInUrl` | Label for sign in URL input | URL |
|
|
589
|
+
| `signInUrlInfoMessage` | Info tooltip message for sign in URL input | URL that users are redirected to when clicking the sign-in button. |
|
|
590
|
+
| `signInTarget` | Label for sign in target select | Target |
|
|
591
|
+
| `optionsLayout` | Label for options layout select | Options layout |
|
|
592
|
+
| `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. |
|
|
593
|
+
| `syncWithProfile` | Label for sync with profile toggle switch | Sync with profile |
|
|
594
|
+
| `syncWithProfileDescription` | Description for sync with profile toggle switch | When enabled, the lead form data is synced with the user's profile data. |
|
|
595
|
+
| `configureAdditionalCta` | Label for configure additional CTA toggle switch | Configure additional CTA |
|
|
596
|
+
| `configureAdditionalCtaTooltip` | Tooltip for configure additional CTA toggle switch | The additional CTA is shown after the user submits their answer. |
|
|
597
|
+
| `additionalCtaLabel` | Label for additional CTA label input | Label |
|
|
598
|
+
| `additionalCtaLabelInfoMessage` | Info tooltip message for additional CTA label input | Custom text displayed on the additional CTA button. |
|
|
599
|
+
| `additionalCtaHandler` | Label for additional CTA handler input | Handler |
|
|
600
|
+
| `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(). |
|
|
601
|
+
| `additionalCtaUrl` | Label for additional CTA URL input | URL |
|
|
602
|
+
| `additionalCtaUrlInfoMessage` | Info tooltip message for additional CTA URL input | URL that users are redirected to when clicking the additional CTA button. |
|
|
603
|
+
| `additionalCtaTarget` | Label for additional CTA target select | Target |
|
|
604
|
+
| `copiedToClipboard` | Toast info message when embed code is copied to clipboard | HTML div element copied to clipboard! |
|
|
565
605
|
| `configureSignIn` | Label for configure sign in switch | Configure sign-in options |
|
|
566
606
|
| `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”. |
|
|
567
607
|
| `enableMultipleChoice` | Label for enable multiple choice toggle switch | Enable multiple choice |
|
|
@@ -600,3 +640,29 @@ Here is all information about **`LabelsModel`**:
|
|
|
600
640
|
| `regenerate` | Label for regenerate button in AI generation | Regenerate |
|
|
601
641
|
| `createAndContinue` | Label for create and continue button in AI generation | Create and Continue |
|
|
602
642
|
| `createAndGoTo` | Label for create and go to poll button in AI generation | Create and Go To Poll |
|
|
643
|
+
| `translationOptions` | Label for translation options section in clone modal | Translate to: |
|
|
644
|
+
| `cloneMiniGameTitle` | Title for clone Poll modal | Clone Poll |
|
|
645
|
+
| `clone` | Label for clone button | Clone |
|
|
646
|
+
| `clonePollMessage` | Toast successful message when cloning Poll | You have successfully cloned Poll |
|
|
647
|
+
| `clonePollErrorMessage` | Toast error message when cloning Poll fails | There was a problem cloning Poll. Please try again |
|
|
648
|
+
| `translationErrorMessage` | Toast error message when translation fails during cloning | An error occurred while translating. |
|
|
649
|
+
|
|
650
|
+
## Changelog
|
|
651
|
+
|
|
652
|
+
### 2.16.0 - 2025-11-26
|
|
653
|
+
|
|
654
|
+
- **Added**:
|
|
655
|
+
- New controls in Widget embed code accordion - additional cta options, new options in sign in, options layout and sync with profile in leads options
|
|
656
|
+
|
|
657
|
+
### 2.15.0 - 2025-01-01
|
|
658
|
+
|
|
659
|
+
- **Added:**
|
|
660
|
+
- Clone functionality for polls
|
|
661
|
+
- Translation support during cloning process - users can clone games and translate them to multiple languages simultaneously
|
|
662
|
+
- New clone action in the actions menu for existing games
|
|
663
|
+
- New labels for clone functionality: `translationOptions`, `cloneMiniGameTitle`, `clone`, `clonePollMessage`, `clonePollErrorMessage`, `translationErrorMessage`
|
|
664
|
+
- Enhanced user experience with loading states and toast notifications during cloning operations
|
|
665
|
+
|
|
666
|
+
- **Changed:**
|
|
667
|
+
- Updated LabelsModel to include new clone-related labels with default values
|
|
668
|
+
- Enhanced ActionsMenu component to include clone option alongside edit and delete actions
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PollBasicModel } from 'fansunited-sdk-esm';
|
|
3
|
+
type ClonePollModalProps = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
poll: PollBasicModel;
|
|
6
|
+
getPolls: () => void;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const ClonePollModal: React.FC<ClonePollModalProps>;
|
|
10
|
+
export default ClonePollModal;
|
|
@@ -3,7 +3,7 @@ import { PollBasicModel } from 'fansunited-sdk-esm';
|
|
|
3
3
|
type ActionsMenuProps = {
|
|
4
4
|
poll: PollBasicModel;
|
|
5
5
|
onClickEdit: () => void;
|
|
6
|
-
|
|
6
|
+
getPolls: () => void;
|
|
7
7
|
};
|
|
8
8
|
declare const ActionsMenu: React.FC<ActionsMenuProps>;
|
|
9
9
|
export default ActionsMenu;
|
|
@@ -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;
|
|
@@ -248,5 +265,11 @@ export default class LabelsModel {
|
|
|
248
265
|
regenerate: string;
|
|
249
266
|
createAndContinue: string;
|
|
250
267
|
createAndGoTo: string;
|
|
268
|
+
clonePollMessage: string;
|
|
269
|
+
clonePollErrorMessage: string;
|
|
270
|
+
translationErrorMessage: string;
|
|
271
|
+
clonePollTitle: string;
|
|
272
|
+
clone: string;
|
|
273
|
+
translationOptions: string;
|
|
251
274
|
constructor(labels?: LabelsModel);
|
|
252
275
|
}
|