react-luminus-components 1.3.21 → 1.3.23

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 (242) hide show
  1. package/dist/.vite/manifest.json +187 -0
  2. package/dist/PrimaryButton-Cx3E5x2b.cjs +1 -0
  3. package/dist/PrimaryButton-DJLMLJJ7.js +712 -0
  4. package/dist/SimpleTooltip-CIPtCvs1.js +5 -0
  5. package/dist/SimpleTooltip-Dtb0OmTb.cjs +1 -0
  6. package/dist/UserAvatarToggle-CsTHq7yG.js +7009 -0
  7. package/dist/UserAvatarToggle-DJWp7_0z.cjs +253 -0
  8. package/dist/components/BnfTableValueFormats/UserAvatarValueFormat/UserAvatarValueFormat.d.ts +3 -0
  9. package/dist/components/BnfTableValueFormats/index.d.ts +1 -0
  10. package/dist/components/Buttons/ContextButton/ContextButton.d.ts +14 -0
  11. package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +12 -0
  12. package/dist/components/Buttons/FloatingSubmit/FloatingFormSubmit.d.ts +8 -0
  13. package/dist/components/Buttons/IconButton/IconButton.d.ts +13 -0
  14. package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +14 -0
  15. package/dist/components/Buttons/index.d.ts +5 -0
  16. package/dist/components/Dropdown/Dropdown.d.ts +8 -0
  17. package/dist/components/Dropdown/comps/DropdownDivider/DropdownDivider.d.ts +6 -0
  18. package/dist/components/Dropdown/comps/DropdownItem/DropdownItem.d.ts +9 -0
  19. package/dist/components/Dropdown/comps/DropdownItem/FileUploadDropdownItem.d.ts +12 -0
  20. package/dist/components/Dropdown/comps/DropdownToggle/DropdownToggle.d.ts +7 -0
  21. package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +10 -0
  22. package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +8 -0
  23. package/dist/components/Dropdown/comps/index.d.ts +6 -0
  24. package/dist/components/Dropdown/index.d.ts +2 -0
  25. package/dist/components/Form/CheckInput/CheckInput.d.ts +4 -0
  26. package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +4 -0
  27. package/dist/components/Form/NumericStepperInput/NumericStepperInput.d.ts +4 -0
  28. package/dist/components/Form/SelectInput/SelectInput.d.ts +4 -0
  29. package/dist/components/Form/TextAreaInput/TextAreaInput.d.ts +4 -0
  30. package/dist/components/Form/TextInput/TextInput.d.ts +4 -0
  31. package/dist/components/Form/index.d.ts +6 -0
  32. package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +4 -0
  33. package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +4 -0
  34. package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +4 -0
  35. package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +4 -0
  36. package/dist/components/HookForm/FloatingSubmit/HookFormFloatingSubmit.d.ts +8 -0
  37. package/dist/components/HookForm/NumericStepperInput/HookFormNumericStepperInput.d.ts +4 -0
  38. package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +4 -0
  39. package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +4 -0
  40. package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +4 -0
  41. package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +4 -0
  42. package/dist/components/HookForm/index.d.ts +10 -0
  43. package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +34 -0
  44. package/dist/components/InputContainers/InputAnchorContainer/InputAnchorContainer.d.ts +9 -0
  45. package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +34 -0
  46. package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +34 -0
  47. package/dist/components/InputContainers/index.d.ts +4 -0
  48. package/dist/components/NewTabs/Tab/Tab.d.ts +10 -0
  49. package/dist/components/NewTabs/TabPanel/TabPanel.d.ts +11 -0
  50. package/dist/components/NewTabs/Tabs/Tabs.d.ts +9 -0
  51. package/dist/components/NewTabs/index.d.ts +3 -0
  52. package/dist/components/Tabs/Tabs.d.ts +9 -0
  53. package/dist/components/Tabs/comps/Tab/Tab.d.ts +7 -0
  54. package/dist/components/Tabs/comps/index.d.ts +1 -0
  55. package/dist/components/Tabs/index.d.ts +2 -0
  56. package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +23 -0
  57. package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +8 -0
  58. package/dist/components/Tooltip/index.d.ts +2 -0
  59. package/dist/components/UserAvatar/AvatarIcon/AvatarIcon.d.ts +8 -0
  60. package/dist/components/UserAvatar/index.d.ts +1 -0
  61. package/dist/components/common/Alert/Alert.d.ts +8 -0
  62. package/dist/components/common/ApiFileDownloadButton/ApiFileDownloadButton.d.ts +8 -0
  63. package/dist/components/common/AppSearch/AppSearch.d.ts +9 -0
  64. package/dist/components/common/AppSearch/comps/AutocompleteWindow/AutocompleteWindow.d.ts +12 -0
  65. package/dist/components/common/AppSearch/comps/TypeSelector/TypeSelector.d.ts +9 -0
  66. package/dist/components/common/AppSearch/comps/index.d.ts +2 -0
  67. package/dist/components/common/AppSearch/hooks/useSearchItems.d.ts +6 -0
  68. package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +7 -0
  69. package/dist/components/common/Backdrop/Backdrop.d.ts +7 -0
  70. package/dist/components/common/Badge/Badge.d.ts +9 -0
  71. package/dist/components/common/Card/Card.d.ts +28 -0
  72. package/dist/components/common/Collapse/Collapse.d.ts +20 -0
  73. package/dist/components/common/ConfirmDialog/ConfirmDialog.d.ts +3 -0
  74. package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +9 -0
  75. package/dist/components/common/FloatingActionContainer/FloatingActionContainer.d.ts +7 -0
  76. package/dist/components/common/HomeDashboard/HomeDashboard.d.ts +10 -0
  77. package/dist/components/common/HomeDashboard/comps/FreeSpaceWidget/FreeSpaceWidget.d.ts +9 -0
  78. package/dist/components/common/HomeDashboard/comps/WidgetPicker/WidgetPicker.d.ts +11 -0
  79. package/dist/components/common/HomeDashboard/comps/index.d.ts +1 -0
  80. package/dist/components/common/HomeDashboard/hooks/useUserDashboard.d.ts +6 -0
  81. package/dist/components/common/ImgApi/ImgApi.d.ts +4 -0
  82. package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +9 -0
  83. package/dist/components/common/ImgDirect/ImgDirect.d.ts +4 -0
  84. package/dist/components/common/InvalidFeedback/InvalidFeedback.d.ts +6 -0
  85. package/dist/components/common/Loading/Loading.d.ts +3 -0
  86. package/dist/components/common/Loading/LoadingBlock.d.ts +4 -0
  87. package/dist/components/common/MonthPicker/MonthPicker.d.ts +11 -0
  88. package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +14 -0
  89. package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +18 -0
  90. package/dist/components/common/PromptDialog/PromptDialog.d.ts +3 -0
  91. package/dist/components/common/SimplePicker/SimplePicker.d.ts +25 -0
  92. package/dist/components/common/Timeline/Timeline.d.ts +7 -0
  93. package/dist/components/common/Typography/Typography.d.ts +9 -0
  94. package/dist/components/common/VersionInfo/VersionInfo.d.ts +6 -0
  95. package/dist/components/common/Widget/WidgetCard.d.ts +8 -0
  96. package/dist/components/common/Widget/WidgetWrapper.d.ts +7 -0
  97. package/dist/components/common/YearPicker/YearPicker.d.ts +10 -0
  98. package/dist/components/common/index.d.ts +27 -0
  99. package/dist/contexts/auth/AuthContext.d.ts +9 -0
  100. package/dist/contexts/auth/AuthProvider.d.ts +16 -0
  101. package/dist/contexts/confirm/ConfirmContext.d.ts +9 -0
  102. package/dist/contexts/confirm/ConfirmProvider.d.ts +6 -0
  103. package/dist/contexts/delegation/DelegationContext.d.ts +8 -0
  104. package/dist/contexts/delegation/DelegationProvider.d.ts +6 -0
  105. package/dist/contexts/index.d.ts +11 -0
  106. package/dist/contexts/loading/LoadingContext.d.ts +8 -0
  107. package/dist/contexts/loading/LoadingProvider.d.ts +6 -0
  108. package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +24 -0
  109. package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +25 -0
  110. package/dist/contexts/prompt/PromptContext.d.ts +13 -0
  111. package/dist/contexts/prompt/PromptProvider.d.ts +6 -0
  112. package/dist/contexts/user/UserContext.d.ts +11 -0
  113. package/dist/contexts/user/UserProvider.d.ts +6 -0
  114. package/dist/contexts.cjs.js +1 -0
  115. package/dist/contexts.d.ts +1 -0
  116. package/dist/contexts.es.js +366 -0
  117. package/dist/dateUtils-7nL2BXlo.js +131 -0
  118. package/dist/dateUtils-DUA3CKds.cjs +1 -0
  119. package/dist/hooks/index.d.ts +13 -0
  120. package/dist/hooks/useAuth/hooks/useDevAuth.d.ts +7 -0
  121. package/dist/hooks/useAuth/hooks/useMsalAuth.d.ts +8 -0
  122. package/dist/hooks/useAuth/useAuth.d.ts +8 -0
  123. package/dist/hooks/useAxios/useAxios.d.ts +10 -0
  124. package/dist/hooks/useClickOutside/useClickOutside.d.ts +3 -0
  125. package/dist/hooks/useConfirm/useConfirm.d.ts +8 -0
  126. package/dist/hooks/useFormControlType/useFormControlType.d.ts +2 -0
  127. package/dist/hooks/useGetApiData/useGetApiData.d.ts +9 -0
  128. package/dist/hooks/useGetDataBound/useGetDataBound.d.ts +2 -0
  129. package/dist/hooks/useKeyPress/useKeyPress.d.ts +2 -0
  130. package/dist/hooks/useLocalStorageState/useLocalStorageState.d.ts +3 -0
  131. package/dist/hooks/useNotifications/useNotifications.d.ts +4 -0
  132. package/dist/hooks/usePermissions/usePermissions.d.ts +4 -0
  133. package/dist/hooks/usePrompt/usePrompt.d.ts +8 -0
  134. package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +74 -0
  135. package/dist/hooks.cjs.js +1 -0
  136. package/dist/hooks.d.ts +1 -0
  137. package/dist/hooks.es.js +2989 -0
  138. package/dist/latinize-BQrinury.js +950 -0
  139. package/dist/latinize-DaqzUOla.cjs +1 -0
  140. package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +4 -0
  141. package/dist/layout/MainContainer/MainContainer.d.ts +4 -0
  142. package/dist/layout/PageTitle/PageTitle.d.ts +6 -0
  143. package/dist/layout/SideContentBar/SideContentBar.d.ts +7 -0
  144. package/dist/layout/SideMenu/MenuItem/MenuItem.d.ts +11 -0
  145. package/dist/layout/SideMenu/SideMenu.d.ts +12 -0
  146. package/dist/layout/TopBar/TopBar.d.ts +9 -0
  147. package/dist/layout/index.d.ts +5 -0
  148. package/dist/layout.cjs.js +1 -0
  149. package/dist/layout.d.ts +1 -0
  150. package/dist/layout.es.js +132 -0
  151. package/dist/main.cjs.js +1 -0
  152. package/dist/main.d.ts +32 -0
  153. package/dist/main.es.js +4269 -0
  154. package/dist/models/index.d.ts +65 -0
  155. package/dist/models/prop-types/ContainerProps.d.ts +10 -0
  156. package/dist/models/prop-types/DashboardWidgetCommonProps.d.ts +5 -0
  157. package/dist/models/prop-types/FormInputProps/FormCheckInputProps.d.ts +6 -0
  158. package/dist/models/prop-types/FormInputProps/FormFileInputProps.d.ts +11 -0
  159. package/dist/models/prop-types/FormInputProps/FormNumericStepperInputProps.d.ts +8 -0
  160. package/dist/models/prop-types/FormInputProps/FormRadioInputProps.d.ts +6 -0
  161. package/dist/models/prop-types/FormInputProps/FormSelectInputProps.d.ts +7 -0
  162. package/dist/models/prop-types/FormInputProps/FormTextAreaInputProps.d.ts +7 -0
  163. package/dist/models/prop-types/FormInputProps/FormTextInputProps.d.ts +7 -0
  164. package/dist/models/prop-types/HookFormInputProps/HookFormCheckInputProps.d.ts +4 -0
  165. package/dist/models/prop-types/HookFormInputProps/HookFormDropdownPickerProps.d.ts +4 -0
  166. package/dist/models/prop-types/HookFormInputProps/HookFormFileInputProps.d.ts +4 -0
  167. package/dist/models/prop-types/HookFormInputProps/HookFormInputBaseProps.d.ts +7 -0
  168. package/dist/models/prop-types/HookFormInputProps/HookFormInputProps.d.ts +9 -0
  169. package/dist/models/prop-types/HookFormInputProps/HookFormNumericStepperInputProps.d.ts +4 -0
  170. package/dist/models/prop-types/HookFormInputProps/HookFormRadioInputProps.d.ts +4 -0
  171. package/dist/models/prop-types/HookFormInputProps/HookFormSelectInputProps.d.ts +4 -0
  172. package/dist/models/prop-types/HookFormInputProps/HookFormTextAreaInputProps.d.ts +7 -0
  173. package/dist/models/prop-types/HookFormInputProps/HookFormTextInputProps.d.ts +4 -0
  174. package/dist/models/prop-types/ImgProps.d.ts +7 -0
  175. package/dist/models/prop-types/InputContainerProps.d.ts +26 -0
  176. package/dist/models/prop-types/InputProps/CheckInputProps.d.ts +5 -0
  177. package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +24 -0
  178. package/dist/models/prop-types/InputProps/FileInputProps.d.ts +6 -0
  179. package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +15 -0
  180. package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +6 -0
  181. package/dist/models/prop-types/InputProps/RadioInputProps.d.ts +6 -0
  182. package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +9 -0
  183. package/dist/models/prop-types/InputProps/TextAreaInputProps.d.ts +5 -0
  184. package/dist/models/prop-types/InputProps/TextInputProps.d.ts +10 -0
  185. package/dist/models/texts/AppSearchTexts.d.ts +5 -0
  186. package/dist/models/texts/AxiosTexts.d.ts +8 -0
  187. package/dist/models/texts/ConfirmTexts.d.ts +7 -0
  188. package/dist/models/texts/CustomSelectTexts.d.ts +5 -0
  189. package/dist/models/texts/DropdownPickerTexts.d.ts +5 -0
  190. package/dist/models/texts/ErrorBoundaryTexts.d.ts +5 -0
  191. package/dist/models/texts/FormSubmitTexts.d.ts +4 -0
  192. package/dist/models/texts/FormValidationTexts.d.ts +5 -0
  193. package/dist/models/texts/HomeDashboardTexts.d.ts +6 -0
  194. package/dist/models/texts/WidgetTexts.d.ts +4 -0
  195. package/dist/models/types/ApiErrorResult.d.ts +8 -0
  196. package/dist/models/types/DashboardConfig.d.ts +5 -0
  197. package/dist/models/types/DashboardWidget.d.ts +9 -0
  198. package/dist/models/types/DashboardWidgetConfig.d.ts +5 -0
  199. package/dist/models/types/DropdownPickerOption.d.ts +7 -0
  200. package/dist/models/types/EmployeeIndexModel.d.ts +14 -0
  201. package/dist/models/types/ErrorField.d.ts +5 -0
  202. package/dist/models/types/FormSelectOption.d.ts +5 -0
  203. package/dist/models/types/HookFormInputProps.d.ts +9 -0
  204. package/dist/models/types/LoginState.d.ts +7 -0
  205. package/dist/models/types/MenuItemType.d.ts +11 -0
  206. package/dist/models/types/MenuItemTypeExtended.d.ts +6 -0
  207. package/dist/models/types/NameIdIntModel.d.ts +5 -0
  208. package/dist/models/types/NameIdIntOptionalModel.d.ts +5 -0
  209. package/dist/models/types/NameIdStringModel.d.ts +5 -0
  210. package/dist/models/types/NameIdStringOptionalModel.d.ts +5 -0
  211. package/dist/models/types/PhotoAction.d.ts +9 -0
  212. package/dist/models/types/PhotoLibraryItemModel.d.ts +7 -0
  213. package/dist/models/types/PromptOptions.d.ts +7 -0
  214. package/dist/models/types/SearchResultGroupKeyModel.d.ts +6 -0
  215. package/dist/models/types/SearchResultGroupModel.d.ts +7 -0
  216. package/dist/models/types/SearchResultModel.d.ts +8 -0
  217. package/dist/models/types/SearchType.d.ts +6 -0
  218. package/dist/models/types/TimelineStep.d.ts +11 -0
  219. package/dist/models/types/TimelineStepState.d.ts +5 -0
  220. package/dist/models/types/UseGetApiDataOptions.d.ts +9 -0
  221. package/dist/models/types/UserLoginState.d.ts +7 -0
  222. package/dist/models/types/UserModel.d.ts +11 -0
  223. package/dist/searchUtils-Do20vjZW.cjs +1 -0
  224. package/dist/searchUtils-Du4JnXdQ.js +7 -0
  225. package/dist/style.css +1 -0
  226. package/dist/useFormControlType-Dqz8sV4J.cjs +1 -0
  227. package/dist/useFormControlType-oJGqgThz.js +20 -0
  228. package/dist/useLocalStorageState-Cg6ipags.js +40 -0
  229. package/dist/useLocalStorageState-CkEIA-gx.cjs +1 -0
  230. package/dist/usePermissions-B1eRrluF.js +14 -0
  231. package/dist/usePermissions-DUTyAK35.cjs +1 -0
  232. package/dist/utils/apiErrorFields/apiErrorFieldsUtils.d.ts +4 -0
  233. package/dist/utils/date/dateUtils.d.ts +1 -0
  234. package/dist/utils/hookForm/hookFormUtils.d.ts +3 -0
  235. package/dist/utils/index.d.ts +6 -0
  236. package/dist/utils/object/objectUtils.d.ts +2 -0
  237. package/dist/utils/search/searchUtils.d.ts +3 -0
  238. package/dist/utils/text/textUtils.d.ts +3 -0
  239. package/dist/utils.cjs.js +1 -0
  240. package/dist/utils.d.ts +1 -0
  241. package/dist/utils.es.js +27 -0
  242. package/package.json +1 -1
