fansunited-widget-poll 1.2.0 → 2.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.
- package/README.md +122 -57
- 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 +10 -0
- package/components/Polls/PollRow.d.ts +10 -0
- package/components/Polls/Polls.d.ts +1 -1
- package/components/Polls/PollsTable.d.ts +14 -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 +58 -28
- 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 +73406 -37593
- package/poll-manager.umd.js +544 -223
- 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
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,10 +0,0 @@
|
|
|
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;
|
|
@@ -1,14 +0,0 @@
|
|
|
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;
|
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
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;
|
|
@@ -1,10 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const placeholders: any;
|
package/context/ApiContext.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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 };
|
package/context/AuthContext.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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 };
|
package/firebase/firebase.d.ts
DELETED
package/firebase/getToken.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getToken: () => Promise<string>;
|
package/helpers/helpers.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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;
|
|
@@ -1,28 +0,0 @@
|
|
|
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 { IBrandingRequestById } from '../RequestBody/RequestBody';
|
|
4
|
-
export interface IPollOption {
|
|
5
|
-
id?: string;
|
|
6
|
-
title: string;
|
|
7
|
-
description: string;
|
|
8
|
-
images: ImagesModel;
|
|
9
|
-
votes?: number;
|
|
10
|
-
}
|
|
11
|
-
export default class PollById {
|
|
12
|
-
id: string;
|
|
13
|
-
title: string;
|
|
14
|
-
description: string;
|
|
15
|
-
type: string;
|
|
16
|
-
rules: string;
|
|
17
|
-
total_votes: number;
|
|
18
|
-
ad_content: string;
|
|
19
|
-
labels: Object;
|
|
20
|
-
custom_fields: Object;
|
|
21
|
-
branding: IBrandingRequestById;
|
|
22
|
-
embed_code: string;
|
|
23
|
-
images: ImagesModel;
|
|
24
|
-
status: string;
|
|
25
|
-
flags: string[];
|
|
26
|
-
options: IPollOption[];
|
|
27
|
-
context: ContextModel;
|
|
28
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
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 {};
|
package/portals/ModalPortal.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import SDKConfigurationModel from 'fansunited-sdk-esm/Core/Configurator/Models/SDKConfiguraitonModel';
|
|
2
|
-
import RequestBody from '../models/RequestBody/RequestBody';
|
|
3
|
-
import { IType } from '../models/Features/Features';
|
|
4
|
-
import SignedInUrlRequestBody from '../models/RequestBody/SignedInUrlRequestBody';
|
|
5
|
-
import Sportal365Config from '../models/Sportal365/Sportal365Config';
|
|
6
|
-
import Sportal365SearchImagesFilters from '../models/Sportal365/Sportal365SearchImagesFilters';
|
|
7
|
-
import ExportUsersRequestBody from '../models/Export/ExportUsersRequestBody';
|
|
8
|
-
export default class HttpsService {
|
|
9
|
-
private votingApiBaseUrl;
|
|
10
|
-
private clientApiBaseUrl;
|
|
11
|
-
private reportingApiBaseUrl;
|
|
12
|
-
private headers;
|
|
13
|
-
private mainQueryParams;
|
|
14
|
-
private apiKey;
|
|
15
|
-
private clientId;
|
|
16
|
-
private environment;
|
|
17
|
-
sportal365Config: Sportal365Config | null;
|
|
18
|
-
private sportal365Headers;
|
|
19
|
-
private readonly sportal365ImagesSearchURL;
|
|
20
|
-
constructor(config: SDKConfigurationModel, sportal365Config: Sportal365Config | null);
|
|
21
|
-
createPoll: (requestBody: RequestBody) => Promise<Response>;
|
|
22
|
-
updatePoll: (id: string, requestBody: RequestBody) => Promise<Response>;
|
|
23
|
-
deletePoll: (pollId: string) => Promise<Response>;
|
|
24
|
-
getPollById: (pollId: string) => Promise<Response>;
|
|
25
|
-
getPollTypes: () => Promise<IType[]>;
|
|
26
|
-
generateSignedInUrl: (requestBody: SignedInUrlRequestBody) => Promise<Response>;
|
|
27
|
-
storeInBucket: (signedInUrl: string, file: File, headers: Record<string, string>) => Promise<string>;
|
|
28
|
-
fetchImagesFromSportal365: (query: string, filters: Sportal365SearchImagesFilters, page: number) => Promise<Response>;
|
|
29
|
-
exportUsers: (requestBody: ExportUsersRequestBody) => Promise<Response>;
|
|
30
|
-
private getPollFeatures;
|
|
31
|
-
private constructAssetsUrl;
|
|
32
|
-
private throwErrorFromXmlResponse;
|
|
33
|
-
}
|