fansunited-management-components 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 (81) hide show
  1. package/README.md +0 -0
  2. package/dev/App.d.ts +2 -0
  3. package/dev/main.d.ts +1 -0
  4. package/index.es.d.ts +3 -0
  5. package/index.es.js +58315 -0
  6. package/index.umd.js +3604 -0
  7. package/package.json +8 -0
  8. package/src/components/Accordion/Accordion.d.ts +6 -0
  9. package/src/components/Accordion/AccordionCard.d.ts +4 -0
  10. package/src/components/AdContent/AdContent.d.ts +9 -0
  11. package/src/components/BasicSelect/BasicSelect.d.ts +10 -0
  12. package/src/components/Branding/Branding.d.ts +9 -0
  13. package/src/components/Branding/BrandingImage.d.ts +11 -0
  14. package/src/components/Buttons/HeaderButtons.d.ts +8 -0
  15. package/src/components/Calendars/DatePicker.d.ts +8 -0
  16. package/src/components/Calendars/Duration.d.ts +11 -0
  17. package/src/components/Calendars/RangeCalendar.d.ts +11 -0
  18. package/src/components/Checkboxes/Checkboxes.d.ts +13 -0
  19. package/src/components/Common/Toast.d.ts +11 -0
  20. package/src/components/DynamicFields/DynamicFields.d.ts +9 -0
  21. package/src/components/Flags/Flags.d.ts +9 -0
  22. package/src/components/FloatingLabelInput/FloatingLabelInput.d.ts +4 -0
  23. package/src/components/Images/ImageCard.d.ts +11 -0
  24. package/src/components/Images/Images.d.ts +10 -0
  25. package/src/components/InformationInput/InformationInput.d.ts +11 -0
  26. package/src/components/Login/Login.d.ts +8 -0
  27. package/src/components/MainColumn/MainColumn.d.ts +4 -0
  28. package/src/components/MarketSelection/MarketSelection.d.ts +10 -0
  29. package/src/components/Match/Match.d.ts +9 -0
  30. package/src/components/Modals/CropImageModal.d.ts +12 -0
  31. package/src/components/Modals/PreviewImageModal.d.ts +10 -0
  32. package/src/components/Related/Related.d.ts +10 -0
  33. package/src/components/Related/RelatedGames.d.ts +10 -0
  34. package/src/components/Related/RelatedTemplates.d.ts +9 -0
  35. package/src/components/RichText/RichText.d.ts +11 -0
  36. package/src/components/Select/SearchSelect/CompetitionSearchSelect.d.ts +11 -0
  37. package/src/components/Select/SearchSelect/ProfileSearchSelect.d.ts +9 -0
  38. package/src/components/Spinner/Spinner.d.ts +7 -0
  39. package/src/components/Sportal365SearchImages/ImageGrid.d.ts +9 -0
  40. package/src/components/Sportal365SearchImages/Sportal365ImagesPagination.d.ts +11 -0
  41. package/src/components/Sportal365SearchImages/Sportal365SearchImagesCard.d.ts +19 -0
  42. package/src/components/Switch/BooleanSwitch.d.ts +9 -0
  43. package/src/components/Table/Table.d.ts +7 -0
  44. package/src/components/Utils/VisuallyHiddenInput.d.ts +2 -0
  45. package/src/components/Winners/Preview/PreviewWinners.d.ts +11 -0
  46. package/src/components/Winners/Tags/Tags.d.ts +9 -0
  47. package/src/components/Winners/WinnerForm.d.ts +12 -0
  48. package/src/components/Winners/Winners.d.ts +11 -0
  49. package/src/components/Winners/WinnersConfig.d.ts +16 -0
  50. package/src/components/Winners/WinnersLayout.d.ts +12 -0
  51. package/src/constants/components.d.ts +1 -0
  52. package/src/constants/placeholders.d.ts +1 -0
  53. package/src/context/ApiContext.d.ts +14 -0
  54. package/src/context/AuthContext.d.ts +9 -0
  55. package/src/context/ComponentContext.d.ts +9 -0
  56. package/src/firebase/firebase.d.ts +3 -0
  57. package/src/functions/helpers.d.ts +2 -0
  58. package/src/hooks/useAPIContext.d.ts +4 -0
  59. package/src/hooks/useComponentContext.d.ts +1 -0
  60. package/src/hooks/useLeaderboard.d.ts +8 -0
  61. package/src/hooks/useWinners.d.ts +4 -0
  62. package/src/index.d.ts +25 -0
  63. package/src/interfaces/interfaces.d.ts +3 -0
  64. package/src/models/ManagementWidgetConfiguration.d.ts +8 -0
  65. package/src/models/SignedInUrlRequestBody.d.ts +6 -0
  66. package/src/models/Winners/WinnersRequestBody.d.ts +8 -0
  67. package/src/models/Winners/WinnersUserList.d.ts +6 -0
  68. package/src/models/images/Images.d.ts +6 -0
  69. package/src/models/related/RelatedEntity.d.ts +4 -0
  70. package/src/models/select/EntitySelectOption.d.ts +7 -0
  71. package/src/models/select/ProfileSelectOption.d.ts +5 -0
  72. package/src/models/select/ReactSelectBaseOption.d.ts +8 -0
  73. package/src/models/sportal365/Sportal365Config.d.ts +4 -0
  74. package/src/models/sportal365/Sportal365SearchImagesFilters.d.ts +4 -0
  75. package/src/models/templates/TemplateRequestBody.d.ts +21 -0
  76. package/src/services/hash/HashService.d.ts +4 -0
  77. package/src/services/https/Https.d.ts +22 -0
  78. package/src/services/https/HttpsService.d.ts +15 -0
  79. package/src/types/types.d.ts +3 -0
  80. package/src/validators/WinnerValidator.d.ts +9 -0
  81. package/style.css +6 -0
