fansunited-widget-poll 2.0.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 CHANGED
@@ -115,7 +115,6 @@ const labels = {
115
115
  hideMoreImages: 'Hide more images',
116
116
  uploadImage: 'Upload image',
117
117
  copyUrl: 'Copy URL',
118
- copied: 'Copied',
119
118
  add: 'Add',
120
119
  configuration: 'Configuration',
121
120
  minimumVotes: 'Minimum votes',
@@ -123,7 +122,6 @@ const labels = {
123
122
  description: 'Description',
124
123
  images: 'Images',
125
124
  rules: 'Rules',
126
- rulesPlaceholder: 'Describe your rules for voting in the poll',
127
125
  adContent: 'Ad content',
128
126
  adContentPlaceholder: 'Place your ad content',
129
127
  mainImage: 'Main',
@@ -144,13 +142,11 @@ const labels = {
144
142
  inactive: 'Inactive',
145
143
  expired: 'Expired',
146
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',
147
- titlePlaceholder: 'Provide a title for your poll',
148
145
  repeatedValueMessage: 'You have entered a repeated value. Please enter a different one',
149
146
  flags: 'Flags',
150
147
  flagsPlaceholder: 'Type your flag and hit enter',
151
148
  labels: 'Labels',
152
149
  customFields: 'Custom fields',
153
- dynamicFieldsDescription: 'You can create your custom attributes for easier way to connect or describe your poll',
154
150
  keyDynamicFields: 'Key',
155
151
  valueDynamicFields: 'Value',
156
152
  options: 'Options',
@@ -158,7 +154,6 @@ const labels = {
158
154
  context: 'Context',
159
155
  content: 'Content',
160
156
  tags: 'Tags',
161
- entity: 'Entity',
162
157
  campaign: 'Campaign',
163
158
  id: 'ID',
164
159
  label: 'Label',
@@ -176,15 +171,15 @@ const labels = {
176
171
  tagsInvalidFieldValidationMessage: 'Tag entity is required!',
177
172
  getPollErrorMessage: 'There was a problem with fetching poll data. Please try again',
178
173
  deletePollMessage: 'You have successfully deleted poll',
179
- deletePollErrorMessage: 'There was a problem with deleting poll. Please try again',
174
+ deletePollErrorMessage: 'There was a problem with deleting poll. Please try again', //here
180
175
  updatePollMessage: 'You have successfully updated the poll',
181
176
  updatePollErrorMessage: 'There was a problem updating the poll. Please try again',
182
177
  uploadingImageMessage: 'You have successfully uploaded image',
183
178
  generateSignedInUrlErrorMessage: 'There was a problem generating signed in URL to store the image in bucket. Please try again',
184
179
  uploadingImageErrorMessage: 'There was a problem with uploading image to bucket. Please try again',
185
180
  encryptingImageErrorMessage: 'There was a problem with encrypting image before uploading it to bucket. Please try again',
186
- clear: 'Clear'
187
- searchSportal365ImagesErrorMessage: 'There was a problem with searching images from Sportal 365 API. Please try again'
181
+ clear: 'Clear',
182
+ searchSportal365ImagesErrorMessage: 'There was a problem with searching images from Sportal 365 API. Please try again',
188
183
  hideFilters: 'Hide filters',
189
184
  showFilters: 'Show filters',
190
185
  branding: 'Branding',
@@ -208,7 +203,6 @@ const labels = {
208
203
  additionalImage: 'Additional Image',
209
204
  embedCode: 'Embed Code',
210
205
  embedCodePlaceholder: 'Place your embed code here',
211
- exportUsers: "Export users",
212
206
  usersExportMessage: "Users have been exported successfully",
213
207
  usersExportErrorMessage: "There was a problem with exporting users. Please try again",
214
208
  managePollTitle: "Manage Poll",
@@ -264,7 +258,7 @@ Here is all information about **`LabelsModel`**:
264
258
  | `tryAgainButton` | Label for no permission card button | Try again |
265
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' |
266
260
  | `signOut` | Used as label on sign out button. | Sign out |
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 |
261
+ | `getPollsErrorMessage` | Toast error message when request fails for fetching list of polls. | There was a problem with fetching list of polls |
268
262
  | `title` | Label for title | Title
269
263
  | `status` | Status of a poll | Status |
270
264
  | `votes` | Votes of a poll | Votes |
@@ -280,6 +274,7 @@ Here is all information about **`LabelsModel`**:
280
274
  | `sortBy` | Label for sort container on main screen | Sort by: |
281
275
  | `sortByAscending` | Label for sort option | Sort by created at field in ascending order |
282
276
  | `sortByDescending` | Label for sort option | Sort by created at field in descending order |
277
+ | `language` | Label for language selection in configuration panel. | Language |
283
278
  | `contextEntityTag` | Label for input search for context entity tag in filters container | Context entity tag |
284
279
  | `typeContextTagNamePlaceholder` | Placeholder for input search for context entity tag in filters container and in context side bar | Type context tag name... |
285
280
  | `itemsPerPage` | Label for items per page filter select | Items per page |
@@ -287,11 +282,9 @@ Here is all information about **`LabelsModel`**:
287
282
  | `hideMoreImages` | Label for hyperlink in images container | Hide more images |
288
283
  | `uploadImage` | Label next to upload button | Upload image |
289
284
  | `copyUrl` | Label for copy url button | Copy URL |
290
- | `copied` | Label for copy url button | Copied |
291
285
  | `add` | Label for add button | Add |
292
286
  | `configuration` | Label for configuration accordion | Configuration |
293
287
  | `minimumVotes` | Label for minimum votes filter input | Minimum votes |
294
- | `titlePlaceholder` | Placeholder/description about title input field name on management screen. | Provide a title for your poll |
295
288
  | `timeFormat` | Timeformat for displaying dates. Widgets uses [dayjs](https://www.npmjs.com/package/dayjs) as a date dependency. | DD.MM.YYYY, HH:mm |
296
289
  | `previous` | Label for pagination button. | Previous |
297
290
  | `next` | Label for pagination button. | Next |
@@ -300,7 +293,6 @@ Here is all information about **`LabelsModel`**:
300
293
  | `description` | Label for description input field on management screen. | Description |
301
294
  | `images` | Label for images container. | Images |
302
295
  | `rules` | Label for rules rich text. | Rules |
303
- | `rulesPlaceholder` | Placeholder for rules rich text. | Describe your rules for voting in the poll |
304
296
  | `adContent` | Label for AD content rich text. | Ad content |
305
297
  | `adContentPlaceholder` | Placeholder for AD content rich text. | Place your ad content |
306
298
  | `mainImage` | Label for main image. | Main |
@@ -326,17 +318,15 @@ Here is all information about **`LabelsModel`**:
326
318
  | `flagsPlaceholder` | Placeholder on input field for flags | Type your flag and hit enter |
327
319
  | `labels` | Label for labels container | Labels |
328
320
  | `customFields` | Label for custom fields container | Custom fields |
329
- | `dynamicFieldsDescription` | Description paragraph for labels and custom fields containers | You can create your custom attributes for easier way to connect or describe your poll |
330
321
  | `keyDynamicFields` | Label for key input | Key |
331
322
  | `valueDynamicFields` | Label for value input | Value |
332
- | `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 |
323
+ | `repeatedValueMessage` | Toast warning message when client submits same flag. | You have entered a repeated value. Please enter a different one |
333
324
  | `options` | Label for options. | Options |
334
325
  | `optionNumber` | Label for option container's header. | Option number |
335
326
  | `correct` | Label for correct radio button. | Correct |
336
327
  | `context` | Label for context container. | Context |
337
328
  | `content` | Label for context content container. | Content |
338
329
  | `tags` | Label for context tags container. | Tags |
339
- | `entity` | Label for entity search in tag. | Entity |
340
330
  | `campaign` | Label for context campaign container. | Campaign |
341
331
  | `id` | Label for ID. | ID |
342
332
  | `label` | Label for context content/campaign label input. | Label |
@@ -370,24 +360,24 @@ Here is all information about **`LabelsModel`**:
370
360
  | `additionalImage` | Label for branding additional image | Additional Image |
371
361
  | `embedCode` | Label for question embed code input | Embed Code |
372
362
  | `embedCodePlaceholder` | Placeholder for question embed code input | Place your embed code here |
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 |
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 |
377
- | `createPollMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when creating poll | You have successfully created poll |
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 |
379
- | `titleRequiredFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating title for poll | Title field is required! |
380
- | `optionsFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating options for poll | Options must have titles |
381
- | `tagsInvalidFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating tags for poll | Tag entity is required! |
382
- | `updatePollMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when updating poll | You have successfully updated the poll |
383
- | `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 |
384
- | `deletePollMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when deleting poll | You have successfully deleted poll |
385
- | `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 |
386
- | `uploadingImageMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) success message when uploading image to bucket | You have successfully uploaded image |
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 |
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 |
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 |
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 |
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 |
391
381
  | `managePollTitle` | Header text on management screen | Manage Poll |
392
382
  | `managePollDescription` | Description paragraph on management screen | Manage your Poll here |
393
383
  | `addOption` | Label for add option button | Add option |
@@ -416,4 +406,18 @@ Here is all information about **`LabelsModel`**:
416
406
  | `changeStatusTo` | Label for select input in schedule accordion | Change status to: |
417
407
  | `at` | Label for calendar input in schedule accordion | At: |
418
408
  | `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: |
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 |
@@ -3,7 +3,6 @@ import { PollBasicModel } from 'fansunited-sdk-esm';
3
3
  type ActionsMenuProps = {
4
4
  poll: PollBasicModel;
5
5
  onClickEdit: () => void;
6
- onClickExport: () => void;
7
6
  onDelete: () => void;
8
7
  };
9
8
  declare const ActionsMenu: React.FC<ActionsMenuProps>;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ type ParticipationChartProps = {
3
+ chartData: {
4
+ date: string;
5
+ participations: number;
6
+ }[];
7
+ };
8
+ declare const ParticipationChart: React.FC<ParticipationChartProps>;
9
+ export default ParticipationChart;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { PollBasicModel } from 'fansunited-sdk-esm';
3
+ type PollExportsProps = {
4
+ poll: PollBasicModel;
5
+ };
6
+ declare const PollExports: React.FC<PollExportsProps>;
7
+ export default PollExports;
@@ -3,7 +3,6 @@ import { PollBasicModel } from 'fansunited-sdk-esm';
3
3
  type PollRowProps = {
4
4
  row: PollBasicModel;
5
5
  onClickEdit: () => void;
6
- onClickExport: () => void;
7
6
  onDelete: () => void;
8
7
  };
9
8
  declare const PollRow: React.FC<PollRowProps>;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { PollBasicModel } from 'fansunited-sdk-esm';
3
+ type PollStandingsProps = {
4
+ poll: PollBasicModel;
5
+ };
6
+ declare const PollStandings: React.FC<PollStandingsProps>;
7
+ export default PollStandings;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { PollBasicModel } from 'fansunited-sdk-esm';
3
+ export declare const formatDateByPeriod: (date: Date, period: string) => string;
4
+ type PollStatsProps = {
5
+ poll: PollBasicModel;
6
+ };
7
+ declare const PollStats: React.FC<PollStatsProps>;
8
+ export default PollStats;
@@ -7,7 +7,6 @@ type PollsTableProps = {
7
7
  getPreviousPage: () => void;
8
8
  getNextPage: () => void;
9
9
  onClickEdit: (id: string) => void;
10
- onClickExport: (id: string) => void;
11
10
  onDelete: () => void;
12
11
  };
13
12
  declare const PollsTable: React.FC<PollsTableProps>;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { PollBasicModel } from 'fansunited-sdk-esm';
3
+ type TableInfoTabsProps = {
4
+ poll: PollBasicModel;
5
+ };
6
+ declare const TableInfoTabs: React.FC<TableInfoTabsProps>;
7
+ export default TableInfoTabs;
@@ -8,7 +8,6 @@ export default class LabelsModel {
8
8
  timeFormat: string;
9
9
  getPollsErrorMessage: string;
10
10
  title: string;
11
- titlePlaceholder: string;
12
11
  noPollsFound: string;
13
12
  status: string;
14
13
  votes: string;
@@ -32,7 +31,6 @@ export default class LabelsModel {
32
31
  hideMoreImages: string;
33
32
  uploadImage: string;
34
33
  copyUrl: string;
35
- copied: string;
36
34
  add: string;
37
35
  configuration: string;
38
36
  minimumVotes: string;
@@ -61,7 +59,6 @@ export default class LabelsModel {
61
59
  embedCode: string;
62
60
  embedCodePlaceholder: string;
63
61
  rules: string;
64
- rulesPlaceholder: string;
65
62
  adContent: string;
66
63
  adContentPlaceholder: string;
67
64
  mainImage: string;
@@ -86,7 +83,6 @@ export default class LabelsModel {
86
83
  flagsPlaceholder: string;
87
84
  labels: string;
88
85
  customFields: string;
89
- dynamicFieldsDescription: string;
90
86
  keyDynamicFields: string;
91
87
  valueDynamicFields: string;
92
88
  options: string;
@@ -95,7 +91,6 @@ export default class LabelsModel {
95
91
  context: string;
96
92
  content: string;
97
93
  tags: string;
98
- entity: string;
99
94
  campaign: string;
100
95
  id: string;
101
96
  label: string;
@@ -110,9 +105,6 @@ export default class LabelsModel {
110
105
  previous: string;
111
106
  next: string;
112
107
  clear: string;
113
- exportUsers: string;
114
- usersExportMessage: string;
115
- usersExportErrorMessage: string;
116
108
  getFootballEntitiesErrorMessage: string;
117
109
  titleRequiredFieldValidationMessage: string;
118
110
  optionsFieldValidationMessage: string;
@@ -158,5 +150,22 @@ export default class LabelsModel {
158
150
  at: string;
159
151
  deleteScheduledTaskModalTitle: string;
160
152
  deleteScheduledTaskModalParagraph: string;
153
+ additionalInformation: string;
154
+ voting: string;
155
+ reports: string;
156
+ option: string;
157
+ exports: string;
158
+ exportUsersData: string;
159
+ category: string;
160
+ action: string;
161
+ exportAllUsers: string;
162
+ exportAllUsersDescription: string;
163
+ usersExportMessage: string;
164
+ usersExportErrorMessage: string;
165
+ participations: string;
166
+ performanceByDay: string;
167
+ exportUsersForOption: string;
168
+ exportAllUsersForOption: string;
169
+ exportForOption: string;
161
170
  constructor(labels?: LabelsModel);
162
171
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-widget-poll",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "main": "poll-manager.es.js",
5
5
  "author": "Fans United",
6
6
  "description": "",