fansunited-widget-poll 1.0.0-RC1

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 (89) hide show
  1. package/README.md +306 -0
  2. package/components/Accordion/Accordion.d.ts +6 -0
  3. package/components/Buttons/ActionsButtons.d.ts +9 -0
  4. package/components/Buttons/AddButton.d.ts +7 -0
  5. package/components/Buttons/ClearButton.d.ts +6 -0
  6. package/components/Buttons/CopyToClipboard.d.ts +8 -0
  7. package/components/Buttons/HomeButtons.d.ts +8 -0
  8. package/components/Buttons/ManageButtons.d.ts +8 -0
  9. package/components/Buttons/RemoveButton.d.ts +7 -0
  10. package/components/Buttons/SignOutButton.d.ts +6 -0
  11. package/components/Buttons/Sportal365/Sportal365Button.d.ts +8 -0
  12. package/components/Cards/ImagesCard.d.ts +6 -0
  13. package/components/Cards/PollsCard.d.ts +3 -0
  14. package/components/Cards/WidgetCard.d.ts +3 -0
  15. package/components/Filters/Filters.d.ts +12 -0
  16. package/components/Login/Login.d.ts +6 -0
  17. package/components/Main.d.ts +14 -0
  18. package/components/MainLayout.d.ts +7 -0
  19. package/components/Management/Context/Context.d.ts +9 -0
  20. package/components/Management/Context/ContextTabs.d.ts +7 -0
  21. package/components/Management/DynamicFields/DynamicFields.d.ts +8 -0
  22. package/components/Management/Flags/Flags.d.ts +16 -0
  23. package/components/Management/IDInput/IDInput.d.ts +6 -0
  24. package/components/Management/Images/FileUploader.d.ts +9 -0
  25. package/components/Management/Images/Image.d.ts +11 -0
  26. package/components/Management/Images/Images.d.ts +11 -0
  27. package/components/Management/Images/Sportal365/Filters/Sportal365ImagesFromToFilter.d.ts +7 -0
  28. package/components/Management/Images/Sportal365/Sportal365Images.d.ts +9 -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 +9 -0
  32. package/components/Management/MainColumn.d.ts +10 -0
  33. package/components/Management/ManagePoll.d.ts +11 -0
  34. package/components/Management/ManagementScreenHeader.d.ts +8 -0
  35. package/components/Management/NumberInput/NumberInput.d.ts +8 -0
  36. package/components/Management/Options/OptionImages.d.ts +9 -0
  37. package/components/Management/Options/OptionInput.d.ts +9 -0
  38. package/components/Management/Options/Options.d.ts +9 -0
  39. package/components/Management/RichText/RichText.d.ts +8 -0
  40. package/components/Management/SideBar.d.ts +12 -0
  41. package/components/Management/StatusSelect/StatusSelect.d.ts +7 -0
  42. package/components/Management/Type/Type.d.ts +7 -0
  43. package/components/Modals/ConfirmationModal.d.ts +11 -0
  44. package/components/Modals/ImageModal.d.ts +8 -0
  45. package/components/Modals/PreviewModal.d.ts +10 -0
  46. package/components/Pagination/Pagination.d.ts +10 -0
  47. package/components/Polls/Polls.d.ts +7 -0
  48. package/components/Portals/Portal.d.ts +6 -0
  49. package/components/Select/ContextSelectFilter.d.ts +14 -0
  50. package/components/Select/ContextTagSelect.d.ts +9 -0
  51. package/components/Select/PollSelectFilter.d.ts +12 -0
  52. package/components/Spinner/ButtonSpinner.d.ts +3 -0
  53. package/components/Spinner/Spinner.d.ts +3 -0
  54. package/components/Table/TableBody.d.ts +10 -0
  55. package/components/Table/TableHeader.d.ts +3 -0
  56. package/constants/constants.d.ts +4 -0
  57. package/constants/placeholders.d.ts +1 -0
  58. package/context/ApiContext.d.ts +15 -0
  59. package/context/AuthContext.d.ts +8 -0
  60. package/context/LabelsContext.d.ts +8 -0
  61. package/factories/PollFactory.d.ts +30 -0
  62. package/firebase/firebase.d.ts +2 -0
  63. package/firebase/getToken.d.ts +1 -0
  64. package/helpers/helpers.d.ts +36 -0
  65. package/hooks/useConstantContext.d.ts +2 -0
  66. package/index.d.ts +1 -0
  67. package/models/Features/Features.d.ts +7 -0
  68. package/models/Filters/PollFiltersModel.d.ts +12 -0
  69. package/models/Labels/LabelsModel.d.ts +108 -0
  70. package/models/PollById/PollById.d.ts +25 -0
  71. package/models/RequestBody/RequestBody.d.ts +18 -0
  72. package/models/RequestBody/SignedInUrlRequestBody.d.ts +6 -0
  73. package/models/Select/GroupSelectOption.d.ts +5 -0
  74. package/models/Select/ReactSelectBaseOption.d.ts +5 -0
  75. package/models/Select/SelectOption.d.ts +9 -0
  76. package/models/Sportal365/Sportal365Config.d.ts +4 -0
  77. package/models/Sportal365/Sportal365ImagesContainer.d.ts +5 -0
  78. package/models/Sportal365/Sportal365SearchImages.d.ts +21 -0
  79. package/models/Sportal365/Sportal365SearchImagesFilters.d.ts +4 -0
  80. package/package.json +8 -0
  81. package/poll-manager.es.d.ts +1 -0
  82. package/poll-manager.es.js +38878 -0
  83. package/poll-manager.umd.js +2335 -0
  84. package/portals/ModalPortal.d.ts +6 -0
  85. package/services/HashService.d.ts +4 -0
  86. package/services/HttpsService.d.ts +29 -0
  87. package/style.css +6 -0
  88. package/types/types.d.ts +6 -0
  89. package/validators/PollValidator.d.ts +10 -0
