react-luminus-components 1.3.18 → 1.3.21

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