fansunited-widget-either-or 1.0.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 +310 -0
- package/components/Buttons/ActionsButtons.d.ts +9 -0
- package/components/Buttons/AddButton.d.ts +7 -0
- package/components/Buttons/ClearButton.d.ts +6 -0
- package/components/Buttons/EitherOrsCard.d.ts +3 -0
- package/components/Buttons/HomeButtons.d.ts +7 -0
- package/components/Buttons/ManageButtons.d.ts +8 -0
- package/components/Buttons/RemoveButton.d.ts +7 -0
- package/components/Buttons/SignOutButton.d.ts +6 -0
- package/components/Buttons/Sportal365/Sportal365Button.d.ts +7 -0
- package/components/Buttons/Sportal365/Sportal365QuestionAndOptionButton.d.ts +11 -0
- package/components/Cards/ImagesCard.d.ts +6 -0
- package/components/Cards/WidgetCard.d.ts +3 -0
- package/components/EitherOrs/EitherOrs.d.ts +6 -0
- package/components/Login/Login.d.ts +6 -0
- package/components/Main.d.ts +13 -0
- package/components/MainLayout.d.ts +6 -0
- package/components/Management/Context/Context.d.ts +9 -0
- package/components/Management/Context/FootballEntitySelect/FootballEntitySelect.d.ts +10 -0
- package/components/Management/Context/SelectTagType/SelectTagType.d.ts +14 -0
- package/components/Management/DynamicFields/DynamicFields.d.ts +8 -0
- package/components/Management/EitherOrSelect/EitherOrSelect.d.ts +8 -0
- package/components/Management/Flags/Flags.d.ts +8 -0
- package/components/Management/IDInput/IDInput.d.ts +6 -0
- package/components/Management/Images/FileUploader.d.ts +9 -0
- package/components/Management/Images/Images.d.ts +9 -0
- package/components/Management/Images/Sportal365/Filters/Sportal365ImagesFromToFilter.d.ts +7 -0
- package/components/Management/Images/Sportal365/Sportal365Images.d.ts +13 -0
- package/components/Management/Images/Sportal365/Sportal365ImagesPagination.d.ts +10 -0
- package/components/Management/Images/Sportal365/Sportal365ImagesSearch.d.ts +8 -0
- package/components/Management/InformationInput/InformationInput.d.ts +11 -0
- package/components/Management/ManageEitherOr.d.ts +12 -0
- package/components/Management/ManagementScreenHeader.d.ts +8 -0
- package/components/Management/NumberInput/NumberInput.d.ts +8 -0
- package/components/Management/Options/OptionImages.d.ts +9 -0
- package/components/Management/Options/OptionInput.d.ts +9 -0
- package/components/Management/Options/Options.d.ts +9 -0
- package/components/Management/Points/Points.d.ts +9 -0
- package/components/Management/RichText/RichText.d.ts +8 -0
- package/components/Management/Type/Type.d.ts +7 -0
- package/components/Modals/ConfirmationModal.d.ts +12 -0
- package/components/Modals/PreviewModal.d.ts +10 -0
- package/components/Pagination/Pagination.d.ts +9 -0
- package/components/Portals/Portal.d.ts +6 -0
- package/components/Spinner/ButtonSpinner.d.ts +3 -0
- package/components/Spinner/Spinner.d.ts +3 -0
- package/components/Table/TableBody.d.ts +10 -0
- package/components/Table/TableHeader.d.ts +3 -0
- package/constants/constants.d.ts +4 -0
- package/constants/placeholders.d.ts +1 -0
- package/context/ApiContext.d.ts +15 -0
- package/context/AuthContext.d.ts +8 -0
- package/context/LabelsContext.d.ts +8 -0
- package/either-or-manager.es.d.ts +1 -0
- package/either-or-manager.es.js +36771 -0
- package/either-or-manager.umd.js +2335 -0
- package/factories/EitherOrFactory.d.ts +33 -0
- package/firebase/firebase.d.ts +2 -0
- package/firebase/getToken.d.ts +1 -0
- package/helpers/helpers.d.ts +27 -0
- package/hooks/useConstantContext.d.ts +2 -0
- package/index.d.ts +1 -0
- package/models/EitherOr/EitherOrById.d.ts +42 -0
- package/models/Features/Features.d.ts +7 -0
- package/models/Labels/LabelsModel.d.ts +115 -0
- package/models/RequestBody/RequestBody.d.ts +21 -0
- package/models/RequestBody/SignedInUrlRequestBody.d.ts +6 -0
- package/models/Select/ReactSelectBaseOption.d.ts +5 -0
- package/models/Select/SelectOption.d.ts +9 -0
- package/models/Sportal365/Sportal365Config.d.ts +4 -0
- package/models/Sportal365/Sportal365SearchImages.d.ts +21 -0
- package/models/Sportal365/Sportal365SearchImagesFilters.d.ts +4 -0
- package/package.json +8 -0
- package/portals/ModalPortal.d.ts +6 -0
- package/services/HashService.d.ts +4 -0
- package/services/HttpsService.d.ts +30 -0
- package/style.css +6 -0
- package/types/types.d.ts +6 -0
- package/validators/EitherOrValidator.d.ts +21 -0
package/README.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# Either/Or Management Widget
|
|
2
|
+
|
|
3
|
+
Welcome to Fans United Either/Or Management Widget. The widget allows staff members with sufficient permissions to create, update and delete Either/Or mini-games. You can use this widget as it is and embed it in your platform, or you can use the Management Panel. Either/Or is a mini-game where users receives two options and he needs to answer which is one more or less for a specified time. With successful installation, you can create, edit and delete a Either/Or mini-game.
|
|
4
|
+
|
|
5
|
+
## Installation and usage
|
|
6
|
+
|
|
7
|
+
The easiest way to use fansunited-widget-either-or-management is to install it from npm as follows:
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
npm install fansunited-widget-either-or
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
or:
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
yarn add fansunited-widget-either-or
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Here is an example how you can **integrate** Fans United Either/Or Management Widget:
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
import 'fansunited-widget-either-or/style.css';
|
|
23
|
+
import { EitherOrManager } from 'fansunited-widget-either-or';
|
|
24
|
+
|
|
25
|
+
const App = () => {
|
|
26
|
+
return (
|
|
27
|
+
<EitherOrManager
|
|
28
|
+
fansUnitedApiKey={'your-api-key'}
|
|
29
|
+
fansUnitedClientId={'your-client-id'} />
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
- The widget is bundled as a React component and its usage is as simple as the **above example**
|
|
37
|
+
|
|
38
|
+
- Don't worry about your project's CSS. The widget's styling is done with [Tailwind CSS](https://tailwindcss.com/) and all classes are prefixed to avoid collisions with your existing CSS. This means that the widget's CSS will **NOT** affect yours. **One important thing is that you need to import `style.css` file from package folder:**
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
import 'fansunited-widget-either-or/style.css';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**N.B: If you are using an entry point for importing all your stylings, you need to `import fansunited-widget-either-or/style.css` there as well**
|
|
45
|
+
|
|
46
|
+
- **Easy translation in every language.** For more information [check our Translation heading](#translation).
|
|
47
|
+
|
|
48
|
+
## Props
|
|
49
|
+
|
|
50
|
+
```javascript
|
|
51
|
+
type EitherOrManagerProps = {
|
|
52
|
+
fansUnitedApiKey: string;
|
|
53
|
+
fansUnitedClientId: string;
|
|
54
|
+
fansUnitedLanguage?: string;
|
|
55
|
+
fansUnitedEnvironment?: string;
|
|
56
|
+
sportal365Project?: string;
|
|
57
|
+
sportal365Infrastructure?: 'shared' | 'betway';
|
|
58
|
+
labels?: LabelsModel;
|
|
59
|
+
};
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Fans United Either/Or Management Widget depends on [Fans United JS SDK](https://docs.fansunitedmedia.com/sdks/js) and [Fans United Client API](https://docs.fansunitedmedia.com/apis/client.api). Thats why `fansUnitedApiKey` and `fansUnitedClientId` are **required**. They will be provided to you from Fans United team. For other optional props here is some information:
|
|
63
|
+
|
|
64
|
+
- `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).
|
|
65
|
+
|
|
66
|
+
- `fansUnitedEnvironment` - You can run the widget in the following environments: **staging**, **production** and **watg**. If no value given it will be set to **production** (prod).
|
|
67
|
+
|
|
68
|
+
- `labels` - you can easily translate all labels, UI messages, descriptions, placeholders and etc. with this prop. By default, Fans United Match Quiz Management Widget is available in **English** so if no value is given, the widget will be translated in English.
|
|
69
|
+
|
|
70
|
+
- `sportal365Project` - The Sportal365 project. Used as a request header when communicating with Sportal365 APIs.
|
|
71
|
+
|
|
72
|
+
- `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** .
|
|
73
|
+
|
|
74
|
+
## Translation
|
|
75
|
+
|
|
76
|
+
You can easily translate Fans United Either/Or 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:
|
|
77
|
+
|
|
78
|
+
```javascript
|
|
79
|
+
import 'fansunited-widget-either-or/style.css';
|
|
80
|
+
import { EitherOrManager } from 'fansunited-widget-either-or';
|
|
81
|
+
|
|
82
|
+
const labels = {
|
|
83
|
+
userNotFound: 'User not found. Please try again',
|
|
84
|
+
noGamesFound: "No Either/Or games were found. You can create one by clicking the button 'Create'",
|
|
85
|
+
signOut: 'Sign out',
|
|
86
|
+
timeFormat: 'DD.MM.YYYY, HH:mm',
|
|
87
|
+
getEitherOrsErrorMessage: 'There was a problem with fetching list of Either/Or games',
|
|
88
|
+
title: 'Title',
|
|
89
|
+
status: 'Status',
|
|
90
|
+
creationDate: 'Created at',
|
|
91
|
+
actions: 'Actions',
|
|
92
|
+
create: 'Create',
|
|
93
|
+
edit: 'Edit',
|
|
94
|
+
save: 'Save',
|
|
95
|
+
preview: 'Preview',
|
|
96
|
+
close: 'Close',
|
|
97
|
+
titlePlaceholder: 'Provide a title for your Either/Or',
|
|
98
|
+
description: 'Description',
|
|
99
|
+
descriptionPlaceholder: 'Describe your Either/Or',
|
|
100
|
+
images: 'Images',
|
|
101
|
+
rules: 'Rules',
|
|
102
|
+
rulesPlaceholder: 'Describe your rules for participating in Either/Or',
|
|
103
|
+
adContent: 'Ad content',
|
|
104
|
+
adContentPlaceholder: 'Place your ad content in Either/Or',
|
|
105
|
+
optionImages: 'Option images',
|
|
106
|
+
main: 'Main',
|
|
107
|
+
cover: 'Cover',
|
|
108
|
+
mobile: 'Mobile',
|
|
109
|
+
imagePlaceholder: 'Paste your image as valid URL or as relative path',
|
|
110
|
+
active: 'Active',
|
|
111
|
+
inactive: 'Inactive',
|
|
112
|
+
statusDescription: "When Either/Or is Inactive, then users are not allowed to participate",
|
|
113
|
+
winningCondition: 'Winning condition',
|
|
114
|
+
winningConditionDescription: "Winning condition determines the correct choice out of a pair of options presented to the user. When is set to 'More,' the user must select the option that has a greater value to win. Conversely, if is set to 'Less,' the winning choice is the one with the lesser value",
|
|
115
|
+
more: 'More',
|
|
116
|
+
less: 'Less',
|
|
117
|
+
time: 'Time',
|
|
118
|
+
timePlaceholder: 'Enter the time limit for answering questions by users. Time is in seconds',
|
|
119
|
+
lives: 'Lives',
|
|
120
|
+
livesPlaceholder: 'Enter how many lives the user will have during a game',
|
|
121
|
+
points: 'Points',
|
|
122
|
+
pointsDescription: 'Set the threshold of consecutive correct answers after which points are awarded and define the amount of points received from this step onwards.Valid value for correct steps is between 0-50 and for score 1-100',
|
|
123
|
+
pointNumber: 'Point number',
|
|
124
|
+
pointsCorrectSteps: 'Correct steps',
|
|
125
|
+
pointsCorrectStepsPlaceholder: 'Set the number of correct steps needed in a row to earn points',
|
|
126
|
+
pointsScore: 'Score',
|
|
127
|
+
pointsScorePlaceholder: 'Set the points awarded per correct answer within the streak',
|
|
128
|
+
optionsDescription: 'Describe the options that users will select from during the game. Ensure to provide a minimum of 5 and a maximum of 100 options',
|
|
129
|
+
optionsValue: 'Value',
|
|
130
|
+
optionsValuePlaceholder: 'Type the value of the option',
|
|
131
|
+
repeatedValueMessage: 'You have entered a repeated value. Please enter a different one',
|
|
132
|
+
flags: 'Flags',
|
|
133
|
+
flagsPlaceholder: 'Type your flag and hit enter',
|
|
134
|
+
labels: 'Labels',
|
|
135
|
+
customFields: 'Custom fields',
|
|
136
|
+
dynamicFieldsDescription: 'You can create your custom attributes for easier way to connect or describe your Either/Or',
|
|
137
|
+
keyDynamicFields: 'Key',
|
|
138
|
+
valueDynamicFields: 'Value',
|
|
139
|
+
options: 'Options',
|
|
140
|
+
optionNumber: 'Option number',
|
|
141
|
+
context: 'Context',
|
|
142
|
+
content: 'Content',
|
|
143
|
+
tags: 'Tags',
|
|
144
|
+
entity: 'Entity',
|
|
145
|
+
campaign: 'Campaign',
|
|
146
|
+
tagNumber: 'Tag number',
|
|
147
|
+
id: 'ID',
|
|
148
|
+
idContentPlaceholder: 'Type the ID of your content',
|
|
149
|
+
idCampaignPlaceholder: 'Type the ID of your campaign',
|
|
150
|
+
label: 'Label',
|
|
151
|
+
labelContentPlaceholder: "Type the content's label",
|
|
152
|
+
labelCampaignPlaceholder: "Type the campaign's label",
|
|
153
|
+
type: 'Type',
|
|
154
|
+
typeDescription: 'Select the Either/Or type. You can set the types in our Management Portal by going to Features, then clicking on the Either/Or page',
|
|
155
|
+
noType: "No type",
|
|
156
|
+
deleteLabel: 'Delete',
|
|
157
|
+
cancelLabel: 'Cancel',
|
|
158
|
+
confirmationQuestionLabel: 'Are you sure you want to delete',
|
|
159
|
+
typeContentPlaceholder: "Type the content's type",
|
|
160
|
+
previewEitherOr: 'Preview Either/Or',
|
|
161
|
+
getFootballEntitiesErrorMessage: "There was a problem with fetching football's data",
|
|
162
|
+
createEitherOrMessage: 'You have successfully created Either/Or',
|
|
163
|
+
createEitherOrErrorMessage: 'There was a problem creating Either/Or. Please try again',
|
|
164
|
+
titleRequiredFieldValidationMessage: 'Title field is required!',
|
|
165
|
+
livesFieldValidationMessage: "The value for 'lives' field is invalid. The valid one is withing the range of 1-20",
|
|
166
|
+
timeFieldValidationMessage: "The value for 'time' field is invalid. The valid one is withing the range of 1-20",
|
|
167
|
+
pointsFieldValidationMessage: "Points contain value where score or correct steps is an invalid one",
|
|
168
|
+
optionsFieldValidationMessage: "Options must not contain any repeated IDs",
|
|
169
|
+
tagsInvalidFieldValidationMessage: 'Tag entity is required!',
|
|
170
|
+
getEitherOrErrorMessage: 'There was a problem with fetching Either/Or data. Please try again',
|
|
171
|
+
deleteEitherOrMessage: 'You have successfully deleted Either/Or',
|
|
172
|
+
deleteEitherOrErrorMessage: 'There was a problem with deleting Either/Or. Please try again',
|
|
173
|
+
updateEitherOrMessage: 'You have successfully updated Either/Or',
|
|
174
|
+
updateEitherOrErrorMessage: 'There was a problem updating Either/Or. Please try again',
|
|
175
|
+
uploadingImageMessage: 'You have successfully uploaded image',
|
|
176
|
+
generateSignedInUrlErrorMessage: 'There was a problem generating signed in URL to store the image in bucket. Please try again',
|
|
177
|
+
uploadingImageErrorMessage: 'There was a problem with uploading image to bucket. Please try again',
|
|
178
|
+
encryptingImageErrorMessage: 'There was a problem with encrypting image before uploading it to bucket. Please try again',
|
|
179
|
+
clear: 'Clear'
|
|
180
|
+
searchSportal365ImagesErrorMessage: 'There was a problem with searching images from Sportal 365 API. Please try again'
|
|
181
|
+
searchImage: 'Search image',
|
|
182
|
+
clearFromToFilterSportal365ImagesMessage: 'You have cleared from/to filter for Sportal365 search images',
|
|
183
|
+
hideFilters: 'Hide filters',
|
|
184
|
+
showFilters: 'Show filters',
|
|
185
|
+
dateFromTo: 'Date from/to',
|
|
186
|
+
dateFromToPlaceholder: 'Select Date...'
|
|
187
|
+
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const App = () => {
|
|
191
|
+
return (
|
|
192
|
+
<EitherOrManager
|
|
193
|
+
fansUnitedApiKey={'your-api-key'}
|
|
194
|
+
fansUnitedClientId={'your-client-id'}
|
|
195
|
+
labels={labels}/>
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Here is all information about **`LabelsModel`**:
|
|
201
|
+
|
|
202
|
+
| Key | Description | Default Value |
|
|
203
|
+
| :-------------: |:-------------:| :-----:|
|
|
204
|
+
| `userNotFound` | On login screen when client gives invalid information about email or password. | User not found. Please try again |
|
|
205
|
+
| `noGamesFound` | When there are no created games for specific client, this message will appear on screen. | No Either/Or games were found. You can create one by clicking the button 'Create' |
|
|
206
|
+
| `signOut` | Used as label on sign out button. | Sign out |
|
|
207
|
+
| `getEitherOrsErrorMessage` | [react-toastify](https://github.com/fkhadra/react-toastify) error message when request fails for fetching list of Either/Or. | There was a problem with fetching list of Either/Or games |
|
|
208
|
+
| `title` | Label for title | Title
|
|
209
|
+
| `status` | Status of a Either/Or | Status |
|
|
210
|
+
| `creationDate` | Date of created Either/Or in same format as given for **`timeFormat` prop** | Created at |
|
|
211
|
+
| `actions` | Two icon buttons with different actions | Actions |
|
|
212
|
+
| `create` | Label for management header | Create |
|
|
213
|
+
| `edit` | Label for management header | Edit |
|
|
214
|
+
| `save` | Label for save button | Save |
|
|
215
|
+
| `preview` | Label for preview button | Preview |
|
|
216
|
+
| `close` | Label for close button | Close |
|
|
217
|
+
| `titlePlaceholder` | Placeholder/desciption about title input field name on management screen. | Provide a title for your Either/Or |
|
|
218
|
+
| `timeFormat` | Timeformat for displaying dates. Widgets uses [dayjs](https://www.npmjs.com/package/dayjs) as a date dependency. | DD.MM.YYYY, HH:mm |
|
|
219
|
+
| `previous` | Label for pagination button. | Previous |
|
|
220
|
+
| `next` | Label for pagination button. | Next |
|
|
221
|
+
| `id` | Label for ID read only input field. | ID |
|
|
222
|
+
| `description` | Label for desciption input field on management screen. | Description |
|
|
223
|
+
| `descriptionPlaceholder` | Placeholder/desciption about input field for game description when creating/editing a game. | Describe your Either/Or |
|
|
224
|
+
| `images` | Label for images container. | Images |
|
|
225
|
+
| `rules` | Label for rules rich text. | Rules |
|
|
226
|
+
| `rulesPlaceholder` | Placeholder for rules rich text. | Describe your rules for participating in Either/Or |
|
|
227
|
+
| `adContent` | Label for AD content rich text. | Ad content |
|
|
228
|
+
| `adContentPlaceholder` | Placeholder for AD content rich text. | Place your ad content in Either/Or |
|
|
229
|
+
| `optionImages` | Label for option images container. | Option images |
|
|
230
|
+
| `main` | Label for main image. | Main |
|
|
231
|
+
| `cover` | Label for cover image. | Cover |
|
|
232
|
+
| `mobile` | Label for mobile image. | Mobile |
|
|
233
|
+
| `imagePlaceholder` | Placeholder for image inputs. | Paste your image as valid URL or as relative path |
|
|
234
|
+
| `active` | Label for status. | Active |
|
|
235
|
+
| `inactive` | Label for status. | Inactive |
|
|
236
|
+
| `statusDescription` | Description for status select. | When Either/Or is Inactive, then users are not allowed to participate |
|
|
237
|
+
| `winningCondition` | Label for winning condition select. | Winning condition |
|
|
238
|
+
| `winningConditionDescription` | Description for winning condition select. | Winning condition determines the correct choice out of a pair of options presented to the user. When is set to 'More,' the user must select the option that has a greater value to win. Conversely, if is set to 'Less,' the winning choice is the one with the lesser value |
|
|
239
|
+
| `more` | Label for more option. | More |
|
|
240
|
+
| `less` | Label for less option. | Less |
|
|
241
|
+
| `time` | Label for time input. | Time |
|
|
242
|
+
| `timePlaceholder` | Placeholder for time input. | Enter the time limit for answering questions by users. Time is in seconds |
|
|
243
|
+
| `lives` | Label for lives input. | Lives |
|
|
244
|
+
| `livesPlaceholder` | Placeholder for lives input. | Enter how many lives the user will have during a game |
|
|
245
|
+
| `points` | Label for points. | Points |
|
|
246
|
+
| `pointsDescription` | Description for points. | Set the threshold of consecutive correct answers after which points are awarded and define the amount of points received from this step onwards.Valid value for correct steps is between 0-50 and for score 1-100 |
|
|
247
|
+
| `pointNumber` | Label for point container. | Point number |
|
|
248
|
+
| `pointsCorrectSteps` | Label for points correct steps input. | Correct steps |
|
|
249
|
+
| `pointsCorrectStepsPlaceholder` | Placeholder for point correct steps input. | Set the number of correct steps needed in a row to earn points |
|
|
250
|
+
| `pointsScore` | Label for points score input. | Score |
|
|
251
|
+
| `pointsScorePlaceholder` | Placeholder for points score input. | Set the points awarded per correct answer within the streak |
|
|
252
|
+
| `optionsDescription` | Description for options. | Describe the options that users will select from during the game. Ensure to provide a minimum of 5 and a maximum of 100 options |
|
|
253
|
+
| `optionsValue` | Label for options value. | Value |
|
|
254
|
+
| `optionsValuePlaceholder` | Placeholder for options value. | Type the value of the option |
|
|
255
|
+
| `flags` | Label for choosing flags. | Flags |
|
|
256
|
+
| `flagsPlaceholder` | Placeholder on input field for flags | Type your flag and hit enter |
|
|
257
|
+
| `labels` | Label for labels container | Labels |
|
|
258
|
+
| `customFields` | Label for custom fields container | Custom fields |
|
|
259
|
+
| `dynamicFieldsDescription` | Description paragraph for labels and custom fields containers | You can create your custom attributes for easier way to connect or describe your Either/Or |
|
|
260
|
+
| `keyDynamicFields` | Label for key input | Key |
|
|
261
|
+
| `valueDynamicFields` | Label for value input | Value |
|
|
262
|
+
| `repeatedValueMessage` | [react-toastify](https://github.com/fkhadra/react-toastify) warning message when client submits same flag. | You have entered a repeated value. Please enter a different one |
|
|
263
|
+
| `options` | Label for options. | Options |
|
|
264
|
+
| `optionNumber` | Label for option container's header. | Option number |
|
|
265
|
+
| `correct` | Label for correct radio button. | Correct |
|
|
266
|
+
| `context` | Label for context container. | Context |
|
|
267
|
+
| `content` | Label for context content container. | Content |
|
|
268
|
+
| `tags` | Label for context tags container. | Tags |
|
|
269
|
+
| `entity` | Label for entity search in tag. | Entity |
|
|
270
|
+
| `campaign` | Label for context campaign container. | Campaign |
|
|
271
|
+
| `tagNumber` | Label for context tag container's header. | Tag number |
|
|
272
|
+
| `id` | Label for ID. | ID |
|
|
273
|
+
| `idContentPlaceholder` | Placeholder for ID content in context. | Type the ID of your content |
|
|
274
|
+
| `idCampaignPlaceholder` | Placeholder for ID content in campaign. | Type the ID of your campaign |
|
|
275
|
+
| `label` | Label for context content/campaign label input. | Label |
|
|
276
|
+
| `labelContentPlaceholder` | Placeholder for label content in context. | Type the content's label |
|
|
277
|
+
| `labelCampaignPlaceholder` | Placeholder for label content in campaign. | Type the campaign's label |
|
|
278
|
+
| `type` | Label for context content type input. | Type |
|
|
279
|
+
| `typeDescription` | Description paragraph for type select. | Select the Either/Or type. You can set the types in our Management Portal by going to Features, then clicking on the Either/Or page |
|
|
280
|
+
| `noType` | The default select option for Either/Or type. | No type |
|
|
281
|
+
| `deleteLabel` | Label for delete button in confirmation modal. | Delete |
|
|
282
|
+
| `cancelLabel` | Label for cancel button in confirmation modal. | Cancel |
|
|
283
|
+
| `confirmationQuestionLabel` | Paragraph in confirmation modal. | Are you sure you want to delete |
|
|
284
|
+
| `typeContentPlaceholder` | Placeholder for type content in context. | Type the content's type |
|
|
285
|
+
| `previewEitherOr` | Title in preview modal. | Preview Either/Or |
|
|
286
|
+
| `clear` | Label tippy clear button | Clear |
|
|
287
|
+
| `searchImage` | Label for search image input | Search image |
|
|
288
|
+
| `hideFilters` | Label for hyperlink to hide filters for image search | Hide filters |
|
|
289
|
+
| `showFilters` | Label for hyperlink to show filters for image search | Show filters |
|
|
290
|
+
| `dateFromTo` | Label for date from/to filter for image search | Date from/to |
|
|
291
|
+
| `dateFromToPlaceholder` | Placeholder for input date from/to filter for image search | Select Date... |
|
|
292
|
+
| `getFootballEntitiesErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when typing the name of the entity in tags and request fails. | There was a problem with fetching football's data |
|
|
293
|
+
| `createEitherOrMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when creating Either/Or | You have successfully created Either/Or |
|
|
294
|
+
| `createEitherOrErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when creating Either/Or | There was a problem creating Either/Or. Please try again |
|
|
295
|
+
| `titleRequiredFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating title for Either/Or | Title field is required! |
|
|
296
|
+
| `livesFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating lives for Either/Or | The value for 'lives' field is invalid. The valid one is withing the range of 1-20 |
|
|
297
|
+
| `timeFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating time for Either/Or | The value for 'time' field is invalid. The valid one is withing the range of 1-20 |
|
|
298
|
+
| `pointsFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating points for Either/Or | Points contain value where score or correct steps is an invalid one |
|
|
299
|
+
| `optionsFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating options for Either/Or | Options must not contain any repeated IDs |
|
|
300
|
+
| `tagsInvalidFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating tags for Either/Or | Tag entity is required! |
|
|
301
|
+
| `updateEitherOrMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when updating Either/Or | You have successfully updated Either/Or |
|
|
302
|
+
| `updateEitherOrErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when updating Either/Or | There was a problem updating Either/Or. Please try again |
|
|
303
|
+
| `deleteEitherOrMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when deleting Either/Or | You have successfully deleted Either/Or |
|
|
304
|
+
| `deleteEitherOrErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when deleting Either/Or | There was a problem with deleting Either/Or. Please try again |
|
|
305
|
+
| `uploadingImageMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) success message when uploading image to bucket | You have successfully uploaded image |
|
|
306
|
+
| `generateSignedInUrlErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when trying to receive a signed in URL. | There was a problem generating signed in URL to store the image in bucket. Please try again |
|
|
307
|
+
| `uploadingImageErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when uploading image to bucket | There was a problem with uploading image to bucket. Please try again |
|
|
308
|
+
| `encryptingImageErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when encrypting image before uploading it to bucket | There was a problem with encrypting image before uploading it to bucket. Please try again |
|
|
309
|
+
| `clearFromToFilterSportal365ImagesMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) info message when clearing date from/to filter | You have cleared from/to filter for Sportal365 search images |
|
|
310
|
+
| `searchSportal365ImagesErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when searching images from Sportal 365 API | There was a problem with searching images from Sportal 365 API. Please try again |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const actionButtonStyle = "eow-rounded eow-p-1 eow-flex eow-items-center eow-mr-1";
|
|
3
|
+
type ActionsButtonsProps = {
|
|
4
|
+
quizStatus: string;
|
|
5
|
+
onClickEdit: () => void;
|
|
6
|
+
onClickDelete: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const ActionsButtons: React.FC<ActionsButtonsProps>;
|
|
9
|
+
export default ActionsButtons;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
type Sportal365ButtonProps = {
|
|
3
|
+
setShowImagesContainer: Dispatch<SetStateAction<{
|
|
4
|
+
mainImage: boolean;
|
|
5
|
+
mobileImage: boolean;
|
|
6
|
+
}>>;
|
|
7
|
+
isQuestionsAndOptions?: boolean;
|
|
8
|
+
imageNode: string;
|
|
9
|
+
};
|
|
10
|
+
declare const Sportal365QuestionAndOptionButton: React.FC<Sportal365ButtonProps>;
|
|
11
|
+
export default Sportal365QuestionAndOptionButton;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import LabelsModel from '../models/Labels/LabelsModel';
|
|
3
|
+
type MainProps = {
|
|
4
|
+
fansUnitedApiKey: string;
|
|
5
|
+
fansUnitedClientId: string;
|
|
6
|
+
fansUnitedLanguage?: string;
|
|
7
|
+
fansUnitedEnvironment?: string;
|
|
8
|
+
sportal365Project?: string;
|
|
9
|
+
sportal365Infrastructure?: 'shared' | 'betway';
|
|
10
|
+
labels?: LabelsModel;
|
|
11
|
+
};
|
|
12
|
+
declare const Main: React.FC<MainProps>;
|
|
13
|
+
export default Main;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import ContextModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
|
|
2
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
import RequestBody from '../../../models/RequestBody/RequestBody';
|
|
4
|
+
type ContextProps = {
|
|
5
|
+
defaultValue: ContextModel;
|
|
6
|
+
setRequestBody: Dispatch<SetStateAction<RequestBody>>;
|
|
7
|
+
};
|
|
8
|
+
declare const Context: React.FC<ContextProps>;
|
|
9
|
+
export default Context;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Entity } from '../../../../types/types';
|
|
3
|
+
import TagsModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/TagsModel';
|
|
4
|
+
type FootballEntitySelectProps = {
|
|
5
|
+
entity: Entity;
|
|
6
|
+
tag: TagsModel;
|
|
7
|
+
onChangeTagId: (entityId: string) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const FootballEntitySelect: React.FC<FootballEntitySelectProps>;
|
|
10
|
+
export default FootballEntitySelect;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type SelectTagTypeProps = {
|
|
3
|
+
defaultValue: string;
|
|
4
|
+
tagsTypes: string[];
|
|
5
|
+
onChangeTagType: (value: string) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const selectStyles: {
|
|
8
|
+
container: (provided: any) => any;
|
|
9
|
+
control: (provided: any) => any;
|
|
10
|
+
input: (provided: any) => any;
|
|
11
|
+
option: (provided: any, state: any) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const SelectTagType: React.FC<SelectTagTypeProps>;
|
|
14
|
+
export default SelectTagType;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type EitherOrSelectProps = {
|
|
3
|
+
type: 'status' | 'winning_condition';
|
|
4
|
+
defaultValue: string;
|
|
5
|
+
onChange: (arg: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const EitherOrSelect: React.FC<EitherOrSelectProps>;
|
|
8
|
+
export default EitherOrSelect;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import RequestBody from '../../../models/RequestBody/RequestBody';
|
|
3
|
+
type FlagsProps = {
|
|
4
|
+
defaultValue: string[];
|
|
5
|
+
setRequestBody: Dispatch<SetStateAction<RequestBody>>;
|
|
6
|
+
};
|
|
7
|
+
declare const Flags: React.FC<FlagsProps>;
|
|
8
|
+
export default Flags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type FileUploaderProps = {
|
|
3
|
+
type: 'game' | 'option';
|
|
4
|
+
id: number;
|
|
5
|
+
imageNode: string;
|
|
6
|
+
onChangeImages: (value: string, imageNode: string) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const FileUploader: React.FC<FileUploaderProps>;
|
|
9
|
+
export default FileUploader;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ImagesModel from 'fansunited-sdk-esm/Core/Global/Models/Images/ImagesModel';
|
|
3
|
+
import MiniGameImages from 'fansunited-sdk-esm/Core/Namespaces/MiniGames/Models/MiniGameImages';
|
|
4
|
+
type ImagesProps = {
|
|
5
|
+
onChange: (value: string, imageCases: string) => void;
|
|
6
|
+
loadedImages?: ImagesModel | MiniGameImages;
|
|
7
|
+
};
|
|
8
|
+
declare const Images: React.FC<ImagesProps>;
|
|
9
|
+
export default Images;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import Sportal365SearchImagesFilters from '../../../../../models/Sportal365/Sportal365SearchImagesFilters';
|
|
3
|
+
type Sportal365ImagesFromToFilterProps = {
|
|
4
|
+
setFilters: Dispatch<SetStateAction<Sportal365SearchImagesFilters>>;
|
|
5
|
+
};
|
|
6
|
+
declare const Sportal365ImagesFromToFilter: React.FC<Sportal365ImagesFromToFilterProps>;
|
|
7
|
+
export default Sportal365ImagesFromToFilter;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
type Sportal365ImagesProps = {
|
|
3
|
+
onChangeImages: (url: string) => void;
|
|
4
|
+
type?: 'option';
|
|
5
|
+
imageNode?: string;
|
|
6
|
+
toggleShowImagesContainer?: () => void;
|
|
7
|
+
setShowImagesContainer?: Dispatch<SetStateAction<{
|
|
8
|
+
mainImage: boolean;
|
|
9
|
+
mobileImage: boolean;
|
|
10
|
+
}>>;
|
|
11
|
+
};
|
|
12
|
+
declare const Sportal365Images: React.FC<Sportal365ImagesProps>;
|
|
13
|
+
export default Sportal365Images;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Sportal365SearchImage from '../../../../models/Sportal365/Sportal365SearchImages';
|
|
3
|
+
type PaginationProps = {
|
|
4
|
+
pageCount: number;
|
|
5
|
+
images: Sportal365SearchImage | null;
|
|
6
|
+
getPreviousPage: () => void;
|
|
7
|
+
getNextPage: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const Sportal365ImagesPagination: React.FC<PaginationProps>;
|
|
10
|
+
export default Sportal365ImagesPagination;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import Sportal365SearchImagesFilters from '../../../../models/Sportal365/Sportal365SearchImagesFilters';
|
|
3
|
+
type Sportal365ImagesSearchProps = {
|
|
4
|
+
setQuery: Dispatch<SetStateAction<string>>;
|
|
5
|
+
setFilters: Dispatch<SetStateAction<Sportal365SearchImagesFilters>>;
|
|
6
|
+
};
|
|
7
|
+
declare const Sportal365ImagesSearch: React.FC<Sportal365ImagesSearchProps>;
|
|
8
|
+
export default Sportal365ImagesSearch;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type InformationInputProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
placeholder: string;
|
|
5
|
+
defaultValue: string;
|
|
6
|
+
imageNode?: string;
|
|
7
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
onChangeImages?: (value: string, imageNode: string) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const InformationInput: React.FC<InformationInputProps>;
|
|
11
|
+
export default InformationInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import EitherOrById from '../../models/EitherOr/EitherOrById';
|
|
3
|
+
type ManageEitherOrProps = {
|
|
4
|
+
refetchEitherOrs: {
|
|
5
|
+
current: boolean;
|
|
6
|
+
};
|
|
7
|
+
eitherOrById: EitherOrById | null;
|
|
8
|
+
toggleScreen: () => void;
|
|
9
|
+
clearEitherOrById: () => void;
|
|
10
|
+
};
|
|
11
|
+
declare const ManageEitherOr: React.FC<ManageEitherOrProps>;
|
|
12
|
+
export default ManageEitherOr;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ManagementScreenHeaderProps = {
|
|
3
|
+
managementScreen: 'create' | 'edit';
|
|
4
|
+
toggleScreen: () => void;
|
|
5
|
+
clearQuizById: () => void;
|
|
6
|
+
};
|
|
7
|
+
declare const ManagementScreenHeader: React.FC<ManagementScreenHeaderProps>;
|
|
8
|
+
export default ManagementScreenHeader;
|