fansunited-widget-poll 2.14.0-RC2 → 2.15.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 +54 -1
- package/components/Modals/ClonePollModal.d.ts +10 -0
- package/components/Polls/ActionsMenu.d.ts +1 -1
- package/models/Labels/LabelsModel.d.ts +9 -0
- package/package.json +1 -1
- package/poll-manager.es.js +26182 -21627
- package/poll-manager.umd.js +1242 -252
package/README.md
CHANGED
|
@@ -114,6 +114,7 @@ const labels = {
|
|
|
114
114
|
sortByAscending: 'Sort by created at field in ascending order',
|
|
115
115
|
sortByDescending: 'Sort by created at field in descending order',
|
|
116
116
|
language: 'Language',
|
|
117
|
+
languageDescription: 'Select the language for your Poll. You can manage language selection by configuring available languages in language configuration. It cannot be changed if multilingual feature is in use.',
|
|
117
118
|
contextEntityTag: 'Context entity tag',
|
|
118
119
|
typeContextTagNamePlaceholder: 'Type context tag name...',
|
|
119
120
|
itemsPerPage: 'Items per page',
|
|
@@ -229,6 +230,7 @@ const labels = {
|
|
|
229
230
|
additionalFields: "Additional fields",
|
|
230
231
|
addDescription: "Add description",
|
|
231
232
|
addImages: "Add images",
|
|
233
|
+
addEmbedCode: "Add embed code",
|
|
232
234
|
schedule: "Schedule",
|
|
233
235
|
scheduledTaskNotAvailable: "To configure scheduled tasks you need to first create your poll",
|
|
234
236
|
createScheduledTaskMessage: "You have successfully created scheduled task",
|
|
@@ -242,6 +244,13 @@ const labels = {
|
|
|
242
244
|
at: "At:",
|
|
243
245
|
deleteScheduledTaskModalTitle: "Delete scheduled task",
|
|
244
246
|
deleteScheduledTaskModalParagraph: "Are you sure you want to delete the following scheduled task: ",
|
|
247
|
+
languagesModalTitle: "Select Languages",
|
|
248
|
+
languagesModalDescription: "Select the languages this poll is going to be translated in.",
|
|
249
|
+
languagesModalSave: "Save language preference",
|
|
250
|
+
languageParentText: "This poll is a translated version of",
|
|
251
|
+
pollTranslationErrorMessage: "An error occurred while translating the poll.",
|
|
252
|
+
translateTo: "Translate to _language_",
|
|
253
|
+
additionalInformation: "Additional information",
|
|
245
254
|
voting: 'Voting',
|
|
246
255
|
reports: 'Reports',
|
|
247
256
|
exports: 'Exports',
|
|
@@ -301,6 +310,7 @@ const labels = {
|
|
|
301
310
|
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`,
|
|
302
311
|
externalActivity: "External activity",
|
|
303
312
|
externalActivityDescription: "SKU identifier required for users to vote in paid poll. Must not contain special characters. Cannot be changed once poll has votes.",
|
|
313
|
+
noPreviewAvailable: "No preview available. Click Regenerate or select a different match.",
|
|
304
314
|
createWithAi: 'Create with AI',
|
|
305
315
|
generateFootballPostMatchLabel: '⚽ Football Post-Match',
|
|
306
316
|
generateFootballPostMatchModalTitle: 'Football Post-Match Poll',
|
|
@@ -308,6 +318,7 @@ const labels = {
|
|
|
308
318
|
searchTeamsErrorMessage: 'There was a problem searching teams.',
|
|
309
319
|
targetLanguageDescription: 'Select the language in which the AI will create the entity.',
|
|
310
320
|
searchMatch: 'Search match',
|
|
321
|
+
searchMatchTooltip: 'Click to go back and change match selection',
|
|
311
322
|
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
323
|
onEntityGenerateErrorMessage: 'Failed to generate AI content. Please try again',
|
|
313
324
|
noPreviewAvailable: 'No preview available. Click Regenerate or select a different match.',
|
|
@@ -317,7 +328,15 @@ const labels = {
|
|
|
317
328
|
of: 'of',
|
|
318
329
|
total: 'total',
|
|
319
330
|
generate: 'Generate',
|
|
320
|
-
regenerate: 'Regenerate'
|
|
331
|
+
regenerate: 'Regenerate',
|
|
332
|
+
createAndContinue: 'Create and Continue',
|
|
333
|
+
createAndGoTo: 'Create and Go To Poll',
|
|
334
|
+
clonePollMessage: 'You have successfully cloned Poll',
|
|
335
|
+
clonePollErrorMessage: 'There was a problem cloning Poll. Please try again',
|
|
336
|
+
translationErrorMessage: 'An error occurred while translating.',
|
|
337
|
+
clonePollTitle: 'Clone Poll',
|
|
338
|
+
clone: 'Clone',
|
|
339
|
+
translationOptions: 'Translate to:'
|
|
321
340
|
};
|
|
322
341
|
|
|
323
342
|
const App = () => {
|
|
@@ -364,6 +383,7 @@ Here is all information about **`LabelsModel`**:
|
|
|
364
383
|
| `sortByAscending` | Label for sort option | Sort by created at field in ascending order |
|
|
365
384
|
| `sortByDescending` | Label for sort option | Sort by created at field in descending order |
|
|
366
385
|
| `language` | Label for language selection in configuration panel. | Language |
|
|
386
|
+
| `languageDescription` | Description for language selection in configuration panel. | Select the language for your Poll. You can manage language selection by configuring available languages in language configuration. It cannot be changed if multilingual feature is in use. |
|
|
367
387
|
| `contextEntityTag` | Label for input search for context entity tag in filters container | Context entity tag |
|
|
368
388
|
| `typeContextTagNamePlaceholder` | Placeholder for input search for context entity tag in filters container and in context side bar | Type context tag name... |
|
|
369
389
|
| `itemsPerPage` | Label for items per page filter select | Items per page |
|
|
@@ -485,6 +505,7 @@ Here is all information about **`LabelsModel`**:
|
|
|
485
505
|
| `additionalFields` | Label for additional fields | Additional fields |
|
|
486
506
|
| `addDescription` | Label for toggle description button | Add description |
|
|
487
507
|
| `addImages` | Label for toggle images button | Add images |
|
|
508
|
+
| `addEmbedCode` | Label for toggle embed code button | Add embed code |
|
|
488
509
|
| `schedule` | Label for schedule accordion | Schedule |
|
|
489
510
|
| `scheduledTaskNotAvailable` | Paragraph when trying to configure scheduled task for not created Poll | To configure scheduled tasks you need to first create your poll |
|
|
490
511
|
| `createScheduledTaskMessage` | Toast successful message when a new scheduled task is created | You have successfully created scheduled task |
|
|
@@ -498,6 +519,13 @@ Here is all information about **`LabelsModel`**:
|
|
|
498
519
|
| `at` | Label for calendar input in schedule accordion | At: |
|
|
499
520
|
| `deleteScheduledTaskModalTitle` | Title for delete scheduled task modal | Delete scheduled task |
|
|
500
521
|
| `deleteScheduledTaskModalParagraph` | Paragraph for delete scheduled task modal | Are you sure you want to delete the following scheduled task: |
|
|
522
|
+
| `languagesModalTitle` | Title for languages selection modal | Select Languages |
|
|
523
|
+
| `languagesModalDescription` | Description for languages selection modal | Select the languages this poll is going to be translated in. |
|
|
524
|
+
| `languagesModalSave` | Save button label for languages selection modal | Save language preference |
|
|
525
|
+
| `languageParentText` | Text indicating poll is a translated version | This poll is a translated version of |
|
|
526
|
+
| `pollTranslationErrorMessage` | Error message when poll translation fails | An error occurred while translating the poll. |
|
|
527
|
+
| `translateTo` | Label for translate action with language placeholder | Translate to _language_ |
|
|
528
|
+
| `additionalInformation` | Label for additional information section | Additional information |
|
|
501
529
|
| `voting` | Label for tab | Voting |
|
|
502
530
|
| `reports` | Label for tab | Reports |
|
|
503
531
|
| `exports` | Label for tab | Exports |
|
|
@@ -557,6 +585,7 @@ Here is all information about **`LabelsModel`**:
|
|
|
557
585
|
| `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 |
|
|
558
586
|
| `externalActivity` | Label for external activity input | External activity |
|
|
559
587
|
| `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. |
|
|
588
|
+
| `noPreviewAvailable` | Message when no preview is available in AI generation | No preview available. Click Regenerate or select a different match. |
|
|
560
589
|
| `createWithAi` | Label for create with AI button | Create with AI |
|
|
561
590
|
| `generateFootballPostMatchLabel` | Label for AI creation option | ⚽ Football Post-Match |
|
|
562
591
|
| `generateFootballPostMatchModalTitle` | Title for AI football post-match poll generation modal | Football Post-Match Poll |
|
|
@@ -564,6 +593,7 @@ Here is all information about **`LabelsModel`**:
|
|
|
564
593
|
| `searchTeamsErrorMessage` | Error message when searching teams fails in AI generation | There was a problem searching teams. |
|
|
565
594
|
| `targetLanguageDescription` | Description for target language selection in AI generation | Select the language in which the AI will create the entity. |
|
|
566
595
|
| `searchMatch` | Label for search match functionality in AI generation | Search match |
|
|
596
|
+
| `searchMatchTooltip` | Tooltip for search match button in AI generation | Click to go back and change match selection |
|
|
567
597
|
| `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
598
|
| `onEntityGenerateErrorMessage` | Error message when AI entity generation fails | Failed to generate AI content. Please try again |
|
|
569
599
|
| `noPreviewAvailable` | Message when no preview is available in AI generation | No preview available. Click Regenerate or select a different match. |
|
|
@@ -574,3 +604,26 @@ Here is all information about **`LabelsModel`**:
|
|
|
574
604
|
| `total` | Label for total in pagination | total |
|
|
575
605
|
| `generate` | Label for generate button in AI generation | Generate |
|
|
576
606
|
| `regenerate` | Label for regenerate button in AI generation | Regenerate |
|
|
607
|
+
| `createAndContinue` | Label for create and continue button in AI generation | Create and Continue |
|
|
608
|
+
| `createAndGoTo` | Label for create and go to poll button in AI generation | Create and Go To Poll |
|
|
609
|
+
| `translationOptions` | Label for translation options section in clone modal | Translate to: |
|
|
610
|
+
| `cloneMiniGameTitle` | Title for clone Poll modal | Clone Poll |
|
|
611
|
+
| `clone` | Label for clone button | Clone |
|
|
612
|
+
| `clonePollMessage` | Toast successful message when cloning Poll | You have successfully cloned Poll |
|
|
613
|
+
| `clonePollErrorMessage` | Toast error message when cloning Poll fails | There was a problem cloning Poll. Please try again |
|
|
614
|
+
| `translationErrorMessage` | Toast error message when translation fails during cloning | An error occurred while translating. |
|
|
615
|
+
|
|
616
|
+
## Changelog
|
|
617
|
+
|
|
618
|
+
### 2.15.0 - 2025-01-01
|
|
619
|
+
|
|
620
|
+
- **Added:**
|
|
621
|
+
- Clone functionality for polls
|
|
622
|
+
- Translation support during cloning process - users can clone games and translate them to multiple languages simultaneously
|
|
623
|
+
- New clone action in the actions menu for existing games
|
|
624
|
+
- New labels for clone functionality: `translationOptions`, `cloneMiniGameTitle`, `clone`, `clonePollMessage`, `clonePollErrorMessage`, `translationErrorMessage`
|
|
625
|
+
- Enhanced user experience with loading states and toast notifications during cloning operations
|
|
626
|
+
|
|
627
|
+
- **Changed:**
|
|
628
|
+
- Updated LabelsModel to include new clone-related labels with default values
|
|
629
|
+
- 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;
|
|
@@ -236,6 +236,7 @@ export default class LabelsModel {
|
|
|
236
236
|
searchTeamsErrorMessage: string;
|
|
237
237
|
targetLanguageDescription: string;
|
|
238
238
|
searchMatch: string;
|
|
239
|
+
searchMatchTooltip: string;
|
|
239
240
|
useFramingGuidelinesLabel: string;
|
|
240
241
|
onEntityGenerateErrorMessage: string;
|
|
241
242
|
engagementScore: string;
|
|
@@ -245,5 +246,13 @@ export default class LabelsModel {
|
|
|
245
246
|
total: string;
|
|
246
247
|
generate: string;
|
|
247
248
|
regenerate: string;
|
|
249
|
+
createAndContinue: string;
|
|
250
|
+
createAndGoTo: string;
|
|
251
|
+
clonePollMessage: string;
|
|
252
|
+
clonePollErrorMessage: string;
|
|
253
|
+
translationErrorMessage: string;
|
|
254
|
+
clonePollTitle: string;
|
|
255
|
+
clone: string;
|
|
256
|
+
translationOptions: string;
|
|
248
257
|
constructor(labels?: LabelsModel);
|
|
249
258
|
}
|