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.
Files changed (171) hide show
  1. package/dist/components/BnfTableValueFormats/UserAvatarValueFormat/UserAvatarValueFormat.d.ts +2 -1
  2. package/dist/components/Buttons/ContextButton/ContextButton.d.ts +1 -0
  3. package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +1 -0
  4. package/dist/components/Buttons/FloatingSubmit/FloatingFormSubmit.d.ts +1 -0
  5. package/dist/components/Buttons/IconButton/IconButton.d.ts +1 -0
  6. package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +1 -0
  7. package/dist/components/Dropdown/Dropdown.d.ts +1 -0
  8. package/dist/components/Dropdown/comps/DropdownDivider/DropdownDivider.d.ts +2 -1
  9. package/dist/components/Dropdown/comps/DropdownItem/DropdownItem.d.ts +1 -0
  10. package/dist/components/Dropdown/comps/DropdownItem/FileUploadDropdownItem.d.ts +1 -0
  11. package/dist/components/Dropdown/comps/DropdownToggle/DropdownToggle.d.ts +1 -0
  12. package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +5 -4
  13. package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +2 -1
  14. package/dist/components/Form/CheckInput/CheckInput.d.ts +2 -1
  15. package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +2 -1
  16. package/dist/components/Form/NumericStepperInput/NumericStepperInput.d.ts +2 -1
  17. package/dist/components/Form/SelectInput/SelectInput.d.ts +2 -1
  18. package/dist/components/Form/TextAreaInput/TextAreaInput.d.ts +2 -1
  19. package/dist/components/Form/TextInput/TextInput.d.ts +2 -1
  20. package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +2 -1
  21. package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +2 -1
  22. package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +3 -2
  23. package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +2 -1
  24. package/dist/components/HookForm/FloatingSubmit/HookFormFloatingSubmit.d.ts +1 -0
  25. package/dist/components/HookForm/NumericStepperInput/HookFormNumericStepperInput.d.ts +2 -1
  26. package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +2 -1
  27. package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +2 -1
  28. package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +2 -1
  29. package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +2 -1
  30. package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +23 -22
  31. package/dist/components/InputContainers/InputAnchorContainer/InputAnchorContainer.d.ts +2 -1
  32. package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +23 -22
  33. package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +23 -22
  34. package/dist/components/Layout/MessageBoard/MessageBoard.d.ts +2 -1
  35. package/dist/components/Layout/MessageBoard/components/MessageList/MessageList.d.ts +2 -1
  36. package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageFilters/MessageFilters.d.ts +1 -0
  37. package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageItem/MessageItem.d.ts +2 -1
  38. package/dist/components/NewTabs/Tab/Tab.d.ts +1 -0
  39. package/dist/components/NewTabs/TabPanel/TabPanel.d.ts +1 -0
  40. package/dist/components/NewTabs/Tabs/Tabs.d.ts +2 -1
  41. package/dist/components/Tabs/Tabs.d.ts +1 -0
  42. package/dist/components/Tabs/comps/Tab/Tab.d.ts +1 -0
  43. package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +5 -3
  44. package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +1 -0
  45. package/dist/components/UserAvatar/AvatarIcon/AvatarIcon.d.ts +1 -0
  46. package/dist/components/common/Alert/Alert.d.ts +1 -0
  47. package/dist/components/common/AlertItem/AlertItem.d.ts +1 -0
  48. package/dist/components/common/ApiFileDownloadButton/ApiFileDownloadButton.d.ts +2 -1
  49. package/dist/components/common/AppSearch/AppSearch.d.ts +2 -1
  50. package/dist/components/common/AppSearch/comps/AutocompleteWindow/AutocompleteWindow.d.ts +2 -1
  51. package/dist/components/common/AppSearch/comps/TypeSelector/TypeSelector.d.ts +3 -2
  52. package/dist/components/common/AppSearch/hooks/useSearchItems.d.ts +2 -1
  53. package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +2 -1
  54. package/dist/components/common/Backdrop/Backdrop.d.ts +1 -0
  55. package/dist/components/common/Badge/Badge.d.ts +1 -0
  56. package/dist/components/common/Card/Card.d.ts +1 -0
  57. package/dist/components/common/Collapse/Collapse.d.ts +1 -0
  58. package/dist/components/common/ConfirmDialog/ConfirmDialog.d.ts +1 -0
  59. package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +2 -1
  60. package/dist/components/common/FloatingActionContainer/FloatingActionContainer.d.ts +1 -0
  61. package/dist/components/common/FromToDatePicker/FromToDatePicker.d.ts +3 -2
  62. package/dist/components/common/FromToDatePicker/components/FromToDatePickerDropdownToggle/FromToDatePickerDropdownToggle.d.ts +2 -1
  63. package/dist/components/common/FromToDatePicker/hooks/useFromToDatePicker.d.ts +2 -1
  64. package/dist/components/common/FromToDatePicker/utils/utilsFromToDatePicker.d.ts +1 -0
  65. package/dist/components/common/HomeDashboard/HomeDashboard.d.ts +3 -2
  66. package/dist/components/common/HomeDashboard/comps/FreeSpaceWidget/FreeSpaceWidget.d.ts +2 -1
  67. package/dist/components/common/HomeDashboard/comps/WidgetPicker/WidgetPicker.d.ts +2 -1
  68. package/dist/components/common/HomeDashboard/hooks/useUserDashboard.d.ts +2 -1
  69. package/dist/components/common/ImgApi/ImgApi.d.ts +2 -1
  70. package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +2 -1
  71. package/dist/components/common/ImgDirect/ImgDirect.d.ts +2 -1
  72. package/dist/components/common/InvalidFeedback/InvalidFeedback.d.ts +1 -0
  73. package/dist/components/common/Loading/Loading.d.ts +1 -0
  74. package/dist/components/common/Loading/LoadingBlock.d.ts +1 -0
  75. package/dist/components/common/MonthPicker/MonthPicker.d.ts +1 -0
  76. package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +2 -1
  77. package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +2 -1
  78. package/dist/components/common/PromptDialog/PromptDialog.d.ts +1 -0
  79. package/dist/components/common/SimplePicker/SimplePicker.d.ts +2 -1
  80. package/dist/components/common/Timeline/Timeline.d.ts +2 -1
  81. package/dist/components/common/Typography/Typography.d.ts +1 -0
  82. package/dist/components/common/VersionInfo/VersionInfo.d.ts +1 -0
  83. package/dist/components/common/Widget/WidgetCard.d.ts +1 -0
  84. package/dist/components/common/Widget/WidgetWrapper.d.ts +1 -0
  85. package/dist/components/common/YearPicker/YearPicker.d.ts +1 -0
  86. package/dist/contexts/auth/AuthContext.d.ts +3 -2
  87. package/dist/contexts/auth/AuthProvider.d.ts +2 -1
  88. package/dist/contexts/confirm/ConfirmContext.d.ts +2 -1
  89. package/dist/contexts/confirm/ConfirmProvider.d.ts +1 -0
  90. package/dist/contexts/delegation/DelegationContext.d.ts +3 -2
  91. package/dist/contexts/delegation/DelegationProvider.d.ts +1 -0
  92. package/dist/contexts/loading/LoadingContext.d.ts +2 -1
  93. package/dist/contexts/loading/LoadingProvider.d.ts +1 -0
  94. package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +3 -2
  95. package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +3 -2
  96. package/dist/contexts/prompt/PromptContext.d.ts +3 -2
  97. package/dist/contexts/prompt/PromptProvider.d.ts +1 -0
  98. package/dist/contexts/user/UserContext.d.ts +4 -3
  99. package/dist/contexts/user/UserProvider.d.ts +1 -0
  100. package/dist/contexts.d.ts +1 -240
  101. package/dist/hooks/useAxios/useAxios.d.ts +2 -1
  102. package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -0
  103. package/dist/hooks/useFormControlType/useFormControlType.d.ts +1 -1
  104. package/dist/hooks/useGetApiData/useGetApiData.d.ts +3 -2
  105. package/dist/hooks/useLocalStorageState/useLocalStorageState.d.ts +2 -1
  106. package/dist/hooks/useNotifications/useNotifications.d.ts +1 -1
  107. package/dist/hooks/usePrompt/usePrompt.d.ts +2 -1
  108. package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +2 -1
  109. package/dist/hooks.d.ts +1 -160
  110. package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +2 -1
  111. package/dist/layout/MainContainer/MainContainer.d.ts +2 -1
  112. package/dist/layout/PageTitle/PageTitle.d.ts +1 -0
  113. package/dist/layout/SideContentBar/SideContentBar.d.ts +1 -0
  114. package/dist/layout/SideMenu/MenuItem/MenuItem.d.ts +2 -1
  115. package/dist/layout/SideMenu/SideMenu.d.ts +2 -1
  116. package/dist/layout/TopBar/TopBar.d.ts +1 -0
  117. package/dist/layout.d.ts +1 -54
  118. package/dist/main.cjs.js +1 -1
  119. package/dist/main.d.ts +1 -1
  120. package/dist/main.es.js +3 -3
  121. package/dist/models/luminus-context-types/ILocalizationContext.d.ts +1 -0
  122. package/dist/models/prop-types/ContainerProps.d.ts +1 -0
  123. package/dist/models/prop-types/DashboardWidgetCommonProps.d.ts +1 -0
  124. package/dist/models/prop-types/FormInputProps/FormCheckInputProps.d.ts +2 -1
  125. package/dist/models/prop-types/FormInputProps/FormFileInputProps.d.ts +2 -1
  126. package/dist/models/prop-types/FormInputProps/FormNumericStepperInputProps.d.ts +2 -1
  127. package/dist/models/prop-types/FormInputProps/FormRadioInputProps.d.ts +2 -1
  128. package/dist/models/prop-types/FormInputProps/FormSelectInputProps.d.ts +2 -1
  129. package/dist/models/prop-types/FormInputProps/FormTextAreaInputProps.d.ts +2 -1
  130. package/dist/models/prop-types/FormInputProps/FormTextInputProps.d.ts +2 -1
  131. package/dist/models/prop-types/HookFormInputProps/HookFormCheckInputProps.d.ts +3 -2
  132. package/dist/models/prop-types/HookFormInputProps/HookFormDropdownPickerProps.d.ts +3 -2
  133. package/dist/models/prop-types/HookFormInputProps/HookFormFileInputProps.d.ts +3 -2
  134. package/dist/models/prop-types/HookFormInputProps/HookFormInputBaseProps.d.ts +2 -1
  135. package/dist/models/prop-types/HookFormInputProps/HookFormInputProps.d.ts +2 -1
  136. package/dist/models/prop-types/HookFormInputProps/HookFormNumericStepperInputProps.d.ts +3 -2
  137. package/dist/models/prop-types/HookFormInputProps/HookFormRadioInputProps.d.ts +3 -2
  138. package/dist/models/prop-types/HookFormInputProps/HookFormSelectInputProps.d.ts +3 -2
  139. package/dist/models/prop-types/HookFormInputProps/HookFormTextAreaInputProps.d.ts +3 -2
  140. package/dist/models/prop-types/HookFormInputProps/HookFormTextInputProps.d.ts +3 -2
  141. package/dist/models/prop-types/ImgProps.d.ts +1 -0
  142. package/dist/models/prop-types/InputContainerProps.d.ts +1 -0
  143. package/dist/models/prop-types/InputProps/CheckInputProps.d.ts +2 -1
  144. package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +5 -4
  145. package/dist/models/prop-types/InputProps/FileInputProps.d.ts +2 -1
  146. package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +2 -1
  147. package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +2 -1
  148. package/dist/models/prop-types/InputProps/RadioInputProps.d.ts +3 -2
  149. package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +3 -2
  150. package/dist/models/prop-types/InputProps/TextAreaInputProps.d.ts +2 -1
  151. package/dist/models/prop-types/InputProps/TextInputProps.d.ts +2 -1
  152. package/dist/models/texts/ComponentsContextTexts.d.ts +12 -11
  153. package/dist/models/texts/ErrorBoundaryTexts.d.ts +1 -0
  154. package/dist/models/types/ApiErrorResult.d.ts +2 -1
  155. package/dist/models/types/DashboardConfig.d.ts +2 -1
  156. package/dist/models/types/DashboardWidget.d.ts +2 -1
  157. package/dist/models/types/DropdownPickerOption.d.ts +2 -1
  158. package/dist/models/types/HookFormInputProps.d.ts +2 -1
  159. package/dist/models/types/MenuItemType.d.ts +1 -0
  160. package/dist/models/types/MenuItemTypeExtended.d.ts +2 -1
  161. package/dist/models/types/PhotoAction.d.ts +1 -0
  162. package/dist/models/types/SearchResultGroupModel.d.ts +3 -2
  163. package/dist/models/types/SearchResultModel.d.ts +2 -1
  164. package/dist/models/types/TimelineStep.d.ts +2 -1
  165. package/dist/models/types/UserLoginState.d.ts +3 -2
  166. package/dist/models/types/UserModel.d.ts +2 -1
  167. package/dist/utils/apiErrorFields/apiErrorFieldsUtils.d.ts +2 -1
  168. package/dist/utils/bnfValueFormat/bnfValueFormat.d.ts +1 -0
  169. package/dist/utils/hookForm/hookFormUtils.d.ts +2 -1
  170. package/dist/utils.d.ts +1 -151
  171. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  children: React.ReactNode;
