fansunited-widget-either-or 2.0.0 → 2.2.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
@@ -189,6 +189,7 @@ const labels = {
189
189
  deleteEitherOrErrorMessage: 'There was a problem with deleting Either/Or. Please try again',
190
190
  updateEitherOrMessage: 'You have successfully updated Either/Or',
191
191
  updateEitherOrErrorMessage: 'There was a problem updating Either/Or. Please try again',
192
+ updateEitherOrTranslationErrorMessage: 'There was a problem translating Either/Or game. Please try again',
192
193
  uploadingImageMessage: 'You have successfully uploaded image',
193
194
  generateSignedInUrlErrorMessage: 'There was a problem generating signed in URL to store the image in bucket. Please try again',
194
195
  uploadingImageErrorMessage: 'There was a problem with uploading image to bucket. Please try again',
@@ -252,6 +253,7 @@ const labels = {
252
253
  lead: 'Lead',
253
254
  registered: 'Registered',
254
255
  language: 'Language',
256
+ languageDescription: 'Select the language for your game. You can manage language selection by configuring available languages in language configuration. It cannot be changed if multilingual feature is in use.',
255
257
  urlCopiedToClipboardMessage: 'URL copied to clipboard',
256
258
  imageDeletedMessage: 'Image deleted',
257
259
  imageResetMessage: 'The initial size of the image has been restored',
@@ -271,11 +273,25 @@ const labels = {
271
273
  reports: 'Reports',
272
274
  standings: 'Standings',
273
275
  participations: 'Participations',
276
+ participationOverview: 'Participation Overview',
277
+ exportUsersWithMinPoints: 'Export all users with at least _minPoints_ points',
278
+ exportUsersWithMinPointsDescription: 'Exports the users who got at least _minPoints_ points in the game.',
274
279
  chartErrorMessage: 'There was a problem with fetching information about either/or game participation. Please try again',
275
280
  performanceByDay: 'Performance by day',
276
281
  noStandingsAvailable: 'No standings available.',
277
282
  standingsErrorMessage: 'There was a problem with fetching information about either/or game standings. Please try again',
278
283
  name: 'Name',
284
+ languagesModalTitle: 'Select Languages',
285
+ languagesModalDescription: 'Select the languages this game is going to be translated in.',
286
+ languagesModalSave: 'Save language preference',
287
+ languageParentText: 'This game is a translated version of',
288
+ gameTranslationErrorMessage: 'An error occurred while translating the game.',
289
+ translateTo: 'Translate to ',
290
+ exportUsersLeads: 'Export users leads',
291
+ exportAllUsersLeads: 'Export all users leads',
292
+ exportAllUsersLeadsDescription: 'Export all users collected leads in the game.',
293
+ usersLeadsExportMessage: 'All users leads have been exported successfully',
294
+ usersLeadsExportErrorMessage: 'There was a problem with exporting all users leads. Please try again',
279
295
  };
280
296
 
281
297
  const App = () => {
@@ -419,6 +435,7 @@ Here is all information about **`LabelsModel`**:
419
435
  | `tagsInvalidFieldValidationMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when validating tags for Either/Or | Tag entity is required! |
420
436
  | `updateEitherOrMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when updating Either/Or | You have successfully updated Either/Or |
421
437
  | `updateEitherOrErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when updating Either/Or | There was a problem updating Either/Or. Please try again |
438
+ | `updateEitherOrTranslationErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when updating and making translations for Either/Or game | There was a problem translating Either/Or game. Please try again |
422
439
  | `deleteEitherOrMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when deleting Either/Or | You have successfully deleted Either/Or |
423
440
  | `deleteEitherOrErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when deleting Either/Or | There was a problem with deleting Either/Or. Please try again |
424
441
  | `uploadingImageMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) success message when uploading image to bucket | You have successfully uploaded image |
@@ -467,6 +484,7 @@ Here is all information about **`LabelsModel`**:
467
484
  | `lead` | Label for auth requirement option. | Lead |
468
485
  | `registered` | Label for auth requirement option. | Registered |
469
486
  | `language` | Label for language selection in configuration panel. | Language |
487
+ | `languageDescription` | Description paragraph for language select. | Select the language for your game. You can manage language selection by configuring available languages in language configuration. It cannot be changed if multilingual feature is in use. |
470
488
  | `urlCopiedToClipboardMessage` | Toast info message when image URL is copied | URL copied to clipboard |
471
489
  | `imageDeletedMessage` | Toast info message when image is deleted | Image deleted |
472
490
  | `imageResetMessage` | Toast info message when image size is restored | The initial size of the image has been restored |
@@ -486,9 +504,22 @@ Here is all information about **`LabelsModel`**:
486
504
  | `reports` | Label for tab | Reports |
487
505
  | `standings` | Label for tab | Standings |
488
506
  | `participations` | Label for participations chart legend | Participations |
507
+ | `participationOverview` | Label for statistics table header | Participation Overview |
508
+ | `exportUsersWithMinPoints` | Label for for export users by minimum points criteria category record. The placeholder '_minPoints_' is required and will be replaced with the points that is provided by the user. | Export all users with at least _minPoints_ points |
509
+ | `exportUsersWithMinPointsDescription` | Description for export users by minimum points criteria category record. The placeholder '_minPoints_' is required and will be replaced with the points that is provided by the user. | Exports the users who got at least _minPoints_ points in the game. |
489
510
  | `performanceByDay` | Label for participations chart legend | Performance by day |
490
- | `chartErrorMessage` | Toast error message when fetching the game participation fails |
491
- There was a problem with fetching information about qgameuiz participation. Please try again |
511
+ | `chartErrorMessage` | Toast error message when fetching the game participation fails | There was a problem with fetching information about game participation. Please try again |
492
512
  | `noStandingsAvailable` | Paragraph when no standings is still available | No standings available. |
493
513
  | `standingsErrorMessage` | Toast error message when fetching the game staindings fails | There was a problem with fetching information about either/or game standings. Please try again |
494
- | `name` | Label for name | Name |
514
+ | `name` | Label for name | Name |
515
+ | `languagesModalTitle` | Title for translate languages modal | Select Languages |
516
+ | `languagesModalDescription` | Description for translate languages modal | Select the languages this game is going to be translated in. |
517
+ | `languagesModalSave` | Languages modal save button title | Save language preference |
518
+ | `languageParentText` | Alert text for translated game | This game is a translated version of |
519
+ | `gameTranslationErrorMessage` | Toast error message when translating a game | An error occurred while translating the game. |
520
+ | `translateTo` | Translation game content button title |Translate to |
521
+ | `exportUsersLeads` | Title in export users leads table | Export users leads |
522
+ | `exportAllUsersLeads` | Category label in export users leads table | Export all users leads |
523
+ | `exportAllUsersLeadsDescription` | Category description label in export users leads table | Export all users collected leads in the game. |
524
+ | `exportAllUsersLeadsDescription` | Success toast message when exporting users leads | All users leads have been exported successfully |
525
+ | `exportAllUsersLeadsDescription` | Toast error message when exporting users leads operation fails | There was a problem with exporting all users leads. Please try again |
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { EitherOrBasicModel } from 'fansunited-sdk-esm';
3
- type EitherOrStatsProps = {
3
+ type EitherOrReportsProps = {
4
4
  game: EitherOrBasicModel;
5
5
  };
6
- declare const EitherOrStats: React.FC<EitherOrStatsProps>;
7
- export default EitherOrStats;
6
+ declare const EitherOrReports: React.FC<EitherOrReportsProps>;
7
+ export default EitherOrReports;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { EitherOrBasicModel } from 'fansunited-sdk-esm';
3
+ type EitherOrStatisticsProps = {
4
+ game: EitherOrBasicModel;
5
+ };
6
+ declare const EitherOrStatistics: React.FC<EitherOrStatisticsProps>;
7
+ export default EitherOrStatistics;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ type LanguagesTabBarProps = {
3
+ languages: string[];
4
+ onTabChange: (tab: number) => void;
5
+ onLanguageButtonClick: () => void;
6
+ };
7
+ declare const LanguagesTabBar: React.FC<LanguagesTabBarProps>;
8
+ export default LanguagesTabBar;
@@ -4,6 +4,8 @@ type MainColumnProps = {
4
4
  requestBody: RequestBody;
5
5
  isEditMode: boolean;
6
6
  onRequestBodyUpdate: (body: RequestBody) => void;
7
+ parentTitle: string;
8
+ onParentSelect: () => void;
7
9
  };
8
10
  declare const MainColumn: React.FC<MainColumnProps>;
9
11
  export default MainColumn;
@@ -2,6 +2,9 @@ import { default as React } from 'react';
2
2
  import { default as RequestBody } from '../../models/RequestBody/RequestBody';
3
3
  type ManageEitherOrProps = {
4
4
  eitherOrById: RequestBody | null;
5
+ relatedGames: RequestBody[] | null;
6
+ relatedParentTitle: string;
7
+ loadParent: () => void;
5
8
  onClickBack: () => void;
6
9
  };
7
10
  declare const ManageEitherOr: React.FC<ManageEitherOrProps>;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { IEitherOrOption } from '../../../models/RequestBody/RequestBody';
2
+ import { IEitherOrOption } from 'fansunited-management-components/src/models/minigames/eitherors/EitherOrRequestBody';
3
3
  type AdditionalOptionFieldProps = {
4
4
  option: IEitherOrOption;
5
5
  field: string;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { IEitherOrOption } from '../../../models/RequestBody/RequestBody';
2
+ import { IEitherOrOption } from 'fansunited-management-components/src/models/minigames/eitherors/EitherOrRequestBody';
3
3
  type OptionProps = {
4
4
  option: IEitherOrOption;
5
5
  optionNumber: number;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { IEitherOrOption } from '../../../models/RequestBody/RequestBody';
2
+ import { IEitherOrOption } from 'fansunited-management-components/src/models/minigames/eitherors/EitherOrRequestBody';
3
3
  type OptionsProps = {
4
4
  isEditMode: boolean;
5
5
  isGamePlayed: boolean;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { IEitherOrPoints } from '../../../models/RequestBody/RequestBody';
2
+ import { IEitherOrPoints } from 'fansunited-management-components/src/models/minigames/eitherors/EitherOrRequestBody';
3
3
  type PointsProps = {
4
4
  points: IEitherOrPoints[];
5
5
  isGamePlayed: boolean;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { default as RequestBody } from '../../../../models/RequestBody/RequestBody';
3
3
  type ConfigurationProps = {
4
+ isMultilingual: boolean;
4
5
  requestBody: RequestBody;
5
6
  onRequestBodyUpdate: (body: RequestBody) => void;
6
7
  };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ type LanguageProps = {
3
+ isReadOnly: boolean;
4
+ defaultValue: string;
5
+ onChange: (value: string) => void;
6
+ };
7
+ declare const Language: React.FC<LanguageProps>;
8
+ export default Language;
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  import { default as RequestBody } from '../../../models/RequestBody/RequestBody';
3
3
  type SideBarProps = {
4
4
  requestBody: RequestBody;
5
+ isMultilingual: boolean;
5
6
  onRequestBodyUpdate: (body: RequestBody) => void;
6
7
  };
7
8
  declare const SideBar: React.FC<SideBarProps>;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ type LanguagesModalProps = {
3
+ isOpen: boolean;
4
+ mainLanguage: string;
5
+ languages: string[];
6
+ isLoadingTranslations: boolean;
7
+ onSubmit: (languages: string[]) => void;
8
+ onClose: () => void;
9
+ };
10
+ declare const LanguagesModal: React.FC<LanguagesModalProps>;
11
+ export default LanguagesModal;