fansunited-widget-client-configuration 1.4.0 → 1.5.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 +72 -2
- package/components/Main.d.ts +2 -0
- package/configuration-manager.es.js +26440 -26211
- package/configuration-manager.umd.js +312 -309
- package/models/Labels/LabelsModel.d.ts +25 -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,36 @@ 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'
|
|
103
136
|
};
|
|
104
137
|
|
|
105
138
|
const App = () => {
|
|
@@ -118,6 +151,7 @@ Here is all information about **`LabelsModel`**:
|
|
|
118
151
|
| :-------------: |:-------------:| :-----:|
|
|
119
152
|
| `clientConfigErrorMessage` | Toast error message when fetching client configuration fails. | There was a problem fetching client's configuration. Please try again |
|
|
120
153
|
| `userNotFound` | On login screen when client gives invalid information about email or password. | User not found. Please try again |
|
|
154
|
+
| `signOut` | Label for sign out button. | Sign Out |
|
|
121
155
|
| `language` | Label for language tab. | Language |
|
|
122
156
|
| `profilePreferences` | Label for profile preferences tab. | Profile Preferences |
|
|
123
157
|
| `cacheTTL` | Label for cache TTL tab. | Cache TTL |
|
|
@@ -126,6 +160,7 @@ Here is all information about **`LabelsModel`**:
|
|
|
126
160
|
| `update` | Label for management button. | Update Configuration |
|
|
127
161
|
| `configTitle` | Title of the management screen. | Configure Fans United |
|
|
128
162
|
| `configDescription` | Description of the management screen. | Customize different features of Fans United |
|
|
163
|
+
| `configLanguageTitle` | Title for language configuration section. | Language Configuration |
|
|
129
164
|
| `defaultLanguage` | Label for default language select. | Default language |
|
|
130
165
|
| `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
166
|
| `availableLanguages` | Label for available languages group container. | Available languages |
|
|
@@ -147,9 +182,44 @@ Here is all information about **`LabelsModel`**:
|
|
|
147
182
|
| `selectCategories` | Info text for selecting categories for new preference creation |Select categories for new preference |
|
|
148
183
|
| `uniqueCategoriesIdErrorMessage` | Error validation message when new category added doesn't have unique ID | Categories' IDs must be unique! |
|
|
149
184
|
| `uniquePreferencesIdErrorMessage` | Error validation message when new preference added doesn't have unique ID | Preferences' IDs must be unique! |
|
|
185
|
+
| `uploadImage` | Label for upload image tab in image upload card | Upload Image |
|
|
186
|
+
| `sportal365Images` | Label for Sportal365 images tab in image upload card | Sportal365 Images |
|
|
187
|
+
| `search` | Label for search button | Search |
|
|
188
|
+
| `clearImage` | Label for clear image button | Clear image |
|
|
189
|
+
| `copyUrl` | Label for copy URL button | Copy URL |
|
|
190
|
+
| `viewImage` | Label for view image button | View image |
|
|
191
|
+
| `cropImage` | Label for crop image button | Crop image |
|
|
192
|
+
| `aspectRatio` | Label for aspect ratio input | Aspect ratio |
|
|
193
|
+
| `crop` | Label for crop button in crop modal | Crop |
|
|
194
|
+
| `reset` | Label for reset button in crop modal | Reset |
|
|
195
|
+
| `urlCopiedToClipboardMessage` | Toast success message when URL is copied to clipboard | URL copied to clipboard |
|
|
196
|
+
| `imageDeletedMessage` | Toast success message when image is deleted | Image deleted |
|
|
197
|
+
| `imageResetMessage` | Toast success message when image is reset to initial size | The initial size of the image has been restored |
|
|
198
|
+
| `fromDate` | Label for from date filter in Sportal365 images | From Date |
|
|
199
|
+
| `toDate` | Label for to date filter in Sportal365 images | To Date |
|
|
200
|
+
| `uploadingImageMessage` | Toast success message when image is uploaded | You have successfully uploaded image |
|
|
201
|
+
| `uploadingImageErrorMessage` | Toast error message when uploading image fails | There was a problem with uploading image to bucket. Please try again |
|
|
202
|
+
| `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 |
|
|
203
|
+
| `encryptingImageErrorMessage` | Toast error message when encrypting image fails | There was a problem with encrypting image before uploading it to bucket. Please try again |
|
|
204
|
+
| `searchImage` | Placeholder for search image input | Search image |
|
|
205
|
+
| `hideFilters` | Label for hide filters button in Sportal365 images | Hide filters |
|
|
206
|
+
| `showFilters` | Label for show filters button in Sportal365 images | Show filters |
|
|
207
|
+
| `searchSportal365ImagesErrorMessage` | Toast error message when searching Sportal365 images fails | There was a problem with searching images from Sportal 365 API. Please try again |
|
|
208
|
+
| `previous` | Label for previous page button in Sportal365 images pagination | Previous |
|
|
209
|
+
| `next` | Label for next page button in Sportal365 images pagination | Next |
|
|
150
210
|
|
|
151
211
|
## Changelog
|
|
152
212
|
|
|
213
|
+
### 1.5.0 - 2025-12-23
|
|
214
|
+
|
|
215
|
+
- **Added:**
|
|
216
|
+
- New card container in miscellaneous configuration general settings for rules display
|
|
217
|
+
- Integration with Sportal365 Images API for image search and selection
|
|
218
|
+
|
|
219
|
+
- **Improved:**
|
|
220
|
+
- Default image configuration now supports multiple input methods (URL input or image upload)
|
|
221
|
+
- Clients can choose between legacy URL input behavior or new image upload functionality
|
|
222
|
+
|
|
153
223
|
### 1.4.0 - 2025-11-29
|
|
154
224
|
|
|
155
225
|
- **Added:**
|
package/components/Main.d.ts
CHANGED