package/package.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "fansunited-management-components",
3
+ "version": "1.0.0-RC1",
4
+ "main": "index.es.js",
5
+ "author": "Fans United",
6
+ "description": "",
7
+ "homepage": "https://fansunitedmedia.com/"
8
+ }
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ type AccordionProps = {
3
+ label: string;
4
+ };
5
+ declare const Accordion: React.FC<AccordionProps & React.PropsWithChildren>;
6
+ export default Accordion;
@@ -0,0 +1,4 @@
1
+ import { default as React, PropsWithChildren } from 'react';
2
+
3
+ declare const AccordionCard: React.FC<PropsWithChildren>;
4
+ export default AccordionCard;
@@ -0,0 +1,9 @@
1
+ import { default as React, Dispatch, SetStateAction } from 'react';
2
+
3
+ type AdContentProps = {
4
+ labels: any;
5
+ defaultValue: string;
6
+ setValue: Dispatch<SetStateAction<string>>;
7
+ };
8
+ declare const AdContent: React.FC<AdContentProps>;
9
+ export default AdContent;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ type BasicSelectProps = {
4
+ label: string;
5
+ defaultValue: string;
6
+ values: string[];
7
+ onChange: (value: string) => void;
8
+ };
9
+ declare const BasicSelect: React.FC<BasicSelectProps>;
10
+ export default BasicSelect;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ type BrandingProps = {
4
+ labels: any;
5
+ defaultValue: Record<string, Record<string, string>> | null;
6
+ onChange: (value: any) => void;
7
+ };
8
+ declare const Branding: React.FC<BrandingProps>;
9
+ export default Branding;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ type BrandingImageProps = {
4
+ labels: any;
5
+ title: string;
6
+ image: string;
7
+ onChangeImages: (url: string) => void;
8
+ clearImage: () => void;
9
+ };
10
+ declare const BrandingImage: React.FC<BrandingImageProps>;
11
+ export default BrandingImage;
@@ -0,0 +1,8 @@
1
+ type HeaderButtonsProps = {
2
+ createLabel: string;
3
+ signOutLabel: string;
4
+ environment: string;
5
+ onClickCreate: () => void;
6
+ };
7
+ declare const HeaderButtons: React.FC<HeaderButtonsProps>;
8
+ export default HeaderButtons;
@@ -0,0 +1,8 @@
1
+ type DatePickerProps = {
2
+ label: string;
3
+ defaultValue: string;
4
+ required: boolean;
5
+ onChange: (date: string) => void;
6
+ };
7
+ declare const DatePickerComponent: React.FC<DatePickerProps>;
8
+ export default DatePickerComponent;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ type DurationProps = {
4
+ labels: any;
5
+ required: boolean;
6
+ defaultValue: string[];
7
+ onChangeFromDate: (date: string) => void;
8
+ onChangeToDate: (date: string) => void;
9
+ };
10
+ declare const Duration: React.FC<DurationProps>;
11
+ export default Duration;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { default as Sportal365SearchImagesFilters } from '../../models/sportal365/Sportal365SearchImagesFilters';
3
+
4
+ type RangeCalendarProps = {
5
+ label: string;
6
+ defaultValue: Sportal365SearchImagesFilters | null;
7
+ required: boolean;
8
+ onChange: (date: Sportal365SearchImagesFilters) => void;
9
+ };
10
+ declare const RangeCalendar: React.FC<RangeCalendarProps>;
11
+ export default RangeCalendar;
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ type CheckboxesProps = {
3
+ label: string;
4
+ values: string[];
5
+ allValues: string[];
6
+ valuesMap: Record<string, string>;
7
+ showAll?: boolean;
8
+ showAllLabel?: string;
9
+ onChange: (values: string[]) => void;
10
+ toggleShowAll?: () => void;
11
+ };
12
+ declare const Checkboxes: React.FC<CheckboxesProps>;
13
+ export default Checkboxes;
@@ -0,0 +1,11 @@
1
+ import { ColorPaletteProp } from '@mui/joy';
2
+ import { default as React } from 'react';
3
+
4
+ type ToastProps = {
5
+ showToast: boolean;
6
+ message: string;
7
+ color: ColorPaletteProp;
8
+ hideToast: () => void;
9
+ };
10
+ declare const Toast: React.FC<ToastProps>;
11
+ export default Toast;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ type DynamicFieldsProps = {
4
+ labels: any;
5
+ defaultValue: Record<string, string> | null;
6
+ onChange: (value: Record<string, string>) => void;
7
+ };
8
+ declare const DynamicFields: React.FC<DynamicFieldsProps>;
9
+ export default DynamicFields;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ type FlagsProps = {
4
+ labels: any;
5
+ flags: string[];
6
+ onChange: (flags: string[]) => void;
7
+ };
8
+ declare const Flags: React.FC<FlagsProps>;
9
+ export default Flags;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare const FloatingLabelInput: React.FC;
4
+ export default FloatingLabelInput;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ type ImageCardProps = {
4
+ labels: any;
5
+ title: string;
6
+ image: string;
7
+ onChangeImages: (url: string) => void;
8
+ clearImage: () => void;
9
+ };
10
+ declare const ImageCard: React.FC<ImageCardProps>;
11
+ export default ImageCard;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { default as ImagesModel } from '../../models/images/Images';
3
+
4
+ type ImagesProps = {
5
+ labels: any;
6
+ defaultValue: ImagesModel | null;
7
+ onChange: (value: any) => void;
8
+ };
9
+ declare const Images: React.FC<ImagesProps>;
10
+ export default Images;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ type InformationInputProps = {
4
+ label: string;
5
+ placeholder: string;
6
+ defaultValue: string;
7
+ required: boolean;
8
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
9
+ };
10
+ declare const InformationInput: React.FC<InformationInputProps>;
11
+ export default InformationInput;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ type LoginProps = {
4
+ userNotFound: string;
5
+ environment: string;
6
+ };
7
+ declare const Login: React.FC<LoginProps>;
8
+ export default Login;
@@ -0,0 +1,4 @@
1
+ import { default as React, PropsWithChildren } from 'react';
2
+
3
+ declare const MainColumn: React.FC<PropsWithChildren>;
4
+ export default MainColumn;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ type MarketSelectionProps = {
4
+ labels: any;
5
+ values: string[];
6
+ valuesMap: Record<string, string>;
7
+ onChange: (values: string[]) => void;
8
+ };
9
+ declare const MarketSelection: React.FC<MarketSelectionProps>;
10
+ export default MarketSelection;
@@ -0,0 +1,9 @@
1
+ import { default as MatchBasicModel } from 'fansunited-sdk-esm/Core/Namespaces/Football/Models/Match/MatchBasicModel';
2
+ import { default as React } from 'react';
3
+
4
+ type MatchProps = {
5
+ match: MatchBasicModel;
6
+ timeFormat: string;
7
+ };
8
+ declare const Match: React.FC<MatchProps>;
9
+ export default Match;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ type CropImageModalProps = {
4
+ labels: any;
5
+ open: boolean;
6
+ imageSrc: string;
7
+ uploadImage: (image: File | null) => void;
8
+ resetDefaultImageUrl: () => void;
9
+ toggleModal: () => void;
10
+ };
11
+ declare const CropImageModal: React.FC<CropImageModalProps>;
12
+ export default CropImageModal;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ type ComponentProps = {
4
+ title: string;
5
+ open: boolean;
6
+ imageSrc: string;
7
+ toggleModal: () => void;
8
+ };
9
+ declare const PreviewImageModal: React.FC<ComponentProps>;
10
+ export default PreviewImageModal;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { default as RelatedEntity } from '../../models/related/RelatedEntity';
3
+
4
+ type RelatedProps = {
5
+ labels: any;
6
+ related: RelatedEntity[];
7
+ onChange: (related: RelatedEntity[]) => void;
8
+ };
9
+ declare const Related: React.FC<RelatedProps>;
10
+ export default Related;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { default as RelatedEntity } from '../../models/related/RelatedEntity';
3
+
4
+ type RelatedGamesProps = {
5
+ label: string;
6
+ related: RelatedEntity[];
7
+ onChange: (related: RelatedEntity[]) => void;
8
+ };
9
+ declare const RelatedGames: React.FC<RelatedGamesProps>;
10
+ export default RelatedGames;
@@ -0,0 +1,9 @@
1
+ import { default as RelatedEntity } from '../../models/related/RelatedEntity';
2
+
3
+ type RelatedTemplatesProps = {
4
+ label: string;
5
+ related: RelatedEntity[];
6
+ onChange: (related: RelatedEntity[]) => void;
7
+ };
8
+ declare const RelatedTemplates: React.FC<RelatedTemplatesProps>;
9
+ export default RelatedTemplates;
@@ -0,0 +1,11 @@
1
+ import { default as React, Dispatch, SetStateAction } from 'react';
2
+
3
+ type RichTextProps = {
4
+ label: string;
5
+ placeholder: string;
6
+ defaultValue: string;
7
+ property: 'description' | 'rules' | 'ad_content';
8
+ setValue: Dispatch<SetStateAction<string>>;
9
+ };
10
+ declare const RichText: React.FC<RichTextProps>;
11
+ export default RichText;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ type CompetitionSearchSelectProps = {
4
+ labels: any;
5
+ label: string;
6
+ ids: string[];
7
+ required: boolean;
8
+ onChange: (ids: string[]) => void;
9
+ };
10
+ declare const CompetitionSearchSelect: React.FC<CompetitionSearchSelectProps>;
11
+ export default CompetitionSearchSelect;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ type ProfileSearchSelectProps = {
4
+ labels: any;
5
+ ids: string[];
6
+ onChange: (ids: string[] | null) => void;
7
+ };
8
+ declare const ProfileSearchSelect: React.FC<ProfileSearchSelectProps>;
9
+ export default ProfileSearchSelect;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+
3
+ type SpinnerProps = {
4
+ my: number;
5
+ };
6
+ declare const Spinner: React.FC<SpinnerProps>;
7
+ export default Spinner;
@@ -0,0 +1,9 @@
1
+ import { ISearchImagesData } from './Sportal365SearchImagesCard';
2
+
3
+ type ImageGridProps = {
4
+ images: ISearchImagesData[];
5
+ isLoading: boolean;
6
+ onClick: (url: string) => void;
7
+ };
8
+ declare const ImageGrid: React.FC<ImageGridProps>;
9
+ export default ImageGrid;
@@ -0,0 +1,11 @@
1
+ import { ISearchImagesData } from './Sportal365SearchImagesCard';
2
+
3
+ type Sportal365ImagesPaginationProps = {
4
+ labels: any;
5
+ pageCount: number;
6
+ images: ISearchImagesData[] | null;
7
+ getPreviousPage: () => void;
8
+ getNextPage: () => void;
9
+ };
10
+ declare const Sportal365ImagesPagination: React.FC<Sportal365ImagesPaginationProps>;
11
+ export default Sportal365ImagesPagination;
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface ISearchImagesData {
4
+ id: string;
5
+ urls: {
6
+ uploaded: {
7
+ embed: string;
8
+ gallery: string;
9
+ original: string;
10
+ thumbnail: string;
11
+ };
12
+ };
13
+ }
14
+ type Sportal365SearchImagesCardProps = {
15
+ labels: any;
16
+ onChangeImages: (url: string) => void;
17
+ };
18
+ declare const Sportal365SearchImagesCard: React.FC<Sportal365SearchImagesCardProps>;
19
+ export default Sportal365SearchImagesCard;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ type BooleanSwitchProps = {
4
+ label: string;
5
+ defaultValue: boolean;
6
+ onChange: (checked: boolean) => void;
7
+ };
8
+ declare const BooleanSwitch: React.FC<BooleanSwitchProps>;
9
+ export default BooleanSwitch;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+
3
+ type CustomTableProps = {
4
+ data: any[];
5
+ };
6
+ declare const CustomTable: React.FC<CustomTableProps>;
7
+ export default CustomTable;
@@ -0,0 +1,2 @@
1
+ declare const VisuallyHiddenInput: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/joy').Theme>, import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
2
+ export default VisuallyHiddenInput;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { default as ProfileModel } from 'fansunited-sdk-esm/Core/Namespaces/Profile/Models/ProfileModel';
3
+ import { default as WinnersRequestBody } from '../../../models/Winners/WinnersRequestBody';
4
+
5
+ type PreviewWinnersProps = {
6
+ labels: any;
7
+ winners: WinnersRequestBody;
8
+ profiles: ProfileModel[];
9
+ };
10
+ declare const PreviewWinners: React.FC<PreviewWinnersProps>;
11
+ export default PreviewWinners;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ type TagsProps = {
4
+ labels: any;
5
+ tags: string[];
6
+ onChange: (tags: string[]) => void;
7
+ };
8
+ declare const Tags: React.FC<TagsProps>;
9
+ export default Tags;
@@ -0,0 +1,12 @@
1
+ import { default as LeaderboardModel } from 'fansunited-sdk-esm/Core/Namespaces/Loyalty/Models/Leaderboard/LeaderboardModel';
2
+ import { default as WinnersUserList } from '../../models/Winners/WinnersUserList';
3
+
4
+ type WinnerFormProps = {
5
+ winner: WinnersUserList;
6
+ profile: LeaderboardModel;
7
+ labels: any;
8
+ onChange: (property: string, value: string | string[]) => void;
9
+ onRemove: () => void;
10
+ };
11
+ declare const WinnerForm: React.FC<WinnerFormProps>;
12
+ export default WinnerForm;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ type WinnersProps = {
4
+ entityId: string;
5
+ entityType: string;
6
+ entityName: string;
7
+ labels: any;
8
+ onClickBack: () => void;
9
+ };
10
+ declare const Winners: React.FC<WinnersProps>;
11
+ export default Winners;
@@ -0,0 +1,16 @@
1
+ import { default as LeaderboardModel } from 'fansunited-sdk-esm/Core/Namespaces/Loyalty/Models/Leaderboard/LeaderboardModel';
2
+ import { default as WinnersUserList } from '../../models/Winners/WinnersUserList';
3
+ import { Dispatch, SetStateAction } from 'react';
4
+ import { default as WinnersRequestBody } from '../../models/Winners/WinnersRequestBody';
5
+
6
+ type WinnersConfigProps = {
7
+ labels: any;
8
+ winners: WinnersUserList[];
9
+ leaderboard: LeaderboardModel[] | null;
10
+ hasMoreParticipants: boolean;
11
+ isLoading: boolean;
12
+ setPage: Dispatch<SetStateAction<number>>;
13
+ setWinnersRequestBody: Dispatch<SetStateAction<WinnersRequestBody>>;
14
+ };
15
+ declare const WinnersConfig: React.FC<WinnersConfigProps>;
16
+ export default WinnersConfig;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { default as ContestWinners } from 'fansunited-sdk-esm/Core/Namespaces/TopX/Models/Games/Winners/ContestWinners';
3
+ import { default as WinnersRequestBody } from '../../models/Winners/WinnersRequestBody';
4
+
5
+ type WinnersLayoutProps = {
6
+ labels: any;
7
+ winners: ContestWinners | WinnersRequestBody;
8
+ entityId: string;
9
+ entityType: string;
10
+ };
11
+ declare const WinnersLayout: React.FC<WinnersLayoutProps>;
12
+ export default WinnersLayout;
@@ -0,0 +1 @@
1
+ export declare const components: Record<string, React.FunctionComponent<any>>;
@@ -0,0 +1 @@
1
+ export declare const placeholders: any;
@@ -0,0 +1,14 @@
1
+ import { default as FansUnitedSDKModel } from 'fansunited-sdk-esm/Core/Global/Models/FansUnitedSDKModel';
2
+ import { default as HttpsService } from '../services/https/HttpsService';
3
+ import { PropsWithChildren } from 'react';
4
+
5
+ type APIProviderProps = {
6
+ config: any;
7
+ };
8
+ type APIContextValueType = {
9
+ sdk: FansUnitedSDKModel;
10
+ https: HttpsService;
11
+ };
12
+ declare const APIContext: import('react').Context<APIContextValueType | null>;
13
+ declare const APIProvider: React.FC<APIProviderProps & PropsWithChildren>;
14
+ export { APIContext, APIProvider };
@@ -0,0 +1,9 @@
1
+ import { default as React, PropsWithChildren } from 'react';
2
+ import { default as firebase } from 'firebase/compat/app';
3
+
4
+ type AuthProviderProps = {
5
+ environment: string;
6
+ };
7
+ declare const AuthContext: React.Context<firebase.User | null>;
8
+ declare const AuthProvider: React.FC<AuthProviderProps & PropsWithChildren>;
9
+ export { AuthContext, AuthProvider };
@@ -0,0 +1,9 @@
1
+ import { default as React, PropsWithChildren, ReactNode } from 'react';
2
+
3
+ type ComponentProviderProps = {
4
+ config?: any;
5
+ children?: ReactNode;
6
+ };
7
+ declare const ComponentContext: React.Context<Record<string, React.FunctionComponent<any>> | null>;
8
+ declare const ComponentProvider: React.FC<ComponentProviderProps & PropsWithChildren>;
9
+ export { ComponentContext, ComponentProvider };
@@ -0,0 +1,3 @@
1
+ import { default as firebase } from 'firebase/compat/app';
2
+
3
+ export declare const firebaseAuth: (fansUnitedEnvironment: string) => firebase.auth.Auth;
@@ -0,0 +1,2 @@
1
+ export declare const displayName: (name: string | undefined, nickname: string | undefined) => string;
2
+ export declare const remapKeysToSpecificCase: (obj: any, type: "camel" | "snake") => any;
@@ -0,0 +1,4 @@
1
+ export declare const useAPIContext: () => {
2
+ sdk: import('fansunited-sdk-esm/Core/Global/Models/FansUnitedSDKModel').default;
3
+ https: import('../services/https/HttpsService').default;
4
+ };
@@ -0,0 +1 @@
1
+ export declare const useComponentContext: () => Record<string, import('react').FunctionComponent<any>>;
@@ -0,0 +1,8 @@
1
+ import { default as LeaderboardModel } from 'fansunited-sdk-esm/Core/Namespaces/Loyalty/Models/Leaderboard/LeaderboardModel';
2
+ import { ColorPaletteProp } from '@mui/joy';
3
+
4
+ export declare const useLeaderboard: (entityId: string, entityType: string, leaderboardErrorMessage: string, page: number, displayToast: (color: ColorPaletteProp, message: string) => void) => {
5
+ leaderboard: LeaderboardModel[] | null;
6
+ hasMoreParticipants: boolean;
7
+ isLeaderboardLoading: boolean;
8
+ };
@@ -0,0 +1,4 @@
1
+ import { default as ContestWinners } from 'fansunited-sdk-esm/Core/Namespaces/TopX/Models/Games/Winners/ContestWinners';
2
+ import { default as WinnersRequestBody } from '../models/Winners/WinnersRequestBody';
3
+
4
+ export declare const useWinners: (entityId: string, entityType: string, displayToast: () => void) => WinnersRequestBody | ContestWinners | null;
package/src/index.d.ts ADDED
@@ -0,0 +1,25 @@
1
+ declare const _default: {
2
+ APIProvider: import('react').FC<{
3
+ config: any;
4
+ } & {
5
+ children?: import('react').ReactNode | undefined;
6
+ }>;
7
+ AuthProvider: import('react').FC<{
8
+ environment: string;
9
+ } & {
10
+ children?: import('react').ReactNode | undefined;
11
+ }>;
12
+ AuthContext: import('react').Context<import("firebase/compat/app").default.User | null>;
13
+ ComponentProvider: import('react').FC<{
14
+ config?: any;
15
+ children?: import('react').ReactNode;
16
+ } & {
17
+ children?: import('react').ReactNode | undefined;
18
+ }>;
19
+ useComponentContext: () => Record<string, import('react').FunctionComponent<any>>;
20
+ useAPIContext: () => {
21
+ sdk: import('fansunited-sdk-esm/Core/Global/Models/FansUnitedSDKModel').default;
22
+ https: import('./services/https/HttpsService').default;
23
+ };
24
+ };
25
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export interface ICommonProps {
2
+ label: string;
3
+ }
@@ -0,0 +1,8 @@
1
+ export default class ManagementWidgetConfiguration {
2
+ apiKey: string;
3
+ clientId: string;
4
+ language?: string;
5
+ environment?: string;
6
+ sportal365Project?: string;
7
+ sportal365Infrastructure?: 'shared' | 'betway';
8
+ }
@@ -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,8 @@
1
+ import { default as WinnersUserList } from './WinnersUserList';
2
+
3
+ export default class WinnersRequestBody {
4
+ contestId: string;
5
+ contestType: string;
6
+ description: string;
7
+ userList: WinnersUserList[];
8
+ }