@@ -0,0 +1,366 @@
1
+ import { j as a, am as F, Q as j, an as b, ao as z, ap as K, L as A, K as l, aq as H, ar as B, as as U, ab as q, ae as G, at as M, af as V, ah as L, ag as $, au as Q } from "./UserAvatarToggle-CsTHq7yG.js";
2
+ import J, { useState as h, useCallback as f, useMemo as S, useContext as y, useEffect as P, useRef as W, useReducer as X } from "react";
3
+ import "./latinize-BQrinury.js";
4
+ import "react-hook-form";
5
+ import { u as Y, a as Z, b as ee } from "./useLocalStorageState-Cg6ipags.js";
6
+ import { M as C, b as te, P as p, L as ne, E as u } from "./PrimaryButton-DJLMLJJ7.js";
7
+ const se = ({ children: e }) => {
8
+ const [r, t] = h(!1), [s, n] = h(""), o = f((d) => {
9
+ t(!0), n(d);
10
+ }, []), c = f(() => {
11
+ t(!1);
12
+ }, []), i = S(() => ({ show: r, text: s, showConfirm: o, hideConfirm: c }), [r, s, o, c]);
13
+ return /* @__PURE__ */ a.jsxs(F.Provider, { value: i, children: [
14
+ /* @__PURE__ */ a.jsx(ue, {}),
15
+ e
16
+ ] });
17
+ }, oe = () => {
18
+ const { confirmTexts: e } = y(j), { isShown: r, text: t, onFinish: s } = Y(), { options: n } = y(b), [o, c] = h(n.defaultValue ?? ""), i = f(() => {
19
+ s(null);
20
+ }, [s]), d = f((E) => {
21
+ E.preventDefault(), !(n.required && !o) && s(o);
22
+ }, [s, n.required, o]);
23
+ P(() => {
24
+ r === !0 && c(n.defaultValue ?? "");
25
+ }, [r, n.defaultValue]);
26
+ const g = S(() => ({
27
+ value: o,
28
+ onChange: (E) => c(E.currentTarget.value),
29
+ className: "w-100",
30
+ autoFocus: !0,
31
+ tabIndex: 0
32
+ }), [o]);
33
+ return /* @__PURE__ */ a.jsxs(C, { show: r, size: "sm", centered: !0, onHide: i, children: [
34
+ /* @__PURE__ */ a.jsx(C.Header, { className: "justify-content-center", children: /* @__PURE__ */ a.jsx(C.Title, { children: t }) }),
35
+ /* @__PURE__ */ a.jsxs("form", { onSubmit: d, children: [
36
+ /* @__PURE__ */ a.jsxs(C.Body, { children: [
37
+ n.input === "textarea" ? /* @__PURE__ */ a.jsx("textarea", { ...g, rows: 5 }) : void 0,
38
+ n.input === "input" ? /* @__PURE__ */ a.jsx(te, { ...g, type: n.type }) : void 0
39
+ ] }),
40
+ /* @__PURE__ */ a.jsxs(C.Footer, { className: "w-100 d-flex gap-5", children: [
41
+ /* @__PURE__ */ a.jsx(p, { variant: "outlined", color: "secondary", onClick: i, className: "flex-grow-1", children: e.cancel }),
42
+ /* @__PURE__ */ a.jsx(p, { color: "primary", disabled: n.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
43
+ ] })
44
+ ] })
45
+ ] });
46
+ }, re = ({ children: e }) => {
47
+ const [r, t] = h(!1), [s, n] = h(""), [o, c] = h({ input: "textarea", type: "text" }), i = W(() => {
48
+ }), d = f((I) => {
49
+ n(I), t(!0);
50
+ }, []), g = f(() => {
51
+ t(!1);
52
+ }, []), E = S(() => ({
53
+ isShown: r,
54
+ text: s,
55
+ showPrompt: d,
56
+ hidePrompt: g,
57
+ resolveRef: i,
58
+ options: o,
59
+ setOptions: c
60
+ }), [r, s, d, g, o]);
61
+ return /* @__PURE__ */ a.jsxs(b.Provider, { value: E, children: [
62
+ e,
63
+ /* @__PURE__ */ a.jsx(oe, {})
64
+ ] });
65
+ }, he = ({ cookieDomain: e, axiosOptions: r, LinkComponent: t, NavigateComponent: s, language: n, axiosTexts: o, confirmTexts: c, formValidationTexts: i, homeDashboardTexts: d, formSubmitTexts: g, appSearchTexts: E, customSelectTexts: I, errorBoundaryTexts: v, widgetTexts: R, children: _ }) => {
66
+ const N = S(() => ({
67
+ axiosOptions: r,
68
+ cookieDomain: e,
69
+ LinkComponent: t,
70
+ NavigateComponent: s,
71
+ language: n,
72
+ axiosTexts: o,
73
+ confirmTexts: c,
74
+ formValidationTexts: i,
75
+ homeDashboardTexts: d,
76
+ formSubmitTexts: g,
77
+ appSearchTexts: E,
78
+ customSelectTexts: I,
79
+ errorBoundaryTexts: v,
80
+ widgetTexts: R
81
+ }), [
82
+ r,
83
+ e,
84
+ t,
85
+ s,
86
+ n,
87
+ o,
88
+ c,
89
+ i,
90
+ d,
91
+ g,
92
+ E,
93
+ I,
94
+ v,
95
+ R
96
+ ]);
97
+ return /* @__PURE__ */ a.jsx(j.Provider, { value: N, children: /* @__PURE__ */ a.jsx(se, { children: /* @__PURE__ */ a.jsxs(re, { children: [
98
+ /* @__PURE__ */ a.jsx(z, {}),
99
+ _
100
+ ] }) }) });
101
+ }, Ce = ({ children: e }) => {
102
+ const [r, t] = h(!1), [s] = h(/* @__PURE__ */ new Set()), n = f((i) => {
103
+ s.add(i), t(!0);
104
+ }, [s]), o = f((i) => {
105
+ s.delete(i), s.size === 0 && t(!1);
106
+ }, [s]), c = S(() => ({ isLoading: r, startLoading: n, stopLoading: o }), [r, n, o]);
107
+ return /* @__PURE__ */ a.jsxs(K.Provider, { value: c, children: [
108
+ r && /* @__PURE__ */ a.jsx(ne, {}),
109
+ e
110
+ ] });
111
+ };
112
+ /*! @azure/msal-browser v3.14.0 2024-05-07 */
113
+ class ae {
114
+ /**
115
+ * Gets interaction status from event message
116
+ * @param message
117
+ * @param currentStatus
118
+ */
119
+ static getInteractionStatusFromEvent(r, t) {
120
+ switch (r.eventType) {
121
+ case u.LOGIN_START:
122
+ return l.Login;
123
+ case u.SSO_SILENT_START:
124
+ return l.SsoSilent;
125
+ case u.ACQUIRE_TOKEN_START:
126
+ if (r.interactionType === A.Redirect || r.interactionType === A.Popup)
127
+ return l.AcquireToken;
128
+ break;
129
+ case u.HANDLE_REDIRECT_START:
130
+ return l.HandleRedirect;
131
+ case u.LOGOUT_START:
132
+ return l.Logout;
133
+ case u.SSO_SILENT_SUCCESS:
134
+ case u.SSO_SILENT_FAILURE:
135
+ if (t && t !== l.SsoSilent)
136
+ break;
137
+ return l.None;
138
+ case u.LOGOUT_END:
139
+ if (t && t !== l.Logout)
140
+ break;
141
+ return l.None;
142
+ case u.HANDLE_REDIRECT_END:
143
+ if (t && t !== l.HandleRedirect)
144
+ break;
145
+ return l.None;
146
+ case u.LOGIN_SUCCESS:
147
+ case u.LOGIN_FAILURE:
148
+ case u.ACQUIRE_TOKEN_SUCCESS:
149
+ case u.ACQUIRE_TOKEN_FAILURE:
150
+ case u.RESTORE_FROM_BFCACHE:
151
+ if (r.interactionType === A.Redirect || r.interactionType === A.Popup) {
152
+ if (t && t !== l.Login && t !== l.AcquireToken)
153
+ break;
154
+ return l.None;
155
+ }
156
+ break;
157
+ }
158
+ return null;
159
+ }
160
+ }
161
+ /*! @azure/msal-react v2.0.16 2024-05-07 */
162
+ const ce = "@azure/msal-react", w = "2.0.16";
163
+ /*! @azure/msal-react v2.0.16 2024-05-07 */
164
+ const O = {
165
+ UNBLOCK_INPROGRESS: "UNBLOCK_INPROGRESS",
166
+ EVENT: "EVENT"
167
+ }, ie = (e, r) => {
168
+ const { type: t, payload: s } = r;
169
+ let n = e.inProgress;
170
+ switch (t) {
171
+ case O.UNBLOCK_INPROGRESS:
172
+ e.inProgress === l.Startup && (n = l.None, s.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));
173
+ break;
174
+ case O.EVENT:
175
+ const c = s.message, i = ae.getInteractionStatusFromEvent(c, e.inProgress);
176
+ i && (s.logger.info(`MsalProvider - ${c.eventType} results in setting inProgress from ${e.inProgress} to ${i}`), n = i);
177
+ break;
178
+ default:
179
+ throw new Error(`Unknown action type: ${t}`);
180
+ }
181
+ const o = s.instance.getAllAccounts();
182
+ return n !== e.inProgress && !U(o, e.accounts) ? {
183
+ ...e,
184
+ inProgress: n,
185
+ accounts: o
186
+ } : n !== e.inProgress ? {
187
+ ...e,
188
+ inProgress: n
189
+ } : U(o, e.accounts) ? e : {
190
+ ...e,
191
+ accounts: o
192
+ };
193
+ };
194
+ function le({ instance: e, children: r }) {
195
+ P(() => {
196
+ e.initializeWrapperLibrary(H.React, w);
197
+ }, [e]);
198
+ const t = S(() => e.getLogger().clone(ce, w), [e]), [s, n] = X(ie, void 0, () => ({
199
+ inProgress: l.Startup,
200
+ accounts: e.getAllAccounts()
201
+ }));
202
+ P(() => {
203
+ const c = e.addEventCallback((i) => {
204
+ n({
205
+ payload: {
206
+ instance: e,
207
+ logger: t,
208
+ message: i
209
+ },
210
+ type: O.EVENT
211
+ });
212
+ });
213
+ return t.verbose(`MsalProvider - Registered event callback with id: ${c}`), e.initialize().then(() => {
214
+ e.handleRedirectPromise().catch(() => {
215
+ }).finally(() => {
216
+ n({
217
+ payload: {
218
+ instance: e,
219
+ logger: t
220
+ },
221
+ type: O.UNBLOCK_INPROGRESS
222
+ });
223
+ });
224
+ }).catch(() => {
225
+ }), () => {
226
+ c && (t.verbose(`MsalProvider - Removing event callback ${c}`), e.removeEventCallback(c));
227
+ };
228
+ }, [e, t]);
229
+ const o = {
230
+ instance: e,
231
+ inProgress: s.inProgress,
232
+ accounts: s.accounts,
233
+ logger: t
234
+ };
235
+ return J.createElement(B.Provider, { value: o }, r);
236
+ }
237
+ const Se = ({ children: e }) => {
238
+ const r = q(), { msalInstance: t } = y(G), { delegation: s, setDelegation: n } = y(M), { getToken: o } = V(), [c, i] = h(null), d = f(async () => {
239
+ const m = await o();
240
+ m && i(m);
241
+ }, [o]);
242
+ P(() => {
243
+ d();
244
+ }, [d]);
245
+ const E = f(() => {
246
+ const m = localStorage.getItem("user") ?? null;
247
+ return m ? JSON.parse(m ?? "") : null;
248
+ }, [])(), [I, v] = h({
249
+ state: E ? L.LOGGED_IN : L.LOGGING_IN,
250
+ user: E
251
+ }), R = f(async (m) => {
252
+ let x = null;
253
+ return await r.get("/user/detail", m ? { headers: { Authorization: `Bearer ${m}` } } : void 0).then((k) => {
254
+ x = k.data;
255
+ }).catch(() => {
256
+ x = null;
257
+ }), x;
258
+ }, [r]), _ = f(() => {
259
+ localStorage.removeItem("user"), v({
260
+ state: L.LOGGED_OUT,
261
+ user: null
262
+ });
263
+ }, []), N = f(async (m) => {
264
+ v({
265
+ state: L.LOGGING_IN,
266
+ user: null
267
+ });
268
+ const x = await R(m);
269
+ return x ? (v({
270
+ state: L.LOGGED_IN,
271
+ user: x
272
+ }), localStorage.setItem("user", JSON.stringify(x)), !0) : (v({
273
+ state: L.LOGIN_FAILED,
274
+ user: null
275
+ }), !1);
276
+ }, [R]), T = f(() => {
277
+ _();
278
+ }, [_]), D = S(() => ({
279
+ user: I.user,
280
+ userLoginState: I,
281
+ loginUser: N,
282
+ logoutUser: T
283
+ }), [I, N, T]);
284
+ return P(() => {
285
+ if (t) {
286
+ const m = t.addEventCallback((x) => {
287
+ if (x.eventType === u.LOGIN_SUCCESS && x.payload) {
288
+ const k = x.payload;
289
+ i(k.accessToken);
290
+ }
291
+ });
292
+ return () => {
293
+ m && t.removeEventCallback(m);
294
+ };
295
+ }
296
+ return () => {
297
+ };
298
+ }, [t, N, T]), P(() => {
299
+ c && N(c).catch(() => {
300
+ T(), n(null);
301
+ });
302
+ }, [c, N, T, s == null ? void 0 : s.id, n]), /* @__PURE__ */ a.jsx($.Provider, { value: D, children: e });
303
+ }, Ie = ({ ...e }) => {
304
+ const { cookieDomain: r } = y(j), [, t] = Q(["Authorization"]), s = S(() => ({
305
+ useMsal: e.useMsal ?? !1,
306
+ msalInstance: e.useMsal ? e.msalInstance ?? null : null,
307
+ msalScopes: e.useMsal ? e.msalScopes ?? [] : []
308
+ }), [e]);
309
+ return P(() => {
310
+ if (e.useMsal) {
311
+ const n = e.msalInstance.addEventCallback((o) => {
312
+ if (o.eventType === u.LOGIN_SUCCESS || o.eventType === u.ACQUIRE_TOKEN_SUCCESS && o.payload) {
313
+ const c = o.payload, i = c.account;
314
+ e.msalInstance.setActiveAccount(i);
315
+ const d = c.accessToken, g = c.expiresOn;
316
+ t("Authorization", d, {
317
+ path: "/",
318
+ secure: !0,
319
+ sameSite: "none",
320
+ domain: r,
321
+ expires: g ?? void 0
322
+ });
323
+ }
324
+ o.error && console.error("AuthProvider MSAL Error", o);
325
+ });
326
+ return () => {
327
+ n && e.msalInstance.removeEventCallback(n);
328
+ };
329
+ }
330
+ return () => {
331
+ };
332
+ }, [e, t, r]), /* @__PURE__ */ a.jsx(G.Provider, { value: s, children: e.useMsal ? /* @__PURE__ */ a.jsx(le, { instance: e.msalInstance, children: e.children }) : e.children });
333
+ }, Pe = ({ children: e }) => {
334
+ const [r, t, s] = Z("user-delegation", null);
335
+ P(() => {
336
+ const o = () => {
337
+ s();
338
+ };
339
+ return window.addEventListener("focus", o), () => {
340
+ window.removeEventListener("focus", o);
341
+ };
342
+ }, [s]);
343
+ const n = S(() => ({ delegation: r, setDelegation: t }), [r, t]);
344
+ return /* @__PURE__ */ a.jsx(M.Provider, { value: n, children: e });
345
+ }, ue = () => {
346
+ const { confirmTexts: e } = y(j), { onConfirm: r, onCancel: t, text: s, show: n } = ee();
347
+ return /* @__PURE__ */ a.jsxs(C, { show: n, size: "sm", centered: !0, onHide: t, children: [
348
+ /* @__PURE__ */ a.jsx(C.Header, { className: "justify-content-center", children: /* @__PURE__ */ a.jsx(C.Title, { children: s }) }),
349
+ /* @__PURE__ */ a.jsx(C.Body, { children: /* @__PURE__ */ a.jsxs("div", { className: "w-100 d-flex gap-5", children: [
350
+ /* @__PURE__ */ a.jsx(p, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: t, children: e.no }),
351
+ /* @__PURE__ */ a.jsx(p, { type: "button", color: "primary", onClick: r, className: "w-100 ml", children: e.yes })
352
+ ] }) })
353
+ ] });
354
+ };
355
+ export {
356
+ G as AuthContext,
357
+ Ie as AuthProvider,
358
+ M as DelegationContext,
359
+ Pe as DelegationProvider,
360
+ K as LoadingContext,
361
+ Ce as LoadingProvider,
362
+ j as LuminusComponentsContext,
363
+ he as LuminusComponentsProvider,
364
+ $ as UserContext,
365
+ Se as UserProvider
366
+ };
@@ -0,0 +1,131 @@
1
+ import { b as m, g as D } from "./latinize-BQrinury.js";
2
+ function N(t, e) {
3
+ const n = w(t);
4
+ let a;
5
+ if (n.date) {
6
+ const i = h(n.date, 2);
7
+ a = C(i.restDateString, i.year);
8
+ }
9
+ if (!a || isNaN(a.getTime()))
10
+ return /* @__PURE__ */ new Date(NaN);
11
+ const s = a.getTime();
12
+ let o = 0, u;
13
+ if (n.time && (o = I(n.time), isNaN(o)))
14
+ return /* @__PURE__ */ new Date(NaN);
15
+ if (n.timezone) {
16
+ if (u = x(n.timezone), isNaN(u))
17
+ return /* @__PURE__ */ new Date(NaN);
18
+ } else {
19
+ const i = new Date(s + o), c = /* @__PURE__ */ new Date(0);
20
+ return c.setFullYear(
21
+ i.getUTCFullYear(),
22
+ i.getUTCMonth(),
23
+ i.getUTCDate()
24
+ ), c.setHours(
25
+ i.getUTCHours(),
26
+ i.getUTCMinutes(),
27
+ i.getUTCSeconds(),
28
+ i.getUTCMilliseconds()
29
+ ), c;
30
+ }
31
+ return new Date(s + o + u);
32
+ }
33
+ const f = {
34
+ dateTimeDelimiter: /[T ]/,
35
+ timeZoneDelimiter: /[Z ]/i,
36
+ timezone: /([Z+-].*)$/
37
+ }, g = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, T = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, U = /^([+-])(\d{2})(?::?(\d{2}))?$/;
38
+ function w(t) {
39
+ const e = {}, r = t.split(f.dateTimeDelimiter);
40
+ let n;
41
+ if (r.length > 2)
42
+ return e;
43
+ if (/:/.test(r[0]) ? n = r[0] : (e.date = r[0], n = r[1], f.timeZoneDelimiter.test(e.date) && (e.date = t.split(f.timeZoneDelimiter)[0], n = t.substr(
44
+ e.date.length,
45
+ t.length
46
+ ))), n) {
47
+ const a = f.timezone.exec(n);
48
+ a ? (e.time = n.replace(a[1], ""), e.timezone = a[1]) : e.time = n;
49
+ }
50
+ return e;
51
+ }
52
+ function h(t, e) {
53
+ const r = new RegExp(
54
+ "^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
55
+ ), n = t.match(r);
56
+ if (!n)
57
+ return { year: NaN, restDateString: "" };
58
+ const a = n[1] ? parseInt(n[1]) : null, s = n[2] ? parseInt(n[2]) : null;
59
+ return {
60
+ year: s === null ? a : s * 100,
61
+ restDateString: t.slice((n[1] || n[2]).length)
62
+ };
63
+ }
64
+ function C(t, e) {
65
+ if (e === null)
66
+ return /* @__PURE__ */ new Date(NaN);
67
+ const r = t.match(g);
68
+ if (!r)
69
+ return /* @__PURE__ */ new Date(NaN);
70
+ const n = !!r[4], a = l(r[1]), s = l(r[2]) - 1, o = l(r[3]), u = l(r[4]), i = l(r[5]) - 1;
71
+ if (n)
72
+ return M(e, u, i) ? Y(e, u, i) : /* @__PURE__ */ new Date(NaN);
73
+ {
74
+ const c = /* @__PURE__ */ new Date(0);
75
+ return !z(e, s, o) || !O(e, a) ? /* @__PURE__ */ new Date(NaN) : (c.setUTCFullYear(e, s, Math.max(a, o)), c);
76
+ }
77
+ }
78
+ function l(t) {
79
+ return t ? parseInt(t) : 1;
80
+ }
81
+ function I(t) {
82
+ const e = t.match(T);
83
+ if (!e)
84
+ return NaN;
85
+ const r = d(e[1]), n = d(e[2]), a = d(e[3]);
86
+ return S(r, n, a) ? r * m + n * D + a * 1e3 : NaN;
87
+ }
88
+ function d(t) {
89
+ return t && parseFloat(t.replace(",", ".")) || 0;
90
+ }
91
+ function x(t) {
92
+ if (t === "Z")
93
+ return 0;
94
+ const e = t.match(U);
95
+ if (!e)
96
+ return 0;
97
+ const r = e[1] === "+" ? -1 : 1, n = parseInt(e[2]), a = e[3] && parseInt(e[3]) || 0;
98
+ return Z(n, a) ? r * (n * m + a * D) : NaN;
99
+ }
100
+ function Y(t, e, r) {
101
+ const n = /* @__PURE__ */ new Date(0);
102
+ n.setUTCFullYear(t, 0, 4);
103
+ const a = n.getUTCDay() || 7, s = (e - 1) * 7 + r + 1 - a;
104
+ return n.setUTCDate(n.getUTCDate() + s), n;
105
+ }
106
+ const y = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
107
+ function p(t) {
108
+ return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
109
+ }
110
+ function z(t, e, r) {
111
+ return e >= 0 && e <= 11 && r >= 1 && r <= (y[e] || (p(t) ? 29 : 28));
112
+ }
113
+ function O(t, e) {
114
+ return e >= 1 && e <= (p(t) ? 366 : 365);
115
+ }
116
+ function M(t, e, r) {
117
+ return e >= 1 && e <= 53 && r >= 0 && r <= 6;
118
+ }
119
+ function S(t, e, r) {
120
+ return t === 24 ? e === 0 && r === 0 : r >= 0 && r < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
121
+ }
122
+ function Z(t, e) {
123
+ return e >= 0 && e <= 59;
124
+ }
125
+ const F = (t) => {
126
+ const e = N(t);
127
+ return !Number.isNaN(e.getTime());
128
+ };
129
+ export {
130
+ F as i
131
+ };
@@ -0,0 +1 @@
1
+ "use strict";const d=require("./latinize-DaqzUOla.cjs");function N(t,e){const n=I(t);let i;if(n.date){const s=U(n.date,2);i=w(s.restDateString,s.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const a=i.getTime();let o=0,u;if(n.time&&(o=h(n.time),isNaN(o)))return new Date(NaN);if(n.timezone){if(u=C(n.timezone),isNaN(u))return new Date(NaN)}else{const s=new Date(a+o),c=new Date(0);return c.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),c.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),c}return new Date(a+o+u)}const f={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},p=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,g=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,T=/^([+-])(\d{2})(?::?(\d{2}))?$/;function I(t){const e={},r=t.split(f.dateTimeDelimiter);let n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],f.timeZoneDelimiter.test(e.date)&&(e.date=t.split(f.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){const i=f.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}function U(t,e){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(r);if(!n)return{year:NaN,restDateString:""};const i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:t.slice((n[1]||n[2]).length)}}function w(t,e){if(e===null)return new Date(NaN);const r=t.match(p);if(!r)return new Date(NaN);const n=!!r[4],i=l(r[1]),a=l(r[2])-1,o=l(r[3]),u=l(r[4]),s=l(r[5])-1;if(n)return O(e,u,s)?Y(e,u,s):new Date(NaN);{const c=new Date(0);return!y(e,a,o)||!z(e,i)?new Date(NaN):(c.setUTCFullYear(e,a,Math.max(i,o)),c)}}function l(t){return t?parseInt(t):1}function h(t){const e=t.match(g);if(!e)return NaN;const r=m(e[1]),n=m(e[2]),i=m(e[3]);return M(r,n,i)?r*d.millisecondsInHour+n*d.millisecondsInMinute+i*1e3:NaN}function m(t){return t&&parseFloat(t.replace(",","."))||0}function C(t){if(t==="Z")return 0;const e=t.match(T);if(!e)return 0;const r=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return S(n,i)?r*(n*d.millisecondsInHour+i*d.millisecondsInMinute):NaN}function Y(t,e,r){const n=new Date(0);n.setUTCFullYear(t,0,4);const i=n.getUTCDay()||7,a=(e-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}const x=[31,null,31,30,31,30,31,31,30,31,30,31];function D(t){return t%400===0||t%4===0&&t%100!==0}function y(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(x[e]||(D(t)?29:28))}function z(t,e){return e>=1&&e<=(D(t)?366:365)}function O(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}function M(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}function S(t,e){return e>=0&&e<=59}const Z=t=>{const e=N(t);return!Number.isNaN(e.getTime())};exports.isISODate=Z;
@@ -0,0 +1,13 @@
1
+ export { default as useAuth } from './useAuth/useAuth';
2
+ export { default as useNotifications } from './useNotifications/useNotifications';
3
+ export { useAxios, cancelToken } from './useAxios/useAxios';
4
+ export { default as useConfirm } from './useConfirm/useConfirm';
5
+ export { default as usePrompt } from './usePrompt/usePrompt';
6
+ export { default as useZodSchemaTypes } from './useZodSchemaTypes/useZodSchemaTypes';
7
+ export { default as useClickOutside } from './useClickOutside/useClickOutside';
8
+ export { default as usePermissions } from './usePermissions/usePermissions';
9
+ export { default as useKeyPress } from './useKeyPress/useKeyPress';
10
+ export { default as useGetApiData } from './useGetApiData/useGetApiData';
11
+ export { default as useGetDataBound } from './useGetDataBound/useGetDataBound';
12
+ export { default as useFormControlType } from './useFormControlType/useFormControlType';
13
+ export { default as useLocalStorageState } from './useLocalStorageState/useLocalStorageState';
@@ -0,0 +1,7 @@
1
+ declare const useDevAuth: () => {
2
+ isAuthenticated: () => boolean;
3
+ login: (kid: string, password: string) => Promise<string | null>;
4
+ logout: () => void;
5
+ getToken: () => string | null;
6
+ };
7
+ export default useDevAuth;
@@ -0,0 +1,8 @@
1
+ declare const useMsalAuth: () => {
2
+ isAuthenticated: () => boolean;
3
+ isAuthenticating: () => boolean;
4
+ login: () => Promise<string | null>;
5
+ logout: () => void;
6
+ getToken: () => Promise<string | null>;
7
+ };
8
+ export default useMsalAuth;
@@ -0,0 +1,8 @@
1
+ declare const useAuth: () => {
2
+ isAuthenticated: () => boolean;
3
+ isAuthenticating: () => boolean;
4
+ getToken: (() => string | null) | (() => Promise<string | null>);
5
+ login: (kid: string, password: string) => Promise<string | null>;
6
+ logout: () => void;
7
+ };
8
+ export default useAuth;
@@ -0,0 +1,10 @@
1
+ import { CancelTokenStatic } from 'axios';
2
+ export declare const cancelToken: CancelTokenStatic;
3
+ type Config = {
4
+ authenticated?: boolean;
5
+ differentBaseUrl?: string;
6
+ silent?: boolean;
7
+ customToken?: string;
8
+ };
9
+ export declare const useAxios: (useAxiosConfig?: Config) => import("axios").AxiosInstance;
10
+ export {};
@@ -0,0 +1,3 @@
1
+ import { RefObject } from 'react';
2
+ declare const useClickOutside: (refs: RefObject<HTMLElement>[], callback: () => void) => void;
3
+ export default useClickOutside;
@@ -0,0 +1,8 @@
1
+ declare const useConfirm: () => {
2
+ confirm: (t: string) => Promise<unknown>;
3
+ onConfirm: () => void;
4
+ onCancel: () => void;
5
+ show: boolean;
6
+ text: string;
7
+ };
8
+ export default useConfirm;
@@ -0,0 +1,2 @@
1
+ declare const useFormControlType: (type: 'number' | 'text' | 'password' | 'date' | 'datetime-local', currentValue: string | null, isFocused: boolean) => "number" | "text" | "password" | "date" | "datetime-local";
2
+ export default useFormControlType;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { UseGetApiDataOptions } from '@models/index';
3
+ import { GenericAbortSignal } from 'axios';
4
+ declare const useGetApiData: <T>(uri: string, { loadOnInit, enabled, silent, nullStateBeforeLoad, customApiUrl, customBearerToken, }?: UseGetApiDataOptions) => {
5
+ data: T | null;
6
+ setData: import("react").Dispatch<import("react").SetStateAction<T | null>>;
7
+ reloadData: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<void>;
8
+ };
9
+ export default useGetApiData;
@@ -0,0 +1,2 @@
1
+ declare function useGetDataBound<T>(url: string): T | null;
2
+ export default useGetDataBound;
@@ -0,0 +1,2 @@
1
+ declare const useKeyPress: (handleKeyPress: (e: KeyboardEvent) => void) => void;
2
+ export default useKeyPress;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const useLocalStorageState: <T>(key: string, initialValue: T) => readonly [T, import("react").Dispatch<import("react").SetStateAction<T>>, () => void];
3
+ export default useLocalStorageState;
@@ -0,0 +1,4 @@
1
+ declare const useNotifications: () => {
2
+ addNotification: (message: string, type: 'success' | 'info' | 'danger' | 'warning' | 'prompt') => void;
3
+ };
4
+ export default useNotifications;
@@ -0,0 +1,4 @@
1
+ declare const usePermissions: () => {
2
+ checkUserHasPermissions: (permissions: string[]) => boolean;
3
+ };
4
+ export default usePermissions;
@@ -0,0 +1,8 @@
1
+ import PromptOptions from '@models/types/PromptOptions';
2
+ declare const usePrompt: () => {
3
+ isShown: boolean;
4
+ text: string;
5
+ prompt: (t: string, options?: PromptOptions) => Promise<string | null>;
6
+ onFinish: (userResponse: string | null) => void;
7
+ };
8
+ export default usePrompt;