fansunited-widget-client-configuration 1.4.0 → 1.6.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 +158 -2
- package/components/Main.d.ts +2 -0
- package/components/Tabs/Branding.d.ts +3 -0
- package/components/Tabs/BrandingForm.d.ts +14 -0
- package/components/Tabs/UserCentricWidgets/ConfigurationForm.d.ts +1 -0
- package/configuration-manager.es.js +32387 -31317
- package/configuration-manager.umd.js +321 -318
- package/models/Labels/LabelsModel.d.ts +65 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,6 +48,8 @@ type ConfigurationManagerProps = {
|
|
|
48
48
|
fansUnitedEnvironment?: string;
|
|
49
49
|
labels?: LabelsModel;
|
|
50
50
|
hideSignOutButton?: boolean;
|
|
51
|
+
sportal365Project?: string;
|
|
52
|
+
sportal365Infrastructure?: 'shared' | 'betway';
|
|
51
53
|
};
|
|
52
54
|
```
|
|
53
55
|
|
|
@@ -61,6 +63,10 @@ Fans United Classic Quiz Management Widget depends on [Fans United JS SDK](https
|
|
|
61
63
|
|
|
62
64
|
- `hideSignOutButton` - By default on the top right corner of the widget will be displayed a sign out button. To hide that button set this prop to true.
|
|
63
65
|
|
|
66
|
+
- `sportal365Project` - The Sportal365 project. Used as a request header when communicating with Sportal365 APIs.
|
|
67
|
+
|
|
68
|
+
- `sportal365Infrastructure` - The Sportal365 infrastructure. Used to determine what authorization should be used when communicating with Sportal365 APIs. If no value given (when sportal365Project props is provided) it will be set to **shared** .
|
|
69
|
+
|
|
64
70
|
## Translation
|
|
65
71
|
|
|
66
72
|
You can easily translate Fans United Configuration Management Widget in your language! You just need to pass an object to `labels` **prop** with concrete keys and values and that's it! Here's an example how you can do it:
|
|
@@ -71,6 +77,7 @@ import { ConfigurationManager } from 'fansunited-widget-client-configuration';
|
|
|
71
77
|
const labels = {
|
|
72
78
|
clientConfigErrorMessage: "There was a problem fetching client's configuration. Please try again",
|
|
73
79
|
userNotFound: 'User not found. Please try again',
|
|
80
|
+
signOut: 'Sign Out',
|
|
74
81
|
language: 'Language',
|
|
75
82
|
profilePreferences: 'Profile Preferences',
|
|
76
83
|
cacheTTL: 'Cache TTL',
|
|
@@ -79,6 +86,7 @@ const labels = {
|
|
|
79
86
|
update: 'Update Configuration',
|
|
80
87
|
configTitle: 'Configure Fans United',
|
|
81
88
|
configDescription: 'Customize different features of Fans United',
|
|
89
|
+
configLanguageTitle: 'Language Configuration',
|
|
82
90
|
defaultLanguage: 'Default language',
|
|
83
91
|
defaultLanguageHelperText: 'What is the default language of your content? This field, if different from English, would be used in our translation tools.',
|
|
84
92
|
availableLanguages: 'Available languages',
|
|
@@ -95,11 +103,76 @@ const labels = {
|
|
|
95
103
|
id: 'ID',
|
|
96
104
|
name: 'Name',
|
|
97
105
|
addCategory: 'Add Category',
|
|
98
|
-
preferences:
|
|
106
|
+
preferences: 'Preferences',
|
|
99
107
|
addPreference: 'Add Preference',
|
|
100
108
|
selectCategories: 'Select categories for new preference',
|
|
101
109
|
uniqueCategoriesIdErrorMessage: `Categories' IDs must be unique!`,
|
|
102
|
-
uniquePreferencesIdErrorMessage: `Preferences' IDs must be unique
|
|
110
|
+
uniquePreferencesIdErrorMessage: `Preferences' IDs must be unique!`,
|
|
111
|
+
uploadImage: 'Upload Image',
|
|
112
|
+
sportal365Images: 'Sportal365 Images',
|
|
113
|
+
search: 'Search',
|
|
114
|
+
clearImage: 'Clear image',
|
|
115
|
+
copyUrl: 'Copy URL',
|
|
116
|
+
viewImage: 'View image',
|
|
117
|
+
cropImage: 'Crop image',
|
|
118
|
+
aspectRatio: 'Aspect ratio',
|
|
119
|
+
crop: 'Crop',
|
|
120
|
+
reset: 'Reset',
|
|
121
|
+
urlCopiedToClipboardMessage: 'URL copied to clipboard',
|
|
122
|
+
imageDeletedMessage: 'Image deleted',
|
|
123
|
+
imageResetMessage: 'The initial size of the image has been restored',
|
|
124
|
+
fromDate: 'From Date',
|
|
125
|
+
toDate: 'To Date',
|
|
126
|
+
uploadingImageMessage: 'You have successfully uploaded image',
|
|
127
|
+
uploadingImageErrorMessage: 'There was a problem with uploading image to bucket. Please try again',
|
|
128
|
+
generateSignedInUrlErrorMessage: 'There was a problem generating signed in URL to store the image in bucket. Please try again',
|
|
129
|
+
encryptingImageErrorMessage: 'There was a problem with encrypting image before uploading it to bucket. Please try again',
|
|
130
|
+
searchImage: 'Search image',
|
|
131
|
+
hideFilters: 'Hide filters',
|
|
132
|
+
showFilters: 'Show filters',
|
|
133
|
+
searchSportal365ImagesErrorMessage: 'There was a problem with searching images from Sportal 365 API. Please try again',
|
|
134
|
+
previous: 'Previous',
|
|
135
|
+
next: 'Next',
|
|
136
|
+
add: 'Add',
|
|
137
|
+
branding: 'Branding',
|
|
138
|
+
noBrandingsFound: 'No brandings found',
|
|
139
|
+
createFirstBrandingTemplate: 'Create your first branding template to get started',
|
|
140
|
+
createBranding: 'Create Branding',
|
|
141
|
+
colors: 'Colors',
|
|
142
|
+
noColorsDefined: 'No colors defined',
|
|
143
|
+
image: 'image',
|
|
144
|
+
images: 'images',
|
|
145
|
+
noImages: 'No images',
|
|
146
|
+
url: 'URL',
|
|
147
|
+
urls: 'URLs',
|
|
148
|
+
noUrls: 'No URLs',
|
|
149
|
+
newBranding: 'New Branding',
|
|
150
|
+
deleteBranding: 'Delete',
|
|
151
|
+
deleteBrandingConfirmation: 'branding? This action cannot be undone.',
|
|
152
|
+
close: 'Close',
|
|
153
|
+
brandingCreatedMessage: 'Branding created successfully',
|
|
154
|
+
brandingUpdatedMessage: 'Branding updated successfully',
|
|
155
|
+
brandingDeletedMessage: 'Branding deleted successfully',
|
|
156
|
+
createBrandingErrorMessage: 'There was a problem creating branding. Please try again',
|
|
157
|
+
updateBrandingErrorMessage: 'There was a problem updating branding. Please try again',
|
|
158
|
+
deleteBrandingErrorMessage: 'There was a problem deleting branding. Please try again',
|
|
159
|
+
fetchBrandingsErrorMessage: 'There was a problem fetching brandings. Please try again',
|
|
160
|
+
mainLogo: 'Main Logo',
|
|
161
|
+
mobileLogo: 'Mobile logo',
|
|
162
|
+
backgroundImage: 'Background image',
|
|
163
|
+
mobileBackgroundImage: 'Mobile background image',
|
|
164
|
+
additionalImage: 'Additional image',
|
|
165
|
+
primaryColor: 'Primary color',
|
|
166
|
+
secondaryColor: 'Secondary color',
|
|
167
|
+
contentColor: 'Content color',
|
|
168
|
+
backgroundColor: 'Background color',
|
|
169
|
+
borderColor: 'Border color',
|
|
170
|
+
additionalColor: 'Additional color',
|
|
171
|
+
primaryUrl: 'Primary URL',
|
|
172
|
+
secondaryUrl: 'Secondary URL',
|
|
173
|
+
privacyPolicyUrl: 'Privacy policy URL',
|
|
174
|
+
termsAndConditionsUrl: 'Terms and conditions URL',
|
|
175
|
+
additionalUrl: 'Additional URL',
|
|
103
176
|
};
|
|
104
177
|
|
|
105
178
|
const App = () => {
|
|
@@ -118,6 +191,7 @@ Here is all information about **`LabelsModel`**:
|
|
|
118
191
|
| :-------------: |:-------------:| :-----:|
|
|
119
192
|
| `clientConfigErrorMessage` | Toast error message when fetching client configuration fails. | There was a problem fetching client's configuration. Please try again |
|
|
120
193
|
| `userNotFound` | On login screen when client gives invalid information about email or password. | User not found. Please try again |
|
|
194
|
+
| `signOut` | Label for sign out button. | Sign Out |
|
|
121
195
|
| `language` | Label for language tab. | Language |
|
|
122
196
|
| `profilePreferences` | Label for profile preferences tab. | Profile Preferences |
|
|
123
197
|
| `cacheTTL` | Label for cache TTL tab. | Cache TTL |
|
|
@@ -126,6 +200,7 @@ Here is all information about **`LabelsModel`**:
|
|
|
126
200
|
| `update` | Label for management button. | Update Configuration |
|
|
127
201
|
| `configTitle` | Title of the management screen. | Configure Fans United |
|
|
128
202
|
| `configDescription` | Description of the management screen. | Customize different features of Fans United |
|
|
203
|
+
| `configLanguageTitle` | Title for language configuration section. | Language Configuration |
|
|
129
204
|
| `defaultLanguage` | Label for default language select. | Default language |
|
|
130
205
|
| `defaultLanguageHelperText` | Description for default language select. | What is the default language of your content? This field, if different from English, would be used in our translation tools. |
|
|
131
206
|
| `availableLanguages` | Label for available languages group container. | Available languages |
|
|
@@ -147,9 +222,90 @@ Here is all information about **`LabelsModel`**:
|
|
|
147
222
|
| `selectCategories` | Info text for selecting categories for new preference creation |Select categories for new preference |
|
|
148
223
|
| `uniqueCategoriesIdErrorMessage` | Error validation message when new category added doesn't have unique ID | Categories' IDs must be unique! |
|
|
149
224
|
| `uniquePreferencesIdErrorMessage` | Error validation message when new preference added doesn't have unique ID | Preferences' IDs must be unique! |
|
|
225
|
+
| `uploadImage` | Label for upload image tab in image upload card | Upload Image |
|
|
226
|
+
| `sportal365Images` | Label for Sportal365 images tab in image upload card | Sportal365 Images |
|
|
227
|
+
| `search` | Label for search button | Search |
|
|
228
|
+
| `clearImage` | Label for clear image button | Clear image |
|
|
229
|
+
| `copyUrl` | Label for copy URL button | Copy URL |
|
|
230
|
+
| `viewImage` | Label for view image button | View image |
|
|
231
|
+
| `cropImage` | Label for crop image button | Crop image |
|
|
232
|
+
| `aspectRatio` | Label for aspect ratio input | Aspect ratio |
|
|
233
|
+
| `crop` | Label for crop button in crop modal | Crop |
|
|
234
|
+
| `reset` | Label for reset button in crop modal | Reset |
|
|
235
|
+
| `urlCopiedToClipboardMessage` | Toast success message when URL is copied to clipboard | URL copied to clipboard |
|
|
236
|
+
| `imageDeletedMessage` | Toast success message when image is deleted | Image deleted |
|
|
237
|
+
| `imageResetMessage` | Toast success message when image is reset to initial size | The initial size of the image has been restored |
|
|
238
|
+
| `fromDate` | Label for from date filter in Sportal365 images | From Date |
|
|
239
|
+
| `toDate` | Label for to date filter in Sportal365 images | To Date |
|
|
240
|
+
| `uploadingImageMessage` | Toast success message when image is uploaded | You have successfully uploaded image |
|
|
241
|
+
| `uploadingImageErrorMessage` | Toast error message when uploading image fails | There was a problem with uploading image to bucket. Please try again |
|
|
242
|
+
| `generateSignedInUrlErrorMessage` | Toast error message when generating signed URL fails | There was a problem generating signed in URL to store the image in bucket. Please try again |
|
|
243
|
+
| `encryptingImageErrorMessage` | Toast error message when encrypting image fails | There was a problem with encrypting image before uploading it to bucket. Please try again |
|
|
244
|
+
| `searchImage` | Placeholder for search image input | Search image |
|
|
245
|
+
| `hideFilters` | Label for hide filters button in Sportal365 images | Hide filters |
|
|
246
|
+
| `showFilters` | Label for show filters button in Sportal365 images | Show filters |
|
|
247
|
+
| `searchSportal365ImagesErrorMessage` | Toast error message when searching Sportal365 images fails | There was a problem with searching images from Sportal 365 API. Please try again |
|
|
248
|
+
| `previous` | Label for previous page button in Sportal365 images pagination | Previous |
|
|
249
|
+
| `next` | Label for next page button in Sportal365 images pagination | Next |
|
|
250
|
+
| `add` | Label for add button | Add |
|
|
251
|
+
| `branding` | Label for branding tab | Branding |
|
|
252
|
+
| `noBrandingsFound` | Message when no brandings are found | No brandings found |
|
|
253
|
+
| `createFirstBrandingTemplate` | Helper text for creating first branding | Create your first branding template to get started |
|
|
254
|
+
| `createBranding` | Label for create branding button | Create Branding |
|
|
255
|
+
| `colors` | Label for colors section | Colors |
|
|
256
|
+
| `noColorsDefined` | Message when no colors are defined | No colors defined |
|
|
257
|
+
| `image` | Label for single image (singular) | image |
|
|
258
|
+
| `images` | Label for multiple images (plural) | images |
|
|
259
|
+
| `noImages` | Message when no images are present | No images |
|
|
260
|
+
| `url` | Label for single URL (singular) | URL |
|
|
261
|
+
| `urls` | Label for multiple URLs (plural) | URLs |
|
|
262
|
+
| `noUrls` | Message when no URLs are present | No URLs |
|
|
263
|
+
| `newBranding` | Title for new branding modal | New Branding |
|
|
264
|
+
| `deleteBranding` | Label for delete branding action | Delete |
|
|
265
|
+
| `deleteBrandingConfirmation` | Confirmation message for deleting branding | branding? This action cannot be undone. |
|
|
266
|
+
| `close` | Label for close button | Close |
|
|
267
|
+
| `brandingCreatedMessage` | Toast success message when branding is created | Branding created successfully |
|
|
268
|
+
| `brandingUpdatedMessage` | Toast success message when branding is updated | Branding updated successfully |
|
|
269
|
+
| `brandingDeletedMessage` | Toast success message when branding is deleted | Branding deleted successfully |
|
|
270
|
+
| `createBrandingErrorMessage` | Toast error message when creating branding fails | There was a problem creating branding. Please try again |
|
|
271
|
+
| `updateBrandingErrorMessage` | Toast error message when updating branding fails | There was a problem updating branding. Please try again |
|
|
272
|
+
| `deleteBrandingErrorMessage` | Toast error message when deleting branding fails | There was a problem deleting branding. Please try again |
|
|
273
|
+
| `fetchBrandingsErrorMessage` | Toast error message when fetching brandings fails | There was a problem fetching brandings. Please try again |
|
|
274
|
+
| `primaryColor` | Label for primary color input in branding accordion | Primary color |
|
|
275
|
+
| `secondaryColor` | Label for secondary color input in branding accordion | Secondary color |
|
|
276
|
+
| `contentColor` | Label for content color input in branding accordion | Content color |
|
|
277
|
+
| `backgroundColor` | Label for background color input in branding accordion | Background color |
|
|
278
|
+
| `borderColor` | Label for border color input in branding accordion | Border color |
|
|
279
|
+
| `additionalColor` | Label for additional color input in branding accordion | Additional color |
|
|
280
|
+
| `primaryUrl` | Label for primary url input in branding accordion | Primary URL |
|
|
281
|
+
| `secondaryUrl` | Label for secondary url input in branding accordion | Secondary URL |
|
|
282
|
+
| `privacyPolicyUrl` | Label for privacy policy url input in branding accordion | Privacy policy URL |
|
|
283
|
+
| `termsAndConditionsUrl` | Label for terms and conditions url input in branding accordion | Terms and conditions URL |
|
|
284
|
+
| `additionalUrl` | Label for additional url input in branding accordion | Additional URL |
|
|
285
|
+
| `mainLogo` | Label for main logo input in branding accordion | Main Logo |
|
|
286
|
+
| `mobileLogo` | Label for mobile logo input in branding accordion | Mobile logo |
|
|
287
|
+
| `backgroundImage` | Label for background image input in branding accordion | Background image |
|
|
288
|
+
| `mobileBackgroundImage` | Label for mobile background image input in branding accordion | Mobile background image |
|
|
289
|
+
| `additionalImage` | Label for additional image input in branding accordion | Additional image |
|
|
150
290
|
|
|
151
291
|
## Changelog
|
|
152
292
|
|
|
293
|
+
### 1.6.0 - 2026-01-09
|
|
294
|
+
|
|
295
|
+
- **Added:**
|
|
296
|
+
- Branding management with card based list view and modal based form
|
|
297
|
+
- Ability to copy the configuration ID of User-Centric Widgets to clipboard
|
|
298
|
+
|
|
299
|
+
### 1.5.0 - 2025-12-23
|
|
300
|
+
|
|
301
|
+
- **Added:**
|
|
302
|
+
- New card container in miscellaneous configuration general settings for rules display
|
|
303
|
+
- Integration with Sportal365 Images API for image search and selection
|
|
304
|
+
|
|
305
|
+
- **Improved:**
|
|
306
|
+
- Default image configuration now supports multiple input methods (URL input or image upload)
|
|
307
|
+
- Clients can choose between legacy URL input behavior or new image upload functionality
|
|
308
|
+
|
|
153
309
|
### 1.4.0 - 2025-11-29
|
|
154
310
|
|
|
155
311
|
- **Added:**
|
package/components/Main.d.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IBranding } from 'fansunited-management-components/src/models/IBranding';
|
|
3
|
+
interface BrandingFormProps {
|
|
4
|
+
name: string;
|
|
5
|
+
branding: IBranding;
|
|
6
|
+
onNameChange: (value: string) => void;
|
|
7
|
+
onBrandingChange: (branding: IBranding) => void;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onSave: () => void;
|
|
10
|
+
isSubmitting: boolean;
|
|
11
|
+
isEditing: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const BrandingForm: React.FC<BrandingFormProps>;
|
|
14
|
+
export default BrandingForm;
|