fansunited-management-components 1.50.3 → 1.50.4
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/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 +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
"name": "fansunited-management-components",
|
|
3
|
+
"version": "1.50.4",
|
|
4
|
+
"main": "index.es.js",
|
|
5
|
+
"module": "index.es.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"author": "Fans United",
|
|
8
|
+
"description": "",
|
|
9
|
+
"homepage": "https://fansunitedmedia.com/"
|
|
8
10
|
}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Displays advertising content input with Rich Text and Plain Text tabs.
|
|
5
|
-
*
|
|
6
|
-
* @property {object} labels - I18n labels; expects `richText` and `plainText` keys.
|
|
7
|
-
* @property {string} defaultValue - Initial content value.
|
|
8
|
-
* @property {(value: string) => void} onChange - Callback when content changes.
|
|
9
|
-
*/
|
|
10
3
|
type AdContentProps = {
|
|
11
4
|
labels: any;
|
|
12
5
|
defaultValue: string;
|
|
13
6
|
onChange: (value: string) => void;
|
|
14
7
|
};
|
|
15
8
|
/**
|
|
16
|
-
*
|
|
9
|
+
* Displays advertising content input with Rich Text and Plain Text tabs.
|
|
17
10
|
*
|
|
18
|
-
* @
|
|
19
|
-
* @
|
|
11
|
+
* @property {object} labels - Custom labels; expects `richText` and `plainText` keys.
|
|
12
|
+
* @property {string} defaultValue - Initial content value.
|
|
13
|
+
* @property {(value: string) => void} onChange - Callback when content changes.
|
|
20
14
|
*/
|
|
21
15
|
declare const AdContent: React.FC<AdContentProps>;
|
|
22
16
|
export default AdContent;
|
|
@@ -6,5 +6,13 @@ type AuthRequirementProps = {
|
|
|
6
6
|
labels: any;
|
|
7
7
|
onChange: (authRequirement: string | null) => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Select for content access requirement: FREE/LEAD/REGISTERED/PAID.
|
|
11
|
+
*
|
|
12
|
+
* @property {string} defaultValue - Selected requirement id.
|
|
13
|
+
* @property {boolean} [isClearable=true] - Whether the selection can be cleared.
|
|
14
|
+
* @property {object} labels - I18n labels for the options and description.
|
|
15
|
+
* @property {(authRequirement: string | null) => void} onChange - Selection handler.
|
|
16
|
+
*/
|
|
9
17
|
declare const AuthRequirement: React.FC<AuthRequirementProps>;
|
|
10
18
|
export default AuthRequirement;
|
|
@@ -5,5 +5,12 @@ type BrandingProps = {
|
|
|
5
5
|
defaultValue: Record<string, Record<string, string>> | null;
|
|
6
6
|
onChange: (value: any) => void;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Branding editor with tabs for Images, Colors, and URLs. Designed for management UIs.
|
|
10
|
+
*
|
|
11
|
+
* @property {object} labels - Custom labels used throughout the tabs.
|
|
12
|
+
* @property {Record<string, Record<string, string>> | null} defaultValue - Initial branding structure with `images`, `colors`, `urls`.
|
|
13
|
+
* @property {(value: any) => void} onChange - Called with the updated branding value.
|
|
14
|
+
*/
|
|
8
15
|
declare const Branding: React.FC<BrandingProps>;
|
|
9
16
|
export default Branding;
|
|
@@ -6,5 +6,15 @@ type HeaderButtonsProps = {
|
|
|
6
6
|
onClickCreate: () => void;
|
|
7
7
|
onClickCreateFromTemplate?: () => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Header action buttons for management pages: create and optional create-from-template, plus sign out.
|
|
11
|
+
*
|
|
12
|
+
* @property {string} createLabel - Label for the create button.
|
|
13
|
+
* @property {string} [createFromTemplateLabel] - Label for the create-from-template button; if omitted the button is hidden.
|
|
14
|
+
* @property {string} signOutLabel - Label for the sign-out button; if empty, button is hidden.
|
|
15
|
+
* @property {string} environment - Firebase environment key passed to SignOutButton.
|
|
16
|
+
* @property {() => void} onClickCreate - Handler for the create button.
|
|
17
|
+
* @property {() => void} [onClickCreateFromTemplate] - Handler for the create-from-template button.
|
|
18
|
+
*/
|
|
9
19
|
declare const HeaderButtons: React.FC<HeaderButtonsProps>;
|
|
10
20
|
export default HeaderButtons;
|
|
@@ -4,5 +4,11 @@ type SignOutButtonProps = {
|
|
|
4
4
|
signOutLabel: string;
|
|
5
5
|
environment: string;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Button that signs out the current user from the given Firebase environment.
|
|
9
|
+
*
|
|
10
|
+
* @property {string} signOutLabel - Button label.
|
|
11
|
+
* @property {string} environment - Firebase environment key.
|
|
12
|
+
*/
|
|
7
13
|
declare const SignOutButton: React.FC<SignOutButtonProps>;
|
|
8
14
|
export default SignOutButton;
|
|
@@ -7,5 +7,14 @@ type CustomFlatpickrCalendarProps = {
|
|
|
7
7
|
dateFormat?: string;
|
|
8
8
|
onChange: (date: string) => void;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Flatpickr-based datetime input with min-date logic and Joy styling.
|
|
12
|
+
*
|
|
13
|
+
* @property {string} defaultDate - ISO date used to initialize and control the input.
|
|
14
|
+
* @property {Date} [minDate] - Minimum selectable date; defaults to now + 15m.
|
|
15
|
+
* @property {Date} [maxDate] - Maximum selectable date.
|
|
16
|
+
* @property {string} [dateFormat='DD.MM.YYYY HH:mm'] - Display format.
|
|
17
|
+
* @property {(date: string) => void} onChange - Emits ISO string when user picks a date.
|
|
18
|
+
*/
|
|
10
19
|
declare const CustomFlatpickrCalendar: React.FC<CustomFlatpickrCalendarProps>;
|
|
11
20
|
export default CustomFlatpickrCalendar;
|
|
@@ -4,5 +4,13 @@ type DatePickerProps = {
|
|
|
4
4
|
required: boolean;
|
|
5
5
|
onChange: (date: string) => void;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Simple date input field using native HTML date input styled by Joy UI.
|
|
9
|
+
*
|
|
10
|
+
* @property {string} label - Field label.
|
|
11
|
+
* @property {string} defaultValue - Initial date value in YYYY-MM-DD format.
|
|
12
|
+
* @property {boolean} required - Whether the field is required.
|
|
13
|
+
* @property {(date: string) => void} onChange - Called with the ISO date string.
|
|
14
|
+
*/
|
|
7
15
|
declare const DatePickerComponent: React.FC<DatePickerProps>;
|
|
8
16
|
export default DatePickerComponent;
|
|
@@ -7,5 +7,14 @@ type DurationProps = {
|
|
|
7
7
|
onChangeFromDate: (date: string) => void;
|
|
8
8
|
onChangeToDate: (date: string) => void;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* A paired date range selector built from two DatePickerComponent instances.
|
|
12
|
+
*
|
|
13
|
+
* @property {object} labels - Custom labels.
|
|
14
|
+
* @property {boolean} required - Whether the fields are required.
|
|
15
|
+
* @property {string[]} defaultValue - Tuple-like [fromDate, toDate] values in YYYY-MM-DD.
|
|
16
|
+
* @property {(date: string) => void} onChangeFromDate - Handler for the "from" date.
|
|
17
|
+
* @property {(date: string) => void} onChangeToDate - Handler for the "to" date.
|
|
18
|
+
*/
|
|
10
19
|
declare const Duration: React.FC<DurationProps>;
|
|
11
20
|
export default Duration;
|
|
@@ -7,5 +7,13 @@ type RangeCalendarProps = {
|
|
|
7
7
|
required: boolean;
|
|
8
8
|
onChange: (date: Sportal365SearchImagesFilters) => void;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Date range selector based on flatpickr, returning { from, to } in YYYY-MM-DD.
|
|
12
|
+
*
|
|
13
|
+
* @property {string} label - Field label.
|
|
14
|
+
* @property {import('../../models/sportal365/Sportal365SearchImagesFilters').default | null} defaultValue - Initial range.
|
|
15
|
+
* @property {boolean} required - Whether selection is required.
|
|
16
|
+
* @property {(date: import('../../models/sportal365/Sportal365SearchImagesFilters').default) => void} onChange - Called with the new range.
|
|
17
|
+
*/
|
|
10
18
|
declare const RangeCalendar: React.FC<RangeCalendarProps>;
|
|
11
19
|
export default RangeCalendar;
|
|
@@ -5,5 +5,12 @@ type NoPermissionCardProps = {
|
|
|
5
5
|
environment: string;
|
|
6
6
|
setNoPermission: Dispatch<SetStateAction<boolean | null>>;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Information card displayed when the user lacks permission. Offers a sign-out to retry.
|
|
10
|
+
*
|
|
11
|
+
* @property {object} labels - Custom labels used for title, message, buttons.
|
|
12
|
+
* @property {string} environment - Firebase environment key used for auth.
|
|
13
|
+
* @property {React.Dispatch<React.SetStateAction<boolean | null>>} setNoPermission - Setter to reset the permission state.
|
|
14
|
+
*/
|
|
8
15
|
declare const NoPermissionCard: React.FC<NoPermissionCardProps>;
|
|
9
16
|
export default NoPermissionCard;
|
|
@@ -7,5 +7,13 @@ type ToastProps = {
|
|
|
7
7
|
color: ColorPaletteProp;
|
|
8
8
|
hideToast: () => void;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Lightweight Snackbar wrapper to show brief messages in the top-right corner.
|
|
12
|
+
*
|
|
13
|
+
* @property {boolean} showToast - Controls visibility.
|
|
14
|
+
* @property {string} message - Message text.
|
|
15
|
+
* @property {import('@mui/joy').ColorPaletteProp} color - Color variant (e.g., 'primary', 'warning', 'danger').
|
|
16
|
+
* @property {() => void} hideToast - Called on close.
|
|
17
|
+
*/
|
|
10
18
|
declare const Toast: React.FC<ToastProps>;
|
|
11
19
|
export default Toast;
|
|
@@ -6,5 +6,12 @@ type EntityContextProps = {
|
|
|
6
6
|
context: ContextModel;
|
|
7
7
|
onChange: (context: ContextModel) => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Tabs to manage entity context: tags, content, and campaign metadata.
|
|
11
|
+
*
|
|
12
|
+
* @property {object} labels - Custom labels for tabs and field labels (id, type, label etc.).
|
|
13
|
+
* @property {ContextModel} context - Current entity context value.
|
|
14
|
+
* @property {(context: ContextModel) => void} onChange - Emits updated context.
|
|
15
|
+
*/
|
|
9
16
|
declare const EntityContext: React.FC<EntityContextProps>;
|
|
10
17
|
export default EntityContext;
|
|
@@ -16,6 +16,13 @@ type SortableListProps = {
|
|
|
16
16
|
};
|
|
17
17
|
setItems: Dispatch<SetStateAction<any[]>>;
|
|
18
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* Sortable list with rich item cards; uses dnd-kit under the hood.
|
|
21
|
+
*
|
|
22
|
+
* @property {ISortableItem[]} items - Items to render and reorder.
|
|
23
|
+
* @property {{noItemsToDisplay:string, dragToReorder:string}} labels - Custom labels.
|
|
24
|
+
* @property {Dispatch<SetStateAction<any[]>>} setItems - Setter after reordering.
|
|
25
|
+
*/
|
|
19
26
|
/**
|
|
20
27
|
* Enhanced sortable list using the `dnd-kit` library with improved UI/UX.
|
|
21
28
|
* Features rich item cards with support for images, descriptions and types.
|
|
@@ -8,11 +8,19 @@ type SortableListProps = {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
+
* Draggable sortable list using dnd-kit. Renders items with optional type chips.
|
|
12
|
+
*
|
|
11
13
|
* This component provides a sortable list using the `dnd-kit` library for drag-and-drop functionality.
|
|
12
14
|
* Each item in the list can be dragged and dropped to reorder the list. The component is designed to be
|
|
13
15
|
* adaptable for use in various projects and integrates with Joy UI for styling.
|
|
14
16
|
* dnd-kit documentation: https://docs.dndkit.com/
|
|
15
17
|
* Original implementation: https://codesandbox.io/p/sandbox/dnd-kit-sortable-starter-template-22x1ix
|
|
18
|
+
*
|
|
19
|
+
* @property {any[]} entities - Items to render (must contain id, title/name, optional type).
|
|
20
|
+
* @property {object} labels - Custom labels (expects removeEntity for tooltip).
|
|
21
|
+
* @property {Dispatch<SetStateAction<any[]>>} setEntities - Setter after reordering.
|
|
22
|
+
* @property {(id: string) => void} removeItem - Remove handler for an item.
|
|
23
|
+
* @property {boolean} [disabled] - Disable drag interactions.
|
|
16
24
|
*/
|
|
17
25
|
declare const SortableList: React.FC<SortableListProps>;
|
|
18
26
|
export default SortableList;
|
|
@@ -6,5 +6,13 @@ type DynamicFieldsProps = {
|
|
|
6
6
|
defaultValue: Record<string, string> | null;
|
|
7
7
|
onChange: (value: Record<string, string>) => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Editable key/value list for custom attributes with add, edit, and delete actions.
|
|
11
|
+
*
|
|
12
|
+
* @property {object} labels - Custom labels for UI actions and field names.
|
|
13
|
+
* @property {string} type - Unique key to namespace items in the list.
|
|
14
|
+
* @property {Record<string,string>|null} defaultValue - Initial attributes object.
|
|
15
|
+
* @property {(value: Record<string,string>) => void} onChange - Emits remapped attributes object.
|
|
16
|
+
*/
|
|
9
17
|
declare const DynamicFields: React.FC<DynamicFieldsProps>;
|
|
10
18
|
export default DynamicFields;
|
|
@@ -14,5 +14,14 @@ type ExportUsersLeadsProps = {
|
|
|
14
14
|
usersLeadsExportErrorMessage: string;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Exports leads for a given entity to CSV via backend endpoint.
|
|
19
|
+
*
|
|
20
|
+
* @property {string} entityId - Target entity id.
|
|
21
|
+
* @property {string} entityType - Target entity type.
|
|
22
|
+
* @property {string} entityName - Used in filename for the export.
|
|
23
|
+
* @property {{exportUsersLeads:string, category:string, action:string, exportAllUsersLeads:string, exportAllUsersLeadsDescription:string, usersLeadsExportMessage:string, usersLeadsExportErrorMessage:string}} labels
|
|
24
|
+
* - I18n labels for UI and messages.
|
|
25
|
+
*/
|
|
17
26
|
declare const ExportUsersLeads: React.FC<ExportUsersLeadsProps>;
|
|
18
27
|
export default ExportUsersLeads;
|
|
@@ -7,5 +7,13 @@ type FlagsProps = {
|
|
|
7
7
|
onChange: (flags: string[]) => void;
|
|
8
8
|
sx?: SxProps;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Creatable multi-select for tags/flags with duplicates prevention and inline add via Enter/Tab.
|
|
12
|
+
*
|
|
13
|
+
* @property {object} labels - Custom labels (expects flagsPlaceholder, repeatedValueMessage).
|
|
14
|
+
* @property {string[]} flags - Current selected flags.
|
|
15
|
+
* @property {(flags: string[]) => void} onChange - Handler when flags change.
|
|
16
|
+
* @property {import('@mui/material').SxProps} [sx] - Container styles.
|
|
17
|
+
*/
|
|
10
18
|
declare const Flags: React.FC<FlagsProps>;
|
|
11
19
|
export default Flags;
|
|
@@ -7,5 +7,14 @@ type ImageCardProps = {
|
|
|
7
7
|
onChangeImages: (url: string) => void;
|
|
8
8
|
clearImage: () => void;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Image picker card with upload, preview, crop, copy URL, and Sportal365 search integration.
|
|
12
|
+
*
|
|
13
|
+
* @property {object} labels - Custom labels for buttons and messages.
|
|
14
|
+
* @property {string} title - Card title.
|
|
15
|
+
* @property {string} image - Current image URL.
|
|
16
|
+
* @property {(url: string) => void} onChangeImages - Called with new image URL after upload/selection.
|
|
17
|
+
* @property {() => void} clearImage - Clear current image.
|
|
18
|
+
*/
|
|
10
19
|
declare const ImageCard: React.FC<ImageCardProps>;
|
|
11
20
|
export default ImageCard;
|
|
@@ -6,5 +6,12 @@ type ImagesProps = {
|
|
|
6
6
|
defaultValue: ImagesModel | null;
|
|
7
7
|
onChange: (value: any) => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Wrapper for selecting/uploading images (main + optional cover/mobile) using ImageCard.
|
|
11
|
+
*
|
|
12
|
+
* @property {object} labels - Custom labels used by the image cards.
|
|
13
|
+
* @property {import('../../models/images/Images').default | null} defaultValue - Initial images object.
|
|
14
|
+
* @property {(value: any) => void} onChange - Called when images object changes.
|
|
15
|
+
*/
|
|
9
16
|
declare const Images: React.FC<ImagesProps>;
|
|
10
17
|
export default Images;
|
|
@@ -6,5 +6,12 @@ type MiniGamesImagesProps = {
|
|
|
6
6
|
defaultValue: ImagesModel | null;
|
|
7
7
|
onChange: (value: any) => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Image pickers for mini-games (main + optional mobile), with collapsible section.
|
|
11
|
+
*
|
|
12
|
+
* @property {object} labels - Custom labels used in the cards.
|
|
13
|
+
* @property {ImagesModel | null} defaultValue - Initial images object.
|
|
14
|
+
* @property {(value: any) => void} onChange - Emits updated images object.
|
|
15
|
+
*/
|
|
9
16
|
declare const MiniGamesImages: React.FC<MiniGamesImagesProps>;
|
|
10
17
|
export default MiniGamesImages;
|
|
@@ -11,5 +11,18 @@ type InformationInputProps = {
|
|
|
11
11
|
endDecorator?: React.ReactNode;
|
|
12
12
|
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Labeled single-line text input using Joy UI.
|
|
16
|
+
*
|
|
17
|
+
* @property {string} label - Field label.
|
|
18
|
+
* @property {string} placeholder - Placeholder text.
|
|
19
|
+
* @property {string} [value] - Controlled value.
|
|
20
|
+
* @property {string} defaultValue - Fallback/uncontrolled default value.
|
|
21
|
+
* @property {boolean} required - Whether the field is required.
|
|
22
|
+
* @property {'sm'|'md'|'lg'} size - Control size.
|
|
23
|
+
* @property {boolean} [readOnly=false] - Read-only mode.
|
|
24
|
+
* @property {React.ReactNode} [endDecorator] - Optional element inside the input at the end.
|
|
25
|
+
* @property {(e: React.ChangeEvent<HTMLInputElement>) => void} onChange - Change handler.
|
|
26
|
+
*/
|
|
14
27
|
declare const InformationInput: React.FC<InformationInputProps>;
|
|
15
28
|
export default InformationInput;
|
|
@@ -10,5 +10,18 @@ type NumberInputProps = {
|
|
|
10
10
|
sx?: SxProps;
|
|
11
11
|
size?: 'sm' | 'md' | 'lg';
|
|
12
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Numeric input with thousand separator formatting.
|
|
15
|
+
*
|
|
16
|
+
* Note: Free-typing is allowed to avoid blocking edits; values are clamped/validated by consumer logic.
|
|
17
|
+
*
|
|
18
|
+
* @property {string} label - Field label.
|
|
19
|
+
* @property {string} [description] - Helper text.
|
|
20
|
+
* @property {number} defaultValue - Initial numeric value.
|
|
21
|
+
* @property {(value: number) => void} onChange - Called with numeric value on change.
|
|
22
|
+
* @property {(values: NumberFormatValues) => boolean} [isAllowed] - Optional additional constraints.
|
|
23
|
+
* @property {import('@mui/material').SxProps} [sx] - Styles applied to Input.
|
|
24
|
+
* @property {'sm'|'md'|'lg'} [size='sm'] - Control size.
|
|
25
|
+
*/
|
|
13
26
|
declare const NumberInput: React.FC<NumberInputProps>;
|
|
14
27
|
export default NumberInput;
|
|
@@ -10,5 +10,16 @@ type ItemsPerPageFilterProps = {
|
|
|
10
10
|
sx?: SxProps;
|
|
11
11
|
onChange: (_: any, value: number | null) => void;
|
|
12
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Small select for “items per page” pagination control.
|
|
15
|
+
*
|
|
16
|
+
* @property {object} labels - Custom labels (expects itemsPerPage).
|
|
17
|
+
* @property {number} value - Current selected items per page.
|
|
18
|
+
* @property {number[]} options - Available values.
|
|
19
|
+
* @property {'sm'|'md'|'lg'} [size='sm'] - Control size.
|
|
20
|
+
* @property {boolean} [disabled=false] - Disable control.
|
|
21
|
+
* @property {import('@mui/material').SxProps} [sx] - Style overrides.
|
|
22
|
+
* @property {(_: any, value: number | null) => void} onChange - Joy Select onChange signature.
|
|
23
|
+
*/
|
|
13
24
|
declare const ItemsPerPageFilter: React.FC<ItemsPerPageFilterProps>;
|
|
14
25
|
export default ItemsPerPageFilter;
|
|
@@ -6,5 +6,13 @@ type MarketSelectionProps = {
|
|
|
6
6
|
valuesMap: Record<string, string>;
|
|
7
7
|
onChange: (values: string[]) => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Market selection control with grouped checkboxes and “show all” behavior.
|
|
11
|
+
*
|
|
12
|
+
* @property {object} labels - Custom labels (expects marketSelection, marketSelectionDescription, showAll, etc.).
|
|
13
|
+
* @property {string[]} values - Currently selected market keys.
|
|
14
|
+
* @property {Record<string,string>} valuesMap - Map from market key to readable label.
|
|
15
|
+
* @property {(values: string[]) => void} onChange - Called when the selected markets change.
|
|
16
|
+
*/
|
|
9
17
|
declare const MarketSelection: React.FC<MarketSelectionProps>;
|
|
10
18
|
export default MarketSelection;
|
|
@@ -5,5 +5,11 @@ type MatchProps = {
|
|
|
5
5
|
match: MatchBasicModel;
|
|
6
6
|
timeFormat: string;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Compact match item with time and team logos.
|
|
10
|
+
*
|
|
11
|
+
* @property {MatchBasicModel} match - Match model containing teams and kickoff time.
|
|
12
|
+
* @property {string} timeFormat - Dayjs format string for kickoff display.
|
|
13
|
+
*/
|
|
8
14
|
declare const Match: React.FC<MatchProps>;
|
|
9
15
|
export default Match;
|
|
@@ -6,5 +6,12 @@ type RelatedProps = {
|
|
|
6
6
|
related: RelatedEntity[];
|
|
7
7
|
onChange: (related: RelatedEntity[]) => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Related entities control combining games and templates pickers.
|
|
11
|
+
*
|
|
12
|
+
* @property {object} labels - Custom labels with games/templates keys.
|
|
13
|
+
* @property {RelatedEntity[]} related - Current related entities.
|
|
14
|
+
* @property {(related: RelatedEntity[]) => void} onChange - Emits merged related list.
|
|
15
|
+
*/
|
|
9
16
|
declare const Related: React.FC<RelatedProps>;
|
|
10
17
|
export default Related;
|
|
@@ -13,5 +13,12 @@ type RelatedRelationshipProps = {
|
|
|
13
13
|
relatedEntitiesErrorMessage: string;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Manage related entities with typed relationships and entity-type aware search.
|
|
18
|
+
*
|
|
19
|
+
* @property {RelatedRelationshipRequest[]} defaultValue - Initial related relationships list.
|
|
20
|
+
* @property {(entities: RelatedRelationshipRequest[]) => void} onChange - Emits updated related list.
|
|
21
|
+
* @property {{type:string, delete:string, relationship:string, entity:string, add:string, relatedEntitiesErrorMessage:string}} labels - I18n labels.
|
|
22
|
+
*/
|
|
16
23
|
declare const RelatedRelationship: React.FC<RelatedRelationshipProps>;
|
|
17
24
|
export default RelatedRelationship;
|
|
@@ -9,5 +9,16 @@ type RichTextProps = {
|
|
|
9
9
|
description?: string;
|
|
10
10
|
onChange: (value: string) => void;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Rich text editor built on ReactQuill with optional label and helper text.
|
|
14
|
+
*
|
|
15
|
+
* @property {string} label - Field label (used for specific properties like description/explanation).
|
|
16
|
+
* @property {string} placeholder - Placeholder for the editor.
|
|
17
|
+
* @property {string} [value] - Controlled value (falls back to defaultValue if not provided).
|
|
18
|
+
* @property {string} defaultValue - Initial HTML value.
|
|
19
|
+
* @property {'description'|'rules'|'ad_content'|'mini_games_explanation'} property - Target field behavior.
|
|
20
|
+
* @property {string} [description] - Helper text shown for specific properties.
|
|
21
|
+
* @property {(value: string) => void} onChange - Called with HTML string on user edits.
|
|
22
|
+
*/
|
|
12
23
|
declare const RichText: React.FC<RichTextProps>;
|
|
13
24
|
export default RichText;
|
|
@@ -6,5 +6,13 @@ type ScheduleProps = {
|
|
|
6
6
|
entityType: string;
|
|
7
7
|
readOnly?: boolean;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Scheduler list with create/update actions for entity status changes.
|
|
11
|
+
*
|
|
12
|
+
* @property {object} labels - Custom labels used for fields, buttons and messages.
|
|
13
|
+
* @property {string} entityId - Target entity id.
|
|
14
|
+
* @property {string} entityType - Target entity type.
|
|
15
|
+
* @property {boolean} [readOnly] - Disable edit controls.
|
|
16
|
+
*/
|
|
9
17
|
declare const Schedule: React.FC<ScheduleProps>;
|
|
10
18
|
export default Schedule;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Simple select component for choosing one string value.
|
|
5
|
+
*
|
|
6
|
+
* @property {string} label - Field label.
|
|
7
|
+
* @property {string} defaultValue - Initial selected value.
|
|
8
|
+
* @property {string[]} values - List of options to pick from.
|
|
9
|
+
* @property {string} description - Helper text shown below the field.
|
|
10
|
+
* @property {(value: string) => void} onChange - Called with the selected value.
|
|
11
|
+
*/
|
|
3
12
|
type BasicSelectProps = {
|
|
4
13
|
label: string;
|
|
5
14
|
defaultValue: string;
|
|
@@ -7,5 +16,9 @@ type BasicSelectProps = {
|
|
|
7
16
|
description: string;
|
|
8
17
|
onChange: (value: string) => void;
|
|
9
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* Render a labeled select with provided options.
|
|
21
|
+
* @param {{ label: string; defaultValue: string; values: string[]; description: string; onChange: (value: string) => void }} props
|
|
22
|
+
*/
|
|
10
23
|
declare const BasicSelect: React.FC<BasicSelectProps>;
|
|
11
24
|
export default BasicSelect;
|
|
@@ -7,5 +7,14 @@ type CustomSelectProps = {
|
|
|
7
7
|
required: boolean;
|
|
8
8
|
onChange: (value: string) => void;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Select with avatar/icon and clear button, suitable for selecting an entity (competition, etc.).
|
|
12
|
+
*
|
|
13
|
+
* @property {string} label - Field label.
|
|
14
|
+
* @property {string} defaultValue - Currently selected id.
|
|
15
|
+
* @property {any[]} options - Options array; each option should have `id`, `name`, and optional `assets.logo`.
|
|
16
|
+
* @property {boolean} required - Whether the field is required.
|
|
17
|
+
* @property {(value: string) => void} onChange - Handler when selection changes.
|
|
18
|
+
*/
|
|
10
19
|
declare const CustomSelect: React.FC<CustomSelectProps>;
|
|
11
20
|
export default CustomSelect;
|
|
@@ -5,5 +5,12 @@ type AdvancedProfileSearchSelectProps = {
|
|
|
5
5
|
ids: string[];
|
|
6
6
|
onChange: (ids: string[] | null) => void;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Multi-select profile search with toggleable search by name or id, with avatars.
|
|
10
|
+
*
|
|
11
|
+
* @property {object} labels - Custom labels (excludedProfilesPlaceholder, searchProfilesErrorMessage, searchByName, searchById).
|
|
12
|
+
* @property {string[]} ids - Initial selected profile ids.
|
|
13
|
+
* @property {(ids: string[] | null) => void} onChange - Emits selected ids or null when empty.
|
|
14
|
+
*/
|
|
8
15
|
declare const AdvancedProfileSearchSelect: React.FC<AdvancedProfileSearchSelectProps>;
|
|
9
16
|
export default AdvancedProfileSearchSelect;
|
|
@@ -7,5 +7,14 @@ type CompetitionSearchSelectProps = {
|
|
|
7
7
|
required: boolean;
|
|
8
8
|
onChange: (ids: string[]) => void;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Single-select competition search with debounce and Joy Autocomplete.
|
|
12
|
+
*
|
|
13
|
+
* @property {object} labels - Custom labels (competitionsSelectionPlaceholder, searchCompetitionsErrorMessage).
|
|
14
|
+
* @property {string} label - Field label displayed above the control.
|
|
15
|
+
* @property {string[]} ids - Initial selected competition id array (first taken).
|
|
16
|
+
* @property {boolean} required - Whether selection is required.
|
|
17
|
+
* @property {(ids: string[]) => void} onChange - Emits a single selected id array or empty array.
|
|
18
|
+
*/
|
|
10
19
|
declare const CompetitionSearchSelect: React.FC<CompetitionSearchSelectProps>;
|
|
11
20
|
export default CompetitionSearchSelect;
|
|
@@ -6,5 +6,13 @@ type CompetitionsSearchSelectProps = {
|
|
|
6
6
|
scope?: string[];
|
|
7
7
|
onChange: (ids: string[] | null) => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Multi-select competitions search with optional scope filter.
|
|
11
|
+
*
|
|
12
|
+
* @property {object} labels - Custom labels (competitionsSelectionPlaceholder, searchCompetitionsErrorMessage).
|
|
13
|
+
* @property {string[]} ids - Initial selected competition ids.
|
|
14
|
+
* @property {string[]} [scope] - Optional competitions scope to limit results.
|
|
15
|
+
* @property {(ids: string[] | null) => void} onChange - Emits selected ids or null when empty.
|
|
16
|
+
*/
|
|
9
17
|
declare const CompetitionsSearchSelect: React.FC<CompetitionsSearchSelectProps>;
|
|
10
18
|
export default CompetitionsSearchSelect;
|
|
@@ -9,5 +9,14 @@ type ContextSelectFilterProps = {
|
|
|
9
9
|
setFilters: Dispatch<SetStateAction<any>>;
|
|
10
10
|
handleResetData: () => void;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Search filter for football context entities (competitions, teams, players) with grouping.
|
|
14
|
+
*
|
|
15
|
+
* @property {object} labels - Custom labels (contextEntityTag, typeContextTagNamePlaceholder).
|
|
16
|
+
* @property {GroupSelectOption[]} options - Currently selected options.
|
|
17
|
+
* @property {Dispatch<SetStateAction<MultiValue<GroupSelectOption>>>} setOptions - Setter for selected options.
|
|
18
|
+
* @property {Dispatch<SetStateAction<any>>} setFilters - Updates upstream filters with selected entityIds.
|
|
19
|
+
* @property {() => void} handleResetData - Callback to reset data when selection changes.
|
|
20
|
+
*/
|
|
12
21
|
declare const ContextSelectFilter: React.FC<ContextSelectFilterProps>;
|
|
13
22
|
export default ContextSelectFilter;
|
|
@@ -5,5 +5,12 @@ type ProfileSearchSelectProps = {
|
|
|
5
5
|
ids: string[];
|
|
6
6
|
onChange: (ids: string[] | null) => void;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Multi-select profiles search with debounce and avatar chip tags.
|
|
10
|
+
*
|
|
11
|
+
* @property {object} labels - Custom labels (expects excludedProfilesPlaceholder, searchProfilesErrorMessage).
|
|
12
|
+
* @property {string[]} ids - Initial selected profile ids.
|
|
13
|
+
* @property {(ids: string[] | null) => void} onChange - Emits selected ids or null when empty.
|
|
14
|
+
*/
|
|
8
15
|
declare const ProfileSearchSelect: React.FC<ProfileSearchSelectProps>;
|
|
9
16
|
export default ProfileSearchSelect;
|
|
@@ -6,5 +6,13 @@ type TeamsSearchSelectProps = {
|
|
|
6
6
|
scope: string[] | undefined;
|
|
7
7
|
onChange: (ids: string[] | null) => void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Multi-select teams search with optional competitions scope.
|
|
11
|
+
*
|
|
12
|
+
* @property {object} labels - Custom labels (teamsSelectionPlaceholder, searchTeamsErrorMessage).
|
|
13
|
+
* @property {string[]} ids - Initial selected team ids.
|
|
14
|
+
* @property {string[]} [scope] - Optional competitions scope.
|
|
15
|
+
* @property {(ids: string[] | null) => void} onChange - Emits selected ids or null when empty.
|
|
16
|
+
*/
|
|
9
17
|
declare const TeamsSearchSelect: React.FC<TeamsSearchSelectProps>;
|
|
10
18
|
export default TeamsSearchSelect;
|
|
@@ -3,5 +3,10 @@ import { default as React } from 'react';
|
|
|
3
3
|
type SpinnerProps = {
|
|
4
4
|
my: number;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Centered loading spinner that fills its container.
|
|
8
|
+
*
|
|
9
|
+
* @property {number} my - Vertical margin (theme spacing units) applied to the container.
|
|
10
|
+
*/
|
|
6
11
|
declare const Spinner: React.FC<SpinnerProps>;
|
|
7
12
|
export default Spinner;
|
|
@@ -15,5 +15,17 @@ type BooleanSwitchProps = {
|
|
|
15
15
|
};
|
|
16
16
|
onChange: (checked: boolean) => void;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Labeled boolean toggle with optional description.
|
|
20
|
+
*
|
|
21
|
+
* @property {string} label - Label displayed next to the switch.
|
|
22
|
+
* @property {'start'|'end'} [labelPosition='start'] - Where to place the switch relative to the label.
|
|
23
|
+
* @property {boolean} defaultValue - Initial checked state.
|
|
24
|
+
* @property {string} description - Optional helper text shown under the label.
|
|
25
|
+
* @property {import('@mui/joy').ColorPaletteProp} descriptionColor - Color of the helper text.
|
|
26
|
+
* @property {boolean} disabled - Disables interaction.
|
|
27
|
+
* @property {{ switch?: import('@mui/material').SxProps; container?: import('@mui/material').SxProps }} [sx] - Style overrides.
|
|
28
|
+
* @property {(checked: boolean) => void} onChange - Called when the switch is toggled.
|
|
29
|
+
*/
|
|
18
30
|
declare const BooleanSwitch: React.FC<BooleanSwitchProps>;
|
|
19
31
|
export default BooleanSwitch;
|
|
@@ -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
|
@@ -16,7 +16,7 @@ declare const _default: {
|
|
|
16
16
|
} & {
|
|
17
17
|
children?: import('react').ReactNode | undefined;
|
|
18
18
|
}>;
|
|
19
|
-
useComponentContext: () =>
|
|
19
|
+
useComponentContext: () => import('./constants/components').ComponentsMap;
|
|
20
20
|
useAPIContext: () => {
|
|
21
21
|
sdk: import('fansunited-sdk-esm').FansUnitedSDKModel;
|
|
22
22
|
https: import('./services/https/HttpsService').default;
|