fansunited-widget-either-or 1.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.
Files changed (79) hide show
  1. package/README.md +310 -0
  2. package/components/Buttons/ActionsButtons.d.ts +9 -0
  3. package/components/Buttons/AddButton.d.ts +7 -0
  4. package/components/Buttons/ClearButton.d.ts +6 -0
  5. package/components/Buttons/EitherOrsCard.d.ts +3 -0
  6. package/components/Buttons/HomeButtons.d.ts +7 -0
  7. package/components/Buttons/ManageButtons.d.ts +8 -0
  8. package/components/Buttons/RemoveButton.d.ts +7 -0
  9. package/components/Buttons/SignOutButton.d.ts +6 -0
  10. package/components/Buttons/Sportal365/Sportal365Button.d.ts +7 -0
  11. package/components/Buttons/Sportal365/Sportal365QuestionAndOptionButton.d.ts +11 -0
  12. package/components/Cards/ImagesCard.d.ts +6 -0
  13. package/components/Cards/WidgetCard.d.ts +3 -0
  14. package/components/EitherOrs/EitherOrs.d.ts +6 -0
  15. package/components/Login/Login.d.ts +6 -0
  16. package/components/Main.d.ts +13 -0
  17. package/components/MainLayout.d.ts +6 -0
  18. package/components/Management/Context/Context.d.ts +9 -0
  19. package/components/Management/Context/FootballEntitySelect/FootballEntitySelect.d.ts +10 -0
  20. package/components/Management/Context/SelectTagType/SelectTagType.d.ts +14 -0
  21. package/components/Management/DynamicFields/DynamicFields.d.ts +8 -0
  22. package/components/Management/EitherOrSelect/EitherOrSelect.d.ts +8 -0
  23. package/components/Management/Flags/Flags.d.ts +8 -0
  24. package/components/Management/IDInput/IDInput.d.ts +6 -0
  25. package/components/Management/Images/FileUploader.d.ts +9 -0
  26. package/components/Management/Images/Images.d.ts +9 -0
  27. package/components/Management/Images/Sportal365/Filters/Sportal365ImagesFromToFilter.d.ts +7 -0
  28. package/components/Management/Images/Sportal365/Sportal365Images.d.ts +13 -0
  29. package/components/Management/Images/Sportal365/Sportal365ImagesPagination.d.ts +10 -0
  30. package/components/Management/Images/Sportal365/Sportal365ImagesSearch.d.ts +8 -0
  31. package/components/Management/InformationInput/InformationInput.d.ts +11 -0
  32. package/components/Management/ManageEitherOr.d.ts +12 -0
  33. package/components/Management/ManagementScreenHeader.d.ts +8 -0
  34. package/components/Management/NumberInput/NumberInput.d.ts +8 -0
  35. package/components/Management/Options/OptionImages.d.ts +9 -0
  36. package/components/Management/Options/OptionInput.d.ts +9 -0
  37. package/components/Management/Options/Options.d.ts +9 -0
  38. package/components/Management/Points/Points.d.ts +9 -0
  39. package/components/Management/RichText/RichText.d.ts +8 -0
  40. package/components/Management/Type/Type.d.ts +7 -0
  41. package/components/Modals/ConfirmationModal.d.ts +12 -0
  42. package/components/Modals/PreviewModal.d.ts +10 -0
  43. package/components/Pagination/Pagination.d.ts +9 -0
  44. package/components/Portals/Portal.d.ts +6 -0
  45. package/components/Spinner/ButtonSpinner.d.ts +3 -0
  46. package/components/Spinner/Spinner.d.ts +3 -0
  47. package/components/Table/TableBody.d.ts +10 -0
  48. package/components/Table/TableHeader.d.ts +3 -0
  49. package/constants/constants.d.ts +4 -0
  50. package/constants/placeholders.d.ts +1 -0
  51. package/context/ApiContext.d.ts +15 -0
  52. package/context/AuthContext.d.ts +8 -0
  53. package/context/LabelsContext.d.ts +8 -0
  54. package/either-or-manager.es.d.ts +1 -0
  55. package/either-or-manager.es.js +36771 -0
  56. package/either-or-manager.umd.js +2335 -0
  57. package/factories/EitherOrFactory.d.ts +33 -0
  58. package/firebase/firebase.d.ts +2 -0
  59. package/firebase/getToken.d.ts +1 -0
  60. package/helpers/helpers.d.ts +27 -0
  61. package/hooks/useConstantContext.d.ts +2 -0
  62. package/index.d.ts +1 -0
  63. package/models/EitherOr/EitherOrById.d.ts +42 -0
  64. package/models/Features/Features.d.ts +7 -0
  65. package/models/Labels/LabelsModel.d.ts +115 -0
  66. package/models/RequestBody/RequestBody.d.ts +21 -0
  67. package/models/RequestBody/SignedInUrlRequestBody.d.ts +6 -0
  68. package/models/Select/ReactSelectBaseOption.d.ts +5 -0
  69. package/models/Select/SelectOption.d.ts +9 -0
  70. package/models/Sportal365/Sportal365Config.d.ts +4 -0
  71. package/models/Sportal365/Sportal365SearchImages.d.ts +21 -0
  72. package/models/Sportal365/Sportal365SearchImagesFilters.d.ts +4 -0
  73. package/package.json +8 -0
  74. package/portals/ModalPortal.d.ts +6 -0
  75. package/services/HashService.d.ts +4 -0
  76. package/services/HttpsService.d.ts +30 -0
  77. package/style.css +6 -0
  78. package/types/types.d.ts +6 -0
  79. package/validators/EitherOrValidator.d.ts +21 -0
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type NumberInputProps = {
3
+ type: 'time' | 'lives' | 'points_correct_steps' | 'points_score' | 'options_value';
4
+ defaultValue: number;
5
+ onChange: (value: number) => void;
6
+ };
7
+ declare const NumberInput: React.FC<NumberInputProps>;
8
+ export default NumberInput;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import MiniGameImages from 'fansunited-sdk-esm/Core/Namespaces/MiniGames/Models/MiniGameImages';
3
+ type OptionImagesProps = {
4
+ id: number;
5
+ loadedImages: MiniGameImages;
6
+ onChange: (value: string, imageNode: string) => void;
7
+ };
8
+ declare const OptionImages: React.FC<OptionImagesProps>;
9
+ export default OptionImages;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type OptionInputProps = {
3
+ label: string;
4
+ defaultValue: string;
5
+ placeholder: string;
6
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
7
+ };
8
+ declare const OptionInput: React.FC<OptionInputProps>;
9
+ export default OptionInput;
@@ -0,0 +1,9 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import { IEitherOrOption } from '../../../models/EitherOr/EitherOrById';
3
+ import RequestBody from '../../../models/RequestBody/RequestBody';
4
+ type OptionsProps = {
5
+ options: IEitherOrOption[];
6
+ setRequestBody: Dispatch<SetStateAction<RequestBody>>;
7
+ };
8
+ declare const Options: React.FC<OptionsProps>;
9
+ export default Options;
@@ -0,0 +1,9 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import { IEitherOrPoints } from '../../../models/EitherOr/EitherOrById';
3
+ import RequestBody from '../../../models/RequestBody/RequestBody';
4
+ type PointsProps = {
5
+ points: IEitherOrPoints[];
6
+ setRequestBody: Dispatch<SetStateAction<RequestBody>>;
7
+ };
8
+ declare const Points: React.FC<PointsProps>;
9
+ export default Points;
@@ -0,0 +1,8 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ type RichTextProps = {
3
+ defaultValue: string;
4
+ property: 'description' | 'rules' | 'ad_content';
5
+ setValue: Dispatch<SetStateAction<string>>;
6
+ };
7
+ declare const RichText: React.FC<RichTextProps>;
8
+ export default RichText;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type TypeProps = {
3
+ defaultValue: string;
4
+ onChange: (arg: React.ChangeEvent<HTMLSelectElement>) => void;
5
+ };
6
+ declare const Type: React.FC<TypeProps>;
7
+ export default Type;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import EitherOrBasicModel from 'fansunited-sdk-esm/Core/Namespaces/MiniGames/Models/EitherOr/EitherOrBasicModel';
3
+ type ConfirmationModalProps = {
4
+ isOpen: boolean;
5
+ eitherOr: EitherOrBasicModel;
6
+ refetchEitherOrs: {
7
+ current: boolean;
8
+ };
9
+ handleClose: () => void;
10
+ };
11
+ declare const ConfirmationModal: React.FC<ConfirmationModalProps>;
12
+ export default ConfirmationModal;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import EitherOrById from '../../models/EitherOr/EitherOrById';
3
+ type PreviewModalProps = {
4
+ isOpen: boolean;
5
+ requestBody: EitherOrById;
6
+ description: string;
7
+ handleClose: () => void;
8
+ };
9
+ declare const PreviewModal: React.FC<PreviewModalProps>;
10
+ export default PreviewModal;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type PaginationProps = {
3
+ pageCount: number;
4
+ pageGames: Map<any, any>;
5
+ getPreviousPage: () => void;
6
+ getNextPage: () => void;
7
+ };
8
+ declare const Pagination: React.FC<PaginationProps>;
9
+ export default Pagination;
@@ -0,0 +1,6 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ type PortalProps = {
3
+ wrapperId?: string;
4
+ };
5
+ declare const Portal: React.FC<PropsWithChildren<PortalProps>>;
6
+ export default Portal;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const ButtonSpinner: React.FC;
3
+ export default ButtonSpinner;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Spinner: React.FC;
3
+ export default Spinner;
@@ -0,0 +1,10 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import EitherOrBasicModel from 'fansunited-sdk-esm/Core/Namespaces/MiniGames/Models/EitherOr/EitherOrBasicModel';
3
+ type TableBodyProps = {
4
+ data: EitherOrBasicModel[];
5
+ fetchEitherOrById: (eitherOrId: string) => void;
6
+ handleModal: () => void;
7
+ setSelectedEitherOr: Dispatch<SetStateAction<EitherOrBasicModel>>;
8
+ };
9
+ declare const TableBody: React.FC<TableBodyProps>;
10
+ export default TableBody;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const TableHeader: React.FC;
3
+ export default TableHeader;
@@ -0,0 +1,4 @@
1
+ export declare const inputLabelStyle = "eow-text-xs eow-font-medium eow-block eow-mb-1 eow-uppercase eow-font-extrabold";
2
+ export declare const inputStyle = "eow-rounded eow-border eow-border-gray-200 eow-w-full focus:eow-outline-none eow-px-3 eow-py-2";
3
+ export declare const imagesMap: Map<string, string>;
4
+ export declare const questionAndOptionImagesMap: Map<string, string>;
@@ -0,0 +1 @@
1
+ export declare const placeholders: any;
@@ -0,0 +1,15 @@
1
+ import HttpsService from '../services/HttpsService';
2
+ import FansUnitedSDKModel from 'fansunited-sdk-esm/Core/Global/Models/FansUnitedSDKModel';
3
+ import React from 'react';
4
+ import Sportal365Config from '../models/Sportal365/Sportal365Config';
5
+ type APIProviderProps = {
6
+ config: any;
7
+ sportal365Config: Sportal365Config;
8
+ };
9
+ type APIContextValueType = {
10
+ sdk: FansUnitedSDKModel;
11
+ https: HttpsService;
12
+ };
13
+ declare const APIContext: React.Context<APIContextValueType>;
14
+ declare const APIProvider: React.FC<APIProviderProps>;
15
+ export { APIContext, APIProvider };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import firebase from 'firebase/compat/app';
3
+ type AuthProviderProps = {
4
+ fansUnitedEnvironment: string;
5
+ };
6
+ declare const AuthContext: React.Context<firebase.User>;
7
+ declare const AuthProvider: React.FC<AuthProviderProps>;
8
+ export { AuthContext, AuthProvider };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import LabelsModel from '../models/Labels/LabelsModel';
3
+ declare const LabelsContext: React.Context<LabelsModel>;
4
+ type LabelsContextProviderProps = {
5
+ labels: LabelsModel;
6
+ };
7
+ declare const LabelsProvider: React.FC<LabelsContextProviderProps>;
8
+ export { LabelsContext, LabelsProvider };
@@ -0,0 +1 @@
1
+ export * from './index'