fansunited-widget-poll 1.0.0-RC1

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.
Files changed (89) hide show
  1. package/README.md +306 -0
  2. package/components/Accordion/Accordion.d.ts +6 -0
  3. package/components/Buttons/ActionsButtons.d.ts +9 -0
  4. package/components/Buttons/AddButton.d.ts +7 -0
  5. package/components/Buttons/ClearButton.d.ts +6 -0
  6. package/components/Buttons/CopyToClipboard.d.ts +8 -0
  7. package/components/Buttons/HomeButtons.d.ts +8 -0
  8. package/components/Buttons/ManageButtons.d.ts +8 -0
  9. package/components/Buttons/RemoveButton.d.ts +7 -0
  10. package/components/Buttons/SignOutButton.d.ts +6 -0
  11. package/components/Buttons/Sportal365/Sportal365Button.d.ts +8 -0
  12. package/components/Cards/ImagesCard.d.ts +6 -0
  13. package/components/Cards/PollsCard.d.ts +3 -0
  14. package/components/Cards/WidgetCard.d.ts +3 -0
  15. package/components/Filters/Filters.d.ts +12 -0
  16. package/components/Login/Login.d.ts +6 -0
  17. package/components/Main.d.ts +14 -0
  18. package/components/MainLayout.d.ts +7 -0
  19. package/components/Management/Context/Context.d.ts +9 -0
  20. package/components/Management/Context/ContextTabs.d.ts +7 -0
  21. package/components/Management/DynamicFields/DynamicFields.d.ts +8 -0
  22. package/components/Management/Flags/Flags.d.ts +16 -0
  23. package/components/Management/IDInput/IDInput.d.ts +6 -0
  24. package/components/Management/Images/FileUploader.d.ts +9 -0
  25. package/components/Management/Images/Image.d.ts +11 -0
  26. package/components/Management/Images/Images.d.ts +11 -0
  27. package/components/Management/Images/Sportal365/Filters/Sportal365ImagesFromToFilter.d.ts +7 -0
  28. package/components/Management/Images/Sportal365/Sportal365Images.d.ts +9 -0
  29. package/components/Management/Images/Sportal365/Sportal365ImagesPagination.d.ts +10 -0
  30. package/components/Management/Images/Sportal365/Sportal365ImagesSearch.d.ts +8 -0
  31. package/components/Management/InformationInput/InformationInput.d.ts +9 -0
  32. package/components/Management/MainColumn.d.ts +10 -0
  33. package/components/Management/ManagePoll.d.ts +11 -0
  34. package/components/Management/ManagementScreenHeader.d.ts +8 -0
  35. package/components/Management/NumberInput/NumberInput.d.ts +8 -0
  36. package/components/Management/Options/OptionImages.d.ts +9 -0
  37. package/components/Management/Options/OptionInput.d.ts +9 -0
  38. package/components/Management/Options/Options.d.ts +9 -0
  39. package/components/Management/RichText/RichText.d.ts +8 -0
  40. package/components/Management/SideBar.d.ts +12 -0
  41. package/components/Management/StatusSelect/StatusSelect.d.ts +7 -0
  42. package/components/Management/Type/Type.d.ts +7 -0
  43. package/components/Modals/ConfirmationModal.d.ts +11 -0
  44. package/components/Modals/ImageModal.d.ts +8 -0
  45. package/components/Modals/PreviewModal.d.ts +10 -0
  46. package/components/Pagination/Pagination.d.ts +10 -0
  47. package/components/Polls/Polls.d.ts +7 -0
  48. package/components/Portals/Portal.d.ts +6 -0
  49. package/components/Select/ContextSelectFilter.d.ts +14 -0
  50. package/components/Select/ContextTagSelect.d.ts +9 -0
  51. package/components/Select/PollSelectFilter.d.ts +12 -0
  52. package/components/Spinner/ButtonSpinner.d.ts +3 -0
  53. package/components/Spinner/Spinner.d.ts +3 -0
  54. package/components/Table/TableBody.d.ts +10 -0
  55. package/components/Table/TableHeader.d.ts +3 -0
  56. package/constants/constants.d.ts +4 -0
  57. package/constants/placeholders.d.ts +1 -0
  58. package/context/ApiContext.d.ts +15 -0
  59. package/context/AuthContext.d.ts +8 -0
  60. package/context/LabelsContext.d.ts +8 -0
  61. package/factories/PollFactory.d.ts +30 -0
  62. package/firebase/firebase.d.ts +2 -0
  63. package/firebase/getToken.d.ts +1 -0
  64. package/helpers/helpers.d.ts +36 -0
  65. package/hooks/useConstantContext.d.ts +2 -0
  66. package/index.d.ts +1 -0
  67. package/models/Features/Features.d.ts +7 -0
  68. package/models/Filters/PollFiltersModel.d.ts +12 -0
  69. package/models/Labels/LabelsModel.d.ts +108 -0
  70. package/models/PollById/PollById.d.ts +25 -0
  71. package/models/RequestBody/RequestBody.d.ts +18 -0
  72. package/models/RequestBody/SignedInUrlRequestBody.d.ts +6 -0
  73. package/models/Select/GroupSelectOption.d.ts +5 -0
  74. package/models/Select/ReactSelectBaseOption.d.ts +5 -0
  75. package/models/Select/SelectOption.d.ts +9 -0
  76. package/models/Sportal365/Sportal365Config.d.ts +4 -0
  77. package/models/Sportal365/Sportal365ImagesContainer.d.ts +5 -0
  78. package/models/Sportal365/Sportal365SearchImages.d.ts +21 -0
  79. package/models/Sportal365/Sportal365SearchImagesFilters.d.ts +4 -0
  80. package/package.json +8 -0
  81. package/poll-manager.es.d.ts +1 -0
  82. package/poll-manager.es.js +38878 -0
  83. package/poll-manager.umd.js +2335 -0
  84. package/portals/ModalPortal.d.ts +6 -0
  85. package/services/HashService.d.ts +4 -0
  86. package/services/HttpsService.d.ts +29 -0
  87. package/style.css +6 -0
  88. package/types/types.d.ts +6 -0
  89. package/validators/PollValidator.d.ts +10 -0
