fansunited-widget-poll 1.2.0 → 2.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 +122 -57
- package/components/Cards/PollsCard.d.ts +5 -2
- package/components/Cards/WidgetCard.d.ts +5 -2
- package/components/Filters/Filters.d.ts +3 -3
- package/components/Main.d.ts +2 -2
- package/components/MainLayout.d.ts +1 -1
- package/components/Management/Header.d.ts +6 -0
- package/components/Management/MainColumn.d.ts +5 -6
- package/components/Management/ManagePoll.d.ts +5 -5
- package/components/Management/Options/AdditionalOptionField.d.ts +9 -0
- package/components/Management/Options/Checkboxes.d.ts +13 -0
- package/components/Management/Options/Option.d.ts +14 -0
- package/components/Management/Options/Options.d.ts +5 -4
- package/components/Management/SideBar/Configuration/Configuration.d.ts +8 -0
- package/components/Management/SideBar/Configuration/PollStatus.d.ts +7 -0
- package/components/Management/{Type → SideBar/Configuration}/Type.d.ts +2 -2
- package/components/Management/SideBar/SideBar.d.ts +8 -0
- package/components/Modals/DeletePollModal.d.ts +10 -0
- package/components/Modals/PreviewModal.d.ts +3 -4
- package/components/Polls/ActionsMenu.d.ts +10 -0
- package/components/Polls/PollRow.d.ts +10 -0
- package/components/Polls/Polls.d.ts +1 -1
- package/components/Polls/PollsTable.d.ts +14 -0
- package/components/Polls/TablePagination.d.ts +10 -0
- package/constants/constants.d.ts +249 -4
- package/context/ConfigurationContext.d.ts +9 -0
- package/context/LabelsContext.d.ts +3 -2
- package/factories/PollFactory.d.ts +6 -8
- package/models/Features/Features.d.ts +11 -0
- package/models/Filters/PollFiltersModel.d.ts +3 -2
- package/models/Labels/LabelsModel.d.ts +58 -28
- package/models/RequestBody/RequestBody.d.ts +12 -3
- package/models/Select/SelectOption.d.ts +1 -1
- package/package.json +1 -1
- package/poll-manager.es.d.ts +1 -0
- package/poll-manager.es.js +73406 -37593
- package/poll-manager.umd.js +544 -223
- package/style.css +2 -2
- package/validators/PollValidator.d.ts +2 -2
- package/components/Accordion/Accordion.d.ts +0 -6
- package/components/Buttons/ActionsButtons.d.ts +0 -10
- package/components/Buttons/AddButton.d.ts +0 -7
- package/components/Buttons/ClearButton.d.ts +0 -6
- package/components/Buttons/CopyToClipboard.d.ts +0 -8
- package/components/Buttons/HomeButtons.d.ts +0 -8
- package/components/Buttons/ManageButtons.d.ts +0 -8
- package/components/Buttons/RemoveButton.d.ts +0 -7
- package/components/Buttons/SignOutButton.d.ts +0 -6
- package/components/Buttons/Sportal365/Sportal365Button.d.ts +0 -8
- package/components/Cards/ImagesCard.d.ts +0 -6
- package/components/Login/Login.d.ts +0 -6
- package/components/Management/Branding/Branding.d.ts +0 -8
- package/components/Management/Branding/BrandingImages.d.ts +0 -8
- package/components/Management/Branding/BrandingTabs.d.ts +0 -7
- package/components/Management/Context/Context.d.ts +0 -9
- package/components/Management/Context/ContextTabs.d.ts +0 -7
- package/components/Management/DynamicFields/DynamicFields.d.ts +0 -8
- package/components/Management/Flags/Flags.d.ts +0 -16
- package/components/Management/IDInput/IDInput.d.ts +0 -6
- package/components/Management/Images/FileUploader.d.ts +0 -9
- package/components/Management/Images/Image.d.ts +0 -11
- package/components/Management/Images/Images.d.ts +0 -11
- package/components/Management/Images/Sportal365/Filters/Sportal365ImagesFromToFilter.d.ts +0 -7
- package/components/Management/Images/Sportal365/Sportal365Images.d.ts +0 -9
- package/components/Management/Images/Sportal365/Sportal365ImagesPagination.d.ts +0 -10
- package/components/Management/Images/Sportal365/Sportal365ImagesSearch.d.ts +0 -8
- package/components/Management/InformationInput/InformationInput.d.ts +0 -9
- package/components/Management/ManagementScreenHeader.d.ts +0 -8
- package/components/Management/NumberInput/NumberInput.d.ts +0 -8
- package/components/Management/Options/OptionImages.d.ts +0 -9
- package/components/Management/Options/OptionInput.d.ts +0 -9
- package/components/Management/RichText/RichText.d.ts +0 -8
- package/components/Management/SideBar.d.ts +0 -12
- package/components/Management/StatusSelect/StatusSelect.d.ts +0 -7
- package/components/Modals/ConfirmationModal.d.ts +0 -11
- package/components/Modals/ImageModal.d.ts +0 -8
- package/components/Pagination/Pagination.d.ts +0 -10
- package/components/Portals/Portal.d.ts +0 -6
- package/components/Select/ContextSelectFilter.d.ts +0 -14
- package/components/Select/ContextTagSelect.d.ts +0 -9
- package/components/Select/PollSelectFilter.d.ts +0 -12
- package/components/Spinner/ButtonSpinner.d.ts +0 -9
- package/components/Spinner/Spinner.d.ts +0 -3
- package/components/Table/TableBody.d.ts +0 -10
- package/components/Table/TableHeader.d.ts +0 -3
- package/constants/placeholders.d.ts +0 -1
- package/context/ApiContext.d.ts +0 -15
- package/context/AuthContext.d.ts +0 -8
- package/firebase/firebase.d.ts +0 -2
- package/firebase/getToken.d.ts +0 -1
- package/helpers/helpers.d.ts +0 -36
- package/models/PollById/PollById.d.ts +0 -28
- package/models/RequestBody/SignedInUrlRequestBody.d.ts +0 -6
- package/models/Select/GroupSelectOption.d.ts +0 -5
- package/models/Sportal365/Sportal365Config.d.ts +0 -4
- package/models/Sportal365/Sportal365ImagesContainer.d.ts +0 -5
- package/models/Sportal365/Sportal365SearchImages.d.ts +0 -21
- package/models/Sportal365/Sportal365SearchImagesFilters.d.ts +0 -4
- package/portals/ModalPortal.d.ts +0 -6
- package/services/HashService.d.ts +0 -4
- package/services/HttpsService.d.ts +0 -33
- package/types/types.d.ts +0 -6
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ return (
|
|
|
35
35
|
|
|
36
36
|
- The widget is bundled as a React component and its usage is as simple as the **above example**
|
|
37
37
|
|
|
38
|
-
- Don't worry about your project's CSS. The widget's styling is done with [
|
|
38
|
+
- Don't worry about your project's CSS. The widget's styling is done with [Joy UI](https://mui.com/joy-ui/getting-started/) which is based on headless unstyle react components. 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
39
|
|
|
40
40
|
```
|
|
41
41
|
import 'fansunited-widget-poll/style.css';
|
|
@@ -64,7 +64,7 @@ Fans United Poll Management Widget depends on [Fans United JS SDK](https://docs.
|
|
|
64
64
|
|
|
65
65
|
- `fansUnitedLanguage` - for our sports APIs FansUnited platform supports different languages. For now they are **Bulgarian** (bg), **English** (en), **Romanian** (ro), **Greek** (el), **Slovak** (sk), **Serbian** (sr) and **Hungarian** (hu). If no value given it will be set to **English** (en).
|
|
66
66
|
|
|
67
|
-
- `fansUnitedEnvironment` - You can run the widget in the following environments: **staging**, **production** and **
|
|
67
|
+
- `fansUnitedEnvironment` - You can run the widget in the following environments: **staging**, **production**, **watg** and **yolo**. If no value given it will be set to **production** (prod).
|
|
68
68
|
|
|
69
69
|
- `labels` - you can easily translate all labels, UI messages, descriptions, placeholders and etc. with this prop. By default, Fans United Match Quiz Management Widget is available in **English** so if no value is given, the widget will be translated in English.
|
|
70
70
|
|
|
@@ -84,6 +84,10 @@ import { PollManager } from 'fansunited-widget-poll';
|
|
|
84
84
|
|
|
85
85
|
const labels = {
|
|
86
86
|
userNotFound: 'User not found. Please try again',
|
|
87
|
+
clientFeaturesNotFoundMessage: "There was a problem fetching client's configuration. Please check again your API key and client ID. For more information contact Fans United staff.",
|
|
88
|
+
featureDisabled: 'Feature disabled!',
|
|
89
|
+
noPermissionMessage: 'You have no permission for this feature!',
|
|
90
|
+
tryAgainButton: 'Try again',
|
|
87
91
|
noPollsFound: "No polls games were found. You can create one by clicking the button 'Create'",
|
|
88
92
|
signOut: 'Sign out',
|
|
89
93
|
timeFormat: 'DD.MM.YYYY, HH:mm',
|
|
@@ -93,44 +97,54 @@ const labels = {
|
|
|
93
97
|
votes: 'Votes',
|
|
94
98
|
creationDate: 'Created at',
|
|
95
99
|
actions: 'Actions',
|
|
100
|
+
pageNo: 'Page No',
|
|
101
|
+
back: 'Back',
|
|
96
102
|
create: 'Create',
|
|
97
103
|
edit: 'Edit',
|
|
98
104
|
save: 'Save',
|
|
99
105
|
preview: 'Preview',
|
|
100
106
|
close: 'Close',
|
|
101
|
-
filterBy: 'Filter by:',
|
|
102
107
|
sortBy: 'Sort by:',
|
|
103
|
-
|
|
108
|
+
sortByAscending: 'Sort by created at field in ascending order',
|
|
109
|
+
sortByDescending: 'Sort by created at field in descending order',
|
|
110
|
+
language: 'Language',
|
|
104
111
|
contextEntityTag: 'Context entity tag',
|
|
105
112
|
typeContextTagNamePlaceholder: 'Type context tag name...',
|
|
113
|
+
itemsPerPage: 'Items per page',
|
|
106
114
|
showMoreImages: 'Show more images',
|
|
107
115
|
hideMoreImages: 'Hide more images',
|
|
108
116
|
uploadImage: 'Upload image',
|
|
109
|
-
groupByStatus: 'Group by status',
|
|
110
117
|
copyUrl: 'Copy URL',
|
|
111
118
|
copied: 'Copied',
|
|
112
119
|
add: 'Add',
|
|
113
120
|
configuration: 'Configuration',
|
|
114
121
|
minimumVotes: 'Minimum votes',
|
|
115
|
-
|
|
122
|
+
alternativeTitle: 'Alternative title',
|
|
116
123
|
description: 'Description',
|
|
117
|
-
descriptionPlaceholder: 'Describe your poll',
|
|
118
124
|
images: 'Images',
|
|
119
125
|
rules: 'Rules',
|
|
120
126
|
rulesPlaceholder: 'Describe your rules for voting in the poll',
|
|
121
127
|
adContent: 'Ad content',
|
|
122
128
|
adContentPlaceholder: 'Place your ad content',
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
129
|
+
mainImage: 'Main',
|
|
130
|
+
coverImage: 'Cover',
|
|
131
|
+
mobileImage: 'Mobile',
|
|
132
|
+
clearImage: 'Clear image',
|
|
133
|
+
viewImage: 'View image',
|
|
134
|
+
cropImage: 'Crop image',
|
|
135
|
+
aspectRatio: 'Aspect ratio',
|
|
136
|
+
crop: 'Crop',
|
|
137
|
+
reset: 'Reset',
|
|
138
|
+
sportal365Images: 'Sportal365 Images',
|
|
139
|
+
search: 'Search',
|
|
140
|
+
delete: 'Delete',
|
|
141
|
+
fromDate: 'From Date',
|
|
142
|
+
toDate: 'To Date',
|
|
127
143
|
active: 'Active',
|
|
128
144
|
inactive: 'Inactive',
|
|
129
|
-
|
|
145
|
+
expired: 'Expired',
|
|
130
146
|
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
147
|
titlePlaceholder: 'Provide a title for your poll',
|
|
132
|
-
optionTitlePlaceholder: 'Type the title of the option',
|
|
133
|
-
optionDescriptionPlaceholder: 'Type the description of the option',
|
|
134
148
|
repeatedValueMessage: 'You have entered a repeated value. Please enter a different one',
|
|
135
149
|
flags: 'Flags',
|
|
136
150
|
flagsPlaceholder: 'Type your flag and hit enter',
|
|
@@ -147,18 +161,12 @@ const labels = {
|
|
|
147
161
|
entity: 'Entity',
|
|
148
162
|
campaign: 'Campaign',
|
|
149
163
|
id: 'ID',
|
|
150
|
-
idContentPlaceholder: 'Type the ID of your content',
|
|
151
|
-
idCampaignPlaceholder: 'Type the ID of your campaign',
|
|
152
164
|
label: 'Label',
|
|
153
|
-
labelContentPlaceholder: "Type the content's label",
|
|
154
|
-
labelCampaignPlaceholder: "Type the campaign's label",
|
|
155
165
|
type: 'Type',
|
|
156
166
|
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
167
|
deleteLabel: 'Delete',
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
typeContentPlaceholder: "Type the content's type",
|
|
168
|
+
deletePollTitle: 'Delete Poll',
|
|
169
|
+
deletePollDescription: 'Are you sure you want to delete',
|
|
162
170
|
previewPoll: 'Preview poll',
|
|
163
171
|
getFootballEntitiesErrorMessage: "There was a problem with fetching football's data",
|
|
164
172
|
createPollMessage: 'You have successfully created poll',
|
|
@@ -177,12 +185,8 @@ const labels = {
|
|
|
177
185
|
encryptingImageErrorMessage: 'There was a problem with encrypting image before uploading it to bucket. Please try again',
|
|
178
186
|
clear: 'Clear'
|
|
179
187
|
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
188
|
hideFilters: 'Hide filters',
|
|
183
189
|
showFilters: 'Show filters',
|
|
184
|
-
dateFromTo: 'Date from/to',
|
|
185
|
-
dateFromToPlaceholder: 'Select Date...',
|
|
186
190
|
branding: 'Branding',
|
|
187
191
|
urls: 'URLs',
|
|
188
192
|
primaryUrl: 'Primary URL',
|
|
@@ -204,9 +208,38 @@ const labels = {
|
|
|
204
208
|
additionalImage: 'Additional Image',
|
|
205
209
|
embedCode: 'Embed Code',
|
|
206
210
|
embedCodePlaceholder: 'Place your embed code here',
|
|
207
|
-
|
|
208
|
-
usersExportMessage: "
|
|
209
|
-
usersExportErrorMessage: "There was a problem with exporting users. Please try again"
|
|
211
|
+
exportUsers: "Export users",
|
|
212
|
+
usersExportMessage: "Users have been exported successfully",
|
|
213
|
+
usersExportErrorMessage: "There was a problem with exporting users. Please try again",
|
|
214
|
+
managePollTitle: "Manage Poll",
|
|
215
|
+
managePollDescription: "Manage your Poll here",
|
|
216
|
+
addOption: "Add option",
|
|
217
|
+
removeOption: "Remove option",
|
|
218
|
+
urlCopiedToClipboardMessage: "URL copied to clipboard",
|
|
219
|
+
imageDeletedMessage: "Image deleted",
|
|
220
|
+
imageResetMessage: "The initial size of the image has been restored",
|
|
221
|
+
authRequirement: "Auth Requirement",
|
|
222
|
+
authRequirementDescription: "Choose the type of authentication to be used.",
|
|
223
|
+
free: "Free",
|
|
224
|
+
lead: "Lead",
|
|
225
|
+
registered: "Registered",
|
|
226
|
+
optionDescriptionExplanation: "This optional field allows you to provide users with more information about the option",
|
|
227
|
+
additionalFields: "Additional fields",
|
|
228
|
+
addDescription: "Add description",
|
|
229
|
+
addImages: "Add images",
|
|
230
|
+
schedule: "Schedule",
|
|
231
|
+
scheduledTaskNotAvailable: "To configure scheduled tasks you need to first create your poll",
|
|
232
|
+
createScheduledTaskMessage: "You have successfully created scheduled task",
|
|
233
|
+
createScheduledTaskErrorMessage: "An error occurred while creating scheduled task. Please try again later",
|
|
234
|
+
updateScheduledTaskMessage: "You have successfully updated scheduled task",
|
|
235
|
+
updateScheduledTaskErrorMessage: "An error occurred while updating scheduled task. Please try again later",
|
|
236
|
+
deleteScheduledTaskMessage: "You have successfully deleted scheduled task",
|
|
237
|
+
deleteScheduledTaskErrorMessage: "An error occurred while deleting scheduled task. Please try again later",
|
|
238
|
+
name: "Name",
|
|
239
|
+
changeStatusTo: "Change status to:",
|
|
240
|
+
at: "At:",
|
|
241
|
+
deleteScheduledTaskModalTitle: "Delete scheduled task",
|
|
242
|
+
deleteScheduledTaskModalParagraph: "Are you sure you want to delete the following scheduled task: ",
|
|
210
243
|
|
|
211
244
|
};
|
|
212
245
|
|
|
@@ -225,6 +258,10 @@ Here is all information about **`LabelsModel`**:
|
|
|
225
258
|
| Key | Description | Default Value |
|
|
226
259
|
| :-------------: |:-------------:| :-----:|
|
|
227
260
|
| `userNotFound` | On login screen when client gives invalid information about email or password. | User not found. Please try again |
|
|
261
|
+
| `clientFeaturesNotFoundMessage` | Toast error message when client is providing invalid value to **fansUnitedApiKey** or **fansUnitedClientId** prop. | There was a problem fetching client's configuration. Please check again your API key and client ID. For more information contact Fans United staff. |
|
|
262
|
+
| `featureDisabled` | Label for no permission card title | Feature disabled! |
|
|
263
|
+
| `noPermissionMessage` | Label for no permission card paragraph | You have no permission for this feature! |
|
|
264
|
+
| `tryAgainButton` | Label for no permission card button | Try again |
|
|
228
265
|
| `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' |
|
|
229
266
|
| `signOut` | Used as label on sign out button. | Sign out |
|
|
230
267
|
| `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 |
|
|
@@ -233,49 +270,58 @@ Here is all information about **`LabelsModel`**:
|
|
|
233
270
|
| `votes` | Votes of a poll | Votes |
|
|
234
271
|
| `creationDate` | Date of created poll in same format as given for **`timeFormat` prop** | Created at |
|
|
235
272
|
| `actions` | Two icon buttons with different actions | Actions |
|
|
273
|
+
| `pageNo` | Label before pagination buttons | Page No |
|
|
274
|
+
| `back` | Label next to back button | Back |
|
|
236
275
|
| `create` | Label for management header | Create |
|
|
237
276
|
| `edit` | Label for management header | Edit |
|
|
238
277
|
| `save` | Label for save button | Save |
|
|
239
278
|
| `preview` | Label for preview button | Preview |
|
|
240
279
|
| `close` | Label for close button | Close |
|
|
241
|
-
| `filterBy` | Label for filters container on main screen | Filter by: |
|
|
242
280
|
| `sortBy` | Label for sort container on main screen | Sort by: |
|
|
243
|
-
| `
|
|
281
|
+
| `sortByAscending` | Label for sort option | Sort by created at field in ascending order |
|
|
282
|
+
| `sortByDescending` | Label for sort option | Sort by created at field in descending order |
|
|
244
283
|
| `contextEntityTag` | Label for input search for context entity tag in filters container | Context entity tag |
|
|
245
284
|
| `typeContextTagNamePlaceholder` | Placeholder for input search for context entity tag in filters container and in context side bar | Type context tag name... |
|
|
285
|
+
| `itemsPerPage` | Label for items per page filter select | Items per page |
|
|
246
286
|
| `showMoreImages` | Label for hyperlink in images container | Show more images |
|
|
247
287
|
| `hideMoreImages` | Label for hyperlink in images container | Hide more images |
|
|
248
288
|
| `uploadImage` | Label next to upload button | Upload image |
|
|
249
|
-
| `groupByStatus` | Label for checkbox in sort container | Group by status |
|
|
250
289
|
| `copyUrl` | Label for copy url button | Copy URL |
|
|
251
290
|
| `copied` | Label for copy url button | Copied |
|
|
252
291
|
| `add` | Label for add button | Add |
|
|
253
292
|
| `configuration` | Label for configuration accordion | Configuration |
|
|
254
293
|
| `minimumVotes` | Label for minimum votes filter input | Minimum votes |
|
|
255
|
-
| `minimumVotesPlaceholder` | Placeholder for minimum votes filter input | Enter the minimum votes for polls |
|
|
256
294
|
| `titlePlaceholder` | Placeholder/description about title input field name on management screen. | Provide a title for your poll |
|
|
257
295
|
| `timeFormat` | Timeformat for displaying dates. Widgets uses [dayjs](https://www.npmjs.com/package/dayjs) as a date dependency. | DD.MM.YYYY, HH:mm |
|
|
258
296
|
| `previous` | Label for pagination button. | Previous |
|
|
259
297
|
| `next` | Label for pagination button. | Next |
|
|
260
298
|
| `id` | Label for ID read only input field. | ID |
|
|
299
|
+
| `alternativeTitle` | Label for alternative title input field. | Alternative title |
|
|
261
300
|
| `description` | Label for description input field on management screen. | Description |
|
|
262
|
-
| `descriptionPlaceholder` | Placeholder/description about input field for poll description when creating/editing a poll. | Describe your poll |
|
|
263
301
|
| `images` | Label for images container. | Images |
|
|
264
302
|
| `rules` | Label for rules rich text. | Rules |
|
|
265
303
|
| `rulesPlaceholder` | Placeholder for rules rich text. | Describe your rules for voting in the poll |
|
|
266
304
|
| `adContent` | Label for AD content rich text. | Ad content |
|
|
267
305
|
| `adContentPlaceholder` | Placeholder for AD content rich text. | Place your ad content |
|
|
268
|
-
| `
|
|
269
|
-
| `
|
|
270
|
-
| `
|
|
271
|
-
| `
|
|
306
|
+
| `mainImage` | Label for main image. | Main |
|
|
307
|
+
| `coverImage` | Label for cover image. | Cover |
|
|
308
|
+
| `mobileImage` | Label for mobile image. | Mobile |
|
|
309
|
+
| `clearImage` | Tooltip for clear image button | Clear image |
|
|
310
|
+
| `viewImage` | Tooltip for view image button | View image |
|
|
311
|
+
| `cropImage` | Tooltip for crop image button | Crop image |
|
|
312
|
+
| `aspectRatio` | Label for aspect ratio select | Aspect ratio |
|
|
313
|
+
| `crop` | Label for crop button | Crop |
|
|
314
|
+
| `rest` | Label for reset button | Reset |
|
|
315
|
+
| `sportal365Images` | Label for sportal365 images button | Sportal365 Images |
|
|
316
|
+
| `search` | Label for search | Search |
|
|
317
|
+
| `delete` | Label for delete | Delete |
|
|
318
|
+
| `fromDate` | Label for from date input | From Date |
|
|
319
|
+
| `toDate` | Label for to date input | To Date |
|
|
272
320
|
| `imagePlaceholder` | Placeholder for image inputs. | Paste your image as valid URL or as relative path |
|
|
273
321
|
| `active` | Label for status. | Active |
|
|
274
322
|
| `inactive` | Label for status. | Inactive |
|
|
275
|
-
| `
|
|
323
|
+
| `expired` | Label for status. | Expired |
|
|
276
324
|
| `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 |
|
|
277
|
-
| `optionTitlePlaceholder` | Placeholder for option title input. | Type the title of the option |
|
|
278
|
-
| `optionDescriptionPlaceholder` | Placeholder for option description input. | Type the description of the option |
|
|
279
325
|
| `flags` | Label for choosing flags. | Flags |
|
|
280
326
|
| `flagsPlaceholder` | Placeholder on input field for flags | Type your flag and hit enter |
|
|
281
327
|
| `labels` | Label for labels container | Labels |
|
|
@@ -293,25 +339,16 @@ Here is all information about **`LabelsModel`**:
|
|
|
293
339
|
| `entity` | Label for entity search in tag. | Entity |
|
|
294
340
|
| `campaign` | Label for context campaign container. | Campaign |
|
|
295
341
|
| `id` | Label for ID. | ID |
|
|
296
|
-
| `idContentPlaceholder` | Placeholder for ID content in context. | Type the ID of your content |
|
|
297
|
-
| `idCampaignPlaceholder` | Placeholder for ID content in campaign. | Type the ID of your campaign |
|
|
298
342
|
| `label` | Label for context content/campaign label input. | Label |
|
|
299
|
-
| `labelContentPlaceholder` | Placeholder for label content in context. | Type the content's label |
|
|
300
|
-
| `labelCampaignPlaceholder` | Placeholder for label content in campaign. | Type the campaign's label |
|
|
301
343
|
| `type` | Label for context content type input. | Type |
|
|
302
344
|
| `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 |
|
|
303
|
-
| `noType` | The default select option for poll type. | No type |
|
|
304
345
|
| `deleteLabel` | Label for delete button in confirmation modal. | Delete |
|
|
305
|
-
| `
|
|
306
|
-
| `
|
|
307
|
-
| `typeContentPlaceholder` | Placeholder for type content in context. | Type the content's type |
|
|
346
|
+
| `deletePollTitle` | Title for delete poll modal | Delete Poll |
|
|
347
|
+
| `deletePollDescription` | Description for delete poll modal | Are you sure you want to delete |
|
|
308
348
|
| `previewPoll` | Title in preview modal. | Preview poll |
|
|
309
349
|
| `clear` | Label tippy clear button | Clear |
|
|
310
|
-
| `searchImages` | Label for search image input | Search images |
|
|
311
350
|
| `hideFilters` | Label for hyperlink to hide filters for image search | Hide filters |
|
|
312
351
|
| `showFilters` | Label for hyperlink to show filters for image search | Show filters |
|
|
313
|
-
| `dateFromTo` | Label for date from/to filter for image search | Date from/to |
|
|
314
|
-
| `dateFromToPlaceholder` | Placeholder for input date from/to filter for image search | Select Date... |
|
|
315
352
|
| `branding` | Label for branding container | Branding |
|
|
316
353
|
| `urls` | Label for branding urls container | URLs |
|
|
317
354
|
| `primaryUrl` | Label for branding primary url input | Primary URL |
|
|
@@ -333,9 +370,9 @@ Here is all information about **`LabelsModel`**:
|
|
|
333
370
|
| `additionalImage` | Label for branding additional image | Additional Image |
|
|
334
371
|
| `embedCode` | Label for question embed code input | Embed Code |
|
|
335
372
|
| `embedCodePlaceholder` | Placeholder for question embed code input | Place your embed code here |
|
|
336
|
-
| `
|
|
337
|
-
| `usersExportMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when exporting
|
|
338
|
-
| `usersExportErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when exporting
|
|
373
|
+
| `exportUsers` | Tooltip for exported users button | Export users |
|
|
374
|
+
| `usersExportMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when exporting users | Users have been exported successfully |
|
|
375
|
+
| `usersExportErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when exporting users fails | There was a problem with exporting users. Please try again |
|
|
339
376
|
| `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 |
|
|
340
377
|
| `createPollMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when creating poll | You have successfully created poll |
|
|
341
378
|
| `createPollErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when creating poll | There was a problem creating poll. Please try again |
|
|
@@ -350,5 +387,33 @@ Here is all information about **`LabelsModel`**:
|
|
|
350
387
|
| `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 |
|
|
351
388
|
| `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 |
|
|
352
389
|
| `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 |
|
|
353
|
-
| `
|
|
354
|
-
| `
|
|
390
|
+
| `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 |
|
|
391
|
+
| `managePollTitle` | Header text on management screen | Manage Poll |
|
|
392
|
+
| `managePollDescription` | Description paragraph on management screen | Manage your Poll here |
|
|
393
|
+
| `addOption` | Label for add option button | Add option |
|
|
394
|
+
| `removeOption` | Label for remove option | Remove option |
|
|
395
|
+
| `urlCopiedToClipboardMessage` | Toast info message when image URL is copied | URL copied to clipboard |
|
|
396
|
+
| `imageDeletedMessage` | Toast info message when image is deleted | Image deleted |
|
|
397
|
+
| `imageResetMessage` | Toast info message when image size is restored | The initial size of the image has been restored |
|
|
398
|
+
| `authRequirement` | Label for auth requirement select in configuration panel. | Auth Requirement |
|
|
399
|
+
| `authRequirementDescription` | Description for auth requirement select in configuration panel. | Choose the type of authentication to be used. |
|
|
400
|
+
| `free` | Label for auth requirement option. | Free |
|
|
401
|
+
| `lead` | Label for auth requirement option. | Lead |
|
|
402
|
+
| `registered` | Label for auth requirement option. | Registered |
|
|
403
|
+
| `optionDescriptionExplanation` | Description paragraph for explanation description | This optional field allows you to provide users with more information about the option |
|
|
404
|
+
| `additionalFields` | Label for additional fields | Additional fields |
|
|
405
|
+
| `addDescription` | Label for toggle description button | Add description |
|
|
406
|
+
| `addImages` | Label for toggle images button | Add images |
|
|
407
|
+
| `schedule` | Label for schedule accordion | Schedule |
|
|
408
|
+
| `scheduledTaskNotAvailable` | Paragraph when trying to configure scheduled task for not created Poll | To configure scheduled tasks you need to first create your poll |
|
|
409
|
+
| `createScheduledTaskMessage` | Toast successful message when a new scheduled task is created | You have successfully created scheduled task |
|
|
410
|
+
| `createScheduledTaskErrorMessage` | Toast error message when a new scheduled task is created | An error occurred while creating scheduled task. Please try again later |
|
|
411
|
+
| `updateScheduledTaskMessage` | Toast successful message when a scheduled task is updated | You have successfully updated scheduled task |
|
|
412
|
+
| `updateScheduledTaskErrorMessage` | Toast error message when a scheduled task is updated | An error occurred while updating scheduled task. Please try again later |
|
|
413
|
+
| `deleteScheduledTaskMessage` | Toast successful message when a scheduled task is deleted | You have successfully deleted scheduled task |
|
|
414
|
+
| `deleteScheduledTaskErrorMessage` | Toast error message when a scheduled task is deleted | An error occurred while deleting scheduled task. Please try again later |
|
|
415
|
+
| `name` | Label for name | Name |
|
|
416
|
+
| `changeStatusTo` | Label for select input in schedule accordion | Change status to: |
|
|
417
|
+
| `at` | Label for calendar input in schedule accordion | At: |
|
|
418
|
+
| `deleteScheduledTaskModalTitle` | Title for delete scheduled task modal | Delete scheduled task |
|
|
419
|
+
| `deleteScheduledTaskModalParagraph` | Paragraph for delete scheduled task modal | Are you sure you want to delete the following scheduled task: |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import PollFiltersModel from '../../models/Filters/PollFiltersModel';
|
|
3
|
-
import SelectOption from '../../models/Select/SelectOption';
|
|
1
|
+
import { default as React, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { default as PollFiltersModel } from '../../models/Filters/PollFiltersModel';
|
|
3
|
+
import { default as SelectOption } from '../../models/Select/SelectOption';
|
|
4
4
|
type FiltersProps = {
|
|
5
5
|
filters: PollFiltersModel;
|
|
6
6
|
options: SelectOption[];
|
package/components/Main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import LabelsModel from '../models/Labels/LabelsModel';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as LabelsModel } from '../models/Labels/LabelsModel';
|
|
3
3
|
type MainProps = {
|
|
4
4
|
fansUnitedApiKey: string;
|
|
5
5
|
fansUnitedClientId: string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as RequestBody } from '../../models/RequestBody/RequestBody';
|
|
3
3
|
type MainColumnProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
setDescription: Dispatch<SetStateAction<string>>;
|
|
4
|
+
isEditMode: boolean;
|
|
5
|
+
requestBody: RequestBody;
|
|
6
|
+
onRequestBodyUpdate: (body: RequestBody) => void;
|
|
8
7
|
};
|
|
9
8
|
declare const MainColumn: React.FC<MainColumnProps>;
|
|
10
9
|
export default MainColumn;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import
|
|
3
|
-
import PollFiltersModel from '../../models/Filters/PollFiltersModel';
|
|
1
|
+
import { default as React, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { default as RequestBody } from '../../models/RequestBody/RequestBody';
|
|
4
3
|
type ManagePollProps = {
|
|
5
|
-
pollById:
|
|
6
|
-
|
|
4
|
+
pollById: RequestBody | null;
|
|
5
|
+
setPollById: Dispatch<SetStateAction<RequestBody>>;
|
|
7
6
|
toggleScreen: () => void;
|
|
8
7
|
clearPollById: () => void;
|
|
8
|
+
onClickBack: () => void;
|
|
9
9
|
};
|
|
10
10
|
declare const ManagePoll: React.FC<ManagePollProps>;
|
|
11
11
|
export default ManagePoll;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IPollOption } from '../../../models/RequestBody/RequestBody';
|
|
3
|
+
type AdditionalOptionFieldProps = {
|
|
4
|
+
option: IPollOption;
|
|
5
|
+
field: string;
|
|
6
|
+
onChange: (option: IPollOption) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const AdditionalOptionField: React.FC<AdditionalOptionFieldProps>;
|
|
9
|
+
export default AdditionalOptionField;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type CheckboxesProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
values: string[];
|
|
5
|
+
allValues: string[];
|
|
6
|
+
valuesMap: Record<string, string>;
|
|
7
|
+
showAll?: boolean;
|
|
8
|
+
showAllLabel?: string;
|
|
9
|
+
onChange: (values: string[]) => void;
|
|
10
|
+
toggleShowAll?: () => void;
|
|
11
|
+
};
|
|
12
|
+
declare const Checkboxes: React.FC<CheckboxesProps>;
|
|
13
|
+
export default Checkboxes;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IPollOption } from '../../../models/RequestBody/RequestBody';
|
|
3
|
+
type OptionProps = {
|
|
4
|
+
option: IPollOption;
|
|
5
|
+
optionNumber: number;
|
|
6
|
+
isEditMode: boolean;
|
|
7
|
+
isPollVoted: boolean;
|
|
8
|
+
additionalFields: string[];
|
|
9
|
+
disableDelete: boolean;
|
|
10
|
+
onDelete: () => void;
|
|
11
|
+
onChange: (option: IPollOption) => void;
|
|
12
|
+
};
|
|
13
|
+
declare const Option: React.FC<OptionProps>;
|
|
14
|
+
export default Option;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IPollOption } from '../../../models/
|
|
3
|
-
import RequestBody from '../../../models/RequestBody/RequestBody';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IPollOption } from '../../../models/RequestBody/RequestBody';
|
|
4
3
|
type OptionsProps = {
|
|
4
|
+
isEditMode: boolean;
|
|
5
|
+
isPollVoted: boolean;
|
|
5
6
|
options: IPollOption[];
|
|
6
|
-
|
|
7
|
+
onChange: (options: IPollOption[]) => void;
|
|
7
8
|
};
|
|
8
9
|
declare const Options: React.FC<OptionsProps>;
|
|
9
10
|
export default Options;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as RequestBody } from '../../../../models/RequestBody/RequestBody';
|
|
3
|
+
type ConfigurationProps = {
|
|
4
|
+
requestBody: RequestBody;
|
|
5
|
+
onRequestBodyUpdate: (body: RequestBody) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const Configuration: React.FC<ConfigurationProps>;
|
|
8
|
+
export default Configuration;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
type TypeProps = {
|
|
3
3
|
defaultValue: string;
|
|
4
|
-
onChange: (
|
|
4
|
+
onChange: (type: string) => void;
|
|
5
5
|
};
|
|
6
6
|
declare const Type: React.FC<TypeProps>;
|
|
7
7
|
export default Type;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as RequestBody } from '../../../models/RequestBody/RequestBody';
|
|
3
|
+
type SideBarProps = {
|
|
4
|
+
requestBody: RequestBody;
|
|
5
|
+
onRequestBodyUpdate: (body: RequestBody) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const SideBar: React.FC<SideBarProps>;
|
|
8
|
+
export default SideBar;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PollBasicModel } from 'fansunited-sdk-esm';
|
|
3
|
+
type DeletePollModalProps = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
poll: PollBasicModel;
|
|
6
|
+
onDelete: () => void;
|
|
7
|
+
onClose: (e: any) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const DeletePollModal: React.FC<DeletePollModalProps>;
|
|
10
|
+
export default DeletePollModal;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as RequestBody } from '../../models/RequestBody/RequestBody';
|
|
3
3
|
type PreviewModalProps = {
|
|
4
4
|
isOpen: boolean;
|
|
5
|
-
requestBody:
|
|
6
|
-
description: string;
|
|
5
|
+
requestBody: RequestBody;
|
|
7
6
|
handleClose: () => void;
|
|
8
7
|
};
|
|
9
8
|
declare const PreviewModal: React.FC<PreviewModalProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PollBasicModel } from 'fansunited-sdk-esm';
|
|
3
|
+
type ActionsMenuProps = {
|
|
4
|
+
poll: PollBasicModel;
|
|
5
|
+
onClickEdit: () => void;
|
|
6
|
+
onClickExport: () => void;
|
|
7
|
+
onDelete: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const ActionsMenu: React.FC<ActionsMenuProps>;
|
|
10
|
+
export default ActionsMenu;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PollBasicModel } from 'fansunited-sdk-esm';
|
|
3
|
+
type PollRowProps = {
|
|
4
|
+
row: PollBasicModel;
|
|
5
|
+
onClickEdit: () => void;
|
|
6
|
+
onClickExport: () => void;
|
|
7
|
+
onDelete: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const PollRow: React.FC<PollRowProps>;
|
|
10
|
+
export default PollRow;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PollBasicModel } from 'fansunited-sdk-esm';
|
|
3
|
+
type PollsTableProps = {
|
|
4
|
+
pagePolls: Map<number, PollBasicModel[]>;
|
|
5
|
+
pageCount: number;
|
|
6
|
+
pollsPerPage: number;
|
|
7
|
+
getPreviousPage: () => void;
|
|
8
|
+
getNextPage: () => void;
|
|
9
|
+
onClickEdit: (id: string) => void;
|
|
10
|
+
onClickExport: (id: string) => void;
|
|
11
|
+
onDelete: () => void;
|
|
12
|
+
};
|
|
13
|
+
declare const PollsTable: React.FC<PollsTableProps>;
|
|
14
|
+
export default PollsTable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type TablePaginationProps = {
|
|
3
|
+
pageCount: number;
|
|
4
|
+
disablePreviousPage: boolean;
|
|
5
|
+
disableNextPage: boolean;
|
|
6
|
+
goToPreviousPage: () => void;
|
|
7
|
+
goToNextPage: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const TablePagination: React.FC<TablePaginationProps>;
|
|
10
|
+
export default TablePagination;
|