react-luminus-components 1.3.33 → 1.3.34
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 +349 -349
- package/dist/.vite/manifest.json +64 -64
- package/dist/{FromToDatePickerDropdownToggle-BcOIaLyQ.cjs → FromToDatePickerDropdownToggle-DhzBIJXw.cjs} +1 -1
- package/dist/{FromToDatePickerDropdownToggle-CGnDN_zs.js → FromToDatePickerDropdownToggle-Dk7MFcJp.js} +59 -59
- package/dist/{PrimaryButton-B6qFyVVD.js → PrimaryButton-Bbl06m-g.js} +1 -1
- package/dist/{PrimaryButton-Dow_5lBe.cjs → PrimaryButton-D33g-RWP.cjs} +1 -1
- package/dist/{SimpleTooltip-CpLiAgNs.cjs → SimpleTooltip-Bz22xxXa.cjs} +1 -1
- package/dist/{SimpleTooltip-B0I1MS-L.js → SimpleTooltip-C32Faxrc.js} +1 -1
- package/dist/components/BnfTableValueFormats/UserAvatarValueFormat/UserAvatarValueFormat.d.ts +2 -1
- package/dist/components/Buttons/FloatingSubmit/FloatingFormSubmit.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +1 -0
- package/dist/components/Dropdown/comps/DropdownDivider/DropdownDivider.d.ts +2 -1
- package/dist/components/Dropdown/comps/DropdownToggle/DropdownToggle.d.ts +1 -0
- package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +2 -1
- package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +2 -1
- package/dist/components/Form/CheckInput/CheckInput.d.ts +2 -1
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +2 -1
- package/dist/components/Form/NumericStepperInput/NumericStepperInput.d.ts +2 -1
- package/dist/components/Form/SelectInput/SelectInput.d.ts +2 -1
- package/dist/components/Form/TextAreaInput/TextAreaInput.d.ts +2 -1
- package/dist/components/Form/TextInput/TextInput.d.ts +2 -1
- package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +2 -1
- package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +2 -1
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +3 -2
- package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +2 -1
- package/dist/components/HookForm/FloatingSubmit/HookFormFloatingSubmit.d.ts +1 -0
- package/dist/components/HookForm/NumericStepperInput/HookFormNumericStepperInput.d.ts +2 -1
- package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +2 -1
- package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +2 -1
- package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +2 -1
- package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +2 -1
- package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +2 -2
- package/dist/components/InputContainers/InputAnchorContainer/InputAnchorContainer.d.ts +2 -1
- package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +2 -2
- package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +2 -2
- package/dist/components/Layout/MessageBoard/MessageBoard.d.ts +2 -1
- package/dist/components/Layout/MessageBoard/components/MessageList/MessageList.d.ts +2 -1
- package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageItem/MessageItem.d.ts +2 -1
- package/dist/components/NewTabs/Tab/Tab.d.ts +1 -0
- package/dist/components/NewTabs/Tabs/Tabs.d.ts +2 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/components/Tabs/comps/Tab/Tab.d.ts +1 -0
- package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +1 -0
- package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +1 -0
- package/dist/components/common/Alert/Alert.d.ts +1 -0
- package/dist/components/common/ApiFileDownloadButton/ApiFileDownloadButton.d.ts +2 -1
- package/dist/components/common/AppSearch/AppSearch.d.ts +2 -1
- package/dist/components/common/AppSearch/comps/AutocompleteWindow/AutocompleteWindow.d.ts +2 -1
- package/dist/components/common/AppSearch/comps/TypeSelector/TypeSelector.d.ts +3 -2
- package/dist/components/common/AppSearch/hooks/useSearchItems.d.ts +2 -1
- package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +2 -1
- package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +2 -1
- package/dist/components/common/FromToDatePicker/FromToDatePicker.d.ts +3 -2
- package/dist/components/common/FromToDatePicker/components/FromToDatePickerDropdownToggle/FromToDatePickerDropdownToggle.d.ts +2 -1
- package/dist/components/common/FromToDatePicker/hooks/useFromToDatePicker.d.ts +2 -1
- package/dist/components/common/FromToDatePicker/utils/utilsFromToDatePicker.d.ts +1 -0
- package/dist/components/common/HomeDashboard/HomeDashboard.d.ts +3 -2
- package/dist/components/common/HomeDashboard/comps/FreeSpaceWidget/FreeSpaceWidget.d.ts +2 -1
- package/dist/components/common/HomeDashboard/comps/WidgetPicker/WidgetPicker.d.ts +2 -1
- package/dist/components/common/HomeDashboard/hooks/useUserDashboard.d.ts +2 -1
- package/dist/components/common/ImgApi/ImgApi.d.ts +2 -1
- package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +2 -1
- package/dist/components/common/ImgDirect/ImgDirect.d.ts +2 -1
- package/dist/components/common/Loading/LoadingBlock.d.ts +1 -0
- package/dist/components/common/MonthPicker/MonthPicker.d.ts +1 -0
- package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +2 -1
- package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +2 -1
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +2 -1
- package/dist/components/common/Timeline/Timeline.d.ts +2 -1
- package/dist/components/common/Widget/WidgetCard.d.ts +1 -0
- package/dist/components/common/Widget/WidgetWrapper.d.ts +1 -0
- package/dist/contexts/auth/AuthContext.d.ts +3 -2
- package/dist/contexts/auth/AuthProvider.d.ts +2 -1
- package/dist/contexts/confirm/ConfirmContext.d.ts +1 -1
- package/dist/contexts/delegation/DelegationContext.d.ts +3 -2
- package/dist/contexts/loading/LoadingContext.d.ts +1 -1
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +3 -2
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +3 -2
- package/dist/contexts/prompt/PromptContext.d.ts +3 -2
- package/dist/contexts/prompt/PromptProvider.d.ts +1 -0
- package/dist/contexts/user/UserContext.d.ts +4 -3
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.d.ts +1 -240
- package/dist/contexts.es.js +9 -9
- package/dist/{dateUtils-Bc53BdYm.js → dateUtils-B9-rf1Eh.js} +1 -1
- package/dist/{dateUtils-Y_XPaYyg.cjs → dateUtils-Bs39Qj7k.cjs} +1 -1
- package/dist/hooks/useAxios/useAxios.d.ts +2 -1
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -0
- package/dist/hooks/useGetApiData/useGetApiData.d.ts +3 -2
- package/dist/hooks/useLocalStorageState/useLocalStorageState.d.ts +1 -1
- package/dist/hooks/usePrompt/usePrompt.d.ts +2 -1
- package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +2 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.d.ts +1 -160
- package/dist/hooks.es.js +6 -6
- package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +2 -1
- package/dist/layout/MainContainer/MainContainer.d.ts +2 -1
- package/dist/layout/PageTitle/PageTitle.d.ts +1 -0
- package/dist/layout/SideContentBar/SideContentBar.d.ts +1 -0
- package/dist/layout/SideMenu/MenuItem/MenuItem.d.ts +2 -1
- package/dist/layout/SideMenu/SideMenu.d.ts +2 -1
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.d.ts +1 -54
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.es.js +1467 -1467
- package/dist/models/luminus-context-types/ILocalizationContext.d.ts +1 -0
- package/dist/models/prop-types/ContainerProps.d.ts +1 -0
- package/dist/models/prop-types/DashboardWidgetCommonProps.d.ts +1 -0
- package/dist/models/prop-types/FormInputProps/FormCheckInputProps.d.ts +2 -1
- package/dist/models/prop-types/FormInputProps/FormFileInputProps.d.ts +2 -1
- package/dist/models/prop-types/FormInputProps/FormNumericStepperInputProps.d.ts +2 -1
- package/dist/models/prop-types/FormInputProps/FormRadioInputProps.d.ts +2 -1
- package/dist/models/prop-types/FormInputProps/FormSelectInputProps.d.ts +2 -1
- package/dist/models/prop-types/FormInputProps/FormTextAreaInputProps.d.ts +2 -1
- package/dist/models/prop-types/FormInputProps/FormTextInputProps.d.ts +2 -1
- package/dist/models/prop-types/HookFormInputProps/HookFormCheckInputProps.d.ts +3 -2
- package/dist/models/prop-types/HookFormInputProps/HookFormDropdownPickerProps.d.ts +3 -2
- package/dist/models/prop-types/HookFormInputProps/HookFormFileInputProps.d.ts +3 -2
- package/dist/models/prop-types/HookFormInputProps/HookFormInputBaseProps.d.ts +2 -1
- package/dist/models/prop-types/HookFormInputProps/HookFormInputProps.d.ts +2 -1
- package/dist/models/prop-types/HookFormInputProps/HookFormNumericStepperInputProps.d.ts +3 -2
- package/dist/models/prop-types/HookFormInputProps/HookFormRadioInputProps.d.ts +3 -2
- package/dist/models/prop-types/HookFormInputProps/HookFormSelectInputProps.d.ts +3 -2
- package/dist/models/prop-types/HookFormInputProps/HookFormTextAreaInputProps.d.ts +3 -2
- package/dist/models/prop-types/HookFormInputProps/HookFormTextInputProps.d.ts +3 -2
- package/dist/models/prop-types/ImgProps.d.ts +1 -0
- package/dist/models/prop-types/InputProps/CheckInputProps.d.ts +2 -1
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +5 -4
- package/dist/models/prop-types/InputProps/FileInputProps.d.ts +2 -1
- package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +2 -1
- package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +2 -1
- package/dist/models/prop-types/InputProps/RadioInputProps.d.ts +3 -2
- package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +3 -2
- package/dist/models/prop-types/InputProps/TextAreaInputProps.d.ts +2 -1
- package/dist/models/prop-types/InputProps/TextInputProps.d.ts +2 -1
- package/dist/models/texts/ComponentsContextTexts.d.ts +12 -11
- package/dist/models/texts/ErrorBoundaryTexts.d.ts +1 -0
- package/dist/models/types/ApiErrorResult.d.ts +2 -1
- package/dist/models/types/DashboardConfig.d.ts +2 -1
- package/dist/models/types/DashboardWidget.d.ts +2 -1
- package/dist/models/types/DropdownPickerOption.d.ts +2 -1
- package/dist/models/types/HookFormInputProps.d.ts +2 -1
- package/dist/models/types/MenuItemTypeExtended.d.ts +2 -1
- package/dist/models/types/SearchResultGroupModel.d.ts +3 -2
- package/dist/models/types/SearchResultModel.d.ts +2 -1
- package/dist/models/types/TimelineStep.d.ts +2 -1
- package/dist/models/types/UserLoginState.d.ts +3 -2
- package/dist/models/types/UserModel.d.ts +2 -1
- package/dist/{searchUtils-kismAHZM.js → searchUtils-BCxOKHVq.js} +1 -1
- package/dist/{searchUtils-qxu0IgEU.cjs → searchUtils-CxNriHg_.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useFormControlType-BAFqxupC.js → useFormControlType-oJGqgThz.js} +3 -3
- package/dist/{useLocalStorageState-BxKcArKF.cjs → useLocalStorageState-3ebV2Hf5.cjs} +1 -1
- package/dist/{useLocalStorageState-HYmARj_B.js → useLocalStorageState-Cs1tOpr1.js} +1 -1
- package/dist/{usePermissions-yx-0zHae.cjs → usePermissions-BZPN1OT2.cjs} +1 -1
- package/dist/{usePermissions-Dl5tlwwt.js → usePermissions-CfJgVLTi.js} +3 -3
- package/dist/utils/apiErrorFields/apiErrorFieldsUtils.d.ts +2 -1
- package/dist/utils/hookForm/hookFormUtils.d.ts +2 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.d.ts +1 -151
- package/dist/utils.es.js +6 -6
- package/dist/variables.scss +171 -171
- package/package.json +106 -106
package/dist/hooks.d.ts
CHANGED
|
@@ -1,160 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { CancelTokenStatic } from 'axios';
|
|
3
|
-
import { Dispatch } from 'react';
|
|
4
|
-
import { GenericAbortSignal } from 'axios';
|
|
5
|
-
import { RefObject } from 'react';
|
|
6
|
-
import { SetStateAction } from 'react';
|
|
7
|
-
import { z } from 'zod';
|
|
8
|
-
|
|
9
|
-
export declare const cancelToken: CancelTokenStatic;
|
|
10
|
-
|
|
11
|
-
declare type Config = {
|
|
12
|
-
authenticated?: boolean;
|
|
13
|
-
differentBaseUrl?: string;
|
|
14
|
-
silent?: boolean;
|
|
15
|
-
customToken?: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
declare type CustomTypeProps = {
|
|
19
|
-
useCoerce?: boolean;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
declare type NumberTypeProps = CustomTypeProps & {
|
|
23
|
-
min?: number;
|
|
24
|
-
max?: number;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
declare type PromptOptions = {
|
|
28
|
-
required?: boolean;
|
|
29
|
-
input?: 'input' | 'textarea';
|
|
30
|
-
type?: 'text' | 'date' | 'number';
|
|
31
|
-
defaultValue?: string;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export declare const useAuth: () => {
|
|
35
|
-
isAuthenticated: () => boolean;
|
|
36
|
-
isAuthenticating: () => boolean;
|
|
37
|
-
getToken: (() => string | null) | (() => Promise<string | null>);
|
|
38
|
-
login: (kid: string, password: string) => Promise<string | null>;
|
|
39
|
-
logout: () => void;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export declare const useAxios: (useAxiosConfig?: Config) => AxiosInstance;
|
|
43
|
-
|
|
44
|
-
export declare const useClickOutside: (refs: RefObject<HTMLElement>[], callback: () => void) => void;
|
|
45
|
-
|
|
46
|
-
export declare const useConfirm: () => {
|
|
47
|
-
confirm: (t: string) => Promise<unknown>;
|
|
48
|
-
onConfirm: () => void;
|
|
49
|
-
onCancel: () => void;
|
|
50
|
-
show: boolean;
|
|
51
|
-
text: string;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export declare const useFormControlType: (type: "number" | "text" | "password" | "date" | "datetime-local", currentValue: string | null, isFocused: boolean) => "number" | "text" | "password" | "date" | "datetime-local";
|
|
55
|
-
|
|
56
|
-
export declare const useGetApiData: <T>(uri: string, { loadOnInit, enabled, silent, nullStateBeforeLoad, nullStateOnFail, customApiUrl, customBearerToken, }?: UseGetApiDataOptions) => {
|
|
57
|
-
data: T | null;
|
|
58
|
-
setData: Dispatch<SetStateAction<T | null>>;
|
|
59
|
-
reloadData: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<void>;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
declare type UseGetApiDataOptions = {
|
|
63
|
-
silent?: boolean;
|
|
64
|
-
loadOnInit?: boolean;
|
|
65
|
-
enabled?: boolean;
|
|
66
|
-
nullStateBeforeLoad?: boolean;
|
|
67
|
-
nullStateOnFail?: boolean;
|
|
68
|
-
customApiUrl?: string;
|
|
69
|
-
customBearerToken?: string;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export declare function useGetDataBound<T>(url: string): T | null;
|
|
73
|
-
|
|
74
|
-
export declare const useKeyPress: (handleKeyPress: (e: KeyboardEvent) => void) => void;
|
|
75
|
-
|
|
76
|
-
export declare const useLocalStorageState: <T>(key: string, initialValue: T) => readonly [T, Dispatch<SetStateAction<T>>, () => void];
|
|
77
|
-
|
|
78
|
-
export declare const useNotifications: () => {
|
|
79
|
-
addNotification: (message: string, type: "success" | "info" | "danger" | "warning" | "prompt") => void;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export declare const usePermissions: () => {
|
|
83
|
-
checkUserHasPermissions: (permissions: string[]) => boolean;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export declare const usePrompt: () => {
|
|
87
|
-
isShown: boolean;
|
|
88
|
-
text: string;
|
|
89
|
-
prompt: (t: string, options?: PromptOptions) => Promise<string | null>;
|
|
90
|
-
onFinish: (userResponse: string | null) => void;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export declare const useZodSchemaTypes: () => {
|
|
94
|
-
zString: (props?: CustomTypeProps) => z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>, string | null, string | null | undefined>;
|
|
95
|
-
zStringRequired: (props?: CustomTypeProps) => z.ZodEffects<z.ZodString, string, string>;
|
|
96
|
-
zNumber: (props?: NumberTypeProps) => z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, number, number>>>, number | null, number | null | undefined>;
|
|
97
|
-
zNumberRequired: (props?: NumberTypeProps) => z.ZodEffects<z.ZodNumber, number, number>;
|
|
98
|
-
zBool: (props?: CustomTypeProps) => z.ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
99
|
-
zDate: (props?: CustomTypeProps) => z.ZodEffects<z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>, string | null, string | null>;
|
|
100
|
-
zDateRequired: (props?: CustomTypeProps) => z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
101
|
-
zEnum: (options: [string, ...string[]], props?: CustomTypeProps) => z.ZodEffects<z.ZodNullable<z.ZodEffects<z.ZodEnum<[string, ...string[]]>, string, string>>, string | null, string | null>;
|
|
102
|
-
zEnumRequired: (options: [string, ...string[]], _props?: CustomTypeProps) => z.ZodEffects<z.ZodEnum<[string, ...string[]]>, string, string>;
|
|
103
|
-
zObjectIdInt: (_props?: CustomTypeProps) => z.ZodEffects<z.ZodNullable<z.ZodObject<{
|
|
104
|
-
id: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, number, number>>>, number | null, number | null | undefined>;
|
|
105
|
-
}, "strip", z.ZodTypeAny, {
|
|
106
|
-
id: number | null;
|
|
107
|
-
}, {
|
|
108
|
-
id?: number | null | undefined;
|
|
109
|
-
}>>, {
|
|
110
|
-
id: number | null;
|
|
111
|
-
} | null, {
|
|
112
|
-
id?: number | null | undefined;
|
|
113
|
-
} | null>;
|
|
114
|
-
zObjectIdIntRequired: (_props?: CustomTypeProps) => z.ZodEffects<z.ZodObject<{
|
|
115
|
-
id: z.ZodEffects<z.ZodNumber, number, number>;
|
|
116
|
-
}, "strip", z.ZodTypeAny, {
|
|
117
|
-
id: number;
|
|
118
|
-
}, {
|
|
119
|
-
id: number;
|
|
120
|
-
}>, {
|
|
121
|
-
id: number;
|
|
122
|
-
}, {
|
|
123
|
-
id: number;
|
|
124
|
-
}>;
|
|
125
|
-
zObjectIdStr: (_props?: CustomTypeProps) => z.ZodEffects<z.ZodNullable<z.ZodObject<{
|
|
126
|
-
id: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>, string | null, string | null | undefined>;
|
|
127
|
-
}, "strip", z.ZodTypeAny, {
|
|
128
|
-
id: string | null;
|
|
129
|
-
}, {
|
|
130
|
-
id?: string | null | undefined;
|
|
131
|
-
}>>, {
|
|
132
|
-
id: string | null;
|
|
133
|
-
} | null, {
|
|
134
|
-
id?: string | null | undefined;
|
|
135
|
-
} | null>;
|
|
136
|
-
zObjectIdStrRequired: (_props?: CustomTypeProps) => z.ZodEffects<z.ZodObject<{
|
|
137
|
-
id: z.ZodEffects<z.ZodString, string, string>;
|
|
138
|
-
}, "strip", z.ZodTypeAny, {
|
|
139
|
-
id: string;
|
|
140
|
-
}, {
|
|
141
|
-
id: string;
|
|
142
|
-
}>, {
|
|
143
|
-
id: string;
|
|
144
|
-
}, {
|
|
145
|
-
id: string;
|
|
146
|
-
}>;
|
|
147
|
-
zFile: <T extends ZFileProps>({ required, multiple, maxFileSize }: T) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodAny, File[], any>, File[], any>, File[], any>, File[], any>, (T extends {
|
|
148
|
-
multiple: true;
|
|
149
|
-
} ? File[] : File) | (T extends {
|
|
150
|
-
required: false;
|
|
151
|
-
} ? null : never), any>;
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
declare type ZFileProps = {
|
|
155
|
-
required: boolean;
|
|
156
|
-
multiple: boolean;
|
|
157
|
-
maxFileSize: number;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export { }
|
|
1
|
+
export * from './hooks/index'
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { U as q, aD as z,
|
|
2
|
-
import { aF as U,
|
|
3
|
-
import { c as Z, b as $, a as H, u as J } from "./useLocalStorageState-
|
|
1
|
+
import { U as q, aD as z, a4 as _ } from "./FromToDatePickerDropdownToggle-Dk7MFcJp.js";
|
|
2
|
+
import { aF as U, ae as V, aE as K } from "./FromToDatePickerDropdownToggle-Dk7MFcJp.js";
|
|
3
|
+
import { c as Z, b as $, a as H, u as J } from "./useLocalStorageState-Cs1tOpr1.js";
|
|
4
4
|
import { useContext as g, useState as I, useEffect as S } from "react";
|
|
5
5
|
import { z as s } from "zod";
|
|
6
|
-
import { i as j } from "./dateUtils-
|
|
6
|
+
import { i as j } from "./dateUtils-B9-rf1Eh.js";
|
|
7
7
|
import "@azure/msal-browser";
|
|
8
8
|
import "@azure/msal-react";
|
|
9
9
|
import "react-router-dom";
|
|
10
10
|
import "react-hook-form";
|
|
11
|
-
import {
|
|
12
|
-
import { u as re } from "./usePermissions-
|
|
11
|
+
import { b as X, u as Y, a as p } from "./useFormControlType-oJGqgThz.js";
|
|
12
|
+
import { u as re } from "./usePermissions-CfJgVLTi.js";
|
|
13
13
|
const B = () => {
|
|
14
14
|
const { texts: { formValidation: n } } = g(q), u = (e) => (e != null && e.useCoerce ? s.coerce : s).string({
|
|
15
15
|
invalid_type_error: n.required,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { ContainerProps } from '
|
|
1
|
+
import { ContainerProps } from '../../models/index';
|
|
2
|
+
|
|
2
3
|
declare const FullScreenContainer: ({ title, children, sideContent, sideContentWidth, noPadding, className, }: ContainerProps) => import("react").JSX.Element;
|
|
3
4
|
export default FullScreenContainer;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { ContainerProps } from '
|
|
1
|
+
import { ContainerProps } from '../../models/index';
|
|
2
|
+
|
|
2
3
|
declare const MainContainer: ({ title, children, sideContent, sideContentWidth, noPadding, className, }: ContainerProps) => import("react").JSX.Element;
|
|
3
4
|
export default MainContainer;
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FromToDatePickerDropdownToggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FromToDatePickerDropdownToggle-DhzBIJXw.cjs"),j=require("react"),b=require("react-router-dom");require("react-hook-form");require("@azure/msal-browser");require("@azure/msal-react");require("zod");const M=require("./usePermissions-BZPN1OT2.cjs"),B=require("./SimpleTooltip-Bz22xxXa.cjs"),k="_side-menu-item_6vbwa_1",C="_disabled_6vbwa_5",g="_nav-button_6vbwa_9",P="_child_6vbwa_17",S="_text_6vbwa_21",T="_icon_6vbwa_28",f="_collapse-icon_6vbwa_34",y="_collapsed_6vbwa_44",I="_expanded_6vbwa_51",q="_children-container_6vbwa_57",$="_visible_6vbwa_65",H="_children_6vbwa_57",i={"side-menu-item":"_side-menu-item_6vbwa_1",sideMenuItem:k,disabled:C,"nav-button":"_nav-button_6vbwa_9",navButton:g,child:P,text:S,icon:T,"collapse-icon":"_collapse-icon_6vbwa_34",collapseIcon:f,collapsed:y,expanded:I,"children-container":"_children-container_6vbwa_57",childrenContainer:q,visible:$,children:H},F=({item:s,menuExpanded:n,children:t})=>s.tooltip&&!n?e.jsxRuntimeExports.jsx(B.SimpleTooltip,{text:s.tooltip,placement:"right",children:t}):t,R=({item:s,menuExpanded:n,collapsed:t,onCollapse:r,currentPath:c})=>{var v,h;const[d,x]=j.useState(!1),[m]=c.split("?"),u=s.linkTo===m||((v=s.children)==null?void 0:v.some(o=>o.linkTo===m));return e.jsxRuntimeExports.jsxs("li",{className:e.classNames("luminus-side-menu-item",i.sideMenuItem,{[i.expanded]:n},{active:d||u},{open:t&&s.children},{[i.disabled]:s.disabled||s.notPermitted},{disabled:s.disabled||s.notPermitted}),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[e.jsxRuntimeExports.jsx(F,{item:s,menuExpanded:n,children:s.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",i.navButton),onClick:()=>r(),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",i.icon),children:s.icon}),n&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",i.text,"text-nowrap"),children:s.title}),n&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",i.collapseIcon,{[i.collapsed]:t}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(b.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link",i.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",i.icon),children:s.icon}),n&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",i.text,"text-nowrap"),children:s.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",i.childrenContainer,{[i.visible]:t}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",i.children),children:(h=s.children)==null?void 0:h.map(o=>e.jsxRuntimeExports.jsx(b.Link,{to:o.disabled||o.notPermitted?"/":o.linkTo??"/",className:e.classNames("nav-link child rounded",i.navButton,i.child,{[i.disabled]:o.disabled||o.notPermitted},{disabled:o.disabled||o.notPermitted}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",i.text,"text-nowrap"),children:o.title})},o.linkTo))})})]})},L="_side-menu_n1hvm_1",D="_sidebar-header_n1hvm_13",A="_side-menu-content_n1hvm_18",K="_expand_n1hvm_22",U="_divider_n1hvm_26",_={"side-menu":"_side-menu_n1hvm_1",sideMenu:L,"sidebar-header":"_sidebar-header_n1hvm_13",sidebarHeader:D,"side-menu-content":"_side-menu-content_n1hvm_18",sideMenuContent:A,expand:K,divider:U},z=({headerItem:s,mainItems:n,secondaryItems:t,expanded:r,setExpanded:c,currentPath:d})=>{const[x,m]=j.useState(-1),{checkUserHasPermissions:u}=M.usePermissions(),v=j.useMemo(()=>n.map(a=>{var l;return{...a,notPermitted:!u(a.permissions??[]),children:(l=a.children)==null?void 0:l.map(p=>({...p,notPermitted:!u(p.permissions??[]),disabled:a.disabled||p.disabled}))}}),[n,u]),h=j.useMemo(()=>t.map(a=>{var l;return{...a,notPermitted:!u(a.permissions??[]),children:(l=a.children)==null?void 0:l.map(p=>({...p,notPermitted:!u(p.permissions??[])}))}}),[t,u]),o=a=>{m(a===x?-1:a)};return j.useEffect(()=>{r||m(-1)},[r]),e.jsxRuntimeExports.jsxs("section",{className:e.classNames("luminus-side-menu shadow",_.sideMenu,{[_.expand]:r},{expand:r}),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",_.sidebarHeader),children:s}),e.jsxRuntimeExports.jsxs("ul",{className:_.sideMenuContent,children:[v.map((a,l)=>e.jsxRuntimeExports.jsx(R,{item:a,menuExpanded:r,collapsed:l===x,onCollapse:()=>o(l),currentPath:d},a.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",_.divider)}),h.map((a,l)=>e.jsxRuntimeExports.jsx(R,{item:a,menuExpanded:r,collapsed:l===x,onCollapse:()=>o(l),currentPath:d},a.title))]})]})},G="_top-bar_1lk80_1",J="_top-bar-brand_1lk80_14",E={"top-bar":"_top-bar_1lk80_1",topBar:G,"top-bar-brand":"_top-bar-brand_1lk80_14",topBarBrand:J},O=({appName:s,leftOffset:n,centerContent:t,rightContent:r})=>e.jsxRuntimeExports.jsxs("nav",{className:e.classNames("luminus-top-bar shadow",E.topBar),style:{width:n?`calc(100% - ${n}px)`:void 0,left:n?`${n}px`:void 0},children:[e.jsxRuntimeExports.jsx(b.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",E.topBarBrand),children:s}),t&&e.jsxRuntimeExports.jsx("div",{children:t}),e.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center gap-2",children:r??null})]}),Q="_side-content-bar_17kwd_1",V={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:Q},N=({width:s,children:n})=>e.jsxRuntimeExports.jsx("section",{className:e.classNames("luminus-side-content-bar shadow",V.sideContentBar),style:{width:`${s}px`},children:n}),w=({title:s})=>e.jsxRuntimeExports.jsx("div",{className:"mb-3",children:typeof s=="string"?e.jsxRuntimeExports.jsx(e.Typography,{variant:"h3",children:s}):s}),X=({title:s,children:n,sideContent:t,sideContentWidth:r=250,noPadding:c,className:d})=>e.jsxRuntimeExports.jsxs("div",{className:e.classNames("container-fluid",c?"p-0":"p-3",d),children:[e.jsxRuntimeExports.jsxs("div",{style:{paddingRight:t?`${r}px`:void 0},children:[s?e.jsxRuntimeExports.jsx(w,{title:s}):null,n]}),t&&e.jsxRuntimeExports.jsx(N,{width:r,children:t})]}),Y="_full-screen-container_1rm4r_1",Z={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:Y},W=({title:s,children:n,sideContent:t,sideContentWidth:r=250,noPadding:c,className:d})=>e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:e.classNames("overflow-hidden luminus-full-screen-container",c?"p-0":"p-3",d,Z.fullScreenContainer),style:{width:t?`calc(100% - ${r}px)`:"100%"},children:[s?e.jsxRuntimeExports.jsx(w,{title:s}):null,n]}),t&&e.jsxRuntimeExports.jsx(N,{width:r,children:t})]});exports.FullScreenContainer=W;exports.MainContainer=X;exports.SideContentBar=N;exports.SideMenu=z;exports.TopBar=O;
|
package/dist/layout.d.ts
CHANGED
|
@@ -1,54 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
declare type ContainerProps = {
|
|
5
|
-
title?: string | ReactNode;
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
sideContent?: React.ReactNode;
|
|
8
|
-
sideContentWidth?: number;
|
|
9
|
-
noPadding?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export declare const FullScreenContainer: ({ title, children, sideContent, sideContentWidth, noPadding, className, }: ContainerProps) => JSX_2.Element;
|
|
14
|
-
|
|
15
|
-
export declare const MainContainer: ({ title, children, sideContent, sideContentWidth, noPadding, className, }: ContainerProps) => JSX_2.Element;
|
|
16
|
-
|
|
17
|
-
declare type MenuItemType = {
|
|
18
|
-
title: string;
|
|
19
|
-
tooltip?: string;
|
|
20
|
-
linkTo?: string;
|
|
21
|
-
icon?: React.ReactNode;
|
|
22
|
-
permissions?: string[];
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
children?: MenuItemType[];
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
declare type Props = {
|
|
28
|
-
headerItem: React.ReactNode;
|
|
29
|
-
mainItems: MenuItemType[];
|
|
30
|
-
secondaryItems: MenuItemType[];
|
|
31
|
-
expanded: boolean;
|
|
32
|
-
setExpanded: (expanded: boolean) => void;
|
|
33
|
-
currentPath: string;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
declare type Props_2 = {
|
|
37
|
-
appName: string;
|
|
38
|
-
leftOffset?: number;
|
|
39
|
-
centerContent?: React.ReactNode;
|
|
40
|
-
rightContent?: React.ReactNode;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
declare type Props_3 = {
|
|
44
|
-
width: number;
|
|
45
|
-
children?: ReactNode;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export declare const SideContentBar: ({ width, children }: Props_3) => JSX_2.Element;
|
|
49
|
-
|
|
50
|
-
export declare const SideMenu: ({ headerItem, mainItems, secondaryItems, expanded, setExpanded, currentPath, }: Props) => JSX_2.Element;
|
|
51
|
-
|
|
52
|
-
export declare const TopBar: ({ appName, leftOffset, centerContent, rightContent }: Props_2) => JSX_2.Element;
|
|
53
|
-
|
|
54
|
-
export { }
|
|
1
|
+
export * from './layout/index'
|
package/dist/layout.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { j as e, c as t, Z as C, S as I } from "./FromToDatePickerDropdownToggle-
|
|
1
|
+
import { j as e, c as t, Z as C, S as I } from "./FromToDatePickerDropdownToggle-Dk7MFcJp.js";
|
|
2
2
|
import { useState as M, useMemo as w, useEffect as P } from "react";
|
|
3
3
|
import { Link as j } from "react-router-dom";
|
|
4
4
|
import "react-hook-form";
|
|
5
5
|
import "@azure/msal-browser";
|
|
6
6
|
import "@azure/msal-react";
|
|
7
7
|
import "zod";
|
|
8
|
-
import { u as g } from "./usePermissions-
|
|
9
|
-
import { S as y } from "./SimpleTooltip-
|
|
8
|
+
import { u as g } from "./usePermissions-CfJgVLTi.js";
|
|
9
|
+
import { S as y } from "./SimpleTooltip-C32Faxrc.js";
|
|
10
10
|
const S = "_side-menu-item_6vbwa_1", T = "_disabled_6vbwa_5", $ = "_nav-button_6vbwa_9", H = "_child_6vbwa_17", E = "_text_6vbwa_21", F = "_icon_6vbwa_28", L = "_collapse-icon_6vbwa_34", R = "_collapsed_6vbwa_44", A = "_expanded_6vbwa_51", K = "_children-container_6vbwa_57", U = "_visible_6vbwa_65", Z = "_children_6vbwa_57", i = {
|
|
11
11
|
"side-menu-item": "_side-menu-item_6vbwa_1",
|
|
12
12
|
sideMenuItem: S,
|