react-luminus-components 1.3.33 → 1.3.35
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/dist/components/BnfTableValueFormats/UserAvatarValueFormat/UserAvatarValueFormat.d.ts +2 -1
- package/dist/components/Buttons/ContextButton/ContextButton.d.ts +1 -0
- package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +1 -0
- package/dist/components/Buttons/FloatingSubmit/FloatingFormSubmit.d.ts +1 -0
- package/dist/components/Buttons/IconButton/IconButton.d.ts +1 -0
- package/dist/components/Buttons/PrimaryButton/PrimaryButton.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/DropdownItem/DropdownItem.d.ts +1 -0
- package/dist/components/Dropdown/comps/DropdownItem/FileUploadDropdownItem.d.ts +1 -0
- package/dist/components/Dropdown/comps/DropdownToggle/DropdownToggle.d.ts +1 -0
- 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 -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 +23 -22
- package/dist/components/InputContainers/InputAnchorContainer/InputAnchorContainer.d.ts +2 -1
- package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +23 -22
- package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +23 -22
- 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/MessageFilters/MessageFilters.d.ts +1 -0
- 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/TabPanel/TabPanel.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 +5 -3
- package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +1 -0
- package/dist/components/UserAvatar/AvatarIcon/AvatarIcon.d.ts +1 -0
- package/dist/components/common/Alert/Alert.d.ts +1 -0
- package/dist/components/common/AlertItem/AlertItem.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/Backdrop/Backdrop.d.ts +1 -0
- package/dist/components/common/Badge/Badge.d.ts +1 -0
- package/dist/components/common/Card/Card.d.ts +1 -0
- package/dist/components/common/Collapse/Collapse.d.ts +1 -0
- package/dist/components/common/ConfirmDialog/ConfirmDialog.d.ts +1 -0
- package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +2 -1
- package/dist/components/common/FloatingActionContainer/FloatingActionContainer.d.ts +1 -0
- 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/InvalidFeedback/InvalidFeedback.d.ts +1 -0
- package/dist/components/common/Loading/Loading.d.ts +1 -0
- 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/PromptDialog/PromptDialog.d.ts +1 -0
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +2 -1
- package/dist/components/common/Timeline/Timeline.d.ts +2 -1
- package/dist/components/common/Typography/Typography.d.ts +1 -0
- package/dist/components/common/VersionInfo/VersionInfo.d.ts +1 -0
- 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 +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 +2 -1
- package/dist/contexts/confirm/ConfirmProvider.d.ts +1 -0
- package/dist/contexts/delegation/DelegationContext.d.ts +3 -2
- package/dist/contexts/delegation/DelegationProvider.d.ts +1 -0
- package/dist/contexts/loading/LoadingContext.d.ts +2 -1
- package/dist/contexts/loading/LoadingProvider.d.ts +1 -0
- 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/user/UserProvider.d.ts +1 -0
- package/dist/contexts.d.ts +1 -240
- 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 -2
- package/dist/hooks/useLocalStorageState/useLocalStorageState.d.ts +2 -1
- 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.d.ts +1 -160
- 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/TopBar/TopBar.d.ts +1 -0
- package/dist/layout.d.ts +1 -54
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.es.js +3 -3
- 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 +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/MenuItemType.d.ts +1 -0
- package/dist/models/types/MenuItemTypeExtended.d.ts +2 -1
- package/dist/models/types/PhotoAction.d.ts +1 -0
- 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/utils/apiErrorFields/apiErrorFieldsUtils.d.ts +2 -1
- package/dist/utils/bnfValueFormat/bnfValueFormat.d.ts +1 -0
- package/dist/utils/hookForm/hookFormUtils.d.ts +2 -1
- package/dist/utils.d.ts +1 -151
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { InputBaseProps } from '
|
|
2
|
-
import FromTo from '
|
|
1
|
+
import { InputBaseProps } from '../../../models/index';
|
|
2
|
+
import { default as FromTo } from '../../../models/types/FromTo';
|
|
3
3
|
import { Dispatch, SetStateAction } from 'react';
|
|
4
|
+
|
|
4
5
|
type FromToDatePickerProps = {
|
|
5
6
|
fromtoState: [FromTo, Dispatch<SetStateAction<FromTo>>];
|
|
6
7
|
className?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import FromTo from '
|
|
1
|
+
import { default as FromTo } from '../../../../models/types/FromTo';
|
|
2
2
|
import { Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import { TimeRangeSymbol } from '../constants/TimeRanges';
|
|
4
|
+
|
|
4
5
|
declare const useFromToDatePicker: (selectedRange: TimeRangeSymbol, setSelectedRange: Dispatch<SetStateAction<TimeRangeSymbol>>, setFromTo: Dispatch<SetStateAction<FromTo>>) => {
|
|
5
6
|
setFromToProp: <T extends keyof FromTo>(propertyName: T, value: FromTo[T]) => void;
|
|
6
7
|
handleArrowClick: (offset: -1 | 1) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import DashboardWidget from '
|
|
2
|
-
import { DashboardConfig } from '
|
|
1
|
+
import { default as DashboardWidget } from '../../../models/types/DashboardWidget';
|
|
2
|
+
import { DashboardConfig } from '../../../models/index';
|
|
3
|
+
|
|
3
4
|
type Props = {
|
|
4
5
|
availableWidgets: DashboardWidget[];
|
|
5
6
|
editMode?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import DashboardConfig from '
|
|
1
|
+
import { default as DashboardConfig } from '../../../../models/types/DashboardConfig';
|
|
2
|
+
|
|
2
3
|
declare const useUserDashboard: (defaultDashboardConfig?: DashboardConfig) => {
|
|
3
4
|
dashboardConfig: DashboardConfig;
|
|
4
5
|
onChangeDashboardConfig: (config: DashboardConfig) => void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { GenericAbortSignal } from 'axios';
|
|
2
|
+
|
|
2
3
|
declare const useGetImgData: (uri: string, baseUrl?: string, customToken?: string, silent?: boolean) => {
|
|
3
4
|
data: Blob | null;
|
|
4
|
-
setData: import(
|
|
5
|
+
setData: import('react').Dispatch<import('react').SetStateAction<Blob | null>>;
|
|
5
6
|
reloadData: (signal?: GenericAbortSignal) => Promise<void>;
|
|
6
7
|
isLoading: boolean;
|
|
7
8
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { DropdownPickerOption, DropdownPickerTexts, FormSelectOption } from '
|
|
2
|
+
import { DropdownPickerOption, DropdownPickerTexts, FormSelectOption } from '../../../models/index';
|
|
3
|
+
|
|
3
4
|
type Props = {
|
|
4
5
|
show: boolean;
|
|
5
6
|
onCancel: () => void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { PublicClientApplication } from '
|
|
1
|
+
import { PublicClientApplication } from '../../../node_modules/@azure/msal-browser';
|
|
2
|
+
|
|
2
3
|
interface IAuthContext {
|
|
3
4
|
useMsal: boolean;
|
|
4
5
|
msalInstance: PublicClientApplication | null;
|
|
5
6
|
msalScopes: string[];
|
|
6
7
|
}
|
|
7
|
-
declare const AuthContext: import(
|
|
8
|
+
declare const AuthContext: import('react').Context<IAuthContext>;
|
|
8
9
|
export default AuthContext;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
interface IConfirmContext {
|
|
2
3
|
show: boolean;
|
|
3
4
|
text: string;
|
|
4
5
|
showConfirm: (text: string) => void;
|
|
5
6
|
hideConfirm: () => void;
|
|
6
7
|
}
|
|
7
|
-
declare const ConfirmContext: import(
|
|
8
|
+
declare const ConfirmContext: import('react').Context<IConfirmContext>;
|
|
8
9
|
export default ConfirmContext;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { NameIdIntModel } from '
|
|
1
|
+
import { NameIdIntModel } from '../../models/index';
|
|
2
2
|
import { GenericAbortSignal } from 'axios';
|
|
3
3
|
import { Dispatch, SetStateAction } from 'react';
|
|
4
|
+
|
|
4
5
|
interface EmployeeSmallModel {
|
|
5
6
|
id: number;
|
|
6
7
|
name: string | null;
|
|
@@ -20,5 +21,5 @@ export interface IDelegationContext {
|
|
|
20
21
|
setAvailableDelegations: React.Dispatch<React.SetStateAction<UserDelegationModel[] | null>>;
|
|
21
22
|
refreshAvailableDelegations: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<void>;
|
|
22
23
|
}
|
|
23
|
-
declare const DelegationContext: import(
|
|
24
|
+
declare const DelegationContext: import('react').Context<IDelegationContext>;
|
|
24
25
|
export default DelegationContext;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
interface ILoadingContext {
|
|
2
3
|
isLoading: boolean;
|
|
3
4
|
startLoading: (key: string) => void;
|
|
4
5
|
stopLoading: (key: string) => void;
|
|
5
6
|
}
|
|
6
|
-
declare const LoadingContext: import(
|
|
7
|
+
declare const LoadingContext: import('react').Context<ILoadingContext>;
|
|
7
8
|
export default LoadingContext;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { CommonLuminusIcons, ILocalizationContext } from '
|
|
2
|
-
import ComponentsContextTexts from '
|
|
1
|
+
import { CommonLuminusIcons, ILocalizationContext } from '../../models/index';
|
|
2
|
+
import { default as ComponentsContextTexts } from '../../models/texts/ComponentsContextTexts';
|
|
3
3
|
import { CreateAxiosDefaults } from 'axios';
|
|
4
4
|
import { Context, ReactNode } from 'react';
|
|
5
5
|
import { IconBaseProps } from 'react-icons';
|
|
6
|
+
|
|
6
7
|
export type IconComponentType = (props: {
|
|
7
8
|
icon: CommonLuminusIcons;
|
|
8
9
|
className?: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ILocalizationContext } from '
|
|
2
|
-
import ComponentsContextTexts from '
|
|
1
|
+
import { ILocalizationContext } from '../../models/index';
|
|
2
|
+
import { default as ComponentsContextTexts } from '../../models/texts/ComponentsContextTexts';
|
|
3
3
|
import { CreateAxiosDefaults } from 'axios';
|
|
4
4
|
import { Context } from 'react';
|
|
5
5
|
import { IconComponentType } from './LuminusComponentsContext';
|
|
6
|
+
|
|
6
7
|
type Props = {
|
|
7
8
|
cookieDomain: string;
|
|
8
9
|
axiosOptions: CreateAxiosDefaults;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import PromptOptions from '
|
|
1
|
+
import { default as PromptOptions } from '../../models/types/PromptOptions';
|
|
2
|
+
|
|
2
3
|
interface IPromptContext {
|
|
3
4
|
isShown: boolean;
|
|
4
5
|
text: string;
|
|
@@ -8,5 +9,5 @@ interface IPromptContext {
|
|
|
8
9
|
options: PromptOptions;
|
|
9
10
|
setOptions: React.Dispatch<React.SetStateAction<PromptOptions>>;
|
|
10
11
|
}
|
|
11
|
-
declare const PromptContext: import(
|
|
12
|
+
declare const PromptContext: import('react').Context<IPromptContext>;
|
|
12
13
|
export default PromptContext;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import UserModel from '
|
|
2
|
-
import { UserLoginState } from '
|
|
1
|
+
import { default as UserModel } from '../../models/types/UserModel';
|
|
2
|
+
import { UserLoginState } from '../../models/index';
|
|
3
|
+
|
|
3
4
|
interface IUserContext {
|
|
4
5
|
user: UserModel | null;
|
|
5
6
|
userLoginState: UserLoginState;
|
|
6
7
|
loginUser: (token?: string) => Promise<boolean>;
|
|
7
8
|
logoutUser: () => void;
|
|
8
9
|
}
|
|
9
|
-
declare const UserContext: import(
|
|
10
|
+
declare const UserContext: import('react').Context<IUserContext>;
|
|
10
11
|
export default UserContext;
|
package/dist/contexts.d.ts
CHANGED
|
@@ -1,240 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { CreateAxiosDefaults } from 'axios';
|
|
3
|
-
import { Dispatch } from 'react';
|
|
4
|
-
import { GenericAbortSignal } from 'axios';
|
|
5
|
-
import { IconBaseProps } from 'react-icons';
|
|
6
|
-
import { JSX as JSX_2 } from 'react';
|
|
7
|
-
import { Locale } from 'date-fns';
|
|
8
|
-
import { PublicClientApplication } from '@azure/msal-browser';
|
|
9
|
-
import { ReactNode } from 'react';
|
|
10
|
-
import { SetStateAction } from 'react';
|
|
11
|
-
|
|
12
|
-
declare type AppSearchTexts = {
|
|
13
|
-
searchPlaceholder: string;
|
|
14
|
-
amountFrom: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export declare const AuthContext: Context<IAuthContext>;
|
|
18
|
-
|
|
19
|
-
export declare const AuthProvider: ({ ...props }: Props_4) => JSX_2.Element;
|
|
20
|
-
|
|
21
|
-
declare type AxiosTexts = {
|
|
22
|
-
validationError: string;
|
|
23
|
-
networkError: string;
|
|
24
|
-
unexpectedError: string;
|
|
25
|
-
forbiddenError: string;
|
|
26
|
-
permissionError: string;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
declare type BaseProps = {
|
|
30
|
-
children: React.ReactNode;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
declare type CommonLuminusIcons = 'edit' | 'delete' | 'info' | 'warning' | 'check' | 'danger' | 'chevron-left' | 'chevron-right';
|
|
34
|
-
|
|
35
|
-
declare type ComponentsContextTexts = {
|
|
36
|
-
axios: AxiosTexts;
|
|
37
|
-
confirm: ConfirmTexts;
|
|
38
|
-
formValidation: FormValidationTexts;
|
|
39
|
-
homeDashboard: HomeDashboardTexts;
|
|
40
|
-
formSubmit: FormSubmitTexts;
|
|
41
|
-
appSearch: AppSearchTexts;
|
|
42
|
-
customSelect: CustomSelectTexts;
|
|
43
|
-
errorBoundary: ErrorBoundaryTexts;
|
|
44
|
-
widget: WidgetTexts;
|
|
45
|
-
messageBoard: MessageBoardTexts;
|
|
46
|
-
date: DateTexts;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
declare type ConfirmTexts = {
|
|
50
|
-
yes: string;
|
|
51
|
-
no: string;
|
|
52
|
-
cancel: string;
|
|
53
|
-
confirm: string;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
declare type CustomSelectTexts = {
|
|
57
|
-
searchPlaceholder: string;
|
|
58
|
-
clearSelection: string;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
declare type DateTexts = {
|
|
62
|
-
year: string;
|
|
63
|
-
month: string;
|
|
64
|
-
week: string;
|
|
65
|
-
day: string;
|
|
66
|
-
custom: string;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export declare const DelegationContext: Context<IDelegationContext>;
|
|
70
|
-
|
|
71
|
-
export declare const DelegationProvider: ({ children, relativeEndpoint }: Props_5) => JSX_2.Element;
|
|
72
|
-
|
|
73
|
-
declare interface EmployeeSmallModel {
|
|
74
|
-
id: number;
|
|
75
|
-
name: string | null;
|
|
76
|
-
kid: string | null;
|
|
77
|
-
driverTrainingDate: string | null;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
declare type ErrorBoundaryTexts = {
|
|
81
|
-
reloadButtonContent: ReactNode;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
declare type FormSubmitTexts = {
|
|
85
|
-
storno: string;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
declare type FormValidationTexts = {
|
|
89
|
-
required: string;
|
|
90
|
-
invalidDate: string;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
declare type HomeDashboardTexts = {
|
|
94
|
-
dashboardEdit: string;
|
|
95
|
-
dashboardEditDone: string;
|
|
96
|
-
pickWidgetToAdd: string;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
declare interface IAuthContext {
|
|
100
|
-
useMsal: boolean;
|
|
101
|
-
msalInstance: PublicClientApplication | null;
|
|
102
|
-
msalScopes: string[];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
declare type IconComponentType = (props: {
|
|
106
|
-
icon: CommonLuminusIcons;
|
|
107
|
-
className?: string;
|
|
108
|
-
iconProps?: IconBaseProps;
|
|
109
|
-
}) => ReactNode;
|
|
110
|
-
|
|
111
|
-
export declare interface IDelegationContext {
|
|
112
|
-
delegation: NameIdIntModel | null;
|
|
113
|
-
setDelegation: Dispatch<SetStateAction<NameIdIntModel | null>>;
|
|
114
|
-
availableDelegations: UserDelegationModel[] | null;
|
|
115
|
-
setAvailableDelegations: React.Dispatch<React.SetStateAction<UserDelegationModel[] | null>>;
|
|
116
|
-
refreshAvailableDelegations: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<void>;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
declare interface ILoadingContext {
|
|
120
|
-
isLoading: boolean;
|
|
121
|
-
startLoading: (key: string) => void;
|
|
122
|
-
stopLoading: (key: string) => void;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
declare interface ILocalizationContext {
|
|
126
|
-
language: string;
|
|
127
|
-
setLanguage: (lng: string) => void;
|
|
128
|
-
dateFnsLocale: Locale;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export declare interface ILuminusComponentsContext {
|
|
132
|
-
cookieDomain: string;
|
|
133
|
-
axiosOptions: CreateAxiosDefaults;
|
|
134
|
-
localizationContext: Context<ILocalizationContext>;
|
|
135
|
-
language: string;
|
|
136
|
-
texts: ComponentsContextTexts;
|
|
137
|
-
ProjectIconComponent: IconComponentType;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
declare interface IUserContext {
|
|
141
|
-
user: UserModel | null;
|
|
142
|
-
userLoginState: UserLoginState;
|
|
143
|
-
loginUser: (token?: string) => Promise<boolean>;
|
|
144
|
-
logoutUser: () => void;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export declare const LoadingContext: Context<ILoadingContext>;
|
|
148
|
-
|
|
149
|
-
export declare const LoadingProvider: ({ children }: Props_2) => JSX_2.Element;
|
|
150
|
-
|
|
151
|
-
declare enum LoginState {
|
|
152
|
-
LOGGING_IN = 0,
|
|
153
|
-
LOGGED_IN = 1,
|
|
154
|
-
LOGGED_OUT = 2,
|
|
155
|
-
LOGIN_FAILED = 3
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export declare const LuminusComponentsContext: Context<ILuminusComponentsContext>;
|
|
159
|
-
|
|
160
|
-
export declare const LuminusComponentsProvider: ({ cookieDomain, axiosOptions, language, texts, ProjectIconComponent, localizationContext, children, }: Props) => JSX_2.Element;
|
|
161
|
-
|
|
162
|
-
declare type MessageBoardTexts = {
|
|
163
|
-
noMessages: string;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
declare type MsalProps = {
|
|
167
|
-
msalInstance: PublicClientApplication;
|
|
168
|
-
msalScopes: string[];
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
declare type NameIdIntModel = {
|
|
172
|
-
id: number;
|
|
173
|
-
name: string | null;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
declare type NameIdStringModel = {
|
|
177
|
-
id: string;
|
|
178
|
-
name: string | null;
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
declare type Props = {
|
|
182
|
-
cookieDomain: string;
|
|
183
|
-
axiosOptions: CreateAxiosDefaults;
|
|
184
|
-
language: string;
|
|
185
|
-
children: React.ReactNode;
|
|
186
|
-
texts: ComponentsContextTexts;
|
|
187
|
-
ProjectIconComponent: IconComponentType;
|
|
188
|
-
localizationContext: Context<ILocalizationContext>;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
declare type Props_2 = {
|
|
192
|
-
children: React.ReactNode;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
declare type Props_3 = {
|
|
196
|
-
children: React.ReactNode;
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
declare type Props_4 = BaseProps & ({
|
|
200
|
-
useMsal?: false;
|
|
201
|
-
} | (MsalProps & {
|
|
202
|
-
useMsal: true;
|
|
203
|
-
}));
|
|
204
|
-
|
|
205
|
-
declare type Props_5 = {
|
|
206
|
-
children: React.ReactNode;
|
|
207
|
-
relativeEndpoint: string;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
export declare const UserContext: Context<IUserContext>;
|
|
211
|
-
|
|
212
|
-
declare interface UserDelegationModel {
|
|
213
|
-
id: number;
|
|
214
|
-
employee: EmployeeSmallModel;
|
|
215
|
-
from: string | null;
|
|
216
|
-
to: string | null;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
declare type UserLoginState = {
|
|
220
|
-
state: LoginState;
|
|
221
|
-
user: UserModel | null;
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
declare type UserModel = {
|
|
225
|
-
personalNumber: number;
|
|
226
|
-
kid: string | null;
|
|
227
|
-
name: string | null;
|
|
228
|
-
photoId: number | null;
|
|
229
|
-
permissions: string[] | null;
|
|
230
|
-
orgUnit: NameIdStringModel;
|
|
231
|
-
cafmToken: string | null;
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
export declare const UserProvider: ({ children }: Props_3) => JSX_2.Element;
|
|
235
|
-
|
|
236
|
-
declare type WidgetTexts = {
|
|
237
|
-
fallbackError: string;
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
export { }
|
|
1
|
+
export * from './contexts/index'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CancelTokenStatic } from 'axios';
|
|
2
|
+
|
|
2
3
|
export declare const cancelToken: CancelTokenStatic;
|
|
3
4
|
type Config = {
|
|
4
5
|
authenticated?: boolean;
|
|
@@ -6,5 +7,5 @@ type Config = {
|
|
|
6
7
|
silent?: boolean;
|
|
7
8
|
customToken?: string;
|
|
8
9
|
};
|
|
9
|
-
export declare const useAxios: (useAxiosConfig?: Config) => import(
|
|
10
|
+
export declare const useAxios: (useAxiosConfig?: Config) => import('axios').AxiosInstance;
|
|
10
11
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useFormControlType: (type:
|
|
1
|
+
declare const useFormControlType: (type: 'number' | 'text' | 'password' | 'date' | 'datetime-local', currentValue: string | null, isFocused: boolean) => "number" | "date" | "text" | "password" | "datetime-local";
|
|
2
2
|
export default useFormControlType;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { UseGetApiDataOptions } from '
|
|
1
|
+
import { UseGetApiDataOptions } from '../../models/index';
|
|
2
2
|
import { GenericAbortSignal } from 'axios';
|
|
3
|
+
|
|
3
4
|
declare const useGetApiData: <T>(uri: string, { loadOnInit, enabled, silent, nullStateBeforeLoad, nullStateOnFail, customApiUrl, customBearerToken, }?: UseGetApiDataOptions) => {
|
|
4
5
|
data: T | null;
|
|
5
|
-
setData: import(
|
|
6
|
+
setData: import('react').Dispatch<import('react').SetStateAction<T | null>>;
|
|
6
7
|
reloadData: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<void>;
|
|
7
8
|
};
|
|
8
9
|
export default useGetApiData;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const useLocalStorageState: <T>(key: string, initialValue: T) => readonly [T, import('react').Dispatch<import('react').SetStateAction<T>>, () => void];
|
|
2
3
|
export default useLocalStorageState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const useNotifications: () => {
|
|
2
|
-
addNotification: (message: string, type:
|
|
2
|
+
addNotification: (message: string, type: 'success' | 'info' | 'danger' | 'warning' | 'prompt') => void;
|
|
3
3
|
};
|
|
4
4
|
export default useNotifications;
|