@instincthub/react-ui 0.0.5 → 0.0.6
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 +4 -3
- package/dist/src/assets/css/bootstrap/display.css +21 -0
- package/dist/src/assets/css/bootstrap/readme/display.md +20 -0
- package/dist/src/assets/css/forms/input-fields.css +3 -2
- package/dist/src/assets/css/main.css +3 -3
- package/dist/src/assets/css/modals/modal-updates.css +6 -3
- package/dist/src/assets/css/modals/modal.css +1 -1
- package/dist/src/assets/css/navbar/sidenav.css +8 -0
- package/dist/src/assets/css/ui/content-viewer.css +1 -0
- package/dist/src/assets/css/ui/create-button.css +140 -0
- package/dist/src/assets/css/ui/pagination.css +359 -0
- package/dist/src/assets/css/ui/ui-index.css +2 -0
- package/dist/src/components/auth/LoginForm.js +1 -1
- package/dist/src/components/auth/ReactClientProviders.js +1 -1
- package/dist/src/components/forms/CheckBoxes.js +2 -0
- package/dist/src/components/forms/CheckBoxes.js.map +1 -0
- package/dist/src/components/forms/ChipsInput.js +1 -1
- package/dist/src/components/forms/FileField.js +2 -0
- package/dist/src/components/forms/FileField.js.map +1 -0
- package/dist/src/components/forms/FilterArray.js +1 -1
- package/dist/src/components/forms/FilterObjects.js +1 -1
- package/dist/src/components/forms/SearchField.js +1 -1
- package/dist/src/components/forms/SearchObjectsFromDB.js +1 -1
- package/dist/src/components/forms/TextArea.js +1 -1
- package/dist/src/components/forms/TextArea.js.map +1 -1
- package/dist/src/components/lib/auth/actions.js +1 -1
- package/dist/src/components/lib/auth/dbRequestst.js +1 -1
- package/dist/src/components/lib/auth/dbRequestst.js.map +1 -1
- package/dist/src/components/lib/convertArrayToObject.js +2 -0
- package/dist/src/components/lib/convertArrayToObject.js.map +1 -0
- package/dist/src/components/lib/createSubscription.js +2 -0
- package/dist/src/components/lib/createSubscription.js.map +1 -0
- package/dist/src/components/lib/elementIsVisibleInViewport.js +2 -0
- package/dist/src/components/lib/elementIsVisibleInViewport.js.map +1 -0
- package/dist/src/components/lib/fileToBase64.js +2 -0
- package/dist/src/components/lib/fileToBase64.js.map +1 -0
- package/dist/src/components/lib/formError.js +2 -0
- package/dist/src/components/lib/formError.js.map +1 -0
- package/dist/src/components/lib/getPriceObjects.js +2 -0
- package/dist/src/components/lib/getPriceObjects.js.map +1 -0
- package/dist/src/components/lib/helpFunction.js +1 -1
- package/dist/src/components/lib/helpFunction.js.map +1 -1
- package/dist/src/components/lib/index.js +1 -1
- package/dist/src/components/lib/index.js.map +1 -1
- package/dist/src/components/lib/modals/modals.js +1 -1
- package/dist/src/components/lib/modals/modals.js.map +1 -1
- package/dist/src/components/lib/paystack.js.map +1 -1
- package/dist/src/components/lib/permissions.js +1 -1
- package/dist/src/components/lib/permissions.js.map +1 -1
- package/dist/src/components/lib/redux/index.js +1 -1
- package/dist/src/components/lib/redux/rootReducer.js +1 -1
- package/dist/src/components/lib/redux/rootReducer.js.map +1 -1
- package/dist/src/components/lib/redux/slices/authSlice/selectors.js +2 -0
- package/dist/src/components/lib/redux/slices/authSlice/selectors.js.map +1 -0
- package/dist/src/components/lib/redux/slices/generics/arraySlice.js +2 -0
- package/dist/src/components/lib/redux/slices/generics/arraySlice.js.map +1 -0
- package/dist/src/components/lib/redux/slices/generics/objectSlice.js +2 -0
- package/dist/src/components/lib/redux/slices/generics/objectSlice.js.map +1 -0
- package/dist/src/components/lib/redux/slices/generics/selectors.js +2 -0
- package/dist/src/components/lib/redux/slices/generics/selectors.js.map +1 -0
- package/dist/src/components/navbar/ChannelListAvatar.js +1 -1
- package/dist/src/components/navbar/SideNavbar.js +1 -1
- package/dist/src/components/status/DeleteConfirmationModal.js +1 -1
- package/dist/src/components/status/ModalExamples.js +1 -1
- package/dist/src/components/status/MultiPurposeModal.js +1 -1
- package/dist/src/components/status/ReactTimeTracker.js +1 -1
- package/dist/src/components/ui/ComponentLists.js +2 -0
- package/dist/src/components/ui/ComponentLists.js.map +1 -0
- package/dist/src/components/ui/create-button/CreateButton.js +2 -0
- package/dist/src/components/ui/create-button/CreateButton.js.map +1 -0
- package/dist/src/components/ui/create-button/CreateButtonExample.js +2 -0
- package/dist/src/components/ui/create-button/CreateButtonExample.js.map +1 -0
- package/dist/src/components/ui/editor/CustomTextEditor.js +1 -1
- package/dist/src/components/ui/pagination/Pagination.js +2 -0
- package/dist/src/components/ui/pagination/Pagination.js.map +1 -0
- package/dist/src/components/ui/pagination/PaginationDemo.js +2 -0
- package/dist/src/components/ui/pagination/PaginationDemo.js.map +1 -0
- package/dist/src/components/ui/tables/IHubTableServer.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/types/components/auth/LoginForm.d.ts +3 -1
- package/dist/src/types/components/auth/index.d.ts +5 -0
- package/dist/src/types/components/forms/CheckBoxes.d.ts +33 -6
- package/dist/src/types/components/forms/CheckboxesField.d.ts +24 -1
- package/dist/src/types/components/forms/FileField.d.ts +8 -4
- package/dist/src/types/components/forms/FilterArray.d.ts +12 -2
- package/dist/src/types/components/forms/FilterObjects.d.ts +11 -3
- package/dist/src/types/components/forms/SearchField.d.ts +16 -0
- package/dist/src/types/components/forms/TextArea.d.ts +12 -0
- package/dist/src/types/components/forms/index.d.ts +49 -0
- package/dist/src/types/components/lib/auth/dbRequestst.d.ts +2 -0
- package/dist/src/types/components/lib/convertArrayToObject.d.ts +30 -0
- package/dist/src/types/components/lib/helpFunction.d.ts +4 -0
- package/dist/src/types/components/lib/index.d.ts +6 -6
- package/dist/src/types/components/lib/modals/modals.d.ts +2 -1
- package/dist/src/types/components/lib/permissions.d.ts +12 -1
- package/dist/src/types/components/lib/redux/rootReducer.d.ts +2 -0
- package/dist/src/types/components/lib/redux/slices/generics/arraySlice.d.ts +20 -0
- package/dist/src/types/components/lib/redux/slices/generics/index.d.ts +2 -0
- package/dist/src/types/components/lib/redux/slices/generics/objectSlice.d.ts +12 -0
- package/dist/src/types/components/lib/redux/slices/generics/selectors.d.ts +3 -0
- package/dist/src/types/components/lib/redux/slices/index.d.ts +2 -0
- package/dist/src/types/components/lib/redux/slices/selectors.d.ts +5 -0
- package/dist/src/types/components/lib/redux/store.d.ts +6 -0
- package/dist/src/types/components/navbar/index.d.ts +5 -0
- package/dist/src/types/components/status/MultiPurposeModal.d.ts +27 -10
- package/dist/src/types/components/status/index.d.ts +11 -0
- package/dist/src/types/components/tabs/index.d.ts +3 -0
- package/dist/src/types/components/theme/index.d.ts +6 -0
- package/dist/src/types/components/ui/create-button/CreateButton.d.ts +54 -0
- package/dist/src/types/components/ui/create-button/CreateButtonExample.d.ts +3 -0
- package/dist/src/types/components/ui/editor/CustomTextEditor.d.ts +7 -3
- package/dist/src/types/components/ui/index.d.ts +16 -0
- package/dist/src/types/components/ui/pagination/Pagination.d.ts +8 -0
- package/dist/src/types/components/ui/pagination/PaginationDemo.d.ts +3 -0
- package/dist/src/types/index.d.ts +9 -3
- package/dist/src/types/types/index.d.ts +37 -5
- package/dist/src/types/types/navbar.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -2
- package/dist/src/components/ComponentLists.js +0 -2
- package/dist/src/components/ComponentLists.js.map +0 -1
- /package/dist/src/types/components/{ComponentLists.d.ts → ui/ComponentLists.d.ts} +0 -0
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as ActionDropdown}from"./components/forms/ActionDropdown.js";export{default as AnimatedBox}from"./components/forms/AnimatedBox.js";export{default as PasswordField}from"./components/forms/PasswordField.js";export{default as DateInput}from"./components/forms/DateInput.js";export{default as DateTimeInput}from"./components/forms/DateTimeInput.js";export{default as DropFile}from"./components/forms/DropFile.js";export{default as EmailList}from"./components/forms/EmailList.js";export{default as FilterArray}from"./components/forms/FilterArray.js";export{default as FilterBy}from"./components/forms/FilterBy.js";export{default as FilterObjects}from"./components/forms/FilterObjects.js";export{default as FormError}from"./components/forms/FormError.js";export{default as HandleError}from"./components/forms/HandleError.js";export{default as Logout}from"./components/forms/Logout.js";export{default as MessageDisplay}from"./components/forms/MessageDisplay.js";export{default as MultipleEmail}from"./components/forms/MultipleEmail.js";export{PageLoading}from"./components/forms/PageLoading.js";export{default as IsUsernameEmailTaken}from"./components/auth/IsUsernameEmailTaken.js";export{default as ClientDetector}from"./components/auth/ClientDetector.js";export{default as PasswordsMatch}from"./components/auth/PasswordsMatch.js";export{default as FromInstinctHub}from"./components/auth/FromInstinctHub.js";export{default as LoginForm}from"./components/auth/LoginForm.js";export{default as ReactClientProviders}from"./components/auth/ReactClientProviders.js";export{default as PhoneNumberInput}from"./components/forms/PhoneNumberInput.js";export{default as RadioField}from"./components/forms/RadioField.js";export{default as RadioSimple}from"./components/forms/RadioSimple.js";export{default as ReactTimeAgo}from"./components/forms/ReactTimeAgo.js";export{default as ReadTermsAndCondition}from"./components/forms/ReadTermsAndCondition.js";export{default as SearchField}from"./components/forms/SearchField.js";export{default as SearchFieldDB}from"./components/forms/SearchFieldDB.js";export{default as StepProgressBar}from"./components/forms/StepProgressBar.js";export{default as SubmitButton}from"./components/forms/SubmitButton.js";export{default as Tables}from"./components/forms/Tables.js";export{default as TextArea}from"./components/forms/TextArea.js";export{default as TextField}from"./components/forms/TextField.js";export{default as Tooltip}from"./components/forms/Tooltip.js";export{default as UnsplashRandomImage}from"./components/forms/UnsplashRandomImage.js";export{default as DownloadAsExcel}from"./components/forms/DownloadAsExcel.js";export{default as THeadSortBtn}from"./components/forms/THeadSortBtn.js";export{default as THeadSortList}from"./components/forms/THeadSortList.js";export{default as TBodyNoData}from"./components/forms/TBodyNoData.js";export{default as ActionCallbackDropdown}from"./components/forms/ActionCallbackDropdown.js";export{default as InputNumber}from"./components/forms/InputNumber.js";export{default as InputText}from"./components/forms/InputText.js";export{default as InputTextarea}from"./components/forms/InputTextarea.js";export{default as SearchObjectsFromDB}from"./components/forms/SearchObjectsFromDB.js";export{default as ToggleButton}from"./components/forms/ToggleButton.js";export{default as
|
|
1
|
+
export{default as ActionDropdown}from"./components/forms/ActionDropdown.js";export{default as AnimatedBox}from"./components/forms/AnimatedBox.js";export{default as PasswordField}from"./components/forms/PasswordField.js";export{default as DateInput}from"./components/forms/DateInput.js";export{default as DateTimeInput}from"./components/forms/DateTimeInput.js";export{default as DropFile}from"./components/forms/DropFile.js";export{default as EmailList}from"./components/forms/EmailList.js";export{default as FilterArray}from"./components/forms/FilterArray.js";export{default as FilterBy}from"./components/forms/FilterBy.js";export{default as FilterObjects}from"./components/forms/FilterObjects.js";export{default as FormError}from"./components/forms/FormError.js";export{default as HandleError}from"./components/forms/HandleError.js";export{default as Logout}from"./components/forms/Logout.js";export{default as MessageDisplay}from"./components/forms/MessageDisplay.js";export{default as MultipleEmail}from"./components/forms/MultipleEmail.js";export{PageLoading}from"./components/forms/PageLoading.js";export{default as IsUsernameEmailTaken}from"./components/auth/IsUsernameEmailTaken.js";export{default as ClientDetector}from"./components/auth/ClientDetector.js";export{default as PasswordsMatch}from"./components/auth/PasswordsMatch.js";export{default as FromInstinctHub}from"./components/auth/FromInstinctHub.js";export{default as LoginForm}from"./components/auth/LoginForm.js";export{default as ReactClientProviders}from"./components/auth/ReactClientProviders.js";export{default as PhoneNumberInput}from"./components/forms/PhoneNumberInput.js";export{default as RadioField}from"./components/forms/RadioField.js";export{default as RadioSimple}from"./components/forms/RadioSimple.js";export{default as ReactTimeAgo}from"./components/forms/ReactTimeAgo.js";export{default as ReadTermsAndCondition}from"./components/forms/ReadTermsAndCondition.js";export{default as SearchField}from"./components/forms/SearchField.js";export{default as SearchFieldDB}from"./components/forms/SearchFieldDB.js";export{default as StepProgressBar}from"./components/forms/StepProgressBar.js";export{default as SubmitButton}from"./components/forms/SubmitButton.js";export{default as Tables}from"./components/forms/Tables.js";export{default as TextArea}from"./components/forms/TextArea.js";export{default as TextField}from"./components/forms/TextField.js";export{default as Tooltip}from"./components/forms/Tooltip.js";export{default as UnsplashRandomImage}from"./components/forms/UnsplashRandomImage.js";export{default as DownloadAsExcel}from"./components/forms/DownloadAsExcel.js";export{default as THeadSortBtn}from"./components/forms/THeadSortBtn.js";export{default as THeadSortList}from"./components/forms/THeadSortList.js";export{default as TBodyNoData}from"./components/forms/TBodyNoData.js";export{default as ActionCallbackDropdown}from"./components/forms/ActionCallbackDropdown.js";export{default as InputNumber}from"./components/forms/InputNumber.js";export{default as InputText}from"./components/forms/InputText.js";export{default as InputTextarea}from"./components/forms/InputTextarea.js";export{default as SearchObjectsFromDB}from"./components/forms/SearchObjectsFromDB.js";export{default as ToggleButton}from"./components/forms/ToggleButton.js";export{default as CheckBoxesField}from"./components/forms/CheckboxesField.js";export{default as CheckBoxes}from"./components/forms/CheckBoxes.js";export{default as DateInputPicker}from"./components/forms/DateInputPicker.js";export{default as ChipsInput}from"./components/forms/ChipsInput.js";export{default as RadioButton}from"./components/forms/radio-btn/RadioButton.js";export{default as RadioGroup}from"./components/forms/radio-btn/RadioGroup.js";export{default as InputAmount}from"./components/forms/InputAmount.js";export{default as FileField}from"./components/forms/FileField.js";export{default as ChannelListAvatar}from"./components/navbar/ChannelListAvatar.js";export{default as MenuDropdown}from"./components/navbar/MenuDropdown.js";export{default as Breadcrumb}from"./components/navbar/Breadcrumb.js";export{default as ResponsiveNavbar}from"./components/navbar/ResponsiveNavbar.js";export{default as SideNavbar}from"./components/navbar/SideNavbar.js";export{default as FileUploader}from"./components/forms/uploads/FileUploader.js";export{default as IhubFileUploader}from"./components/forms/uploads/IhubFileUploader.js";export{default as CustomTextEditor}from"./components/ui/editor/CustomTextEditor.js";export{default as ContentViewer}from"./components/ui/viewer/ContentViewer.js";export{default as ContentViewOrEdit}from"./components/ui/viewer/ContentViewOrEdit.js";export{default as CodeDisplay}from"./components/ui/viewer/CodeDisplay.js";export{IHubTable}from"./components/ui/tables/IHubTable.js";export{IHubTableServer}from"./components/ui/tables/IHubTableServer.js";export{default as OrDivider}from"./components/ui/OrDivider.js";export{default as RandomGradientImage}from"./components/ui/images/RandomGradientImage.js";export{default as ComponentLists}from"./components/ui/ComponentLists.js";export{default as Action}from"./components/ui/Action.js";export{default as Dialog}from"./components/ui/dialogs/Dialog.js";export{default as Badge}from"./components/ui/Badge.js";export{default as Dropdown}from"./components/ui/Dropdown.js";export{default as ColorPicker}from"./components/ui/ColorPicker.js";export{default as Pagination}from"./components/ui/pagination/Pagination.js";export{default as PaginationDemo}from"./components/ui/pagination/PaginationDemo.js";export{default as CreateButton}from"./components/ui/create-button/CreateButton.js";export{default as CreateButtonExample}from"./components/ui/create-button/CreateButtonExample.js";export{default as Card}from"./components/ui/cards/Card.js";export{default as CardList}from"./components/ui/cards/CardList.js";export{default as CardGrid}from"./components/ui/cards/CardGrid.js";export{default as FeatureCard}from"./components/ui/cards/FeatureCard.js";export{default as HorizontalCard}from"./components/ui/cards/HorizontalCard.js";export{default as MediaCard}from"./components/ui/cards/MediaCard.js";export{default as PricingCard}from"./components/ui/cards/PricingCard.js";export{default as ProfileCard}from"./components/ui/cards/ProfileCard.js";export{default as InstinctHubChart}from"./components/ui/charts/InstinctHubChart.js";export{default as InstinctHubChartDashboard}from"./components/ui/charts/InstinctHubChartDashboard.js";export{default as ChartConfigurator}from"./components/ui/charts/ChartConfigurator.js";export{default as ChangeStyleVariable}from"./components/theme/ChangeStyleVariable.js";export{default as DarkModeProvider}from"./components/theme/DarkModeProvider.js";export{default as LoadingAnimate}from"./components/theme/LoadingAnimate.js";export{default as SessionProviders}from"./components/theme/SessionProviders.js";export{default as SessionExpiresLogout}from"./components/theme/signout/SessionExpiresLogout.js";export{default as SignOutSession}from"./components/theme/signout/SignOutSession.js";export{default as ReactTimeTracker,default as TimeTracker}from"./components/status/ReactTimeTracker.js";export{default as SessionHandleProvider}from"./components/status/SessionHandleProvider.js";export{default as Error500}from"./components/status/Error500.js";export{default as ErrorState}from"./components/status/ErrorState.js";export{default as DeleteConfirmationModal}from"./components/status/DeleteConfirmationModal.js";export{default as CopyToClipboard}from"./components/status/CopyToClipBoard.js";export{default as MultiPurposeModal}from"./components/status/MultiPurposeModal.js";export{default as ModalExamples}from"./components/status/ModalExamples.js";export{default as NotFound}from"./components/status/NotFound.js";export{default as Unauthorized}from"./components/status/Unauthorized.js";export{default as Tabs}from"./components/tabs/Tabs.js";export{default as VerticalTabs}from"./components/tabs/VerticalTabs.js";export{default as TabContent}from"./components/tabs/TabContent.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -22,9 +22,11 @@ import { LoginFormPropsType } from "../../types";
|
|
|
22
22
|
* @property {string} endpointPath - The endpoint path for the LoginForm component
|
|
23
23
|
* @property {string} verificationPath - The verification path for the LoginForm component
|
|
24
24
|
* @property {string} redirectPath - The redirect path for the LoginForm component
|
|
25
|
+
* @property {boolean} hideResetPassword - Whether to hide the reset password option
|
|
26
|
+
* @property {boolean} hideSignup - Whether to hide the signup option
|
|
25
27
|
* @property {string} type - The type for the LoginForm component | sis, skills, lms, crm, ecommerce, inventory, hr.
|
|
26
28
|
*
|
|
27
29
|
* @returns {React.ReactElement} The LoginForm component
|
|
28
30
|
*/
|
|
29
|
-
declare const LoginForm: ({ params, searchParams, endpointPath, verificationPath, redirectPath, type, }: LoginFormPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare const LoginForm: ({ params, searchParams, endpointPath, verificationPath, redirectPath, hideResetPassword, hideSignup, type, }: LoginFormPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
30
32
|
export default LoginForm;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export { default as ClientDetector } from "./ClientDetector";
|
|
2
2
|
export { default as ClientOnly } from "./ClientOnly";
|
|
3
|
+
export { default as IsUsernameEmailTaken } from "./IsUsernameEmailTaken";
|
|
4
|
+
export { default as PasswordsMatch } from "./PasswordsMatch";
|
|
5
|
+
export { default as FromInstinctHub } from "./FromInstinctHub";
|
|
6
|
+
export { default as LoginForm } from "./LoginForm";
|
|
7
|
+
export { default as ReactClientProviders } from "./ReactClientProviders";
|
|
3
8
|
export { default as useClientSide } from "./useClientSide";
|
|
4
9
|
export { default as useFormattedDate } from "./useFormattedDate";
|
|
5
10
|
export { default as useStableRandom } from "./useStableRandom";
|
|
@@ -1,15 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
interface Option {
|
|
2
3
|
id: string | number;
|
|
3
|
-
title
|
|
4
|
+
title: string;
|
|
4
5
|
status?: boolean;
|
|
5
6
|
[key: string]: any;
|
|
6
7
|
}
|
|
7
8
|
interface CheckBoxesProps {
|
|
8
|
-
objects: Record<string, Option
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
objects: Record<string, Option> | Option[];
|
|
10
|
+
label: string;
|
|
11
|
+
name: string;
|
|
11
12
|
key_name?: string;
|
|
12
|
-
|
|
13
|
+
selected: Option[];
|
|
14
|
+
setSelected: (selected: Option[]) => void | React.Dispatch<React.SetStateAction<Option[]>>;
|
|
13
15
|
}
|
|
14
|
-
|
|
16
|
+
/**
|
|
17
|
+
* CheckBoxes component for rendering multiple checkbox inputs
|
|
18
|
+
* @param {CheckBoxesProps} props - The component props
|
|
19
|
+
* @param {Record<string, Option> | Option[]} props.objects - The objects to display in the checkboxes
|
|
20
|
+
* @param {string} props.label - The label for the checkboxes
|
|
21
|
+
* @param {string} props.name - The name of the checkboxes
|
|
22
|
+
* @param {string} props.key_name - The key name to use for display text (optional, defaults to 'title')
|
|
23
|
+
* @param {(selected: Option[]) => void | React.Dispatch<React.SetStateAction<Option[]>>} props.setSelected - The function to set the selected options
|
|
24
|
+
* @param {(string | number)[]} props.defaultIDs - The default IDs of the checkboxes to be checked
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <CheckBoxes
|
|
29
|
+
* objects={[
|
|
30
|
+
* { id: 1, title: "Option 1" },
|
|
31
|
+
* { id: 2, title: "Option 2" },
|
|
32
|
+
* { id: 3, title: "Option 3" },
|
|
33
|
+
* ]}
|
|
34
|
+
* label="Select Options"
|
|
35
|
+
* name="options"
|
|
36
|
+
* key_name="title"
|
|
37
|
+
* defaultIDs={[1, 2]}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare function CheckBoxes(props: CheckBoxesProps): import("react/jsx-runtime").JSX.Element;
|
|
15
42
|
export default CheckBoxes;
|
|
@@ -9,7 +9,7 @@ interface CheckboxesFieldProps {
|
|
|
9
9
|
name: string;
|
|
10
10
|
label: string;
|
|
11
11
|
key_name?: string;
|
|
12
|
-
options: Record<string, Option
|
|
12
|
+
options: Record<string, Option> | Option[];
|
|
13
13
|
defaultValues?: boolean;
|
|
14
14
|
required?: boolean;
|
|
15
15
|
disabled?: boolean;
|
|
@@ -21,6 +21,26 @@ interface CheckboxesFieldProps {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* A reusable checkbox group component using controlled components pattern
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <CheckboxesField
|
|
27
|
+
* name="selectName"
|
|
28
|
+
* label="Select Label"
|
|
29
|
+
* key_name="id"
|
|
30
|
+
* options={[
|
|
31
|
+
* { id: 1, title: "Option 1" },
|
|
32
|
+
* { id: 2, title: "Option 2" },
|
|
33
|
+
* { id: 3, title: "Option 3" },
|
|
34
|
+
* ]}
|
|
35
|
+
* defaultValues={1}
|
|
36
|
+
* required={true}
|
|
37
|
+
* error="Error message"
|
|
38
|
+
* onChange={setValue}
|
|
39
|
+
* onBlur={handleBlur}
|
|
40
|
+
* fontSize="ihub-fs-sm"
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
24
44
|
* @param name The field name
|
|
25
45
|
* @param label The label for the checkbox group
|
|
26
46
|
* @param key_name The key name of the checkbox group (description, name key, etc)
|
|
@@ -33,6 +53,9 @@ interface CheckboxesFieldProps {
|
|
|
33
53
|
* @param onChange Callback when values change
|
|
34
54
|
* @param onBlur Callback when the field loses focus
|
|
35
55
|
* @param fontSize Font size of the checkbox text
|
|
56
|
+
*
|
|
57
|
+
* @helper
|
|
58
|
+
* const categoriesObject = convertArrayToObject(categories);
|
|
36
59
|
*/
|
|
37
60
|
declare const CheckboxesField: React.FC<CheckboxesFieldProps>;
|
|
38
61
|
export default CheckboxesField;
|
|
@@ -2,11 +2,15 @@ import React from "react";
|
|
|
2
2
|
interface FileFieldProps {
|
|
3
3
|
onChange?: (file: File) => void;
|
|
4
4
|
defaultImageUrl?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
label?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
dataName?: string;
|
|
9
9
|
maxLimit?: number;
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
acceptedTypes?: string;
|
|
13
|
+
helperText?: string;
|
|
10
14
|
}
|
|
11
15
|
declare const FileField: React.FC<FileFieldProps>;
|
|
12
16
|
export default FileField;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface FilterArrayProps {
|
|
3
|
-
options: string[];
|
|
3
|
+
options: string[] | [];
|
|
4
4
|
defaultValue?: string;
|
|
5
5
|
notUpperCase?: boolean;
|
|
6
6
|
name: string;
|
|
@@ -14,6 +14,7 @@ interface FilterArrayProps {
|
|
|
14
14
|
arrayProps?: any[];
|
|
15
15
|
dataName?: string;
|
|
16
16
|
notes?: string | null;
|
|
17
|
+
error?: string;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* FilterArray component
|
|
@@ -22,7 +23,7 @@ interface FilterArrayProps {
|
|
|
22
23
|
* <FilterArray
|
|
23
24
|
* options={["Option 1", "Option 2", "Option 3"]}
|
|
24
25
|
* names="selectName"
|
|
25
|
-
*
|
|
26
|
+
* label="Select Label"
|
|
26
27
|
* />
|
|
27
28
|
* @param {FilterArrayProps} props - The component props
|
|
28
29
|
* @param {string[]} props.options - The options to display in the dropdown
|
|
@@ -31,6 +32,15 @@ interface FilterArrayProps {
|
|
|
31
32
|
* @param {string} props.name - The name of the dropdown
|
|
32
33
|
* @param {string} props.label - The label of the dropdown
|
|
33
34
|
* @param {string} props.notes - The notes of the dropdown
|
|
35
|
+
* @param {(value: string) => void} props.setValue - The callback function to set the selected value
|
|
36
|
+
* @param {(name: string | null, value: string) => void} props.setNameValue - The callback function to set the name and value
|
|
37
|
+
* @param {any[]} props.arrayProps - The array of props to set
|
|
38
|
+
* @param {string} props.dataName - The name of the data
|
|
39
|
+
* @param {string} props.defaultWidth - The default width of the dropdown
|
|
40
|
+
* @param {boolean} props.required - Whether the dropdown is required
|
|
41
|
+
* @param {boolean} props.err - Whether the dropdown has an error
|
|
42
|
+
* @param {(arrayProps: any[], option: string) => void} props.setArrayProps - The callback function to set the array props
|
|
43
|
+
* @param {string} props.error - The error message to display
|
|
34
44
|
* @returns {React.ReactElement} The FilterArray component
|
|
35
45
|
*/
|
|
36
46
|
declare const FilterArray: React.FC<FilterArrayProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FilterObjectsType } from "src/types";
|
|
2
2
|
interface FilterObjectsProps {
|
|
3
|
-
options: FilterObjectsType[];
|
|
3
|
+
options: FilterObjectsType[] | [];
|
|
4
4
|
defaultValue?: FilterObjectsType | string | number;
|
|
5
5
|
name: string;
|
|
6
6
|
label?: string;
|
|
@@ -17,6 +17,7 @@ interface FilterObjectsProps {
|
|
|
17
17
|
setObjects?: (option: FilterObjectsType) => void;
|
|
18
18
|
status?: number;
|
|
19
19
|
upperCases?: boolean;
|
|
20
|
+
error?: string;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* FilterOnject dropdown
|
|
@@ -30,7 +31,7 @@ interface FilterObjectsProps {
|
|
|
30
31
|
* { id: 2, title: "Option 2" },
|
|
31
32
|
* { id: 3, title: "Option 3" },
|
|
32
33
|
* ]}
|
|
33
|
-
*
|
|
34
|
+
* defaultValue={1}
|
|
34
35
|
* name="filterObjects"
|
|
35
36
|
* label="Filter Objects"
|
|
36
37
|
* setValue={setValue}
|
|
@@ -43,14 +44,21 @@ interface FilterObjectsProps {
|
|
|
43
44
|
* ```
|
|
44
45
|
* Props interface for the FilterObjects component
|
|
45
46
|
* @property {FilterObjectsType[]} options - Array of objects to filter
|
|
46
|
-
* @property {string}
|
|
47
|
+
* @property {string} defaultValue - Default value for the dropdown
|
|
47
48
|
* @property {string} name - Name of the input field
|
|
48
49
|
* @property {string} label - Label for the dropdown
|
|
49
50
|
* @property {(option: FilterObjectsType) => void} setValue - Callback for setting selected values
|
|
50
51
|
* @property {(option: FilterObjectsType) => void} setObjects - Callback for setting objects
|
|
52
|
+
* @property {string}: defaultWidth - Default width of the dropdown
|
|
53
|
+
* @property {boolean} required - Whether the dropdown is required
|
|
54
|
+
* @property {boolean} err - Whether the dropdown has an error
|
|
55
|
+
* @property {(arrayProps: any[], option: FilterObjectsType) => void} setArrayProps - Callback for setting array props
|
|
51
56
|
* @property {any[]} arrayProps - Array of objects to set
|
|
52
57
|
* @property {string} dataName - Name of the data
|
|
53
58
|
* @property {string} setCookies - Cookie name to set
|
|
59
|
+
* @property {boolean} upperCases - Whether to convert the selected value to uppercase
|
|
60
|
+
* @property {number} status - Status of the field
|
|
61
|
+
* @property {string} error - Error message to display
|
|
54
62
|
*/
|
|
55
63
|
declare const FilterObjects: (props: FilterObjectsProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
64
|
export default FilterObjects;
|
|
@@ -2,6 +2,22 @@ import React from "react";
|
|
|
2
2
|
interface SearchFieldProps {
|
|
3
3
|
labels?: string;
|
|
4
4
|
setSearchValues?: (value: string) => void;
|
|
5
|
+
delay?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
name?: string;
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <SearchField labels="Search" setSearchValues={setSearchValues} />
|
|
14
|
+
* ```
|
|
15
|
+
* @param labels - Label text for the search field
|
|
16
|
+
* @param setSearchValues - Function to update search values
|
|
17
|
+
* @param delay - Debounce delay for search input
|
|
18
|
+
* @param className - Additional class name
|
|
19
|
+
* @param name - Name attribute for the input field
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
6
22
|
declare const SearchField: React.FC<SearchFieldProps>;
|
|
7
23
|
export default SearchField;
|
|
@@ -2,11 +2,17 @@ import React from "react";
|
|
|
2
2
|
interface TextAreaProps {
|
|
3
3
|
name: string;
|
|
4
4
|
label: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
5
7
|
rows?: number;
|
|
6
8
|
defaultValue?: string;
|
|
7
9
|
placeholder?: string;
|
|
10
|
+
clasName?: string;
|
|
8
11
|
maxLength?: number | string;
|
|
9
12
|
note?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
helperText?: string;
|
|
15
|
+
id?: string;
|
|
10
16
|
setValue?: (value: string) => void;
|
|
11
17
|
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
12
18
|
}
|
|
@@ -24,11 +30,17 @@ interface TextAreaProps {
|
|
|
24
30
|
* Props interface for the TextArea component
|
|
25
31
|
* @property {string} name - The name of the TextArea
|
|
26
32
|
* @property {string} label - The label of the TextArea
|
|
33
|
+
* @property {boolean} [required] - Whether the TextArea is required
|
|
34
|
+
* @property {boolean} [disabled] - Whether the TextArea is disabled
|
|
27
35
|
* @property {number} rows - The number of rows of the TextArea
|
|
28
36
|
* @property {string} defaultValue - The default value of the TextArea
|
|
29
37
|
* @property {string} placeholder - The placeholder of the TextArea
|
|
38
|
+
* @property {string} [clasName] - The class name of the TextArea
|
|
30
39
|
* @property {number | string} maxLength - The max length of the TextArea
|
|
31
40
|
* @property {string} note - The note of the TextArea
|
|
41
|
+
* @property {string} error - The error message of the TextArea
|
|
42
|
+
* @property {string} helperText - The helper text of the TextArea
|
|
43
|
+
* @property {string} id - The id of the TextArea
|
|
32
44
|
* @property {(value: string) => void} setValue - The function to set the value of the TextArea
|
|
33
45
|
* @property {(e: React.ChangeEvent<HTMLTextAreaElement>) => void} onChange - The function to handle the change of the TextArea
|
|
34
46
|
* @returns {React.ReactElement} The TextArea component
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export { default as ActionDropdown } from "./ActionDropdown";
|
|
2
|
+
export { default as AnimatedBox } from "./AnimatedBox";
|
|
3
|
+
export { default as PasswordField } from "./PasswordField";
|
|
4
|
+
export { default as DateInput } from "./DateInput";
|
|
5
|
+
export { default as DateTimeInput } from "./DateTimeInput";
|
|
6
|
+
export { default as DropFile } from "./DropFile";
|
|
7
|
+
export { default as EmailList } from "./EmailList";
|
|
8
|
+
export { default as FilterArray } from "./FilterArray";
|
|
9
|
+
export { default as FilterBy } from "./FilterBy";
|
|
10
|
+
export { default as FilterObjects } from "./FilterObjects";
|
|
11
|
+
export { default as FormError } from "./FormError";
|
|
12
|
+
export { default as HandleError } from "./HandleError";
|
|
13
|
+
export { default as Logout } from "./Logout";
|
|
14
|
+
export { default as MessageDisplay } from "./MessageDisplay";
|
|
15
|
+
export { default as MultipleEmail } from "./MultipleEmail";
|
|
16
|
+
export { default as PageLoading } from "./PageLoading";
|
|
17
|
+
export { default as ReadTermsAndCondition } from "./ReadTermsAndCondition";
|
|
18
|
+
export { default as SearchField } from "./SearchField";
|
|
19
|
+
export { default as SearchFieldDB } from "./SearchFieldDB";
|
|
20
|
+
export { default as StepProgressBar } from "./StepProgressBar";
|
|
21
|
+
export { default as SubmitButton } from "./SubmitButton";
|
|
22
|
+
export { default as Tables } from "./Tables";
|
|
23
|
+
export { default as TextArea } from "./TextArea";
|
|
24
|
+
export { default as TextField } from "./TextField";
|
|
25
|
+
export { default as Tooltip } from "./Tooltip";
|
|
26
|
+
export { default as UnsplashRandomImage } from "./UnsplashRandomImage";
|
|
27
|
+
export { default as DownloadAsExcel } from "./DownloadAsExcel";
|
|
28
|
+
export { default as THeadSortBtn } from "./THeadSortBtn";
|
|
29
|
+
export { default as THeadSortList } from "./THeadSortList";
|
|
30
|
+
export { default as TBodyNoData } from "./TBodyNoData";
|
|
31
|
+
export { default as ActionCallbackDropdown } from "./ActionCallbackDropdown";
|
|
32
|
+
export { default as InputNumber } from "./InputNumber";
|
|
33
|
+
export { default as InputText } from "./InputText";
|
|
34
|
+
export { default as InputTextarea } from "./InputTextarea";
|
|
35
|
+
export { default as SearchObjectsFromDB } from "./SearchObjectsFromDB";
|
|
36
|
+
export { default as ToggleButton } from "./ToggleButton";
|
|
37
|
+
export { default as CheckboxesField } from "./CheckboxesField";
|
|
38
|
+
export { default as DateInputPicker } from "./DateInputPicker";
|
|
39
|
+
export { default as ChipsInput } from "./ChipsInput";
|
|
40
|
+
export { default as RadioButton } from "./radio-btn/RadioButton";
|
|
41
|
+
export { default as RadioGroup } from "./radio-btn/RadioGroup";
|
|
42
|
+
export { default as InputAmount } from "./InputAmount";
|
|
43
|
+
export { default as FileField } from "./FileField";
|
|
44
|
+
export { default as PhoneNumberInput } from "./PhoneNumberInput";
|
|
45
|
+
export { default as RadioField } from "./RadioField";
|
|
46
|
+
export { default as RadioSimple } from "./RadioSimple";
|
|
47
|
+
export { default as ReactTimeAgo } from "./ReactTimeAgo";
|
|
48
|
+
export { default as FileUploader } from "./uploads/FileUploader";
|
|
49
|
+
export { default as IhubFileUploader } from "./uploads/IhubFileUploader";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
interface RequestParams {
|
|
2
|
+
host_url?: string;
|
|
2
3
|
path: string;
|
|
3
4
|
data?: any;
|
|
4
5
|
token?: string | null;
|
|
@@ -13,6 +14,7 @@ interface RequestParams {
|
|
|
13
14
|
* const data = await getData({ path: "/api/data", token: "your_token" });
|
|
14
15
|
* ```
|
|
15
16
|
* @param params Request parameters
|
|
17
|
+
* @param params.host_url The host url to use for the request (optional)
|
|
16
18
|
* @param params.path The path to the API endpoint (required) eg. "sis/${handle}/student/"
|
|
17
19
|
* @param params.token The token to use for the request (optional)
|
|
18
20
|
* @param params.method The method to use for the request (optional)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type Category = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
status: boolean;
|
|
5
|
+
};
|
|
6
|
+
type CategoriesObject = {
|
|
7
|
+
[key: string]: Category;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Converts an array of category objects into an object
|
|
11
|
+
* where each key is the `id` of the category.
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const categories = [
|
|
15
|
+
* { id: "1", title: "Category 1", status: true },
|
|
16
|
+
* { id: "2", title: "Category 2", status: false },
|
|
17
|
+
* ];
|
|
18
|
+
* const categoriesObject = convertArrayToObject(categories);
|
|
19
|
+
* console.log(categoriesObject);
|
|
20
|
+
* // Output:
|
|
21
|
+
* {
|
|
22
|
+
* "1": { id: "1", title: "Category 1", status: true },
|
|
23
|
+
* "2": { id: "2", title: "Category 2", status: false },
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
* @param arr - Array of Category items
|
|
27
|
+
* @returns An object with category ids as keys and category objects as values
|
|
28
|
+
*/
|
|
29
|
+
export default function convertArrayToObject(arr: Category[]): CategoriesObject;
|
|
30
|
+
export {};
|
|
@@ -218,6 +218,10 @@ export declare function getNestedValue(row: any, accessor: string): any;
|
|
|
218
218
|
* @param channel Channel ID string or null
|
|
219
219
|
* @param auth_sk Use auth secret boolean (true, false)
|
|
220
220
|
* @returns Request options object
|
|
221
|
+
*
|
|
222
|
+
* Set environment
|
|
223
|
+
* NEXT_PUBLIC_INSTINCTHUB_SK_KEY="Your secret key name"
|
|
224
|
+
* NEXT_PUBLIC_INSTINCTHUB_AUTH_SECRET="Your seceret key"
|
|
221
225
|
*/
|
|
222
226
|
export declare const reqOptions: (method: string, data?: BodyInit | FormData | null, token?: string | null, content_type?: "json" | "form-data" | null | false, channel?: string | null, auth_sk?: boolean) => RequestOptions;
|
|
223
227
|
/**
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from "./auth/actions";
|
|
2
1
|
export * from "./auth/dbRequestst";
|
|
3
2
|
export * from "./roles";
|
|
4
3
|
export * from "./json/accounts";
|
|
@@ -6,12 +5,13 @@ export * from "./json/countryNigeria";
|
|
|
6
5
|
export * from "./json/countryObjects";
|
|
7
6
|
export * from "./json/educationLevels";
|
|
8
7
|
export * from "./json/unsplashDefaultObject";
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
8
|
+
export { default as createSubscription } from "./createSubscription";
|
|
9
|
+
export { default as elementIsVisibleInViewport } from "./elementIsVisibleInViewport";
|
|
10
|
+
export { default as handleFormErrors } from "./formError";
|
|
11
|
+
export { default as fileToBase64 } from "./fileToBase64";
|
|
12
|
+
export { default as getPriceObjects } from "./getPriceObjects";
|
|
13
|
+
export { default as convertArrayToObject } from "./convertArrayToObject";
|
|
12
14
|
export * from "./format";
|
|
13
|
-
export * from "./formError";
|
|
14
|
-
export * from "./getPriceObjects";
|
|
15
15
|
export * from "./helpFunction";
|
|
16
16
|
export * from "./loadScript";
|
|
17
17
|
export * from "./oauth_json";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
type StatusCode = 200 | 201 | 400 | 500 | number;
|
|
2
3
|
declare global {
|
|
3
4
|
interface Window {
|
|
@@ -9,6 +10,6 @@ declare global {
|
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
export declare const openConfirmModal: (message: string, flag?: boolean) => Promise<boolean>;
|
|
12
|
-
export declare const openToast: (message?: string, status?: StatusCode) => void;
|
|
13
|
+
export declare const openToast: (message?: React.ReactDOM | string, status?: StatusCode) => void;
|
|
13
14
|
export declare const getUserEmailInputModal: (title: string) => Promise<string | undefined>;
|
|
14
15
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NextApiRequest } from
|
|
1
|
+
import { NextApiRequest } from "next";
|
|
2
2
|
interface Session {
|
|
3
3
|
user: {
|
|
4
4
|
name: {
|
|
@@ -19,4 +19,15 @@ export declare const headerUsernamePermission: (session: Session | null, req: Ne
|
|
|
19
19
|
* @returns Promise<boolean> - True if the request has a valid header
|
|
20
20
|
*/
|
|
21
21
|
export declare const headerKeyPermission: (req: NextApiRequest) => Promise<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Finds a permission in an array of permissions
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* findPermissions(REGISTRAR_PERMISSION, instructorType)
|
|
27
|
+
* ```
|
|
28
|
+
* @param permission - Array of permissions
|
|
29
|
+
* @param option - Permission to find
|
|
30
|
+
* @returns string | undefined - Permission if found, undefined if not found
|
|
31
|
+
*/
|
|
32
|
+
export declare const findPermissions: (permission: string[], option: string) => string | undefined;
|
|
22
33
|
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const reducer: {
|
|
2
|
+
objectSlice: import("redux").Reducer<import("./slices/generics/objectSlice").ObjectState, import("redux").UnknownAction, import("./slices/generics/objectSlice").ObjectState>;
|
|
3
|
+
arraySlice: import("redux").Reducer<import("./slices/generics/arraySlice").ArrayState<any>, import("redux").UnknownAction, import("./slices/generics/arraySlice").ArrayState<any>>;
|
|
2
4
|
subjects: import("redux").Reducer<import("../../../types/redux").courseFilterSubjectSliceState, import("redux").UnknownAction, import("../../../types/redux").courseFilterSubjectSliceState>;
|
|
3
5
|
levels: import("redux").Reducer<import("../../../types/redux").courseFilterLevelSliceState, import("redux").UnknownAction, import("../../../types/redux").courseFilterLevelSliceState>;
|
|
4
6
|
durations: import("redux").Reducer<import("../../../types/redux").courseFilterDurationSliceState, import("redux").UnknownAction, import("../../../types/redux").courseFilterDurationSliceState>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
interface ArrayState<T = any> {
|
|
3
|
+
value: T[];
|
|
4
|
+
status: "idle" | "loading" | "failed";
|
|
5
|
+
}
|
|
6
|
+
export declare const arraySlice: import("@reduxjs/toolkit").Slice<ArrayState<any>, {
|
|
7
|
+
setArray(state: import("immer").WritableDraft<ArrayState<any>>, action: PayloadAction<any[]>): void;
|
|
8
|
+
addToArray(state: import("immer").WritableDraft<ArrayState<any>>, action: PayloadAction<any>): void;
|
|
9
|
+
removeFromArray(state: import("immer").WritableDraft<ArrayState<any>>, action: PayloadAction<number>): void;
|
|
10
|
+
clearArray(state: import("immer").WritableDraft<ArrayState<any>>): void;
|
|
11
|
+
updateInArray(state: import("immer").WritableDraft<ArrayState<any>>, action: PayloadAction<{
|
|
12
|
+
index: number;
|
|
13
|
+
value: any;
|
|
14
|
+
}>): void;
|
|
15
|
+
}, "array", "array", import("@reduxjs/toolkit").SliceSelectors<ArrayState<any>>>;
|
|
16
|
+
export declare const setArray: import("@reduxjs/toolkit").ActionCreatorWithPayload<any[], "array/setArray">, addToArray: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "array/addToArray">, removeFromArray: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "array/removeFromArray">, clearArray: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"array/clearArray">, updateInArray: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
|
+
index: number;
|
|
18
|
+
value: any;
|
|
19
|
+
}, "array/updateInArray">;
|
|
20
|
+
export type { ArrayState };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
interface ObjectState {
|
|
3
|
+
value: Record<string, any>;
|
|
4
|
+
status: "idle" | "loading" | "failed";
|
|
5
|
+
}
|
|
6
|
+
export declare const objectSlice: import("@reduxjs/toolkit").Slice<ObjectState, {
|
|
7
|
+
setObject(state: import("immer").WritableDraft<ObjectState>, action: PayloadAction<Record<string, any>>): void;
|
|
8
|
+
updateObject(state: import("immer").WritableDraft<ObjectState>, action: PayloadAction<Partial<Record<string, any>>>): void;
|
|
9
|
+
clearObject(state: import("immer").WritableDraft<ObjectState>): void;
|
|
10
|
+
}, "object", "object", import("@reduxjs/toolkit").SliceSelectors<ObjectState>>;
|
|
11
|
+
export declare const setObject: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string, any>, "object/setObject">, updateObject: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<Record<string, any>>, "object/updateObject">, clearObject: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"object/clearObject">;
|
|
12
|
+
export type { ObjectState };
|
|
@@ -2,6 +2,8 @@ import { type ConfigureStoreOptions, type ThunkAction, type Action } from '@redu
|
|
|
2
2
|
import { type TypedUseSelectorHook } from 'react-redux';
|
|
3
3
|
export declare const makeReduxStore: (options?: ConfigureStoreOptions) => import("redux").Store<any, import("redux").UnknownAction, unknown>;
|
|
4
4
|
export declare const reduxStore: import("@reduxjs/toolkit").EnhancedStore<{
|
|
5
|
+
objectSlice: import("./slices/generics/objectSlice").ObjectState;
|
|
6
|
+
arraySlice: import("./slices/generics/arraySlice").ArrayState<any>;
|
|
5
7
|
subjects: import("../../../types/redux").courseFilterSubjectSliceState;
|
|
6
8
|
levels: import("../../../types/redux").courseFilterLevelSliceState;
|
|
7
9
|
durations: import("../../../types/redux").courseFilterDurationSliceState;
|
|
@@ -26,6 +28,8 @@ export declare const reduxStore: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
26
28
|
channelHandle: import("./slices").channelHandleSliceState;
|
|
27
29
|
}, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
|
|
28
30
|
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
31
|
+
objectSlice: import("./slices/generics/objectSlice").ObjectState;
|
|
32
|
+
arraySlice: import("./slices/generics/arraySlice").ArrayState<any>;
|
|
29
33
|
subjects: import("../../../types/redux").courseFilterSubjectSliceState;
|
|
30
34
|
levels: import("../../../types/redux").courseFilterLevelSliceState;
|
|
31
35
|
durations: import("../../../types/redux").courseFilterDurationSliceState;
|
|
@@ -51,6 +55,8 @@ export declare const reduxStore: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
51
55
|
}, undefined, import("redux").UnknownAction>;
|
|
52
56
|
}, {}>, import("redux").StoreEnhancer<{}, {}>]>>;
|
|
53
57
|
export declare const useDispatch: () => import("redux-thunk").ThunkDispatch<{
|
|
58
|
+
objectSlice: import("./slices/generics/objectSlice").ObjectState;
|
|
59
|
+
arraySlice: import("./slices/generics/arraySlice").ArrayState<any>;
|
|
54
60
|
subjects: import("../../../types/redux").courseFilterSubjectSliceState;
|
|
55
61
|
levels: import("../../../types/redux").courseFilterLevelSliceState;
|
|
56
62
|
durations: import("../../../types/redux").courseFilterDurationSliceState;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as ChannelListAvatar } from "./ChannelListAvatar";
|
|
2
|
+
export { default as MenuDropdown } from "./MenuDropdown";
|
|
3
|
+
export { default as Breadcrumb } from "./Breadcrumb";
|
|
4
|
+
export { default as ResponsiveNavbar } from "./ResponsiveNavbar";
|
|
5
|
+
export { default as SideNavbar } from "./SideNavbar";
|