react-luminus-components 1.3.32 → 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 +0 -6
- package/dist/.vite/manifest.json +60 -60
- package/dist/FromToDatePickerDropdownToggle-DhzBIJXw.cjs +253 -0
- package/dist/{FromToDatePickerDropdownToggle-DDOxJCc2.js → FromToDatePickerDropdownToggle-Dk7MFcJp.js} +2761 -2615
- package/dist/{PrimaryButton-B64e5vBv.js → PrimaryButton-Bbl06m-g.js} +135 -145
- package/dist/PrimaryButton-D33g-RWP.cjs +1 -0
- package/dist/{SimpleTooltip-DIqIPx0H.cjs → SimpleTooltip-Bz22xxXa.cjs} +1 -1
- package/dist/{SimpleTooltip-BgRjtr0d.js → SimpleTooltip-C32Faxrc.js} +1 -1
- package/dist/components/BnfTableValueFormats/UserAvatarValueFormat/UserAvatarValueFormat.d.ts +2 -1
- package/dist/components/Buttons/ContextButton/ContextButton.d.ts +0 -1
- package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +0 -1
- package/dist/components/Buttons/FloatingSubmit/FloatingFormSubmit.d.ts +1 -0
- package/dist/components/Buttons/IconButton/IconButton.d.ts +0 -1
- package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +0 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/comps/DropdownDivider/DropdownDivider.d.ts +2 -1
- package/dist/components/Dropdown/comps/DropdownItem/DropdownItem.d.ts +0 -1
- package/dist/components/Dropdown/comps/DropdownItem/FileUploadDropdownItem.d.ts +0 -1
- package/dist/components/Dropdown/comps/DropdownToggle/DropdownToggle.d.ts +1 -1
- package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +5 -4
- package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +2 -1
- package/dist/components/Form/CheckInput/CheckInput.d.ts +2 -2
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +2 -2
- package/dist/components/Form/NumericStepperInput/NumericStepperInput.d.ts +2 -2
- package/dist/components/Form/SelectInput/SelectInput.d.ts +2 -2
- package/dist/components/Form/TextAreaInput/TextAreaInput.d.ts +2 -2
- package/dist/components/Form/TextInput/TextInput.d.ts +2 -2
- package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +2 -2
- package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +2 -2
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +3 -2
- package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +2 -2
- package/dist/components/HookForm/FloatingSubmit/HookFormFloatingSubmit.d.ts +1 -0
- package/dist/components/HookForm/NumericStepperInput/HookFormNumericStepperInput.d.ts +2 -2
- package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +2 -2
- package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +2 -2
- package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +2 -2
- package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +2 -2
- package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +22 -23
- package/dist/components/InputContainers/InputAnchorContainer/InputAnchorContainer.d.ts +2 -2
- package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +22 -23
- package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +22 -23
- package/dist/components/Layout/MessageBoard/MessageBoard.d.ts +2 -1
- package/dist/components/Layout/MessageBoard/components/MessageList/MessageList.d.ts +2 -2
- package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageFilters/MessageFilters.d.ts +0 -1
- package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageItem/MessageItem.d.ts +2 -2
- package/dist/components/NewTabs/Tab/Tab.d.ts +1 -0
- package/dist/components/NewTabs/TabPanel/TabPanel.d.ts +0 -1
- package/dist/components/NewTabs/Tabs/Tabs.d.ts +2 -2
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/comps/Tab/Tab.d.ts +1 -1
- package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +1 -0
- package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +1 -0
- package/dist/components/UserAvatar/AvatarIcon/AvatarIcon.d.ts +0 -1
- package/dist/components/common/Alert/Alert.d.ts +1 -1
- package/dist/components/common/AlertItem/AlertItem.d.ts +0 -1
- package/dist/components/common/ApiFileDownloadButton/ApiFileDownloadButton.d.ts +2 -1
- package/dist/components/common/AppSearch/AppSearch.d.ts +2 -2
- package/dist/components/common/AppSearch/comps/AutocompleteWindow/AutocompleteWindow.d.ts +2 -2
- 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/Backdrop/Backdrop.d.ts +0 -1
- package/dist/components/common/Badge/Badge.d.ts +0 -1
- package/dist/components/common/Card/Card.d.ts +0 -1
- package/dist/components/common/Collapse/Collapse.d.ts +0 -1
- package/dist/components/common/ConfirmDialog/ConfirmDialog.d.ts +0 -1
- package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +2 -1
- package/dist/components/common/FloatingActionContainer/FloatingActionContainer.d.ts +0 -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 -3
- package/dist/components/common/HomeDashboard/comps/FreeSpaceWidget/FreeSpaceWidget.d.ts +2 -2
- package/dist/components/common/HomeDashboard/comps/WidgetPicker/WidgetPicker.d.ts +2 -2
- package/dist/components/common/HomeDashboard/hooks/useUserDashboard.d.ts +2 -1
- package/dist/components/common/ImgApi/ImgApi.d.ts +2 -2
- package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +2 -2
- package/dist/components/common/ImgDirect/ImgDirect.d.ts +2 -2
- package/dist/components/common/InvalidFeedback/InvalidFeedback.d.ts +0 -1
- package/dist/components/common/Loading/Loading.d.ts +0 -1
- package/dist/components/common/Loading/LoadingBlock.d.ts +1 -0
- package/dist/components/common/MonthPicker/MonthPicker.d.ts +1 -1
- package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +2 -2
- package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +2 -2
- package/dist/components/common/PromptDialog/PromptDialog.d.ts +0 -1
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +2 -1
- package/dist/components/common/Timeline/Timeline.d.ts +2 -2
- package/dist/components/common/Typography/Typography.d.ts +0 -1
- package/dist/components/common/VersionInfo/VersionInfo.d.ts +0 -1
- package/dist/components/common/Widget/WidgetCard.d.ts +1 -0
- package/dist/components/common/Widget/WidgetWrapper.d.ts +1 -0
- package/dist/components/common/YearPicker/YearPicker.d.ts +0 -1
- package/dist/contexts/auth/AuthContext.d.ts +3 -3
- package/dist/contexts/auth/AuthProvider.d.ts +2 -2
- package/dist/contexts/confirm/ConfirmContext.d.ts +1 -2
- package/dist/contexts/confirm/ConfirmProvider.d.ts +0 -1
- package/dist/contexts/delegation/DelegationContext.d.ts +3 -2
- package/dist/contexts/delegation/DelegationProvider.d.ts +0 -1
- package/dist/contexts/loading/LoadingContext.d.ts +1 -2
- package/dist/contexts/loading/LoadingProvider.d.ts +0 -1
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +3 -16
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +4 -17
- package/dist/contexts/prompt/PromptContext.d.ts +3 -3
- package/dist/contexts/prompt/PromptProvider.d.ts +1 -0
- package/dist/contexts/user/UserContext.d.ts +4 -4
- package/dist/contexts/user/UserProvider.d.ts +0 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.d.ts +1 -257
- package/dist/contexts.es.js +129 -158
- package/dist/{dateUtils-C8trxO28.js → dateUtils-B9-rf1Eh.js} +11 -21
- package/dist/{dateUtils-ChS-y8JY.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/useFormControlType/useFormControlType.d.ts +1 -1
- package/dist/hooks/useGetApiData/useGetApiData.d.ts +3 -3
- package/dist/hooks/useLocalStorageState/useLocalStorageState.d.ts +1 -2
- package/dist/hooks/useNotifications/useNotifications.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 -162
- package/dist/hooks.es.js +22 -22
- package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +2 -2
- package/dist/layout/MainContainer/MainContainer.d.ts +2 -2
- 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 -2
- package/dist/layout/SideMenu/SideMenu.d.ts +2 -2
- package/dist/layout/TopBar/TopBar.d.ts +0 -1
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.d.ts +1 -56
- package/dist/layout.es.js +92 -95
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.es.js +1149 -1171
- 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/InputContainerProps.d.ts +0 -1
- package/dist/models/prop-types/InputProps/CheckInputProps.d.ts +2 -1
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +5 -5
- 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 -2
- package/dist/models/texts/ComponentsContextTexts.d.ts +21 -2
- 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/MenuItemType.d.ts +0 -1
- package/dist/models/types/MenuItemTypeExtended.d.ts +2 -1
- package/dist/models/types/PhotoAction.d.ts +0 -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 -2
- package/dist/models/types/UserLoginState.d.ts +3 -2
- package/dist/models/types/UserModel.d.ts +2 -1
- package/dist/{searchUtils-C38WM_G8.js → searchUtils-BCxOKHVq.js} +1 -1
- package/dist/{searchUtils-BdYnxcy0.cjs → searchUtils-CxNriHg_.cjs} +1 -1
- package/dist/{useLocalStorageState-asgEpnUg.cjs → useLocalStorageState-3ebV2Hf5.cjs} +1 -1
- package/dist/{useLocalStorageState-CFe9QRz0.js → useLocalStorageState-Cs1tOpr1.js} +3 -3
- package/dist/{usePermissions-Ce0AAKj1.cjs → usePermissions-BZPN1OT2.cjs} +1 -1
- package/dist/{usePermissions-55of2QBH.js → usePermissions-CfJgVLTi.js} +3 -3
- package/dist/utils/apiErrorFields/apiErrorFieldsUtils.d.ts +2 -1
- package/dist/utils/bnfValueFormat/bnfValueFormat.d.ts +0 -1
- package/dist/utils/hookForm/hookFormUtils.d.ts +2 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.d.ts +1 -153
- package/dist/utils.es.js +7 -7
- package/package.json +2 -2
- package/dist/FromToDatePickerDropdownToggle-BPfviPUU.cjs +0 -253
- package/dist/PrimaryButton-BnrFH2PB.cjs +0 -1
package/dist/contexts.d.ts
CHANGED
|
@@ -1,257 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { Context } from 'react';
|
|
4
|
-
import { CreateAxiosDefaults } from 'axios';
|
|
5
|
-
import { Dispatch } from 'react';
|
|
6
|
-
import { GenericAbortSignal } from 'axios';
|
|
7
|
-
import { IconBaseProps } from 'react-icons';
|
|
8
|
-
import { JSX as JSX_2 } from 'react';
|
|
9
|
-
import { LinkProps } from 'react-router-dom';
|
|
10
|
-
import { Locale } from 'date-fns';
|
|
11
|
-
import { NavigateProps } from 'react-router-dom';
|
|
12
|
-
import { PublicClientApplication } from '@azure/msal-browser';
|
|
13
|
-
import { ReactNode } from 'react';
|
|
14
|
-
import { SetStateAction } from 'react';
|
|
15
|
-
|
|
16
|
-
declare type AppSearchTexts = {
|
|
17
|
-
searchPlaceholder: string;
|
|
18
|
-
amountFrom: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export declare const AuthContext: Context<IAuthContext>;
|
|
22
|
-
|
|
23
|
-
export declare const AuthProvider: ({ ...props }: Props_4) => JSX_2.Element;
|
|
24
|
-
|
|
25
|
-
declare type AxiosTexts = {
|
|
26
|
-
validationError: string;
|
|
27
|
-
networkError: string;
|
|
28
|
-
unexpectedError: string;
|
|
29
|
-
forbiddenError: string;
|
|
30
|
-
permissionError: string;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
declare type BaseProps = {
|
|
34
|
-
children: React.ReactNode;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
declare type CommonLuminusIcons = 'edit' | 'delete' | 'info' | 'warning' | 'check' | 'danger' | 'chevron-left' | 'chevron-right';
|
|
38
|
-
|
|
39
|
-
declare type ComponentsContextTexts = {
|
|
40
|
-
messageBoard: MessageBoardTexts;
|
|
41
|
-
date: DateTexts;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
declare type ConfirmTexts = {
|
|
45
|
-
yes: string;
|
|
46
|
-
no: string;
|
|
47
|
-
cancel: string;
|
|
48
|
-
confirm: string;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
declare type CustomSelectTexts = {
|
|
52
|
-
searchPlaceholder: string;
|
|
53
|
-
clearSelection: string;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
declare type DateTexts = {
|
|
57
|
-
year: string;
|
|
58
|
-
month: string;
|
|
59
|
-
week: string;
|
|
60
|
-
day: string;
|
|
61
|
-
custom: string;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export declare const DelegationContext: Context<IDelegationContext>;
|
|
65
|
-
|
|
66
|
-
export declare const DelegationProvider: ({ children, relativeEndpoint }: Props_5) => JSX_2.Element;
|
|
67
|
-
|
|
68
|
-
declare interface EmployeeSmallModel {
|
|
69
|
-
id: number;
|
|
70
|
-
name: string | null;
|
|
71
|
-
kid: string | null;
|
|
72
|
-
driverTrainingDate: string | null;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
declare type ErrorBoundaryTexts = {
|
|
76
|
-
reloadButtonContent: ReactNode;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
declare type FormSubmitTexts = {
|
|
80
|
-
storno: string;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
declare type FormValidationTexts = {
|
|
84
|
-
required: string;
|
|
85
|
-
invalidDate: string;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
declare type HomeDashboardTexts = {
|
|
89
|
-
dashboardEdit: string;
|
|
90
|
-
dashboardEditDone: string;
|
|
91
|
-
pickWidgetToAdd: string;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
declare interface IAuthContext {
|
|
95
|
-
useMsal: boolean;
|
|
96
|
-
msalInstance: PublicClientApplication | null;
|
|
97
|
-
msalScopes: string[];
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
declare type IconComponentType = (props: {
|
|
101
|
-
icon: CommonLuminusIcons;
|
|
102
|
-
className?: string;
|
|
103
|
-
iconProps?: IconBaseProps;
|
|
104
|
-
}) => ReactNode;
|
|
105
|
-
|
|
106
|
-
export declare interface IDelegationContext {
|
|
107
|
-
delegation: NameIdIntModel | null;
|
|
108
|
-
setDelegation: Dispatch<SetStateAction<NameIdIntModel | null>>;
|
|
109
|
-
availableDelegations: UserDelegationModel[] | null;
|
|
110
|
-
setAvailableDelegations: React.Dispatch<React.SetStateAction<UserDelegationModel[] | null>>;
|
|
111
|
-
refreshAvailableDelegations: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<void>;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
declare interface ILoadingContext {
|
|
115
|
-
isLoading: boolean;
|
|
116
|
-
startLoading: (key: string) => void;
|
|
117
|
-
stopLoading: (key: string) => void;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
declare interface ILocalizationContext {
|
|
121
|
-
language: string;
|
|
122
|
-
setLanguage: (lng: string) => void;
|
|
123
|
-
dateFnsLocale: Locale;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export declare interface ILuminusComponentsContext {
|
|
127
|
-
cookieDomain: string;
|
|
128
|
-
axiosOptions: CreateAxiosDefaults;
|
|
129
|
-
LinkComponent: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
130
|
-
NavigateComponent: (props: NavigateProps) => null;
|
|
131
|
-
localizationContext: Context<ILocalizationContext>;
|
|
132
|
-
language: string;
|
|
133
|
-
axiosTexts: AxiosTexts;
|
|
134
|
-
confirmTexts: ConfirmTexts;
|
|
135
|
-
formValidationTexts: FormValidationTexts;
|
|
136
|
-
homeDashboardTexts: HomeDashboardTexts;
|
|
137
|
-
formSubmitTexts: FormSubmitTexts;
|
|
138
|
-
appSearchTexts: AppSearchTexts;
|
|
139
|
-
customSelectTexts: CustomSelectTexts;
|
|
140
|
-
errorBoundaryTexts: ErrorBoundaryTexts;
|
|
141
|
-
widgetTexts: WidgetTexts;
|
|
142
|
-
texts: ComponentsContextTexts;
|
|
143
|
-
ProjectIconComponent: IconComponentType;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
declare interface IUserContext {
|
|
147
|
-
user: UserModel | null;
|
|
148
|
-
userLoginState: UserLoginState;
|
|
149
|
-
loginUser: (token?: string) => Promise<boolean>;
|
|
150
|
-
logoutUser: () => void;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export declare const LoadingContext: Context<ILoadingContext>;
|
|
154
|
-
|
|
155
|
-
export declare const LoadingProvider: ({ children }: Props_2) => JSX_2.Element;
|
|
156
|
-
|
|
157
|
-
declare enum LoginState {
|
|
158
|
-
LOGGING_IN = 0,
|
|
159
|
-
LOGGED_IN = 1,
|
|
160
|
-
LOGGED_OUT = 2,
|
|
161
|
-
LOGIN_FAILED = 3
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export declare const LuminusComponentsContext: Context<ILuminusComponentsContext>;
|
|
165
|
-
|
|
166
|
-
export declare const LuminusComponentsProvider: ({ cookieDomain, axiosOptions, LinkComponent, NavigateComponent, language, axiosTexts, confirmTexts, formValidationTexts, homeDashboardTexts, formSubmitTexts, appSearchTexts, customSelectTexts, errorBoundaryTexts, widgetTexts, texts, ProjectIconComponent, localizationContext, children, }: Props) => JSX_2.Element;
|
|
167
|
-
|
|
168
|
-
declare type MessageBoardTexts = {
|
|
169
|
-
noMessages: string;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
declare type MsalProps = {
|
|
173
|
-
msalInstance: PublicClientApplication;
|
|
174
|
-
msalScopes: string[];
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
declare type NameIdIntModel = {
|
|
178
|
-
id: number;
|
|
179
|
-
name: string | null;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
declare type NameIdStringModel = {
|
|
183
|
-
id: string;
|
|
184
|
-
name: string | null;
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
declare type Props = {
|
|
188
|
-
cookieDomain: string;
|
|
189
|
-
axiosOptions: CreateAxiosDefaults;
|
|
190
|
-
LinkComponent: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
191
|
-
NavigateComponent: (props: NavigateProps) => null;
|
|
192
|
-
language: string;
|
|
193
|
-
axiosTexts: AxiosTexts;
|
|
194
|
-
confirmTexts: ConfirmTexts;
|
|
195
|
-
formValidationTexts: FormValidationTexts;
|
|
196
|
-
homeDashboardTexts: HomeDashboardTexts;
|
|
197
|
-
formSubmitTexts: FormSubmitTexts;
|
|
198
|
-
appSearchTexts: AppSearchTexts;
|
|
199
|
-
customSelectTexts: CustomSelectTexts;
|
|
200
|
-
children: React.ReactNode;
|
|
201
|
-
errorBoundaryTexts: ErrorBoundaryTexts;
|
|
202
|
-
widgetTexts: WidgetTexts;
|
|
203
|
-
texts: ComponentsContextTexts;
|
|
204
|
-
ProjectIconComponent: IconComponentType;
|
|
205
|
-
localizationContext: Context<ILocalizationContext>;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
declare type Props_2 = {
|
|
209
|
-
children: React.ReactNode;
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
declare type Props_3 = {
|
|
213
|
-
children: React.ReactNode;
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
declare type Props_4 = BaseProps & ({
|
|
217
|
-
useMsal?: false;
|
|
218
|
-
} | (MsalProps & {
|
|
219
|
-
useMsal: true;
|
|
220
|
-
}));
|
|
221
|
-
|
|
222
|
-
declare type Props_5 = {
|
|
223
|
-
children: React.ReactNode;
|
|
224
|
-
relativeEndpoint: string;
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
export declare const UserContext: Context<IUserContext>;
|
|
228
|
-
|
|
229
|
-
declare interface UserDelegationModel {
|
|
230
|
-
id: number;
|
|
231
|
-
employee: EmployeeSmallModel;
|
|
232
|
-
from: string | null;
|
|
233
|
-
to: string | null;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
declare type UserLoginState = {
|
|
237
|
-
state: LoginState;
|
|
238
|
-
user: UserModel | null;
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
declare type UserModel = {
|
|
242
|
-
personalNumber: number;
|
|
243
|
-
kid: string | null;
|
|
244
|
-
name: string | null;
|
|
245
|
-
photoId: number | null;
|
|
246
|
-
permissions: string[] | null;
|
|
247
|
-
orgUnit: NameIdStringModel;
|
|
248
|
-
cafmToken: string | null;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
export declare const UserProvider: ({ children }: Props_3) => JSX_2.Element;
|
|
252
|
-
|
|
253
|
-
declare type WidgetTexts = {
|
|
254
|
-
fallbackError: string;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
export { }
|
|
1
|
+
export * from './contexts/index'
|
package/dist/contexts.es.js
CHANGED
|
@@ -1,214 +1,185 @@
|
|
|
1
|
-
import { j as n, al as R, U as
|
|
2
|
-
import { useState as h, useCallback as
|
|
3
|
-
import { EventType as
|
|
4
|
-
import { MsalProvider as
|
|
1
|
+
import { j as n, al as R, U as L, am as U, an as z, ao as F, a4 as B, ad as G, ap as O, ae as q, ag as S, af as H, aq as V } from "./FromToDatePickerDropdownToggle-Dk7MFcJp.js";
|
|
2
|
+
import { useState as h, useCallback as d, useMemo as g, useContext as j, useEffect as C, useRef as M } from "react";
|
|
3
|
+
import { EventType as N } from "@azure/msal-browser";
|
|
4
|
+
import { MsalProvider as J } from "@azure/msal-react";
|
|
5
5
|
import "zod";
|
|
6
|
-
import "react-hook-form";
|
|
7
6
|
import "react-router-dom";
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import "react-hook-form";
|
|
8
|
+
import { u as K, a as Q, b as $, c as W } from "./useLocalStorageState-Cs1tOpr1.js";
|
|
9
|
+
import { f as v, b as X, P as I, L as Y } from "./PrimaryButton-Bbl06m-g.js";
|
|
10
|
+
import { m as Z } from "./dateUtils-B9-rf1Eh.js";
|
|
11
11
|
const ee = ({ children: e }) => {
|
|
12
|
-
const [r, a] = h(!1), [o, t] = h(""), s =
|
|
13
|
-
a(!0), t(
|
|
14
|
-
}, []),
|
|
12
|
+
const [r, a] = h(!1), [o, t] = h(""), s = d((u) => {
|
|
13
|
+
a(!0), t(u);
|
|
14
|
+
}, []), i = d(() => {
|
|
15
15
|
a(!1);
|
|
16
|
-
}, []), l = g(() => ({ show: r, text: o, showConfirm: s, hideConfirm:
|
|
16
|
+
}, []), l = g(() => ({ show: r, text: o, showConfirm: s, hideConfirm: i }), [r, o, s, i]);
|
|
17
17
|
return /* @__PURE__ */ n.jsxs(R.Provider, { value: l, children: [
|
|
18
18
|
/* @__PURE__ */ n.jsx(ne, {}),
|
|
19
19
|
e
|
|
20
20
|
] });
|
|
21
21
|
}, te = () => {
|
|
22
|
-
const {
|
|
22
|
+
const { texts: { confirm: e } } = j(L), { isShown: r, text: a, onFinish: o } = K(), { options: t } = j(U), [s, i] = h(t.defaultValue ?? ""), l = d(() => {
|
|
23
23
|
o(null);
|
|
24
|
-
}, [o]),
|
|
25
|
-
|
|
24
|
+
}, [o]), u = d((m) => {
|
|
25
|
+
m.preventDefault(), !(t.required && !s) && o(s);
|
|
26
26
|
}, [o, t.required, s]);
|
|
27
|
-
|
|
28
|
-
r === !0 &&
|
|
27
|
+
C(() => {
|
|
28
|
+
r === !0 && i(t.defaultValue ?? "");
|
|
29
29
|
}, [r, t.defaultValue]);
|
|
30
|
-
const
|
|
30
|
+
const x = g(() => ({
|
|
31
31
|
value: s,
|
|
32
|
-
onChange: (
|
|
32
|
+
onChange: (m) => i(m.currentTarget.value),
|
|
33
33
|
className: "w-100",
|
|
34
34
|
autoFocus: !0,
|
|
35
35
|
tabIndex: 0
|
|
36
36
|
}), [s]);
|
|
37
37
|
return /* @__PURE__ */ n.jsxs(v, { show: r, size: "sm", centered: !0, onHide: l, children: [
|
|
38
38
|
/* @__PURE__ */ n.jsx(v.Header, { className: "justify-content-center", children: /* @__PURE__ */ n.jsx(v.Title, { children: a }) }),
|
|
39
|
-
/* @__PURE__ */ n.jsxs("form", { onSubmit:
|
|
39
|
+
/* @__PURE__ */ n.jsxs("form", { onSubmit: u, children: [
|
|
40
40
|
/* @__PURE__ */ n.jsxs(v.Body, { children: [
|
|
41
|
-
t.input === "textarea" ? /* @__PURE__ */ n.jsx("textarea", { ...
|
|
42
|
-
t.input === "input" ? /* @__PURE__ */ n.jsx(X, { ...
|
|
41
|
+
t.input === "textarea" ? /* @__PURE__ */ n.jsx("textarea", { ...x, rows: 5 }) : void 0,
|
|
42
|
+
t.input === "input" ? /* @__PURE__ */ n.jsx(X, { ...x, type: t.type }) : void 0
|
|
43
43
|
] }),
|
|
44
44
|
/* @__PURE__ */ n.jsxs(v.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
45
|
-
/* @__PURE__ */ n.jsx(
|
|
46
|
-
/* @__PURE__ */ n.jsx(
|
|
45
|
+
/* @__PURE__ */ n.jsx(I, { variant: "outlined", color: "secondary", onClick: l, className: "flex-grow-1", children: e.cancel }),
|
|
46
|
+
/* @__PURE__ */ n.jsx(I, { color: "primary", disabled: t.required && !s, type: "submit", className: "flex-grow-1", children: e.confirm })
|
|
47
47
|
] })
|
|
48
48
|
] })
|
|
49
49
|
] });
|
|
50
50
|
}, se = ({ children: e }) => {
|
|
51
|
-
const [r, a] = h(!1), [o, t] = h(""), [s,
|
|
52
|
-
}),
|
|
53
|
-
t(
|
|
54
|
-
}, []),
|
|
51
|
+
const [r, a] = h(!1), [o, t] = h(""), [s, i] = h({ input: "textarea", type: "text" }), l = M(() => {
|
|
52
|
+
}), u = d((b) => {
|
|
53
|
+
t(b), a(!0);
|
|
54
|
+
}, []), x = d(() => {
|
|
55
55
|
a(!1);
|
|
56
|
-
}, []),
|
|
56
|
+
}, []), m = g(() => ({
|
|
57
57
|
isShown: r,
|
|
58
58
|
text: o,
|
|
59
|
-
showPrompt:
|
|
60
|
-
hidePrompt:
|
|
59
|
+
showPrompt: u,
|
|
60
|
+
hidePrompt: x,
|
|
61
61
|
resolveRef: l,
|
|
62
62
|
options: s,
|
|
63
|
-
setOptions:
|
|
64
|
-
}), [r, o,
|
|
65
|
-
return /* @__PURE__ */ n.jsxs(
|
|
63
|
+
setOptions: i
|
|
64
|
+
}), [r, o, u, x, s]);
|
|
65
|
+
return /* @__PURE__ */ n.jsxs(U.Provider, { value: m, children: [
|
|
66
66
|
e,
|
|
67
67
|
/* @__PURE__ */ n.jsx(te, {})
|
|
68
68
|
] });
|
|
69
|
-
},
|
|
70
|
-
const
|
|
69
|
+
}, fe = ({ cookieDomain: e, axiosOptions: r, language: a, texts: o, ProjectIconComponent: t, localizationContext: s, children: i }) => {
|
|
70
|
+
const l = g(() => ({
|
|
71
71
|
axiosOptions: r,
|
|
72
72
|
cookieDomain: e,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
homeDashboardTexts: i,
|
|
80
|
-
formSubmitTexts: m,
|
|
81
|
-
appSearchTexts: u,
|
|
82
|
-
customSelectTexts: L,
|
|
83
|
-
errorBoundaryTexts: P,
|
|
84
|
-
widgetTexts: y,
|
|
85
|
-
texts: C,
|
|
86
|
-
ProjectIconComponent: N,
|
|
87
|
-
localizationContext: D
|
|
88
|
-
}), [
|
|
89
|
-
r,
|
|
90
|
-
e,
|
|
91
|
-
a,
|
|
92
|
-
o,
|
|
93
|
-
t,
|
|
94
|
-
s,
|
|
95
|
-
c,
|
|
96
|
-
l,
|
|
97
|
-
i,
|
|
98
|
-
m,
|
|
99
|
-
u,
|
|
100
|
-
L,
|
|
101
|
-
P,
|
|
102
|
-
y,
|
|
103
|
-
N,
|
|
104
|
-
D,
|
|
105
|
-
C
|
|
106
|
-
]);
|
|
107
|
-
return /* @__PURE__ */ n.jsx(A.Provider, { value: S, children: /* @__PURE__ */ n.jsx(ee, { children: /* @__PURE__ */ n.jsxs(se, { children: [
|
|
73
|
+
language: a,
|
|
74
|
+
texts: o,
|
|
75
|
+
ProjectIconComponent: t,
|
|
76
|
+
localizationContext: s
|
|
77
|
+
}), [r, e, a, t, s, o]);
|
|
78
|
+
return /* @__PURE__ */ n.jsx(L.Provider, { value: l, children: /* @__PURE__ */ n.jsx(ee, { children: /* @__PURE__ */ n.jsxs(se, { children: [
|
|
108
79
|
/* @__PURE__ */ n.jsx(z, {}),
|
|
109
|
-
|
|
80
|
+
i
|
|
110
81
|
] }) }) });
|
|
111
82
|
}, he = ({ children: e }) => {
|
|
112
|
-
const [r, a] = h(!1), [o] = h(/* @__PURE__ */ new Set()), t =
|
|
83
|
+
const [r, a] = h(!1), [o] = h(/* @__PURE__ */ new Set()), t = d((l) => {
|
|
113
84
|
o.add(l), a(!0);
|
|
114
|
-
}, [o]), s =
|
|
85
|
+
}, [o]), s = d((l) => {
|
|
115
86
|
o.delete(l), o.size === 0 && a(!1);
|
|
116
|
-
}, [o]),
|
|
117
|
-
return /* @__PURE__ */ n.jsxs(F.Provider, { value:
|
|
87
|
+
}, [o]), i = g(() => ({ isLoading: r, startLoading: t, stopLoading: s }), [r, t, s]);
|
|
88
|
+
return /* @__PURE__ */ n.jsxs(F.Provider, { value: i, children: [
|
|
118
89
|
r && /* @__PURE__ */ n.jsx(Y, {}),
|
|
119
90
|
e
|
|
120
91
|
] });
|
|
121
92
|
}, ve = ({ children: e }) => {
|
|
122
|
-
const r =
|
|
123
|
-
const
|
|
124
|
-
|
|
93
|
+
const r = B(), { msalInstance: a } = j(G), { delegation: o, setDelegation: t, setAvailableDelegations: s, refreshAvailableDelegations: i } = j(O), { getToken: l } = q(), [u, x] = h(null), m = d(async () => {
|
|
94
|
+
const c = await l();
|
|
95
|
+
c && x(c);
|
|
125
96
|
}, [l]);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}, [
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
return
|
|
132
|
-
}, [])(), [
|
|
133
|
-
state:
|
|
134
|
-
user:
|
|
135
|
-
}),
|
|
136
|
-
let
|
|
137
|
-
return await r.get("/user/detail",
|
|
138
|
-
|
|
97
|
+
C(() => {
|
|
98
|
+
m();
|
|
99
|
+
}, [m]);
|
|
100
|
+
const D = d(() => {
|
|
101
|
+
const c = localStorage.getItem("user") ?? null;
|
|
102
|
+
return c ? JSON.parse(c ?? "") : null;
|
|
103
|
+
}, [])(), [P, y] = h({
|
|
104
|
+
state: D ? S.LOGGED_IN : S.LOGGING_IN,
|
|
105
|
+
user: D
|
|
106
|
+
}), k = d(async (c) => {
|
|
107
|
+
let f = null;
|
|
108
|
+
return await r.get("/user/detail", c ? { headers: { Authorization: `Bearer ${c}` } } : void 0).then((T) => {
|
|
109
|
+
f = T.data;
|
|
139
110
|
}).catch(() => {
|
|
140
|
-
|
|
141
|
-
}),
|
|
142
|
-
}, [r]),
|
|
143
|
-
localStorage.removeItem("user"),
|
|
144
|
-
state:
|
|
111
|
+
f = null;
|
|
112
|
+
}), f;
|
|
113
|
+
}, [r]), A = d(() => {
|
|
114
|
+
localStorage.removeItem("user"), y({
|
|
115
|
+
state: S.LOGGED_OUT,
|
|
145
116
|
user: null
|
|
146
117
|
}), t(null), s(null);
|
|
147
|
-
}, [s, t]),
|
|
148
|
-
|
|
149
|
-
state:
|
|
118
|
+
}, [s, t]), w = d(async (c) => {
|
|
119
|
+
y({
|
|
120
|
+
state: S.LOGGING_IN,
|
|
150
121
|
user: null
|
|
151
122
|
});
|
|
152
|
-
const
|
|
153
|
-
return
|
|
154
|
-
state:
|
|
155
|
-
user:
|
|
156
|
-
}), localStorage.setItem("user", JSON.stringify(
|
|
157
|
-
state:
|
|
123
|
+
const f = await k(c);
|
|
124
|
+
return f ? (y({
|
|
125
|
+
state: S.LOGGED_IN,
|
|
126
|
+
user: f
|
|
127
|
+
}), localStorage.setItem("user", JSON.stringify(f)), await i(), !0) : (y({
|
|
128
|
+
state: S.LOGIN_FAILED,
|
|
158
129
|
user: null
|
|
159
130
|
}), !1);
|
|
160
|
-
}, [
|
|
161
|
-
|
|
162
|
-
}, [
|
|
163
|
-
|
|
131
|
+
}, [k, i]), p = d(() => {
|
|
132
|
+
A();
|
|
133
|
+
}, [A]);
|
|
134
|
+
C(() => {
|
|
164
135
|
if (a) {
|
|
165
|
-
const
|
|
166
|
-
if (
|
|
167
|
-
const
|
|
168
|
-
|
|
136
|
+
const c = a.addEventCallback((f) => {
|
|
137
|
+
if (f.eventType === N.LOGIN_SUCCESS && f.payload) {
|
|
138
|
+
const T = f.payload;
|
|
139
|
+
x(T.accessToken);
|
|
169
140
|
}
|
|
170
141
|
});
|
|
171
142
|
return () => {
|
|
172
|
-
|
|
143
|
+
c && a.removeEventCallback(c);
|
|
173
144
|
};
|
|
174
145
|
}
|
|
175
146
|
return () => {
|
|
176
147
|
};
|
|
177
|
-
}, [a,
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
148
|
+
}, [a, w, p]);
|
|
149
|
+
const E = d(async (c) => {
|
|
150
|
+
c && await w(c).catch(() => {
|
|
151
|
+
p(), t(null);
|
|
181
152
|
});
|
|
182
|
-
}, [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}, [
|
|
153
|
+
}, [w, p, t]);
|
|
154
|
+
C(() => {
|
|
155
|
+
E(u);
|
|
156
|
+
}, [u, o == null ? void 0 : o.id, E]);
|
|
186
157
|
const _ = g(() => ({
|
|
187
|
-
user:
|
|
188
|
-
userLoginState:
|
|
189
|
-
loginUser:
|
|
190
|
-
logoutUser:
|
|
191
|
-
}), [
|
|
158
|
+
user: P.user,
|
|
159
|
+
userLoginState: P,
|
|
160
|
+
loginUser: w,
|
|
161
|
+
logoutUser: p
|
|
162
|
+
}), [P, w, p]);
|
|
192
163
|
return /* @__PURE__ */ n.jsx(H.Provider, { value: _, children: e });
|
|
193
164
|
}, ge = ({ ...e }) => {
|
|
194
|
-
const { cookieDomain: r } =
|
|
165
|
+
const { cookieDomain: r } = j(L), [, a] = V(["Authorization"]), o = g(() => ({
|
|
195
166
|
useMsal: e.useMsal ?? !1,
|
|
196
167
|
msalInstance: e.useMsal ? e.msalInstance ?? null : null,
|
|
197
168
|
msalScopes: e.useMsal ? e.msalScopes ?? [] : []
|
|
198
169
|
}), [e]);
|
|
199
|
-
return
|
|
170
|
+
return C(() => {
|
|
200
171
|
if (e.useMsal) {
|
|
201
172
|
const t = e.msalInstance.addEventCallback((s) => {
|
|
202
|
-
if (s.eventType ===
|
|
203
|
-
const
|
|
173
|
+
if (s.eventType === N.LOGIN_SUCCESS || s.eventType === N.ACQUIRE_TOKEN_SUCCESS && s.payload) {
|
|
174
|
+
const i = s.payload, l = i.account;
|
|
204
175
|
e.msalInstance.setActiveAccount(l);
|
|
205
|
-
const
|
|
206
|
-
a("Authorization",
|
|
176
|
+
const u = i.accessToken, x = i.expiresOn;
|
|
177
|
+
a("Authorization", u, {
|
|
207
178
|
path: "/",
|
|
208
179
|
secure: !0,
|
|
209
180
|
sameSite: "none",
|
|
210
181
|
domain: r,
|
|
211
|
-
expires:
|
|
182
|
+
expires: x ?? void 0
|
|
212
183
|
});
|
|
213
184
|
}
|
|
214
185
|
s.error && console.error("AuthProvider MSAL Error", s);
|
|
@@ -219,60 +190,60 @@ const ee = ({ children: e }) => {
|
|
|
219
190
|
}
|
|
220
191
|
return () => {
|
|
221
192
|
};
|
|
222
|
-
}, [e, a, r]), /* @__PURE__ */ n.jsx(
|
|
193
|
+
}, [e, a, r]), /* @__PURE__ */ n.jsx(G.Provider, { value: o, children: e.useMsal ? /* @__PURE__ */ n.jsx(J, { instance: e.msalInstance, children: e.children }) : e.children });
|
|
223
194
|
}, Ce = ({ children: e, relativeEndpoint: r }) => {
|
|
224
|
-
const [a, o, t] = Q("user-delegation", null), { data: s, setData:
|
|
195
|
+
const [a, o, t] = Q("user-delegation", null), { data: s, setData: i, reloadData: l } = $(r, {
|
|
225
196
|
nullStateBeforeLoad: !1,
|
|
226
197
|
nullStateOnFail: !0
|
|
227
|
-
}),
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
l(),
|
|
198
|
+
}), u = M(null);
|
|
199
|
+
C(() => {
|
|
200
|
+
const m = () => {
|
|
201
|
+
l(), u.current = window.setTimeout(m, Z() + 5e3);
|
|
231
202
|
};
|
|
232
|
-
return
|
|
233
|
-
|
|
203
|
+
return m(), () => {
|
|
204
|
+
u.current !== null && window.clearTimeout(u.current);
|
|
234
205
|
};
|
|
235
|
-
}, [l]),
|
|
236
|
-
const
|
|
206
|
+
}, [l]), C(() => {
|
|
207
|
+
const m = () => {
|
|
237
208
|
t();
|
|
238
209
|
};
|
|
239
|
-
return window.addEventListener("focus",
|
|
240
|
-
window.removeEventListener("focus",
|
|
210
|
+
return window.addEventListener("focus", m), () => {
|
|
211
|
+
window.removeEventListener("focus", m);
|
|
241
212
|
};
|
|
242
213
|
}, [t, l]);
|
|
243
|
-
const
|
|
214
|
+
const x = g(() => ({
|
|
244
215
|
delegation: a,
|
|
245
216
|
setDelegation: o,
|
|
246
217
|
availableDelegations: s,
|
|
247
|
-
setAvailableDelegations:
|
|
218
|
+
setAvailableDelegations: i,
|
|
248
219
|
refreshAvailableDelegations: l
|
|
249
220
|
}), [
|
|
250
221
|
a,
|
|
251
222
|
o,
|
|
252
223
|
s,
|
|
253
|
-
|
|
224
|
+
i,
|
|
254
225
|
l
|
|
255
226
|
]);
|
|
256
|
-
return /* @__PURE__ */ n.jsx(
|
|
227
|
+
return /* @__PURE__ */ n.jsx(O.Provider, { value: x, children: e });
|
|
257
228
|
}, ne = () => {
|
|
258
|
-
const {
|
|
229
|
+
const { texts: { confirm: e } } = j(L), { onConfirm: r, onCancel: a, text: o, show: t } = W();
|
|
259
230
|
return /* @__PURE__ */ n.jsxs(v, { show: t, size: "sm", centered: !0, onHide: a, children: [
|
|
260
231
|
/* @__PURE__ */ n.jsx(v.Header, { className: "justify-content-center", children: /* @__PURE__ */ n.jsx(v.Title, { children: o }) }),
|
|
261
232
|
/* @__PURE__ */ n.jsx(v.Body, { children: /* @__PURE__ */ n.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
262
|
-
/* @__PURE__ */ n.jsx(
|
|
263
|
-
/* @__PURE__ */ n.jsx(
|
|
233
|
+
/* @__PURE__ */ n.jsx(I, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: a, children: e.no }),
|
|
234
|
+
/* @__PURE__ */ n.jsx(I, { type: "button", color: "primary", onClick: r, className: "w-100 ml", children: e.yes })
|
|
264
235
|
] }) })
|
|
265
236
|
] });
|
|
266
237
|
};
|
|
267
238
|
export {
|
|
268
|
-
|
|
239
|
+
G as AuthContext,
|
|
269
240
|
ge as AuthProvider,
|
|
270
|
-
|
|
241
|
+
O as DelegationContext,
|
|
271
242
|
Ce as DelegationProvider,
|
|
272
243
|
F as LoadingContext,
|
|
273
244
|
he as LoadingProvider,
|
|
274
|
-
|
|
275
|
-
|
|
245
|
+
L as LuminusComponentsContext,
|
|
246
|
+
fe as LuminusComponentsProvider,
|
|
276
247
|
H as UserContext,
|
|
277
248
|
ve as UserProvider
|
|
278
249
|
};
|