3
4
  noSpacer?: boolean;
@@ -1,6 +1,7 @@
1
- import { InputBaseProps } from '@models/index';
2
- import FromTo from '@models/types/FromTo';
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,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  type FromToDatePickerDropdownToggleProps = {
3
4
  onClick: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
4
5
  text?: string;
@@ -1,6 +1,7 @@
1
- import FromTo from '@models/types/FromTo';
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,4 +1,5 @@
1
1
  import { TimeRangeSymbol } from '../constants/TimeRanges';
2
+
2
3
  export declare const getMonthFromTo: (fromDate: Date) => {
3
4
  from: string;
4
5
  to: string;
@@ -1,5 +1,6 @@
1
- import DashboardWidget from '@models/types/DashboardWidget';
2
- import { DashboardConfig } from '@models/index';
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 { DashboardWidget, HomeDashboardTexts } from '@models/index';
1
+ import { DashboardWidget, HomeDashboardTexts } from '../../../../../models/index';
2
+
2
3
  type Props = {
3
4
  availableWidgets: DashboardWidget[];
4
5
  onAdd: (widgetId: number) => void;
@@ -1,4 +1,5 @@
1
- import { DashboardWidget, HomeDashboardTexts } from '@models/index';
1
+ import { DashboardWidget, HomeDashboardTexts } from '../../../../../models/index';
2
+
2
3
  type Props = {
3
4
  show: boolean;
4
5
  widgets: DashboardWidget[];
@@ -1,4 +1,5 @@
1
- import DashboardConfig from '@models/types/DashboardConfig';
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,3 +1,4 @@
1
- import { ImgProps } from '@models/index';
1
+ import { ImgProps } from '../../../models/index';
2
+
2
3
  declare const ImgApi: ({ src, alt, baseUrl, customToken, placeholder, ...otherProps }: ImgProps) => import("react").JSX.Element | null;
3
4
  export default ImgApi;
@@ -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("react").Dispatch<import("react").SetStateAction<Blob | null>>;
5
+ setData: import('react').Dispatch<import('react').SetStateAction<Blob | null>>;
5
6
  reloadData: (signal?: GenericAbortSignal) => Promise<void>;
6
7
  isLoading: boolean;
7
8
  };
@@ -1,3 +1,4 @@
1
- import { ImgProps } from '@models/index';
1
+ import { ImgProps } from '../../../models/index';
2
+
2
3
  declare const ImgDirect: ({ src, alt, baseUrl, customToken, placeholder, ...otherProps }: ImgProps) => import("react").JSX.Element;
3
4
  export default ImgDirect;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  message: string;
3
4
  };
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Loading: () => import("react").JSX.Element;
2
3
  export default Loading;
@@ -1,4 +1,5 @@
1
1
  import { HTMLProps } from 'react';
2
+
2
3
  type LoadingBlockProps = HTMLProps<HTMLDivElement>;
3
4
  declare const LoadingBlock: ({ className, ...props }: LoadingBlockProps) => import("react").JSX.Element;
4
5
  export default LoadingBlock;
@@ -1,4 +1,5 @@
1
1
  import { Locale } from 'date-fns';
2
+
2
3
  type Props = {
3
4
  month: Date;
4
5
  onChangeMonth: (month: Date) => void;
@@ -1,4 +1,5 @@
1
- import { ImgProps, PhotoAction, PhotoLibraryItemModel } from '@models/index';
1
+ import { ImgProps, PhotoAction, PhotoLibraryItemModel } from '../../../models/index';
2
+
2
3
  type Props = {
3
4
  photos: PhotoLibraryItemModel[];
4
5
  uploadPhotosText?: string;
@@ -1,4 +1,5 @@
1
- import { ImgProps, PhotoAction, PhotoLibraryItemModel } from '@models/index';
1
+ import { ImgProps, PhotoAction, PhotoLibraryItemModel } from '../../../models/index';
2
+
2
3
  type Props = {
3
4
  show: boolean;
4
5
  onClose: () => void;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const PromptDialog: () => import("react").JSX.Element;
2
3
  export default PromptDialog;
@@ -1,5 +1,6 @@
1
1
  import { RefObject } from 'react';
2
- import { DropdownPickerOption, DropdownPickerTexts, FormSelectOption } from '@models/index';
2
+ import { DropdownPickerOption, DropdownPickerTexts, FormSelectOption } from '../../../models/index';
3
+
3
4
  type Props = {
4
5
  show: boolean;
5
6
  onCancel: () => void;
@@ -1,4 +1,5 @@
1
- import TimelineStep from '@models/types/TimelineStep';
1
+ import { default as TimelineStep } from '../../../models/types/TimelineStep';
2
+
2
3
  type Props = {
3
4
  steps: TimelineStep[];
4
5
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type TypographyVariant = 'h1' | 'h3' | 'h6' | 'subtitle' | 'body' | 'body2' | 'caption' | 'form-label';
2
3
  type Props = {
3
4
  variant: TypographyVariant;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  version: string;
3
4
  };
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+
2
3
  type WidgetCardProps = {
3
4
  children: ReactNode;
4
5
  title: ReactNode;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+
2
3
  type WidgetWrapperProps = {
3
4
  title: ReactNode;
4
5
  children: ReactNode;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  year: Date;
3
4
  onChangeYear: (year: Date) => void;
@@ -1,8 +1,9 @@
1
- import { PublicClientApplication } from '@azure/msal-browser';
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("react").Context<IAuthContext>;
8
+ declare const AuthContext: import('react').Context<IAuthContext>;
8
9
  export default AuthContext;
@@ -1,4 +1,5 @@
1
- import { PublicClientApplication } from '@azure/msal-browser';
1
+ import { PublicClientApplication } from '../../../node_modules/@azure/msal-browser';
2
+
2
3
  type BaseProps = {
3
4
  children: React.ReactNode;
4
5
  };
@@ -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("react").Context<IConfirmContext>;
8
+ declare const ConfirmContext: import('react').Context<IConfirmContext>;
8
9
  export default ConfirmContext;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  children: React.ReactNode;
3
4
  };
@@ -1,6 +1,7 @@
1
- import { NameIdIntModel } from '@models/index';
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("react").Context<IDelegationContext>;
24
+ declare const DelegationContext: import('react').Context<IDelegationContext>;
24
25
  export default DelegationContext;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  children: React.ReactNode;
3
4
  relativeEndpoint: string;
@@ -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("react").Context<ILoadingContext>;
7
+ declare const LoadingContext: import('react').Context<ILoadingContext>;
7
8
  export default LoadingContext;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  children: React.ReactNode;
3
4
  };
@@ -1,8 +1,9 @@
1
- import { CommonLuminusIcons, ILocalizationContext } from '@models/index';
2
- import ComponentsContextTexts from '@models/texts/ComponentsContextTexts';
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 '@models/index';
2
- import ComponentsContextTexts from '@models/texts/ComponentsContextTexts';
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 '@models/types/PromptOptions';
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("react").Context<IPromptContext>;
12
+ declare const PromptContext: import('react').Context<IPromptContext>;
12
13
  export default PromptContext;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+
2
3
  type Props = {
3
4
  children: ReactNode;
4
5
  };
@@ -1,10 +1,11 @@
1
- import UserModel from '@models/types/UserModel';
2
- import { UserLoginState } from '@models/index';
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("react").Context<IUserContext>;
10
+ declare const UserContext: import('react').Context<IUserContext>;
10
11
  export default UserContext;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  children: React.ReactNode;
3
4
  };
@@ -1,240 +1 @@
1
- import { Context } from 'react';
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("axios").AxiosInstance;
10
+ export declare const useAxios: (useAxiosConfig?: Config) => import('axios').AxiosInstance;
10
11
  export {};
@@ -1,3 +1,4 @@
1
1
  import { RefObject } from 'react';
2
+
2
3
  declare const useClickOutside: (refs: RefObject<HTMLElement>[], callback: () => void) => void;
3
4
  export default useClickOutside;
@@ -1,2 +1,2 @@
1
- declare const useFormControlType: (type: "number" | "text" | "password" | "date" | "datetime-local", currentValue: string | null, isFocused: boolean) => "number" | "text" | "password" | "date" | "datetime-local";
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 '@models/index';
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("react").Dispatch<import("react").SetStateAction<T | null>>;
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
- declare const useLocalStorageState: <T>(key: string, initialValue: T) => readonly [T, import("react").Dispatch<import("react").SetStateAction<T>>, () => void];
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: "success" | "info" | "danger" | "warning" | "prompt") => void;
2
+ addNotification: (message: string, type: 'success' | 'info' | 'danger' | 'warning' | 'prompt') => void;
3
3
  };
4
4
  export default useNotifications;