fansunited-widget-either-or 2.9.0 → 2.11.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 Either/Or Management Widget depends on [Fans United JS SDK](https://
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 Match Either/Or Management Widget is available in **English** so if no value is given, the widget will be translated in English.
70
70
 
@@ -194,7 +194,7 @@ const labels = {
194
194
  generateSignedInUrlErrorMessage: 'There was a problem generating signed in URL to store the image in bucket. Please try again',
195
195
  uploadingImageErrorMessage: 'There was a problem with uploading image to bucket. Please try again',
196
196
  encryptingImageErrorMessage: 'There was a problem with encrypting image before uploading it to bucket. Please try again',
197
- searchSportal365ImagesErrorMessage: 'There was a problem with searching images from Sportal 365 API. Please try again'
197
+ searchSportal365ImagesErrorMessage: 'There was a problem with searching images from Sportal 365 API. Please try again',
198
198
  hideFilters: 'Hide filters',
199
199
  showFilters: 'Show filters',
200
200
  branding: 'Branding',
@@ -317,7 +317,15 @@ const labels = {
317
317
  authenticationHandler: 'Authentication handler',
318
318
  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.',
319
319
  configureSignIn: 'Configure sign-in options',
320
- configureSignInDisabledMessage: `Configure sign-in options is enabled only when the authentication requirement is set to “Registered”.`
320
+ configureSignInDisabledMessage: `Configure sign-in options is enabled only when the authentication requirement is set to “Registered”.`,
321
+ translationOptions: 'Translate to:',
322
+ cloneMiniGameTitle: 'Clone Either/Or',
323
+ clone: 'Clone',
324
+ cloneEitherOrMessage: 'You have successfully cloned Either/Or',
325
+ cloneEitherOrErrorMessage: 'There was a problem cloning Either/Or. Please try again',
326
+ translationErrorMessage: 'An error occurred while translating.',
327
+ brandingTemplateLabel: 'Select branding',
328
+ brandingTemplatePlaceholder: 'Choose existing branding'
321
329
  };
322
330
 
323
331
  const App = () => {
@@ -574,4 +582,33 @@ Here is all information about **`LabelsModel`**:
574
582
  | `authenticationHandler` | Label for authentication handler | Authentication handler |
575
583
  | `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. |
576
584
  | `configureSignIn` | Label for configure sign in switch | Configure sign-in options |
577
- | `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”. |
585
+ | `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”. |
586
+ | `translationOptions` | Label for translation options section in clone modal | Translate to: |
587
+ | `cloneMiniGameTitle` | Title for clone Either/Or modal | Clone Either/Or |
588
+ | `clone` | Label for clone button | Clone |
589
+ | `cloneEitherOrMessage` | Toast successful message when cloning Either/Or | You have successfully cloned Either/Or |
590
+ | `cloneEitherOrErrorMessage` | Toast error message when cloning Either/Or fails | There was a problem cloning Either/Or. Please try again |
591
+ | `translationErrorMessage` | Toast error message when translation fails during cloning | An error occurred while translating. |
592
+ | `brandingTemplateLabel` | Label for branding menu selection | Select branding |
593
+ | `brandingTemplatePlaceholder` | Placeholder for branding menu selection | Choose existing branding |
594
+
595
+ ## Changelog
596
+
597
+ ### 2.11.0 - 2026-01-08
598
+
599
+ - **Changed**:
600
+ - Branding is now configured by a dropdown menu
601
+ - All current branding controls are in read only view
602
+
603
+ ### 2.10.0 - 2025-01-01
604
+
605
+ - **Added:**
606
+ - Clone functionality for Either/Or games
607
+ - Translation support during cloning process - users can clone games and translate them to multiple languages simultaneously
608
+ - New clone action in the actions menu for existing games
609
+ - New labels for clone functionality: `translationOptions`, `cloneMiniGameTitle`, `clone`, `cloneEitherOrMessage`, `cloneEitherOrErrorMessage`, `translationErrorMessage`
610
+ - Enhanced user experience with loading states and toast notifications during cloning operations
611
+
612
+ - **Changed:**
613
+ - Updated LabelsModel to include new clone-related labels with default values
614
+ - Enhanced ActionsMenu component to include clone option alongside edit and delete actions
@@ -3,7 +3,7 @@ import { EitherOrBasicModel } from 'fansunited-sdk-esm';
3
3
  type ActionsMenuProps = {
4
4
  eitherOr: EitherOrBasicModel;
5
5
  onClickEdit: () => void;
6
- onDelete: () => void;
6
+ reloadGames: () => void;
7
7
  };
8
8
  declare const ActionsMenu: React.FC<ActionsMenuProps>;
9
9
  export default ActionsMenu;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { EitherOrBasicModel } from 'fansunited-sdk-esm';
3
+ type CloneMiniGameModalProps = {
4
+ isOpen: boolean;
5
+ eitherOr: EitherOrBasicModel;
6
+ getMiniGames: () => void;
7
+ onClose: () => void;
8
+ };
9
+ declare const CloneMiniGameModal: React.FC<CloneMiniGameModalProps>;
10
+ export default CloneMiniGameModal;
@@ -1,27 +1,3 @@
1
- export declare const initialBranding: {
2
- colors: {
3
- primary_color: string;
4
- secondary_color: string;
5
- content_color: string;
6
- background_color: string;
7
- border_color: string;
8
- additional_color: string;
9
- };
10
- urls: {
11
- primary_url: string;
12
- secondary_url: string;
13
- privacy_policy_url: string;
14
- terms_and_conditions_url: string;
15
- additional_url: string;
16
- };
17
- images: {
18
- main_logo: string;
19
- mobile_logo: string;
20
- background_image: string;
21
- mobile_background_image: string;
22
- additional_image: string;
23
- };
24
- };
25
1
  export declare const avatarPlaceholder = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMA+h6XBeOBCz4ozafvc/W9X+nD29ROsWmINjBVRxC4F3uPnhL6/TMAAAygSURBVHja7N0JkqJAEIXhAsEFEEVs9z3vf8eZmI6J3mxFZamq/L8zaC2ZrxKjTzTaLfu9xWweZ7n8FeRFmRwuq+XbZmDgs2gzPR9iuaGYpOl4yO/AQ+G0lwRSUXJ+40fgkXCaxvKgYDIeGXhgvZrLk8rVxsBp63MsLyn7rAPOCvul1GB+Cg2cE20nUpvDNjJwybpXSK2KPsuAM8J+LPULUk6EbjgF0pDD0MB2w0QaNOMnYLfhRL7iJ6DJaCEtOHAWsNO+F0g7Um4EFlpm0pq8T6/IMptEWhVPDewxWAXSthlNAltEu1I6EKyoD9sgOufSkZIrYfeOM+lQj8NgxzaxdKpcG3RonEvHgpNBV8KDWGByNOjENBMrFJwFu7BPxRbB2KBtw1gsknIbaNk4EKskHATaNLBn+f8vpjLcnn0i9skue4NWHOdipYRfwHUa/v//JBwFWzCYibUm9AebtxCLpQYN64nVVgaNGovllgYN2or13gwaM7Ss/ndNTmuoMevOu/9VZGREGrKxpP17T8bToUaMCnFEQV+gAaFV/d/bYt6O1e5YikPmtAVqNrC2AUBboA2RFfHPRywManQR5/QManMSB5EU1VQApij8k7IC4E855YBaHB0qAHwVExWuQWRxAuieiYHvCZDbzgYvmorTtgYvGTl6APwv4yD4koGlTwCqSwgKqz0AUBHUWgGiHlST0JEI0G0F1YBnOdcCpDFYq6V4grGyTwkdvwF+yEiIKd4A2AR0lgApCL5o70wIvIq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