fansunited-management-components 1.50.3 → 1.50.5
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/index.es.js +1 -0
- package/index.umd.js +178 -178
- package/package.json +8 -6
- package/src/components/AdContent/AdContent.d.ts +4 -10
- package/src/components/AuthRequirement/AuthRequirement.d.ts +8 -0
- package/src/components/Branding/Branding.d.ts +7 -0
- package/src/components/Buttons/HeaderButtons.d.ts +10 -0
- package/src/components/Buttons/SignoutButtton.d.ts +6 -0
- package/src/components/Calendars/CustomFlatpickrCalendar.d.ts +9 -0
- package/src/components/Calendars/DatePicker.d.ts +8 -0
- package/src/components/Calendars/Duration.d.ts +9 -0
- package/src/components/Calendars/RangeCalendar.d.ts +8 -0
- package/src/components/Cards/NoPermissionCard.d.ts +7 -0
- package/src/components/Common/Toast.d.ts +8 -0
- package/src/components/Context/EntityContext.d.ts +7 -0
- package/src/components/DragAndDrop/BasicSortableList/BasicSortableList.d.ts +7 -0
- package/src/components/DragAndDrop/SortableList/SortableList.d.ts +8 -0
- package/src/components/DynamicFields/DynamicFields.d.ts +8 -0
- package/src/components/Exports/ExportUsersLeads.d.ts +9 -0
- package/src/components/Flags/Flags.d.ts +8 -0
- package/src/components/Images/ImageCard.d.ts +9 -0
- package/src/components/Images/Images.d.ts +7 -0
- package/src/components/Images/MiniGamesImages.d.ts +7 -0
- package/src/components/Inputs/InformationInput/InformationInput.d.ts +13 -0
- package/src/components/Inputs/NumberInput/NumberInput.d.ts +13 -0
- package/src/components/ItemsPerPageFilter/ItemsPerPageFilter.d.ts +11 -0
- package/src/components/MarketSelection/MarketSelection.d.ts +8 -0
- package/src/components/Match/Match.d.ts +6 -0
- package/src/components/Related/Related.d.ts +7 -0
- package/src/components/Related/RelatedRelationship/RelatedRelationship.d.ts +7 -0
- package/src/components/RichText/RichText.d.ts +11 -0
- package/src/components/Schedule/Schedule.d.ts +8 -0
- package/src/components/Select/BasicSelect/BasicSelect.d.ts +13 -0
- package/src/components/Select/CustomSelect.d.ts +9 -0
- package/src/components/Select/SearchSelect/AdvancedProfileSearchSelect.d.ts +7 -0
- package/src/components/Select/SearchSelect/CompetitionSearchSelect.d.ts +9 -0
- package/src/components/Select/SearchSelect/CompetitionsSearchSelect.d.ts +8 -0
- package/src/components/Select/SearchSelect/ContextSelectFilter.d.ts +9 -0
- package/src/components/Select/SearchSelect/ProfileSearchSelect.d.ts +7 -0
- package/src/components/Select/SearchSelect/TeamsSearchSelect.d.ts +8 -0
- package/src/components/Spinner/Spinner.d.ts +5 -0
- package/src/components/Switch/BooleanSwitch.d.ts +12 -0
- package/src/components/Utils/FormatNumber.d.ts +10 -0
- package/src/components/WidgetEmbedCode/WidgetEmbedCode.d.ts +8 -0
- package/src/components/WidgetListEmbedCode/WidgetListEmbedCode.d.ts +6 -0
- package/src/components/Winners/Tags/Tags.d.ts +7 -0
- package/src/components/Winners/Winners.d.ts +9 -0
- package/src/constants/components.d.ts +1 -0
- package/src/context/ApiContext.d.ts +4 -0
- package/src/context/AuthContext.d.ts +15 -0
- package/src/context/ComponentContext.d.ts +15 -0
- package/src/hooks/useAPIContext.d.ts +6 -0
- package/src/hooks/useComponentContext.d.ts +7 -1
- package/src/hooks/useIsMobile.d.ts +5 -0
- package/src/index.d.ts +13 -1
|
@@ -6,5 +6,15 @@ interface FormatNumberProps {
|
|
|
6
6
|
sx?: SxProps;
|
|
7
7
|
tooltipPlacement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Display a large number in a compact abbreviated form, with a tooltip showing the full value.
|
|
11
|
+
*
|
|
12
|
+
* @property {number} value - The number to display in compact format (e.g., 1.2k, 3.4m).
|
|
13
|
+
* @property {import('@mui/material').SxProps} [sx] - Style overrides passed to Typography.
|
|
14
|
+
* @property {('bottom-end'|'bottom-start'|'bottom'|'left-end'|'left-start'|'left'|'right-end'|'right-start'|'right'|'top-end'|'top-start'|'top')} [tooltipPlacement]
|
|
15
|
+
* The placement of the tooltip for full value when shown.
|
|
16
|
+
* @example
|
|
17
|
+
* <FormatNumber value={15320} /> // renders 15.3k with tooltip "15,320"
|
|
18
|
+
*/
|
|
9
19
|
declare const FormatNumber: React.FC<FormatNumberProps>;
|
|
10
20
|
export default FormatNumber;
|
|
@@ -6,5 +6,13 @@ type WidgetEmbedCodeProps = {
|
|
|
6
6
|
authRequirement: string | null;
|
|
7
7
|
labels: any;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Generates embed div code for a single widget with optional leads and campaign data attributes.
|
|
11
|
+
*
|
|
12
|
+
* @property {'classic-quiz'|'either-or'|'poll'} entityType - Widget type.
|
|
13
|
+
* @property {string} entityId - Target entity id.
|
|
14
|
+
* @property {string|null} authRequirement - Used to enable/disable leads configuration.
|
|
15
|
+
* @property {object} labels - Custom labels for UI and tooltips.
|
|
16
|
+
*/
|
|
9
17
|
declare const WidgetEmbedCode: React.FC<WidgetEmbedCodeProps>;
|
|
10
18
|
export default WidgetEmbedCode;
|
|
@@ -4,5 +4,11 @@ type WidgetListEmbedCodeProps = {
|
|
|
4
4
|
entityId: string;
|
|
5
5
|
labels: any;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Generates embed div code for a list widget with layout and URL configuration.
|
|
9
|
+
*
|
|
10
|
+
* @property {string} entityId - Target list id.
|
|
11
|
+
* @property {object} labels - Custom labels for UI and tooltips.
|
|
12
|
+
*/
|
|
7
13
|
declare const WidgetListEmbedCode: React.FC<WidgetListEmbedCodeProps>;
|
|
8
14
|
export default WidgetListEmbedCode;
|
|
@@ -5,5 +5,12 @@ type TagsProps = {
|
|
|
5
5
|
tags: string[];
|
|
6
6
|
onChange: (tags: string[]) => void;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Tags input for winners — creatable multi-select with duplicate prevention.
|
|
10
|
+
*
|
|
11
|
+
* @property {object} labels - Custom labels (expects tagsPlaceholder, repeatedValueMessage).
|
|
12
|
+
* @property {string[]} tags - Current tags.
|
|
13
|
+
* @property {(tags: string[]) => void} onChange - Handler when tags change.
|
|
14
|
+
*/
|
|
8
15
|
declare const Tags: React.FC<TagsProps>;
|
|
9
16
|
export default Tags;
|
|
@@ -7,5 +7,14 @@ type WinnersProps = {
|
|
|
7
7
|
labels: any;
|
|
8
8
|
onClickBack: () => void;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Winners management screen: loads winners by entity and provides actions via WinnersLayout.
|
|
12
|
+
*
|
|
13
|
+
* @property {string} entityId - ID of the entity whose winners are managed.
|
|
14
|
+
* @property {string} entityType - Type of the entity (e.g., game type).
|
|
15
|
+
* @property {string} entityName - Display name for the header.
|
|
16
|
+
* @property {object} labels - I18n labels.
|
|
17
|
+
* @property {() => void} onClickBack - Navigate back handler.
|
|
18
|
+
*/
|
|
10
19
|
declare const Winners: React.FC<WinnersProps>;
|
|
11
20
|
export default Winners;
|
|
@@ -10,5 +10,9 @@ type APIContextValueType = {
|
|
|
10
10
|
https: HttpsService;
|
|
11
11
|
};
|
|
12
12
|
declare const APIContext: import('react').Context<APIContextValueType | null>;
|
|
13
|
+
/**
|
|
14
|
+
* React context that exposes the Fans United SDK instance and HTTPS service.
|
|
15
|
+
* Use via `useAPIContext()`.
|
|
16
|
+
*/
|
|
13
17
|
declare const APIProvider: React.FC<APIProviderProps & PropsWithChildren>;
|
|
14
18
|
export { APIContext, APIProvider };
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { default as React, PropsWithChildren } from 'react';
|
|
2
2
|
import { default as firebase } from 'firebase/compat/app';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Provides the authenticated Firebase user to the component tree and suppresses initial flash while loading.
|
|
6
|
+
* Use `AuthContext` to read user or `useContext(AuthContext)` in custom hooks.
|
|
7
|
+
*
|
|
8
|
+
* @property {string} environment - Firebase environment key used to initialize the auth instance.
|
|
9
|
+
*/
|
|
4
10
|
type AuthProviderProps = {
|
|
5
11
|
environment: string;
|
|
6
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* React context exposing the current Firebase user or null.
|
|
15
|
+
*/
|
|
7
16
|
declare const AuthContext: React.Context<firebase.User | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Auth provider that subscribes to Firebase auth state and provides the user once loaded.
|
|
19
|
+
*
|
|
20
|
+
* @param {{ environment: string; children?: React.ReactNode }} props
|
|
21
|
+
* @returns {JSX.Element}
|
|
22
|
+
*/
|
|
8
23
|
declare const AuthProvider: React.FC<AuthProviderProps & PropsWithChildren>;
|
|
9
24
|
export { AuthContext, AuthProvider };
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { default as React, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Provides a registry of public Fans United components by name.
|
|
5
|
+
* Use `useComponentContext()` to resolve components dynamically.
|
|
6
|
+
*
|
|
7
|
+
* @property {object} [config] - Reserved for future component registry configuration.
|
|
8
|
+
*/
|
|
3
9
|
type ComponentProviderProps = {
|
|
4
10
|
config?: any;
|
|
5
11
|
children?: ReactNode;
|
|
6
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* React context mapping component names to their React function components.
|
|
15
|
+
*/
|
|
7
16
|
declare const ComponentContext: React.Context<Record<string, React.FunctionComponent<any>> | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Provider that exposes the components registry to descendants.
|
|
19
|
+
*
|
|
20
|
+
* @param {{ config?: any; children?: React.ReactNode }} props
|
|
21
|
+
* @returns {JSX.Element}
|
|
22
|
+
*/
|
|
8
23
|
declare const ComponentProvider: React.FC<ComponentProviderProps & PropsWithChildren>;
|
|
9
24
|
export { ComponentContext, ComponentProvider };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to access the API services provided by APIProvider.
|
|
3
|
+
*
|
|
4
|
+
* @returns {{ sdk: import('fansunited-sdk-esm').FansUnitedSDKModel; https: import('../services/https/HttpsService').default }}
|
|
5
|
+
* @throws {Error} If used outside of an APIProvider.
|
|
6
|
+
*/
|
|
1
7
|
export declare const useAPIContext: () => {
|
|
2
8
|
sdk: import('fansunited-sdk-esm').FansUnitedSDKModel;
|
|
3
9
|
https: import('../services/https/HttpsService').default;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Hook to access the registry of public components provided by ComponentProvider.
|
|
3
|
+
*
|
|
4
|
+
* @returns {Record<string, React.FunctionComponent<any>>}
|
|
5
|
+
* @throws {Error} If used outside of a ComponentProvider.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useComponentContext: () => import('../constants/components').ComponentsMap;
|
package/src/index.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centered loading spinner that fills its container.
|
|
3
|
+
*
|
|
4
|
+
* Recommended import:
|
|
5
|
+
* `import { Spinner } from 'fansunited-management-components'`
|
|
6
|
+
*/
|
|
7
|
+
export { default as Spinner } from './components/Spinner/Spinner';
|
|
8
|
+
/**
|
|
9
|
+
* Props for the Spinner component.
|
|
10
|
+
* Provides typed access in consumer projects without importing from deep paths.
|
|
11
|
+
*/
|
|
12
|
+
export type SpinnerProps = import('react').ComponentProps<typeof import('./components/Spinner/Spinner').default>;
|
|
1
13
|
declare const _default: {
|
|
2
14
|
APIProvider: import('react').FC<{
|
|
3
15
|
config: any;
|
|
@@ -16,7 +28,7 @@ declare const _default: {
|
|
|
16
28
|
} & {
|
|
17
29
|
children?: import('react').ReactNode | undefined;
|
|
18
30
|
}>;
|
|
19
|
-
useComponentContext: () =>
|
|
31
|
+
useComponentContext: () => import('./constants/components').ComponentsMap;
|
|
20
32
|
useAPIContext: () => {
|
|
21
33
|
sdk: import('fansunited-sdk-esm').FansUnitedSDKModel;
|
|
22
34
|
https: import('./services/https/HttpsService').default;
|