package/README.md ADDED
@@ -0,0 +1,306 @@
1
+ # Poll Management Widget
2
+
3
+ Welcome to Fans United Poll Management Widget. The widget allows staff members with sufficient permissions to create, update and delete Polls. You can use this widget as it is and embed it in your platform, or you can use the Management Panel. With creating a poll, users can answer a single question and win prizes. With successful installation, you can create, edit and delete a poll.
4
+
5
+ ## Installation and usage
6
+
7
+ The easiest way to use fansunited-widget-poll-management is to install it from npm as follows:
8
+
9
+ ```javascript
10
+ npm install fansunited-widget-poll
11
+ ```
12
+
13
+ or:
14
+
15
+ ```javascript
16
+ yarn add fansunited-widget-poll
17
+ ```
18
+
19
+ Here is an example how you can **integrate** Fans United Poll Management Widget:
20
+
21
+ ```javascript
22
+ import 'fansunited-widget-poll/style.css';
23
+ import { PollManager } from 'fansunited-widget-poll';
24
+
25
+ const App = () => {
26
+ return (
27
+ <PollManager
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-poll/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-poll/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 PollManagerProps = {
52
+ fansUnitedApiKey: string;
53
+ fansUnitedClientId: string;
54
+ fansUnitedLanguage?: string;
55
+ fansUnitedEnvironment?: string;
56
+ sportal365Project?: string;
57
+ sportal365Infrastructure?: 'shared' | 'betway';
58
+ labels?: LabelsModel;
59
+ hideSignOutButton?: boolean;
60
+ };
61
+ ```
62
+
63
+ Fans United Poll 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:
64
+
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
+
67
+ - `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).
68
+
69
+ - `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.
70
+
71
+ - `sportal365Project` - The Sportal365 project. Used as a request header when communicating with Sportal365 APIs.
72
+
73
+ - `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** .
74
+
75
+ - `hideSignOutButton` - By default on the top left corner of the widget will be displayed a sign out button. To hide that button set this prop to **true**.
76
+
77
+ ## Translation
78
+
79
+ You can easily translate Fans United Poll 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:
80
+
81
+ ```javascript
82
+ import 'fansunited-widget-poll/style.css';
83
+ import { PollManager } from 'fansunited-widget-poll';
84
+
85
+ const labels = {
86
+ userNotFound: 'User not found. Please try again',
87
+ noPollsFound: "No polls games were found. You can create one by clicking the button 'Create'",
88
+ signOut: 'Sign out',
89
+ timeFormat: 'DD.MM.YYYY, HH:mm',
90
+ getPollsErrorMessage: 'There was a problem with fetching list of polls',
91
+ title: 'Title',
92
+ status: 'Status',
93
+ votes: 'Votes',
94
+ creationDate: 'Created at',
95
+ actions: 'Actions',
96
+ create: 'Create',
97
+ edit: 'Edit',
98
+ save: 'Save',
99
+ preview: 'Preview',
100
+ close: 'Close',
101
+ filterBy: 'Filter by:',
102
+ sortBy: 'Sort by:',
103
+ clearStatus: 'Clear status',
104
+ contextEntityTag: 'Context entity tag',
105
+ typeContextTagNamePlaceholder: 'Type context tag name...',
106
+ showMoreImages: 'Show more images',
107
+ hideMoreImages: 'Hide more images',
108
+ uploadImage: 'Upload image',
109
+ groupByStatus: 'Group by status',
110
+ copyUrl: 'Copy URL',
111
+ copied: 'Copied',
112
+ add: 'Add',
113
+ configuration: 'Configuration',
114
+ minimumVotes: 'Minimum votes',
115
+ minimumVotesPlaceholder: 'Enter the minimum votes for polls',
116
+ description: 'Description',
117
+ descriptionPlaceholder: 'Describe your poll',
118
+ images: 'Images',
119
+ rules: 'Rules',
120
+ rulesPlaceholder: 'Describe your rules for voting in the poll',
121
+ adContent: 'Ad content',
122
+ adContentPlaceholder: 'Place your ad content',
123
+ optionImages: 'Option images',
124
+ main: 'Main',
125
+ cover: 'Cover',
126
+ mobile: 'Mobile',
127
+ active: 'Active',
128
+ inactive: 'Inactive',
129
+ statusDescription: "When poll is Inactive, then users are not allowed to vote",
130
+ optionsDescription: 'Describe the options that users will select from the poll. Ensure to provide a minimum of 2 options. Title for each is required',
131
+ titlePlaceholder: 'Provide a title for your poll',
132
+ optionTitlePlaceholder: 'Type the title of the option',
133
+ optionDescriptionPlaceholder: 'Type the description of the option',
134
+ repeatedValueMessage: 'You have entered a repeated value. Please enter a different one',
135
+ flags: 'Flags',
136
+ flagsPlaceholder: 'Type your flag and hit enter',
137
+ labels: 'Labels',
138
+ customFields: 'Custom fields',
139
+ dynamicFieldsDescription: 'You can create your custom attributes for easier way to connect or describe your poll',
140
+ keyDynamicFields: 'Key',
141
+ valueDynamicFields: 'Value',
142
+ options: 'Options',
143
+ optionNumber: 'Option number',
144
+ context: 'Context',
145
+ content: 'Content',
146
+ tags: 'Tags',
147
+ entity: 'Entity',
148
+ campaign: 'Campaign',
149
+ id: 'ID',
150
+ idContentPlaceholder: 'Type the ID of your content',
151
+ idCampaignPlaceholder: 'Type the ID of your campaign',
152
+ label: 'Label',
153
+ labelContentPlaceholder: "Type the content's label",
154
+ labelCampaignPlaceholder: "Type the campaign's label",
155
+ type: 'Type',
156
+ typeDescription: 'Select the poll type. You can set the types in our Management Portal by going to Features, then clicking on the Poll page',
157
+ noType: "No type",
158
+ deleteLabel: 'Delete',
159
+ cancelLabel: 'Cancel',
160
+ confirmationQuestionLabel: 'Are you sure you want to delete',
161
+ typeContentPlaceholder: "Type the content's type",
162
+ previewPoll: 'Preview poll',
163
+ getFootballEntitiesErrorMessage: "There was a problem with fetching football's data",
164
+ createPollMessage: 'You have successfully created poll',
165
+ createPollErrorMessage: 'There was a problem creating poll. Please try again',
166
+ titleRequiredFieldValidationMessage: 'Title field is required!',
167
+ optionsFieldValidationMessage: "Options must have titles",
168
+ tagsInvalidFieldValidationMessage: 'Tag entity is required!',
169
+ getPollErrorMessage: 'There was a problem with fetching poll data. Please try again',
170
+ deletePollMessage: 'You have successfully deleted poll',
171
+ deletePollErrorMessage: 'There was a problem with deleting poll. Please try again',
172
+ updatePollMessage: 'You have successfully updated the poll',
173
+ updatePollErrorMessage: 'There was a problem updating the poll. Please try again',
174
+ uploadingImageMessage: 'You have successfully uploaded image',
175
+ generateSignedInUrlErrorMessage: 'There was a problem generating signed in URL to store the image in bucket. Please try again',
176
+ uploadingImageErrorMessage: 'There was a problem with uploading image to bucket. Please try again',
177
+ encryptingImageErrorMessage: 'There was a problem with encrypting image before uploading it to bucket. Please try again',
178
+ clear: 'Clear'
179
+ searchSportal365ImagesErrorMessage: 'There was a problem with searching images from Sportal 365 API. Please try again'
180
+ searchImages: 'Search images',
181
+ clearFromToFilterSportal365ImagesMessage: 'You have cleared from/to filter for Sportal365 search images',
182
+ hideFilters: 'Hide filters',
183
+ showFilters: 'Show filters',
184
+ dateFromTo: 'Date from/to',
185
+ dateFromToPlaceholder: 'Select Date...'
186
+
187
+ };
188
+
189
+ const App = () => {
190
+ return (
191
+ <PollManager
192
+ fansUnitedApiKey={'your-api-key'}
193
+ fansUnitedClientId={'your-client-id'}
194
+ labels={labels}/>
195
+ );
196
+ }
197
+ ```
198
+
199
+ Here is all information about **`LabelsModel`**:
200
+
201
+ | Key | Description | Default Value |
202
+ | :-------------: |:-------------:| :-----:|
203
+ | `userNotFound` | On login screen when client gives invalid information about email or password. | User not found. Please try again |
204
+ | `noPollsFound` | When there are no created polls for specific client, this message will appear on screen. | No polls games were found. You can create one by clicking the button 'Create' |
205
+ | `signOut` | Used as label on sign out button. | Sign out |
206
+ | `getPollsErrorMessage` | [react-toastify](https://github.com/fkhadra/react-toastify) error message when request fails for fetching list of polls. | There was a problem with fetching list of polls |
207
+ | `title` | Label for title | Title
208
+ | `status` | Status of a poll | Status |
209
+ | `votes` | Votes of a poll | Votes |
210
+ | `creationDate` | Date of created poll 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
+ | `filterBy` | Label for filters container on main screen | Filter by: |
218
+ | `sortBy` | Label for sort container on main screen | Sort by: |
219
+ | `clearStatus` | Label for clear status hyperlink for status filter | Clear status |
220
+ | `contextEntityTag` | Label for input search for context entity tag in filters container | Context entity tag |
221
+ | `typeContextTagNamePlaceholder` | Placeholder for input search for context entity tag in filters container and in context side bar | Type context tag name... |
222
+ | `showMoreImages` | Label for hyperlink in images container | Show more images |
223
+ | `hideMoreImages` | Label for hyperlink in images container | Hide more images |
224
+ | `uploadImage` | Label next to upload button | Upload image |
225
+ | `groupByStatus` | Label for checkbox in sort container | Group by status |
226
+ | `copyUrl` | Label for copy url button | Copy URL |
227
+ | `copied` | Label for copy url button | Copied |
228
+ | `add` | Label for add button | Add |
229
+ | `configuration` | Label for configuration accordion | Configuration |
230
+ | `minimumVotes` | Label for minimum votes filter input | Minimum votes |
231
+ | `minimumVotesPlaceholder` | Placeholder for minimum votes filter input | Enter the minimum votes for polls |
232
+ | `titlePlaceholder` | Placeholder/description about title input field name on management screen. | Provide a title for your poll |
233
+ | `timeFormat` | Timeformat for displaying dates. Widgets uses [dayjs](https://www.npmjs.com/package/dayjs) as a date dependency. | DD.MM.YYYY, HH:mm |
234
+ | `previous` | Label for pagination button. | Previous |
235
+ | `next` | Label for pagination button. | Next |
236
+ | `id` | Label for ID read only input field. | ID |
237
+ | `description` | Label for description input field on management screen. | Description |
238
+ | `descriptionPlaceholder` | Placeholder/description about input field for poll description when creating/editing a poll. | Describe your poll |
239
+ | `images` | Label for images container. | Images |
240
+ | `rules` | Label for rules rich text. | Rules |
241
+ | `rulesPlaceholder` | Placeholder for rules rich text. | Describe your rules for voting in the poll |
242
+ | `adContent` | Label for AD content rich text. | Ad content |
243
+ | `adContentPlaceholder` | Placeholder for AD content rich text. | Place your ad content |
244
+ | `optionImages` | Label for option images container. | Option images |
245
+ | `main` | Label for main image. | Main |
246
+ | `cover` | Label for cover image. | Cover |
247
+ | `mobile` | Label for mobile image. | Mobile |
248
+ | `imagePlaceholder` | Placeholder for image inputs. | Paste your image as valid URL or as relative path |
249
+ | `active` | Label for status. | Active |
250
+ | `inactive` | Label for status. | Inactive |
251
+ | `statusDescription` | Description for status select. | When poll is Inactive, then users are not allowed to vote |
252
+ | `optionsDescription` | Description for options. | Describe the options that users will select from the poll. Ensure to provide a minimum of 2 options. Title for each is required |
253
+ | `optionTitlePlaceholder` | Placeholder for option title input. | Type the title of the option |
254
+ | `optionDescriptionPlaceholder` | Placeholder for option description input. | Type the description 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 poll |
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
+ | `id` | Label for ID. | ID |
272
+ | `idContentPlaceholder` | Placeholder for ID content in context. | Type the ID of your content |
273
+ | `idCampaignPlaceholder` | Placeholder for ID content in campaign. | Type the ID of your campaign |
274
+ | `label` | Label for context content/campaign label input. | Label |
275
+ | `labelContentPlaceholder` | Placeholder for label content in context. | Type the content's label |
276
+ | `labelCampaignPlaceholder` | Placeholder for label content in campaign. | Type the campaign's label |
277
+ | `type` | Label for context content type input. | Type |
278
+ | `typeDescription` | Description paragraph for type select. | Select the poll type. You can set the types in our Management Portal by going to Features, then clicking on the Poll page |
279
+ | `noType` | The default select option for poll type. | No type |
280
+ | `deleteLabel` | Label for delete button in confirmation modal. | Delete |
281
+ | `cancelLabel` | Label for cancel button in confirmation modal. | Cancel |
282
+ | `confirmationQuestionLabel` | Paragraph in confirmation modal. | Are you sure you want to delete |
283
+ | `typeContentPlaceholder` | Placeholder for type content in context. | Type the content's type |
284
+ | `previewPoll` | Title in preview modal. | Preview poll |
285
+ | `clear` | Label tippy clear button | Clear |
286
+ | `searchImages` | Label for search image input | Search images |
287
+ | `hideFilters` | Label for hyperlink to hide filters for image search | Hide filters |
288
+ | `showFilters` | Label for hyperlink to show filters for image search | Show filters |
289
+ | `dateFromTo` | Label for date from/to filter for image search | Date from/to |
290
+ | `dateFromToPlaceholder` | Placeholder for input date from/to filter for image search | Select Date... |
291
+ | `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 |
292
+ | `createPollMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when creating poll | You have successfully created poll |
293
+ | `createPollErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when creating poll | There was a problem creating poll. Please try again |
294
+ | `titleRequiredFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating title for poll | Title field is required! |
295
+ | `optionsFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating options for poll | Options must have titles |
296
+ | `tagsInvalidFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating tags for poll | Tag entity is required! |
297
+ | `updatePollMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when updating poll | You have successfully updated the poll |
298
+ | `updatePollErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when updating poll | There was a problem updating the poll. Please try again |
299
+ | `deletePollMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when deleting poll | You have successfully deleted poll |
300
+ | `deletePollOrErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when deleting poll | There was a problem with deleting poll. Please try again |
301
+ | `uploadingImageMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) success message when uploading image to bucket | You have successfully uploaded image |
302
+ | `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 |
303
+ | `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 |
304
+ | `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 |
305
+ | `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 |
306
+ | `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,6 @@
1
+ import React from 'react';
2
+ type AccordionProps = {
3
+ title: string;
4
+ };
5
+ declare const Accordion: React.FC<AccordionProps>;
6
+ export default Accordion;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare const actionButtonStyle = "pw-rounded pw-p-1 pw-flex pw-items-center pw-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,7 @@
1
+ import React from 'react';
2
+ type AddButtonProps = {
3
+ isDisabled: boolean;
4
+ onClick: () => void;
5
+ };
6
+ declare const AddButton: React.FC<AddButtonProps>;
7
+ export default AddButton;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type ClearButtonProps = {
3
+ onClick: () => void;
4
+ };
5
+ declare const ClearButton: React.FC<ClearButtonProps>;
6
+ export default ClearButton;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type CopyToClipboardButtonProps = {
3
+ isUrlCopied: boolean;
4
+ isDisabled: boolean;
5
+ onClick: () => void;
6
+ };
7
+ declare const CopyToClipboardButton: React.FC<CopyToClipboardButtonProps>;
8
+ export default CopyToClipboardButton;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type HomeButtonsProps = {
3
+ hideSignOutButton: boolean;
4
+ toggleScreen: () => void;
5
+ fansUnitedEnvironment: string;
6
+ };
7
+ declare const HomeButtons: React.FC<HomeButtonsProps>;
8
+ export default HomeButtons;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type ManageButtonsProps = {
3
+ isLoading: boolean;
4
+ managePoll: () => void;
5
+ handleModal: () => void;
6
+ };
7
+ declare const ManageButtons: React.FC<ManageButtonsProps>;
8
+ export default ManageButtons;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type RemoveButtonProps = {
3
+ isDisabled: boolean;
4
+ onClick: () => void;
5
+ };
6
+ declare const RemoveButton: React.FC<RemoveButtonProps>;
7
+ export default RemoveButton;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type SignOutProps = {
3
+ fansUnitedEnvironment: string;
4
+ };
5
+ declare const SignOutButton: React.FC<SignOutProps>;
6
+ export default SignOutButton;
@@ -0,0 +1,8 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import Sportal365ImagesContainerToggleModel from '../../../models/Sportal365/Sportal365ImagesContainer';
3
+ type Sportal365ButtonProps = {
4
+ imageNode: string;
5
+ setShowImagesContainer: Dispatch<SetStateAction<Sportal365ImagesContainerToggleModel>>;
6
+ };
7
+ declare const Sportal365Button: React.FC<Sportal365ButtonProps>;
8
+ export default Sportal365Button;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type ImagesCardProps = {
3
+ images: string;
4
+ };
5
+ declare const ImagesCard: React.FC<ImagesCardProps>;
6
+ export default ImagesCard;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const PollsCard: React.FC;
3
+ export default PollsCard;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const WidgetCard: React.FC;
3
+ export default WidgetCard;
@@ -0,0 +1,12 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import PollFiltersModel from '../../models/Filters/PollFiltersModel';
3
+ import SelectOption from '../../models/Select/SelectOption';
4
+ type FiltersProps = {
5
+ filters: PollFiltersModel;
6
+ options: SelectOption[];
7
+ setOptions: Dispatch<SetStateAction<SelectOption[]>>;
8
+ setFilters: Dispatch<SetStateAction<PollFiltersModel>>;
9
+ handleResetData: () => void;
10
+ };
11
+ declare const Filters: React.FC<FiltersProps>;
12
+ export default Filters;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type LoginProps = {
3
+ fansUnitedEnvironment: string;
4
+ };
5
+ declare const Login: React.FC<LoginProps>;
6
+ export default Login;
@@ -0,0 +1,14 @@
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
+ hideSignOutButton?: boolean;
12
+ };
13
+ declare const Main: React.FC<MainProps>;
14
+ export default Main;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type MainLayoutProps = {
3
+ hideSignOutButton: boolean;
4
+ fansUnitedEnvironment: string;
5
+ };
6
+ declare const MainLayout: React.FC<MainLayoutProps>;
7
+ export default MainLayout;
@@ -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,7 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ type ContextTabsProps = {
3
+ tabValue: string;
4
+ setTabValue: Dispatch<SetStateAction<string>>;
5
+ };
6
+ declare const ContextTabs: React.FC<ContextTabsProps>;
7
+ export default ContextTabs;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type DynamicFieldsProps = {
3
+ property: 'labels' | 'custom_fields';
4
+ field: Object;
5
+ onChange: (field: Object) => void;
6
+ };
7
+ declare const DynamicFields: React.FC<DynamicFieldsProps>;
8
+ export default DynamicFields;
@@ -0,0 +1,16 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import RequestBody from '../../../models/RequestBody/RequestBody';
3
+ import PollFiltersModel from '../../../models/Filters/PollFiltersModel';
4
+ export declare const flagsSelectStyles: {
5
+ control: (provided: any) => any;
6
+ clearIndicator: (provided: any) => any;
7
+ input: (provided: any) => any;
8
+ };
9
+ type FlagsProps = {
10
+ defaultValue: string[];
11
+ showLabel?: boolean;
12
+ setObject: Dispatch<SetStateAction<RequestBody>> | Dispatch<SetStateAction<PollFiltersModel>>;
13
+ handleResetData?: () => void;
14
+ };
15
+ declare const Flags: React.FC<FlagsProps>;
16
+ export default Flags;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type IDInputProps = {
3
+ value: string | null;
4
+ };
5
+ declare const IDInput: React.FC<IDInputProps>;
6
+ export default IDInput;
@@ -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,11 @@
1
+ import React from 'react';
2
+ type ImagesProps = {
3
+ id: number;
4
+ type: 'game' | 'option';
5
+ label: string;
6
+ imageUrl: string;
7
+ imageNode: string;
8
+ onChange: (value: string, imageNode: string) => void;
9
+ };
10
+ declare const Image: React.FC<ImagesProps>;
11
+ export default Image;
@@ -0,0 +1,11 @@
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
+ id: number;
6
+ type: 'game' | 'option';
7
+ loadedImages: ImagesModel | MiniGameImages;
8
+ onChange: (value: string, imageCases: string) => void;
9
+ };
10
+ declare const Images: React.FC<ImagesProps>;
11
+ 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,9 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import Sportal365ImagesContainerToggleModel from '../../../../models/Sportal365/Sportal365ImagesContainer';
3
+ type Sportal365ImagesProps = {
4
+ onChangeImages: (url: string) => void;
5
+ imageNode: string;
6
+ setShowImagesContainer: Dispatch<SetStateAction<Sportal365ImagesContainerToggleModel>>;
7
+ };
8
+ declare const Sportal365Images: React.FC<Sportal365ImagesProps>;
9
+ 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,9 @@
1
+ import React from 'react';
2
+ type InformationInputProps = {
3
+ title: string;
4
+ placeholder: string;
5
+ defaultValue: string;
6
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
7
+ };
8
+ declare const InformationInput: React.FC<InformationInputProps>;
9
+ export default InformationInput;
@@ -0,0 +1,10 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import PollById from '../../models/PollById/PollById';
3
+ type MainColumnProps = {
4
+ requestBody: PollById;
5
+ setRequestBody: Dispatch<SetStateAction<PollById>>;
6
+ description: string;
7
+ setDescription: Dispatch<SetStateAction<string>>;
8
+ };
9
+ declare const MainColumn: React.FC<MainColumnProps>;
10
+ export default MainColumn;
@@ -0,0 +1,11 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import PollById from '../../models/PollById/PollById';
3
+ import PollFiltersModel from '../../models/Filters/PollFiltersModel';
4
+ type ManagePollProps = {
5
+ pollById: PollById | null;
6
+ setFilters: Dispatch<SetStateAction<PollFiltersModel>>;
7
+ toggleScreen: () => void;
8
+ clearPollById: () => void;
9
+ };
10
+ declare const ManagePoll: React.FC<ManagePollProps>;
11
+ export default ManagePoll;
@@ -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;