fansunited-widget-poll 1.3.0 → 2.1.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 +154 -85
- 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 +9 -0
- package/components/Polls/ParticipationChart.d.ts +9 -0
- package/components/Polls/PollExports.d.ts +7 -0
- package/components/Polls/PollRow.d.ts +9 -0
- package/components/Polls/PollStandings.d.ts +7 -0
- package/components/Polls/PollStats.d.ts +8 -0
- package/components/Polls/Polls.d.ts +1 -1
- package/components/Polls/PollsTable.d.ts +13 -0
- package/components/Polls/TableInfoTabs.d.ts +7 -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 +74 -35
- 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 +82498 -38896
- package/poll-manager.umd.js +536 -221
- 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';
|
|
@@ -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,50 +97,56 @@ 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
|
-
copied: 'Copied',
|
|
112
118
|
add: 'Add',
|
|
113
119
|
configuration: 'Configuration',
|
|
114
120
|
minimumVotes: 'Minimum votes',
|
|
115
|
-
|
|
121
|
+
alternativeTitle: 'Alternative title',
|
|
116
122
|
description: 'Description',
|
|
117
|
-
descriptionPlaceholder: 'Describe your poll',
|
|
118
123
|
images: 'Images',
|
|
119
124
|
rules: 'Rules',
|
|
120
|
-
rulesPlaceholder: 'Describe your rules for voting in the poll',
|
|
121
125
|
adContent: 'Ad content',
|
|
122
126
|
adContentPlaceholder: 'Place your ad content',
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
mainImage: 'Main',
|
|
128
|
+
coverImage: 'Cover',
|
|
129
|
+
mobileImage: 'Mobile',
|
|
130
|
+
clearImage: 'Clear image',
|
|
131
|
+
viewImage: 'View image',
|
|
132
|
+
cropImage: 'Crop image',
|
|
133
|
+
aspectRatio: 'Aspect ratio',
|
|
134
|
+
crop: 'Crop',
|
|
135
|
+
reset: 'Reset',
|
|
136
|
+
sportal365Images: 'Sportal365 Images',
|
|
137
|
+
search: 'Search',
|
|
138
|
+
delete: 'Delete',
|
|
139
|
+
fromDate: 'From Date',
|
|
140
|
+
toDate: 'To Date',
|
|
127
141
|
active: 'Active',
|
|
128
142
|
inactive: 'Inactive',
|
|
129
|
-
|
|
143
|
+
expired: 'Expired',
|
|
130
144
|
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
145
|
repeatedValueMessage: 'You have entered a repeated value. Please enter a different one',
|
|
135
146
|
flags: 'Flags',
|
|
136
147
|
flagsPlaceholder: 'Type your flag and hit enter',
|
|
137
148
|
labels: 'Labels',
|
|
138
149
|
customFields: 'Custom fields',
|
|
139
|
-
dynamicFieldsDescription: 'You can create your custom attributes for easier way to connect or describe your poll',
|
|
140
150
|
keyDynamicFields: 'Key',
|
|
141
151
|
valueDynamicFields: 'Value',
|
|
142
152
|
options: 'Options',
|
|
@@ -144,21 +154,14 @@ const labels = {
|
|
|
144
154
|
context: 'Context',
|
|
145
155
|
content: 'Content',
|
|
146
156
|
tags: 'Tags',
|
|
147
|
-
entity: 'Entity',
|
|
148
157
|
campaign: 'Campaign',
|
|
149
158
|
id: 'ID',
|
|
150
|
-
idContentPlaceholder: 'Type the ID of your content',
|
|
151
|
-
idCampaignPlaceholder: 'Type the ID of your campaign',
|
|
152
159
|
label: 'Label',
|
|
153
|
-
labelContentPlaceholder: "Type the content's label",
|
|
154
|
-
labelCampaignPlaceholder: "Type the campaign's label",
|
|
155
160
|
type: 'Type',
|
|
156
161
|
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
162
|
deleteLabel: 'Delete',
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
typeContentPlaceholder: "Type the content's type",
|
|
163
|
+
deletePollTitle: 'Delete Poll',
|
|
164
|
+
deletePollDescription: 'Are you sure you want to delete',
|
|
162
165
|
previewPoll: 'Preview poll',
|
|
163
166
|
getFootballEntitiesErrorMessage: "There was a problem with fetching football's data",
|
|
164
167
|
createPollMessage: 'You have successfully created poll',
|
|
@@ -168,21 +171,17 @@ const labels = {
|
|
|
168
171
|
tagsInvalidFieldValidationMessage: 'Tag entity is required!',
|
|
169
172
|
getPollErrorMessage: 'There was a problem with fetching poll data. Please try again',
|
|
170
173
|
deletePollMessage: 'You have successfully deleted poll',
|
|
171
|
-
deletePollErrorMessage: 'There was a problem with deleting poll. Please try again',
|
|
174
|
+
deletePollErrorMessage: 'There was a problem with deleting poll. Please try again', //here
|
|
172
175
|
updatePollMessage: 'You have successfully updated the poll',
|
|
173
176
|
updatePollErrorMessage: 'There was a problem updating the poll. Please try again',
|
|
174
177
|
uploadingImageMessage: 'You have successfully uploaded image',
|
|
175
178
|
generateSignedInUrlErrorMessage: 'There was a problem generating signed in URL to store the image in bucket. Please try again',
|
|
176
179
|
uploadingImageErrorMessage: 'There was a problem with uploading image to bucket. Please try again',
|
|
177
180
|
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',
|
|
181
|
+
clear: 'Clear',
|
|
182
|
+
searchSportal365ImagesErrorMessage: 'There was a problem with searching images from Sportal 365 API. Please try again',
|
|
182
183
|
hideFilters: 'Hide filters',
|
|
183
184
|
showFilters: 'Show filters',
|
|
184
|
-
dateFromTo: 'Date from/to',
|
|
185
|
-
dateFromToPlaceholder: 'Select Date...',
|
|
186
185
|
branding: 'Branding',
|
|
187
186
|
urls: 'URLs',
|
|
188
187
|
primaryUrl: 'Primary URL',
|
|
@@ -204,9 +203,37 @@ const labels = {
|
|
|
204
203
|
additionalImage: 'Additional Image',
|
|
205
204
|
embedCode: 'Embed Code',
|
|
206
205
|
embedCodePlaceholder: 'Place your embed code here',
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
usersExportMessage: "Users have been exported successfully",
|
|
207
|
+
usersExportErrorMessage: "There was a problem with exporting users. Please try again",
|
|
208
|
+
managePollTitle: "Manage Poll",
|
|
209
|
+
managePollDescription: "Manage your Poll here",
|
|
210
|
+
addOption: "Add option",
|
|
211
|
+
removeOption: "Remove option",
|
|
212
|
+
urlCopiedToClipboardMessage: "URL copied to clipboard",
|
|
213
|
+
imageDeletedMessage: "Image deleted",
|
|
214
|
+
imageResetMessage: "The initial size of the image has been restored",
|
|
215
|
+
authRequirement: "Auth Requirement",
|
|
216
|
+
authRequirementDescription: "Choose the type of authentication to be used.",
|
|
217
|
+
free: "Free",
|
|
218
|
+
lead: "Lead",
|
|
219
|
+
registered: "Registered",
|
|
220
|
+
optionDescriptionExplanation: "This optional field allows you to provide users with more information about the option",
|
|
221
|
+
additionalFields: "Additional fields",
|
|
222
|
+
addDescription: "Add description",
|
|
223
|
+
addImages: "Add images",
|
|
224
|
+
schedule: "Schedule",
|
|
225
|
+
scheduledTaskNotAvailable: "To configure scheduled tasks you need to first create your poll",
|
|
226
|
+
createScheduledTaskMessage: "You have successfully created scheduled task",
|
|
227
|
+
createScheduledTaskErrorMessage: "An error occurred while creating scheduled task. Please try again later",
|
|
228
|
+
updateScheduledTaskMessage: "You have successfully updated scheduled task",
|
|
229
|
+
updateScheduledTaskErrorMessage: "An error occurred while updating scheduled task. Please try again later",
|
|
230
|
+
deleteScheduledTaskMessage: "You have successfully deleted scheduled task",
|
|
231
|
+
deleteScheduledTaskErrorMessage: "An error occurred while deleting scheduled task. Please try again later",
|
|
232
|
+
name: "Name",
|
|
233
|
+
changeStatusTo: "Change status to:",
|
|
234
|
+
at: "At:",
|
|
235
|
+
deleteScheduledTaskModalTitle: "Delete scheduled task",
|
|
236
|
+
deleteScheduledTaskModalParagraph: "Are you sure you want to delete the following scheduled task: ",
|
|
210
237
|
|
|
211
238
|
};
|
|
212
239
|
|
|
@@ -225,93 +252,93 @@ Here is all information about **`LabelsModel`**:
|
|
|
225
252
|
| Key | Description | Default Value |
|
|
226
253
|
| :-------------: |:-------------:| :-----:|
|
|
227
254
|
| `userNotFound` | On login screen when client gives invalid information about email or password. | User not found. Please try again |
|
|
255
|
+
| `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. |
|
|
256
|
+
| `featureDisabled` | Label for no permission card title | Feature disabled! |
|
|
257
|
+
| `noPermissionMessage` | Label for no permission card paragraph | You have no permission for this feature! |
|
|
258
|
+
| `tryAgainButton` | Label for no permission card button | Try again |
|
|
228
259
|
| `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
260
|
| `signOut` | Used as label on sign out button. | Sign out |
|
|
230
|
-
| `getPollsErrorMessage` |
|
|
261
|
+
| `getPollsErrorMessage` | Toast error message when request fails for fetching list of polls. | There was a problem with fetching list of polls |
|
|
231
262
|
| `title` | Label for title | Title
|
|
232
263
|
| `status` | Status of a poll | Status |
|
|
233
264
|
| `votes` | Votes of a poll | Votes |
|
|
234
265
|
| `creationDate` | Date of created poll in same format as given for **`timeFormat` prop** | Created at |
|
|
235
266
|
| `actions` | Two icon buttons with different actions | Actions |
|
|
267
|
+
| `pageNo` | Label before pagination buttons | Page No |
|
|
268
|
+
| `back` | Label next to back button | Back |
|
|
236
269
|
| `create` | Label for management header | Create |
|
|
237
270
|
| `edit` | Label for management header | Edit |
|
|
238
271
|
| `save` | Label for save button | Save |
|
|
239
272
|
| `preview` | Label for preview button | Preview |
|
|
240
273
|
| `close` | Label for close button | Close |
|
|
241
|
-
| `filterBy` | Label for filters container on main screen | Filter by: |
|
|
242
274
|
| `sortBy` | Label for sort container on main screen | Sort by: |
|
|
243
|
-
| `
|
|
275
|
+
| `sortByAscending` | Label for sort option | Sort by created at field in ascending order |
|
|
276
|
+
| `sortByDescending` | Label for sort option | Sort by created at field in descending order |
|
|
277
|
+
| `language` | Label for language selection in configuration panel. | Language |
|
|
244
278
|
| `contextEntityTag` | Label for input search for context entity tag in filters container | Context entity tag |
|
|
245
279
|
| `typeContextTagNamePlaceholder` | Placeholder for input search for context entity tag in filters container and in context side bar | Type context tag name... |
|
|
280
|
+
| `itemsPerPage` | Label for items per page filter select | Items per page |
|
|
246
281
|
| `showMoreImages` | Label for hyperlink in images container | Show more images |
|
|
247
282
|
| `hideMoreImages` | Label for hyperlink in images container | Hide more images |
|
|
248
283
|
| `uploadImage` | Label next to upload button | Upload image |
|
|
249
|
-
| `groupByStatus` | Label for checkbox in sort container | Group by status |
|
|
250
284
|
| `copyUrl` | Label for copy url button | Copy URL |
|
|
251
|
-
| `copied` | Label for copy url button | Copied |
|
|
252
285
|
| `add` | Label for add button | Add |
|
|
253
286
|
| `configuration` | Label for configuration accordion | Configuration |
|
|
254
287
|
| `minimumVotes` | Label for minimum votes filter input | Minimum votes |
|
|
255
|
-
| `minimumVotesPlaceholder` | Placeholder for minimum votes filter input | Enter the minimum votes for polls |
|
|
256
|
-
| `titlePlaceholder` | Placeholder/description about title input field name on management screen. | Provide a title for your poll |
|
|
257
288
|
| `timeFormat` | Timeformat for displaying dates. Widgets uses [dayjs](https://www.npmjs.com/package/dayjs) as a date dependency. | DD.MM.YYYY, HH:mm |
|
|
258
289
|
| `previous` | Label for pagination button. | Previous |
|
|
259
290
|
| `next` | Label for pagination button. | Next |
|
|
260
291
|
| `id` | Label for ID read only input field. | ID |
|
|
292
|
+
| `alternativeTitle` | Label for alternative title input field. | Alternative title |
|
|
261
293
|
| `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
294
|
| `images` | Label for images container. | Images |
|
|
264
295
|
| `rules` | Label for rules rich text. | Rules |
|
|
265
|
-
| `rulesPlaceholder` | Placeholder for rules rich text. | Describe your rules for voting in the poll |
|
|
266
296
|
| `adContent` | Label for AD content rich text. | Ad content |
|
|
267
297
|
| `adContentPlaceholder` | Placeholder for AD content rich text. | Place your ad content |
|
|
268
|
-
| `
|
|
269
|
-
| `
|
|
270
|
-
| `
|
|
271
|
-
| `
|
|
298
|
+
| `mainImage` | Label for main image. | Main |
|
|
299
|
+
| `coverImage` | Label for cover image. | Cover |
|
|
300
|
+
| `mobileImage` | Label for mobile image. | Mobile |
|
|
301
|
+
| `clearImage` | Tooltip for clear image button | Clear image |
|
|
302
|
+
| `viewImage` | Tooltip for view image button | View image |
|
|
303
|
+
| `cropImage` | Tooltip for crop image button | Crop image |
|
|
304
|
+
| `aspectRatio` | Label for aspect ratio select | Aspect ratio |
|
|
305
|
+
| `crop` | Label for crop button | Crop |
|
|
306
|
+
| `rest` | Label for reset button | Reset |
|
|
307
|
+
| `sportal365Images` | Label for sportal365 images button | Sportal365 Images |
|
|
308
|
+
| `search` | Label for search | Search |
|
|
309
|
+
| `delete` | Label for delete | Delete |
|
|
310
|
+
| `fromDate` | Label for from date input | From Date |
|
|
311
|
+
| `toDate` | Label for to date input | To Date |
|
|
272
312
|
| `imagePlaceholder` | Placeholder for image inputs. | Paste your image as valid URL or as relative path |
|
|
273
313
|
| `active` | Label for status. | Active |
|
|
274
314
|
| `inactive` | Label for status. | Inactive |
|
|
275
|
-
| `
|
|
315
|
+
| `expired` | Label for status. | Expired |
|
|
276
316
|
| `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
317
|
| `flags` | Label for choosing flags. | Flags |
|
|
280
318
|
| `flagsPlaceholder` | Placeholder on input field for flags | Type your flag and hit enter |
|
|
281
319
|
| `labels` | Label for labels container | Labels |
|
|
282
320
|
| `customFields` | Label for custom fields container | Custom fields |
|
|
283
|
-
| `dynamicFieldsDescription` | Description paragraph for labels and custom fields containers | You can create your custom attributes for easier way to connect or describe your poll |
|
|
284
321
|
| `keyDynamicFields` | Label for key input | Key |
|
|
285
322
|
| `valueDynamicFields` | Label for value input | Value |
|
|
286
|
-
| `repeatedValueMessage` |
|
|
323
|
+
| `repeatedValueMessage` | Toast warning message when client submits same flag. | You have entered a repeated value. Please enter a different one |
|
|
287
324
|
| `options` | Label for options. | Options |
|
|
288
325
|
| `optionNumber` | Label for option container's header. | Option number |
|
|
289
326
|
| `correct` | Label for correct radio button. | Correct |
|
|
290
327
|
| `context` | Label for context container. | Context |
|
|
291
328
|
| `content` | Label for context content container. | Content |
|
|
292
329
|
| `tags` | Label for context tags container. | Tags |
|
|
293
|
-
| `entity` | Label for entity search in tag. | Entity |
|
|
294
330
|
| `campaign` | Label for context campaign container. | Campaign |
|
|
295
331
|
| `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
332
|
| `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
333
|
| `type` | Label for context content type input. | Type |
|
|
302
334
|
| `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
335
|
| `deleteLabel` | Label for delete button in confirmation modal. | Delete |
|
|
305
|
-
| `
|
|
306
|
-
| `
|
|
307
|
-
| `typeContentPlaceholder` | Placeholder for type content in context. | Type the content's type |
|
|
336
|
+
| `deletePollTitle` | Title for delete poll modal | Delete Poll |
|
|
337
|
+
| `deletePollDescription` | Description for delete poll modal | Are you sure you want to delete |
|
|
308
338
|
| `previewPoll` | Title in preview modal. | Preview poll |
|
|
309
339
|
| `clear` | Label tippy clear button | Clear |
|
|
310
|
-
| `searchImages` | Label for search image input | Search images |
|
|
311
340
|
| `hideFilters` | Label for hyperlink to hide filters for image search | Hide filters |
|
|
312
341
|
| `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
342
|
| `branding` | Label for branding container | Branding |
|
|
316
343
|
| `urls` | Label for branding urls container | URLs |
|
|
317
344
|
| `primaryUrl` | Label for branding primary url input | Primary URL |
|
|
@@ -333,22 +360,64 @@ Here is all information about **`LabelsModel`**:
|
|
|
333
360
|
| `additionalImage` | Label for branding additional image | Additional Image |
|
|
334
361
|
| `embedCode` | Label for question embed code input | Embed Code |
|
|
335
362
|
| `embedCodePlaceholder` | Placeholder for question embed code input | Place your embed code here |
|
|
336
|
-
| `
|
|
337
|
-
| `
|
|
338
|
-
| `
|
|
339
|
-
| `
|
|
340
|
-
| `
|
|
341
|
-
| `
|
|
342
|
-
| `
|
|
343
|
-
| `
|
|
344
|
-
| `
|
|
345
|
-
| `updatePollMessage` |
|
|
346
|
-
| `updatePollErrorMessage` |
|
|
347
|
-
| `deletePollMessage` |
|
|
348
|
-
| `
|
|
349
|
-
| `uploadingImageMessage` |
|
|
350
|
-
| `generateSignedInUrlErrorMessage` |
|
|
351
|
-
| `uploadingImageErrorMessage` |
|
|
352
|
-
| `encryptingImageErrorMessage` |
|
|
353
|
-
| `
|
|
354
|
-
| `
|
|
363
|
+
| `usersExportMessage` | Toast successful message when exporting users | Users have been exported successfully |
|
|
364
|
+
| `usersExportErrorMessage` | Toast error message when exporting users fails | There was a problem with exporting users. Please try again |
|
|
365
|
+
| `getFootballEntitiesErrorMessage` | Toast error message when typing the name of the entity in tags and request fails. | There was a problem with fetching football's data |
|
|
366
|
+
| `createPollMessage` | Toast successful message when creating poll | You have successfully created poll |
|
|
367
|
+
| `createPollErrorMessage` | Toast error message when creating poll | There was a problem creating poll. Please try again |
|
|
368
|
+
| `titleRequiredFieldValidationMessage` | Toast error message when validating title for poll | Title field is required! |
|
|
369
|
+
| `optionsFieldValidationMessage` | Toast error message when validating options for poll | Options must have titles |
|
|
370
|
+
| `tagsInvalidFieldValidationMessage` | Toast error message when validating tags for poll | Tag entity is required! |
|
|
371
|
+
| `getPollErrorMessage` | Toast error message when fetching poll data. | There was a problem with fetching poll data|
|
|
372
|
+
| `updatePollMessage` | Toast successful message when updating poll | You have successfully updated the poll |
|
|
373
|
+
| `updatePollErrorMessage` | Toast error message when updating poll | There was a problem updating the poll. Please try again |
|
|
374
|
+
| `deletePollMessage` | Toast successful message when deleting poll | You have successfully deleted poll |
|
|
375
|
+
| `deletePollErrorMessage` | Toast error message when deleting poll | There was a problem with deleting poll. Please try again |
|
|
376
|
+
| `uploadingImageMessage` | Toast success message when uploading image to bucket | You have successfully uploaded image |
|
|
377
|
+
| `generateSignedInUrlErrorMessage` | Toast 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 |
|
|
378
|
+
| `uploadingImageErrorMessage` | Toast error message when uploading image to bucket | There was a problem with uploading image to bucket. Please try again |
|
|
379
|
+
| `encryptingImageErrorMessage` | Toast 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 |
|
|
380
|
+
| `searchSportal365ImagesErrorMessage` | Toast error message when searching images from Sportal 365 API | There was a problem with searching images from Sportal 365 API. Please try again |
|
|
381
|
+
| `managePollTitle` | Header text on management screen | Manage Poll |
|
|
382
|
+
| `managePollDescription` | Description paragraph on management screen | Manage your Poll here |
|
|
383
|
+
| `addOption` | Label for add option button | Add option |
|
|
384
|
+
| `removeOption` | Label for remove option | Remove option |
|
|
385
|
+
| `urlCopiedToClipboardMessage` | Toast info message when image URL is copied | URL copied to clipboard |
|
|
386
|
+
| `imageDeletedMessage` | Toast info message when image is deleted | Image deleted |
|
|
387
|
+
| `imageResetMessage` | Toast info message when image size is restored | The initial size of the image has been restored |
|
|
388
|
+
| `authRequirement` | Label for auth requirement select in configuration panel. | Auth Requirement |
|
|
389
|
+
| `authRequirementDescription` | Description for auth requirement select in configuration panel. | Choose the type of authentication to be used. |
|
|
390
|
+
| `free` | Label for auth requirement option. | Free |
|
|
391
|
+
| `lead` | Label for auth requirement option. | Lead |
|
|
392
|
+
| `registered` | Label for auth requirement option. | Registered |
|
|
393
|
+
| `optionDescriptionExplanation` | Description paragraph for explanation description | This optional field allows you to provide users with more information about the option |
|
|
394
|
+
| `additionalFields` | Label for additional fields | Additional fields |
|
|
395
|
+
| `addDescription` | Label for toggle description button | Add description |
|
|
396
|
+
| `addImages` | Label for toggle images button | Add images |
|
|
397
|
+
| `schedule` | Label for schedule accordion | Schedule |
|
|
398
|
+
| `scheduledTaskNotAvailable` | Paragraph when trying to configure scheduled task for not created Poll | To configure scheduled tasks you need to first create your poll |
|
|
399
|
+
| `createScheduledTaskMessage` | Toast successful message when a new scheduled task is created | You have successfully created scheduled task |
|
|
400
|
+
| `createScheduledTaskErrorMessage` | Toast error message when a new scheduled task is created | An error occurred while creating scheduled task. Please try again later |
|
|
401
|
+
| `updateScheduledTaskMessage` | Toast successful message when a scheduled task is updated | You have successfully updated scheduled task |
|
|
402
|
+
| `updateScheduledTaskErrorMessage` | Toast error message when a scheduled task is updated | An error occurred while updating scheduled task. Please try again later |
|
|
403
|
+
| `deleteScheduledTaskMessage` | Toast successful message when a scheduled task is deleted | You have successfully deleted scheduled task |
|
|
404
|
+
| `deleteScheduledTaskErrorMessage` | Toast error message when a scheduled task is deleted | An error occurred while deleting scheduled task. Please try again later |
|
|
405
|
+
| `name` | Label for name | Name |
|
|
406
|
+
| `changeStatusTo` | Label for select input in schedule accordion | Change status to: |
|
|
407
|
+
| `at` | Label for calendar input in schedule accordion | At: |
|
|
408
|
+
| `deleteScheduledTaskModalTitle` | Title for delete scheduled task modal | Delete scheduled task |
|
|
409
|
+
| `deleteScheduledTaskModalParagraph` | Paragraph for delete scheduled task modal | Are you sure you want to delete the following scheduled task: |
|
|
410
|
+
| `voting` | Label for tab | Voting |
|
|
411
|
+
| `reports` | Label for tab | Reports |
|
|
412
|
+
| `exports` | Label for tab | Exports |
|
|
413
|
+
| `option` | Label for voting table column | Option |
|
|
414
|
+
| `exportUsersData` | Title for exports tab | Export users data |
|
|
415
|
+
| `category` | Label for exports table column | Category |
|
|
416
|
+
| `action` | Label for exports table column | Action |
|
|
417
|
+
| `exportAllUsers` | Title for export all users table row | Export all users |
|
|
418
|
+
| `exportAllUsersDescription` | Description for export all users table row | Export all users who voted in the poll. |
|
|
419
|
+
| `participations` | Legend for participations chart | Participations |
|
|
420
|
+
| `performanceByDay` | Header for participations chart | Performance by day |
|
|
421
|
+
| `exportUsersForOption` | Title for export users table row | Export users voted for option |
|
|
422
|
+
| `exportAllUsersForOption` | Description for export users table row | Export all users who voted for option |
|
|
423
|
+
| `exportForOption` | Title for export users table row button | Export for option |
|
|
@@ -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,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PollBasicModel } from 'fansunited-sdk-esm';
|
|
3
|
+
type ActionsMenuProps = {
|
|
4
|
+
poll: PollBasicModel;
|
|
5
|
+
onClickEdit: () => void;
|
|
6
|
+
onDelete: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare const ActionsMenu: React.FC<ActionsMenuProps>;
|
|
9
|
+
export default ActionsMenu;
|