@@ -0,0 +1,8 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import PollFiltersModel from '../../../models/Filters/PollFiltersModel';
3
+ type NumberInputProps = {
4
+ defaultValue: number;
5
+ setFilters: Dispatch<SetStateAction<PollFiltersModel>>;
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 { IPollOption } from '../../../models/PollById/PollById';
3
+ import RequestBody from '../../../models/RequestBody/RequestBody';
4
+ type OptionsProps = {
5
+ options: IPollOption[];
6
+ setRequestBody: Dispatch<SetStateAction<RequestBody>>;
7
+ };
8
+ declare const Options: React.FC<OptionsProps>;
9
+ export default Options;
@@ -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,12 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import PollById from '../../models/PollById/PollById';
3
+ type SideBarProps = {
4
+ requestBody: PollById;
5
+ rules: string;
6
+ adContent: string;
7
+ setRules: Dispatch<SetStateAction<string>>;
8
+ setAdContent: Dispatch<SetStateAction<string>>;
9
+ setRequestBody: Dispatch<SetStateAction<PollById>>;
10
+ };
11
+ declare const SideBar: React.FC<SideBarProps>;
12
+ export default SideBar;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type StatusSelectProps = {
3
+ defaultValue: string;
4
+ onChange: (arg: React.ChangeEvent<HTMLSelectElement>) => void;
5
+ };
6
+ declare const StatusSelect: React.FC<StatusSelectProps>;
7
+ export default StatusSelect;
@@ -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,11 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import PollBasicModel from 'fansunited-sdk-esm/Core/Namespaces/Voting/Models/Polls/PollBasicModel';
3
+ import PollFiltersModel from '../../models/Filters/PollFiltersModel';
4
+ type ConfirmationModalProps = {
5
+ isOpen: boolean;
6
+ poll: PollBasicModel;
7
+ setFilters: Dispatch<SetStateAction<PollFiltersModel>>;
8
+ handleClose: () => void;
9
+ };
10
+ declare const ConfirmationModal: React.FC<ConfirmationModalProps>;
11
+ export default ConfirmationModal;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type ImageModalProps = {
3
+ imageUrl: string;
4
+ isOpen: boolean;
5
+ closeModal: () => void;
6
+ };
7
+ declare const ImageModal: React.FC<ImageModalProps>;
8
+ export default ImageModal;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import PollById from '../../models/PollById/PollById';
3
+ type PreviewModalProps = {
4
+ isOpen: boolean;
5
+ requestBody: PollById;
6
+ description: string;
7
+ handleClose: () => void;
8
+ };
9
+ declare const PreviewModal: React.FC<PreviewModalProps>;
10
+ export default PreviewModal;
@@ -0,0 +1,10 @@
1
+ import PollBasicModel from 'fansunited-sdk-esm/Core/Namespaces/Voting/Models/Polls/PollBasicModel';
2
+ import React from 'react';
3
+ type PaginationProps = {
4
+ pageCount: number;
5
+ pagePolls: Map<number, PollBasicModel[]>;
6
+ getPreviousPage: () => void;
7
+ getNextPage: () => void;
8
+ };
9
+ declare const Pagination: React.FC<PaginationProps>;
10
+ export default Pagination;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type PollsProps = {
3
+ hideSignOutButton: boolean;
4
+ fansUnitedEnvironment: string;
5
+ };
6
+ declare const Polls: React.FC<PollsProps>;
7
+ export default Polls;
@@ -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,14 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import PollFiltersModel from '../../models/Filters/PollFiltersModel';
3
+ import SearchModel from 'fansunited-sdk-esm/Core/Namespaces/Football/Models/Search/SearchModel';
4
+ import GroupSelectOption from '../../models/Select/GroupSelectOption';
5
+ import SelectOption from '../../models/Select/SelectOption';
6
+ export declare const formatGroupOptions: (result: SearchModel) => GroupSelectOption[];
7
+ type ContextSelectFilterProps = {
8
+ options: SelectOption[];
9
+ setOptions: Dispatch<SetStateAction<SelectOption[]>>;
10
+ setFilters: Dispatch<SetStateAction<PollFiltersModel>>;
11
+ handleResetData: () => void;
12
+ };
13
+ declare const ContextSelectFilter: React.FC<ContextSelectFilterProps>;
14
+ export default ContextSelectFilter;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import SelectOption from '../../models/Select/SelectOption';
3
+ import TagsModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/TagsModel';
4
+ type ContextTagSelectProps = {
5
+ tags: TagsModel[];
6
+ onChangeTags: (entities: SelectOption[]) => void;
7
+ };
8
+ declare const ContextTagSelect: React.FC<ContextTagSelectProps>;
9
+ export default ContextTagSelect;
@@ -0,0 +1,12 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import PollFiltersModel from '../../models/Filters/PollFiltersModel';
3
+ type PollSelectFilterProps = {
4
+ filterType: 'status' | 'sort';
5
+ defaultValue: string;
6
+ filterValues: string[];
7
+ showClearStatus?: boolean;
8
+ setFilters: Dispatch<SetStateAction<PollFiltersModel>>;
9
+ handleResetData: () => void;
10
+ };
11
+ declare const PollSelectFilter: React.FC<PollSelectFilterProps>;
12
+ export default PollSelectFilter;
@@ -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 PollBasicModel from 'fansunited-sdk-esm/Core/Namespaces/Voting/Models/Polls/PollBasicModel';
3
+ type TableBodyProps = {
4
+ data: PollBasicModel[];
5
+ fetchPollById: (pollId: string) => void;
6
+ handleModal: () => void;
7
+ setSelectedPoll: Dispatch<SetStateAction<PollBasicModel>>;
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 = "pw-text-xs pw-font-medium pw-block pw-mb-1 pw-uppercase pw-font-extrabold";
2
+ export declare const inputStyle = "pw-rounded pw-border pw-border-gray-200 pw-w-full focus:pw-outline-none pw-px-3 pw-py-2";
3
+ export declare const imagesMap: Map<string, string>;
4
+ export declare const optionImagesMap: 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,30 @@
1
+ import PollById, { IPollOption } from '../models/PollById/PollById';
2
+ import RequestBody from '../models/RequestBody/RequestBody';
3
+ import ContextModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
4
+ import TagsModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/TagsModel';
5
+ export default class PollFactory {
6
+ createNewRequestBody: (requestBody: PollById | null) => RequestBody;
7
+ finalizeNewRequestBody: (requestBody: PollById) => PollById;
8
+ private reconstructImages;
9
+ private reconstructContext;
10
+ createImagesModel: () => {
11
+ main: string;
12
+ cover: string;
13
+ mobile: string;
14
+ };
15
+ createContext: (context: ContextModel) => ContextModel;
16
+ constructEmptyTag: () => TagsModel;
17
+ private isObjectValuesEmpty;
18
+ constructOptions: (options: IPollOption[]) => IPollOption[];
19
+ private constructEmptyCreateOptions;
20
+ constructEmptyOption: (id: string) => {
21
+ id: string;
22
+ title: string;
23
+ description: string;
24
+ images: {
25
+ main: string;
26
+ cover: string;
27
+ mobile: string;
28
+ };
29
+ };
30
+ }
@@ -0,0 +1,2 @@
1
+ import firebase from 'firebase/compat/app';
2
+ export declare const firebaseAuth: (fansUnitedEnvironment: string) => firebase.auth.Auth;
@@ -0,0 +1 @@
1
+ export declare const getToken: () => Promise<string>;
@@ -0,0 +1,36 @@
1
+ import { EnvironmentType, LangType } from 'fansunited-sdk-esm/Core/Configurator/Types/ConfiguratorTypes';
2
+ import { FlagOption } from '../types/types';
3
+ import Sportal365Config from '../models/Sportal365/Sportal365Config';
4
+ import SelectOption from '../models/Select/SelectOption';
5
+ export declare const initSdkConfig: (fansUnitedApiKey: string, fansUnitedClientId: string, fansUnitedLanguage?: LangType, fansUnitedEnvironment?: EnvironmentType) => {
6
+ apiKey: string;
7
+ clientId: string;
8
+ lang: LangType;
9
+ environment: EnvironmentType;
10
+ idSchema: string;
11
+ errorHandlingMode: string;
12
+ authProvider: {
13
+ getIdToken: () => string;
14
+ logout: () => void;
15
+ };
16
+ };
17
+ export declare const configureSportal365: (project: string, infrastructure?: 'shared' | 'betway') => Sportal365Config | null;
18
+ export declare const extractValuesFlagOptions: (flags: FlagOption[]) => string[];
19
+ /**
20
+ * Transforms the number to e specific format. Example:
21
+ * - 1323 -> 1.3k
22
+ * - 1500000 -> 1.5m
23
+ * - 100100000 -> 1.1b
24
+ * @param value Number to be formatted
25
+ * @returns Formatted number
26
+ */
27
+ export declare const formatNumber: (value: number) => string | number;
28
+ export declare const scrollToComponent: (componentId: string) => void;
29
+ export declare const selectStyles: {
30
+ container: (provided: any) => any;
31
+ control: (provided: any) => any;
32
+ input: (provided: any) => any;
33
+ option: (provided: any, state: any) => any;
34
+ };
35
+ export declare const formatOptions: (entity: any) => SelectOption;
36
+ export declare const remapKeysToSpecificCase: (obj: any, type: 'camel' | 'snake') => any;
@@ -0,0 +1,2 @@
1
+ import { Context } from 'react';
2
+ export declare function useConstantContext<T>(context: Context<T>): T;
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { default as PollManager } from './components/Main';
@@ -0,0 +1,7 @@
1
+ export interface IType {
2
+ id: string;
3
+ label: string;
4
+ }
5
+ export default class Features {
6
+ types: IType[];
7
+ }
@@ -0,0 +1,12 @@
1
+ export declare enum PollSortEnum {
2
+ CREATED_AT_ASC = "ASC",
3
+ CREATED_AT_DESC = "DESC"
4
+ }
5
+ export default class PollFiltersModel {
6
+ sort: PollSortEnum;
7
+ status: string;
8
+ flags: string[];
9
+ entityIds: string[];
10
+ minVotes: number;
11
+ refetchPolls: boolean;
12
+ }
@@ -0,0 +1,108 @@
1
+ export default class LabelsModel {
2
+ userNotFound: string;
3
+ signOut: string;
4
+ timeFormat: string;
5
+ getPollsErrorMessage: string;
6
+ title: string;
7
+ titlePlaceholder: string;
8
+ noPollsFound: string;
9
+ status: string;
10
+ votes: string;
11
+ creationDate: string;
12
+ actions: string;
13
+ create: string;
14
+ edit: string;
15
+ save: string;
16
+ preview: string;
17
+ close: string;
18
+ filterBy: string;
19
+ sortBy: string;
20
+ clearStatus: string;
21
+ contextEntityTag: string;
22
+ typeContextTagNamePlaceholder: string;
23
+ showMoreImages: string;
24
+ hideMoreImages: string;
25
+ uploadImage: string;
26
+ groupByStatus: string;
27
+ copyUrl: string;
28
+ copied: string;
29
+ add: string;
30
+ configuration: string;
31
+ minimumVotes: string;
32
+ minimumVotesPlaceholder: string;
33
+ description: string;
34
+ descriptionPlaceholder: string;
35
+ images: string;
36
+ rules: string;
37
+ rulesPlaceholder: string;
38
+ adContent: string;
39
+ adContentPlaceholder: string;
40
+ optionImages: string;
41
+ main: string;
42
+ cover: string;
43
+ mobile: string;
44
+ active: string;
45
+ inactive: string;
46
+ statusDescription: string;
47
+ optionTitlePlaceholder: string;
48
+ optionDescriptionPlaceholder: string;
49
+ repeatedValueMessage: string;
50
+ flags: string;
51
+ flagsPlaceholder: string;
52
+ labels: string;
53
+ customFields: string;
54
+ dynamicFieldsDescription: string;
55
+ keyDynamicFields: string;
56
+ valueDynamicFields: string;
57
+ options: string;
58
+ optionNumber: string;
59
+ optionsDescription: string;
60
+ context: string;
61
+ content: string;
62
+ tags: string;
63
+ entity: string;
64
+ campaign: string;
65
+ id: string;
66
+ idOptionPlaceholder: string;
67
+ labelOptionPlaceholder: string;
68
+ idContentPlaceholder: string;
69
+ idCampaignPlaceholder: string;
70
+ label: string;
71
+ labelContentPlaceholder: string;
72
+ labelCampaignPlaceholder: string;
73
+ type: string;
74
+ typeDescription: string;
75
+ noType: string;
76
+ deleteLabel: string;
77
+ cancelLabel: string;
78
+ confirmationQuestionLabel: string;
79
+ typeContentPlaceholder: string;
80
+ previewPoll: string;
81
+ searchImages: string;
82
+ clearFromToFilterSportal365ImagesMessage: string;
83
+ hideFilters: string;
84
+ showFilters: string;
85
+ dateFromTo: string;
86
+ dateFromToPlaceholder: string;
87
+ noImagesFound: string;
88
+ previous: string;
89
+ next: string;
90
+ clear: string;
91
+ getFootballEntitiesErrorMessage: string;
92
+ titleRequiredFieldValidationMessage: string;
93
+ optionsFieldValidationMessage: string;
94
+ tagsInvalidFieldValidationMessage: string;
95
+ getPollErrorMessage: string;
96
+ deletePollMessage: string;
97
+ deletePollErrorMessage: string;
98
+ createPollMessage: string;
99
+ createPollErrorMessage: string;
100
+ updatePollMessage: string;
101
+ updatePollErrorMessage: string;
102
+ uploadingImageMessage: string;
103
+ generateSignedInUrlErrorMessage: string;
104
+ uploadingImageErrorMessage: string;
105
+ encryptingImageErrorMessage: string;
106
+ searchSportal365ImagesErrorMessage: string;
107
+ constructor(labels?: LabelsModel);
108
+ }
@@ -0,0 +1,25 @@
1
+ import ImagesModel from 'fansunited-sdk-esm/Core/Global/Models/Images/ImagesModel';
2
+ import ContextModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
3
+ export interface IPollOption {
4
+ id?: string;
5
+ title: string;
6
+ description: string;
7
+ images: ImagesModel;
8
+ votes?: number;
9
+ }
10
+ export default class PollById {
11
+ id: string;
12
+ title: string;
13
+ description: string;
14
+ type: string;
15
+ rules: string;
16
+ total_votes: number;
17
+ ad_content: string;
18
+ labels: Object;
19
+ custom_fields: Object;
20
+ images: ImagesModel;
21
+ status: string;
22
+ flags: string[];
23
+ options: IPollOption[];
24
+ context: ContextModel;
25
+ }
@@ -0,0 +1,18 @@
1
+ import ImagesModel from 'fansunited-sdk-esm/Core/Global/Models/Images/ImagesModel';
2
+ import ContextModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
3
+ import { IPollOption } from '../PollById/PollById';
4
+ export default class RequestBody {
5
+ title: string;
6
+ description: string;
7
+ type: string;
8
+ total_votes: number;
9
+ rules: string;
10
+ ad_content: string;
11
+ labels: Object;
12
+ custom_fields: Object;
13
+ images: ImagesModel;
14
+ status: string;
15
+ flags: string[];
16
+ context: ContextModel;
17
+ options: IPollOption[];
18
+ }
@@ -0,0 +1,6 @@
1
+ export default class SignedInUrlRequestBody {
2
+ image_file_name: string;
3
+ image_type: string;
4
+ image_size: number;
5
+ base64_sum: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ import SelectOption from './SelectOption';
2
+ export default class GroupSelectOption {
3
+ label: string;
4
+ options: SelectOption[];
5
+ }
@@ -0,0 +1,5 @@
1
+ export default class ReactSelectBaseOption {
2
+ id: string;
3
+ value: string;
4
+ label: string;
5
+ }
@@ -0,0 +1,9 @@
1
+ import ReactSelectBaseOption from './ReactSelectBaseOption';
2
+ /**
3
+ * Option model for Competition/Team/Player async react-select
4
+ */
5
+ export default class SelectOption extends ReactSelectBaseOption {
6
+ logo: string;
7
+ countryName: string;
8
+ countryFlag: string;
9
+ }
@@ -0,0 +1,4 @@
1
+ export default class Sportal365Config {
2
+ project: string;
3
+ authorization: string;
4
+ }
@@ -0,0 +1,5 @@
1
+ export default class Sportal365ImagesContainerToggleModel {
2
+ mainImage: boolean;
3
+ coverImage: boolean;
4
+ mobileImage: boolean;
5
+ }
@@ -0,0 +1,21 @@
1
+ interface ISearchImagesMeta {
2
+ pagination: {
3
+ current_page: number;
4
+ };
5
+ }
6
+ export interface ISearchImagesData {
7
+ id: string;
8
+ urls: {
9
+ uploaded: {
10
+ embed: string;
11
+ gallery: string;
12
+ original: string;
13
+ thumbnail: string;
14
+ };
15
+ };
16
+ }
17
+ export default class Sportal365SearchImage {
18
+ meta: ISearchImagesMeta;
19
+ data: ISearchImagesData[];
20
+ }
21
+ export {};
@@ -0,0 +1,4 @@
1
+ export default class Sportal365SearchImagesFilters {
2
+ from: string;
3
+ to: string;
4
+ }
package/package.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "fansunited-widget-poll",
3
+ "version": "1.0.0-RC1",
4
+ "main": "poll-manager.es.js",
5
+ "author": "Fans United",
6
+ "description": "",
7
+ "homepage": "https://fansunitedmedia.com/"
8
+ }
@@ -0,0 +1 @@
1
+ export * from './index'