react-luminus-components 1.3.143 → 1.3.145

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 (400) hide show
  1. package/README.md +349 -349
  2. package/dist/variables.scss +165 -165
  3. package/package.json +116 -116
  4. package/dist/.vite/manifest.json +0 -194
  5. package/dist/FullScreenContainer-CmMf6Wz-.js +0 -23
  6. package/dist/FullScreenContainer-DkxbkVKa.cjs +0 -1
  7. package/dist/Loading-Bk25IbQ2.cjs +0 -1
  8. package/dist/Loading-CLeYjOUz.js +0 -17
  9. package/dist/ResponsiveContextDropdown-BcEZzNox.cjs +0 -279
  10. package/dist/ResponsiveContextDropdown-CLWBQLuy.js +0 -24340
  11. package/dist/SimpleTooltip-_neXI0ly.js +0 -5
  12. package/dist/SimpleTooltip-tS3ZQgXE.cjs +0 -1
  13. package/dist/components/BnfTableValueFormats/UserAvatarValueFormat/UserAvatarValueFormat.d.ts +0 -4
  14. package/dist/components/BnfTableValueFormats/index.d.ts +0 -1
  15. package/dist/components/Buttons/ContextButton/ContextButton.d.ts +0 -13
  16. package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +0 -11
  17. package/dist/components/Buttons/FileUploadButton/FileUploadButton.d.ts +0 -11
  18. package/dist/components/Buttons/FloatingSubmit/FloatingFormSubmit.d.ts +0 -9
  19. package/dist/components/Buttons/IconButton/IconButton.d.ts +0 -12
  20. package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +0 -13
  21. package/dist/components/Buttons/index.d.ts +0 -6
  22. package/dist/components/Documents/Documents.d.ts +0 -11
  23. package/dist/components/Documents/components/DocumentDirectory/DocumentDirectory.d.ts +0 -5
  24. package/dist/components/Documents/components/DocumentDirectory/components/DocumentDirectoryLabel/DocumentDirectoryLabel.d.ts +0 -7
  25. package/dist/components/Documents/components/DocumentDirectory/components/index.d.ts +0 -1
  26. package/dist/components/Documents/components/DocumentsActions/DocumentsActions.d.ts +0 -7
  27. package/dist/components/Documents/components/DocumentsActions/components/DocActionButton/DocActionButton.d.ts +0 -10
  28. package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/DocumentsUpload.d.ts +0 -10
  29. package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/componenets/UploadFilesModal/UploadFilesModal.d.ts +0 -7
  30. package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/componenets/UploadFilesModal/hooks/useUploadFilesFormSchema.d.ts +0 -18
  31. package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/componenets/index.d.ts +0 -1
  32. package/dist/components/Documents/components/DocumentsActions/components/index.d.ts +0 -2
  33. package/dist/components/Documents/components/DocumentsFilesTable/DocumentsFilesTable.d.ts +0 -6
  34. package/dist/components/Documents/components/DocumentsFilesTable/hooks/useDocumentsFilesColumns.d.ts +0 -11
  35. package/dist/components/Documents/components/DocumentsModals/DocumentsModals.d.ts +0 -2
  36. package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/CreateFolderModal.d.ts +0 -5
  37. package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/hooks/useDocCreateFolderForm.d.ts +0 -13
  38. package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/EditFileModal.d.ts +0 -5
  39. package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/EditFileModalInner.d.ts +0 -8
  40. package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/hooks/useEditFileForm.d.ts +0 -18
  41. package/dist/components/Documents/components/DocumentsModals/components/index.d.ts +0 -2
  42. package/dist/components/Documents/components/DocumentsModals/types/DocumentsModalType.d.ts +0 -2
  43. package/dist/components/Documents/components/DocumentsRoot/DocumentsRoot.d.ts +0 -5
  44. package/dist/components/Documents/components/FileExtensionIcon/FileExtensionIcon.d.ts +0 -7
  45. package/dist/components/Documents/components/index.d.ts +0 -6
  46. package/dist/components/Documents/contexts/DocumentsContext.d.ts +0 -13
  47. package/dist/components/Documents/hooks/useDocContextApiActions.d.ts +0 -17
  48. package/dist/components/Documents/hooks/useDocumentsApiActions.d.ts +0 -7
  49. package/dist/components/Documents/hooks/useDocumentsDrag.d.ts +0 -19
  50. package/dist/components/Documents/hooks/useDocumentsReducer.d.ts +0 -91
  51. package/dist/components/Documents/index.d.ts +0 -2
  52. package/dist/components/Documents/types/ui/DocumentFile.d.ts +0 -6
  53. package/dist/components/Documents/types/ui/DocumentFolder.d.ts +0 -10
  54. package/dist/components/Documents/types/ui/DocumentState.d.ts +0 -2
  55. package/dist/components/Documents/types/ui/DocumentsActionsObj.d.ts +0 -14
  56. package/dist/components/Documents/types/ui/DocumentsFolderId.d.ts +0 -2
  57. package/dist/components/Documents/types/ui/FileDirType.d.ts +0 -2
  58. package/dist/components/Documents/utils/documentsConstants.d.ts +0 -1
  59. package/dist/components/Documents/utils/documentsDataUtils.d.ts +0 -12
  60. package/dist/components/Documents/utils/documentsTypeUtils.d.ts +0 -4
  61. package/dist/components/Documents/utils/documentsUtils.d.ts +0 -7
  62. package/dist/components/Dropdown/Dropdown.d.ts +0 -8
  63. package/dist/components/Dropdown/comps/DropdownDivider/DropdownDivider.d.ts +0 -7
  64. package/dist/components/Dropdown/comps/DropdownItem/DropdownItem.d.ts +0 -16
  65. package/dist/components/Dropdown/comps/DropdownItem/FileUploadDropdownItem.d.ts +0 -11
  66. package/dist/components/Dropdown/comps/DropdownToggle/DropdownToggle.d.ts +0 -7
  67. package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +0 -11
  68. package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +0 -9
  69. package/dist/components/Dropdown/comps/index.d.ts +0 -6
  70. package/dist/components/Dropdown/index.d.ts +0 -2
  71. package/dist/components/Flexmonster/Flexmonster.d.ts +0 -17
  72. package/dist/components/Flexmonster/ReportPage.d.ts +0 -18
  73. package/dist/components/Flexmonster/components/ReportSharingModal/ReportSharingModal.d.ts +0 -12
  74. package/dist/components/Flexmonster/components/ReportSharingModal/hooks/useReportSharingApi.d.ts +0 -6
  75. package/dist/components/Flexmonster/components/index.d.ts +0 -1
  76. package/dist/components/Flexmonster/hooks/useReportMappings.d.ts +0 -4
  77. package/dist/components/Flexmonster/hooks/useReportVersionApi.d.ts +0 -10
  78. package/dist/components/Flexmonster/index.d.ts +0 -2
  79. package/dist/components/Flexmonster/types/api/ReportModel.d.ts +0 -7
  80. package/dist/components/Flexmonster/types/api/ReportRestrictItem.d.ts +0 -4
  81. package/dist/components/Flexmonster/types/api/ReportRestrictModel.d.ts +0 -6
  82. package/dist/components/Flexmonster/types/api/ReportVersionModel.d.ts +0 -15
  83. package/dist/components/Flexmonster/types/api/ReportVersionUserModel.d.ts +0 -7
  84. package/dist/components/Flexmonster/types/ui/HyperlinkColumn.d.ts +0 -10
  85. package/dist/components/Flexmonster/types/ui/ReportSettings.d.ts +0 -5
  86. package/dist/components/Flexmonster/utils/flexMonsterUtils.d.ts +0 -12
  87. package/dist/components/Form/CheckInput/CheckInput.d.ts +0 -4
  88. package/dist/components/Form/CustomSelectInput/CustomSelectInput.d.ts +0 -4
  89. package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +0 -7
  90. package/dist/components/Form/NumericStepperInput/NumericStepperInput.d.ts +0 -4
  91. package/dist/components/Form/NumericTextInput/NumericTextInput.d.ts +0 -4
  92. package/dist/components/Form/SelectInput/SelectInput.d.ts +0 -4
  93. package/dist/components/Form/TextAreaInput/TextAreaInput.d.ts +0 -4
  94. package/dist/components/Form/TextInput/TextInput.d.ts +0 -4
  95. package/dist/components/Form/index.d.ts +0 -7
  96. package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +0 -4
  97. package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +0 -4
  98. package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +0 -5
  99. package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +0 -4
  100. package/dist/components/HookForm/FloatingSubmit/HookFormFloatingSubmit.d.ts +0 -9
  101. package/dist/components/HookForm/NumericStepperInput/HookFormNumericStepperInput.d.ts +0 -4
  102. package/dist/components/HookForm/NumericTextInput/HookFormNumericTextInput.d.ts +0 -4
  103. package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +0 -4
  104. package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +0 -4
  105. package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +0 -4
  106. package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +0 -4
  107. package/dist/components/HookForm/index.d.ts +0 -11
  108. package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +0 -33
  109. package/dist/components/InputContainers/InputAnchorContainer/InputAnchorContainer.d.ts +0 -9
  110. package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +0 -33
  111. package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +0 -33
  112. package/dist/components/InputContainers/index.d.ts +0 -4
  113. package/dist/components/Layout/MessageBoard/MessageBoard.d.ts +0 -15
  114. package/dist/components/Layout/MessageBoard/components/MessageList/MessageList.d.ts +0 -12
  115. package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageFilters/MessageFilters.d.ts +0 -7
  116. package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageItem/MessageItem.d.ts +0 -11
  117. package/dist/components/Layout/MessageBoard/components/MessageList/comps/index.d.ts +0 -2
  118. package/dist/components/Layout/MessageBoard/components/index.d.ts +0 -1
  119. package/dist/components/Layout/index.d.ts +0 -1
  120. package/dist/components/NewTabs/Tab/Tab.d.ts +0 -12
  121. package/dist/components/NewTabs/TabPanel/TabPanel.d.ts +0 -10
  122. package/dist/components/NewTabs/Tabs/Tabs.d.ts +0 -13
  123. package/dist/components/NewTabs/index.d.ts +0 -3
  124. package/dist/components/ResponsiveContextDropdown/ResponsiveContextDropdown.d.ts +0 -13
  125. package/dist/components/ResponsiveContextDropdown/components/ResponsiveContextDropdownItem/ResponsiveContextDropdownItem.d.ts +0 -22
  126. package/dist/components/ResponsiveContextDropdown/components/index.d.ts +0 -1
  127. package/dist/components/ResponsiveContextDropdown/index.d.ts +0 -2
  128. package/dist/components/ResponsiveContextDropdown/utils/responsiveContextDropdownUtils.d.ts +0 -5
  129. package/dist/components/Tabs/Tabs.d.ts +0 -9
  130. package/dist/components/Tabs/comps/Tab/Tab.d.ts +0 -7
  131. package/dist/components/Tabs/comps/index.d.ts +0 -1
  132. package/dist/components/Tabs/index.d.ts +0 -2
  133. package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +0 -25
  134. package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +0 -11
  135. package/dist/components/Tooltip/index.d.ts +0 -2
  136. package/dist/components/UserAvatar/AvatarIcon/AvatarIcon.d.ts +0 -7
  137. package/dist/components/UserAvatar/index.d.ts +0 -1
  138. package/dist/components/common/Alert/Alert.d.ts +0 -8
  139. package/dist/components/common/AlertItem/AlertItem.d.ts +0 -8
  140. package/dist/components/common/ApiFileDownloadButton/ApiFileDownloadButton.d.ts +0 -9
  141. package/dist/components/common/AppSearch/AppSearch.d.ts +0 -11
  142. package/dist/components/common/AppSearch/comps/AutocompleteWindow/AutocompleteWindow.d.ts +0 -12
  143. package/dist/components/common/AppSearch/comps/TypeSelector/TypeSelector.d.ts +0 -10
  144. package/dist/components/common/AppSearch/comps/index.d.ts +0 -2
  145. package/dist/components/common/AppSearch/hooks/useSearchItems.d.ts +0 -7
  146. package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +0 -7
  147. package/dist/components/common/Backdrop/Backdrop.d.ts +0 -6
  148. package/dist/components/common/Badge/Badge.d.ts +0 -9
  149. package/dist/components/common/BarChart/BarChart.d.ts +0 -14
  150. package/dist/components/common/Card/Card.d.ts +0 -28
  151. package/dist/components/common/Collapse/Collapse.d.ts +0 -19
  152. package/dist/components/common/ColumnResizer/ColumnResizer.d.ts +0 -6
  153. package/dist/components/common/ConfirmDialog/ConfirmDialog.d.ts +0 -2
  154. package/dist/components/common/DisabledRowLabelLink/DisabledRowLabelLink.d.ts +0 -9
  155. package/dist/components/common/DynamicForm/DynamicForm.d.ts +0 -29
  156. package/dist/components/common/DynamicForm/comps/DynamicFormErrors/DynamicFormErrors.d.ts +0 -9
  157. package/dist/components/common/DynamicForm/comps/DynamicFormMasterPicker/DynamicFormMasterPicker.d.ts +0 -10
  158. package/dist/components/common/DynamicForm/comps/DynamicFormTable/DynamicFormTable.d.ts +0 -23
  159. package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/DynamicFormCreateTableRow/DynamicFormCreateTableRow.d.ts +0 -15
  160. package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/DynamicFormTableRow/DynamicFormTableRow.d.ts +0 -17
  161. package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/TableColumnHead/TableColumnHead.d.ts +0 -10
  162. package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/comps/DynamicFormInput/DynamicFormInput.d.ts +0 -23
  163. package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/comps/index.d.ts +0 -1
  164. package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/index.d.ts +0 -3
  165. package/dist/components/common/DynamicForm/comps/index.d.ts +0 -3
  166. package/dist/components/common/DynamicForm/utils/itemTransformers.d.ts +0 -4
  167. package/dist/components/common/EmployeeSmallPhoto/EmployeeSmallPhoto.d.ts +0 -9
  168. package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +0 -12
  169. package/dist/components/common/FloatingActionContainer/FloatingActionContainer.d.ts +0 -6
  170. package/dist/components/common/FromToDatePicker/FromToDatePicker.d.ts +0 -11
  171. package/dist/components/common/FromToDatePicker/components/FromToDatePickerDropdownToggle/FromToDatePickerDropdownToggle.d.ts +0 -8
  172. package/dist/components/common/FromToDatePicker/components/index.d.ts +0 -1
  173. package/dist/components/common/FromToDatePicker/constants/TimeRanges.d.ts +0 -3
  174. package/dist/components/common/FromToDatePicker/hooks/useFromToDatePicker.d.ts +0 -10
  175. package/dist/components/common/FromToDatePicker/utils/utilsFromToDatePicker.d.ts +0 -11
  176. package/dist/components/common/HomeDashboard/HomeDashboard.d.ts +0 -11
  177. package/dist/components/common/HomeDashboard/comps/FreeSpaceWidget/FreeSpaceWidget.d.ts +0 -10
  178. package/dist/components/common/HomeDashboard/comps/WidgetPicker/WidgetPicker.d.ts +0 -12
  179. package/dist/components/common/HomeDashboard/comps/index.d.ts +0 -1
  180. package/dist/components/common/HomeDashboard/hooks/useUserDashboard.d.ts +0 -7
  181. package/dist/components/common/ImgApi/ImgApi.d.ts +0 -4
  182. package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +0 -9
  183. package/dist/components/common/ImgDirect/ImgDirect.d.ts +0 -4
  184. package/dist/components/common/InvalidFeedback/InvalidFeedback.d.ts +0 -5
  185. package/dist/components/common/LanguageSwitch/LanguageSwitch.d.ts +0 -2
  186. package/dist/components/common/Loading/Loading.d.ts +0 -2
  187. package/dist/components/common/Loading/LoadingBlock.d.ts +0 -5
  188. package/dist/components/common/MonthPicker/MonthPicker.d.ts +0 -11
  189. package/dist/components/common/MonthPickerSearchParams/MonthPickerSearchParams.d.ts +0 -8
  190. package/dist/components/common/NumericFormat/NumericFormat.d.ts +0 -9
  191. package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +0 -17
  192. package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +0 -18
  193. package/dist/components/common/PieChart/PieChart.d.ts +0 -12
  194. package/dist/components/common/PromptDialog/PromptDialog.d.ts +0 -2
  195. package/dist/components/common/SearchBox/SearchBox.d.ts +0 -8
  196. package/dist/components/common/SettingsFormPicker/SettingsFormPicker.d.ts +0 -19
  197. package/dist/components/common/SimplePicker/SimplePicker.d.ts +0 -27
  198. package/dist/components/common/Timeline/Timeline.d.ts +0 -7
  199. package/dist/components/common/TypedFormGroup/TypedFormGroup.d.ts +0 -9
  200. package/dist/components/common/Typography/Typography.d.ts +0 -8
  201. package/dist/components/common/VersionInfo/VersionInfo.d.ts +0 -5
  202. package/dist/components/common/Widget/WidgetCard.d.ts +0 -9
  203. package/dist/components/common/Widget/WidgetWrapper.d.ts +0 -8
  204. package/dist/components/common/YearPicker/YearPicker.d.ts +0 -9
  205. package/dist/components/common/YearPickerSearchParams/YearPickerSearchParams.d.ts +0 -9
  206. package/dist/components/common/index.d.ts +0 -42
  207. package/dist/contexts/auth/AuthContext.d.ts +0 -9
  208. package/dist/contexts/auth/AuthProvider.d.ts +0 -16
  209. package/dist/contexts/confirm/ConfirmContext.d.ts +0 -8
  210. package/dist/contexts/confirm/ConfirmProvider.d.ts +0 -5
  211. package/dist/contexts/delegation/DelegationContext.d.ts +0 -24
  212. package/dist/contexts/delegation/DelegationProvider.d.ts +0 -6
  213. package/dist/contexts/helmet/HelmetContext.d.ts +0 -6
  214. package/dist/contexts/helmet/HelmetProvider.d.ts +0 -6
  215. package/dist/contexts/index.d.ts +0 -14
  216. package/dist/contexts/loading/LoadingContext.d.ts +0 -7
  217. package/dist/contexts/loading/LoadingProvider.d.ts +0 -5
  218. package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +0 -22
  219. package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +0 -18
  220. package/dist/contexts/prompt/PromptContext.d.ts +0 -13
  221. package/dist/contexts/prompt/PromptProvider.d.ts +0 -7
  222. package/dist/contexts/user/UserContext.d.ts +0 -11
  223. package/dist/contexts/user/UserProvider.d.ts +0 -5
  224. package/dist/contexts.cjs.js +0 -1
  225. package/dist/contexts.d.ts +0 -1
  226. package/dist/contexts.es.js +0 -940
  227. package/dist/hooks/index.d.ts +0 -19
  228. package/dist/hooks/useAuth/hooks/useDevAuth.d.ts +0 -7
  229. package/dist/hooks/useAuth/hooks/useMsalAuth.d.ts +0 -8
  230. package/dist/hooks/useAuth/useAuth.d.ts +0 -8
  231. package/dist/hooks/useAxios/useAxios.d.ts +0 -13
  232. package/dist/hooks/useClickOutside/useClickOutside.d.ts +0 -4
  233. package/dist/hooks/useClipboard/useClipboard.d.ts +0 -4
  234. package/dist/hooks/useConfirm/useConfirm.d.ts +0 -8
  235. package/dist/hooks/useEmployeePhotoPath/useEmployeePhotoPath.d.ts +0 -5
  236. package/dist/hooks/useFormControlType/useFormControlType.d.ts +0 -2
  237. package/dist/hooks/useGetApiData/useGetApiData.d.ts +0 -9
  238. package/dist/hooks/useGetApiDataBound/useGetApiDataBound.d.ts +0 -9
  239. package/dist/hooks/useGetDataBound/useGetDataBound.d.ts +0 -4
  240. package/dist/hooks/useKeyPress/useKeyPress.d.ts +0 -2
  241. package/dist/hooks/useLocalStorageState/useLocalStorageState.d.ts +0 -2
  242. package/dist/hooks/useNotifications/useNotifications.d.ts +0 -4
  243. package/dist/hooks/usePermissions/usePermissions.d.ts +0 -4
  244. package/dist/hooks/usePrompt/usePrompt.d.ts +0 -9
  245. package/dist/hooks/useSearchQuery/useSearchQuery.d.ts +0 -5
  246. package/dist/hooks/useSearchQueryState/useSearchQueryState.d.ts +0 -16
  247. package/dist/hooks/useWindowSize/useWindowSize.d.ts +0 -6
  248. package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +0 -83
  249. package/dist/hooks.cjs.js +0 -1
  250. package/dist/hooks.d.ts +0 -1
  251. package/dist/hooks.es.js +0 -132
  252. package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +0 -4
  253. package/dist/layout/MainContainer/MainContainer.d.ts +0 -4
  254. package/dist/layout/PageContainer/PageContainer.d.ts +0 -4
  255. package/dist/layout/PageTitle/PageTitle.d.ts +0 -7
  256. package/dist/layout/SideContentBar/SideContentBar.d.ts +0 -8
  257. package/dist/layout/SideMenu/MenuItem/MenuItem.d.ts +0 -14
  258. package/dist/layout/SideMenu/SideMenu.d.ts +0 -15
  259. package/dist/layout/TopBar/TopBar.d.ts +0 -8
  260. package/dist/layout/index.d.ts +0 -6
  261. package/dist/layout.cjs.js +0 -1
  262. package/dist/layout.d.ts +0 -1
  263. package/dist/layout.es.js +0 -150
  264. package/dist/main.cjs.js +0 -9
  265. package/dist/main.d.ts +0 -50
  266. package/dist/main.es.js +0 -4131
  267. package/dist/models/api/documents/DocType.d.ts +0 -6
  268. package/dist/models/api/documents/DocumentFileModel.d.ts +0 -18
  269. package/dist/models/api/documents/DocumentFolderModel.d.ts +0 -9
  270. package/dist/models/api/documents/DocumentListModel.d.ts +0 -8
  271. package/dist/models/api/documents/DocumentUploadModel.d.ts +0 -6
  272. package/dist/models/api/documents/DocumentsCreateFolderModel.d.ts +0 -8
  273. package/dist/models/index.d.ts +0 -84
  274. package/dist/models/luminus-context-types/CommonLuminusIcons.d.ts +0 -2
  275. package/dist/models/luminus-context-types/ILocalizationContext.d.ts +0 -8
  276. package/dist/models/prop-types/ContainerProps.d.ts +0 -12
  277. package/dist/models/prop-types/DashboardWidgetCommonProps.d.ts +0 -6
  278. package/dist/models/prop-types/FormInputProps/FormCheckInputProps.d.ts +0 -8
  279. package/dist/models/prop-types/FormInputProps/FormFileInputProps.d.ts +0 -12
  280. package/dist/models/prop-types/FormInputProps/FormNumericStepperInputProps.d.ts +0 -9
  281. package/dist/models/prop-types/FormInputProps/FormNumericTextInputProps.d.ts +0 -8
  282. package/dist/models/prop-types/FormInputProps/FormRadioInputProps.d.ts +0 -7
  283. package/dist/models/prop-types/FormInputProps/FormSelectInputProps.d.ts +0 -9
  284. package/dist/models/prop-types/FormInputProps/FormTextAreaInputProps.d.ts +0 -8
  285. package/dist/models/prop-types/FormInputProps/FormTextInputProps.d.ts +0 -8
  286. package/dist/models/prop-types/HookFormInputProps/HookFormCheckInputProps.d.ts +0 -5
  287. package/dist/models/prop-types/HookFormInputProps/HookFormDropdownPickerProps.d.ts +0 -8
  288. package/dist/models/prop-types/HookFormInputProps/HookFormFileInputProps.d.ts +0 -5
  289. package/dist/models/prop-types/HookFormInputProps/HookFormInputBaseProps.d.ts +0 -8
  290. package/dist/models/prop-types/HookFormInputProps/HookFormInputProps.d.ts +0 -10
  291. package/dist/models/prop-types/HookFormInputProps/HookFormNumericStepperInputProps.d.ts +0 -5
  292. package/dist/models/prop-types/HookFormInputProps/HookFormNumericTextInputProps.d.ts +0 -5
  293. package/dist/models/prop-types/HookFormInputProps/HookFormRadioInputProps.d.ts +0 -5
  294. package/dist/models/prop-types/HookFormInputProps/HookFormSelectInputProps.d.ts +0 -5
  295. package/dist/models/prop-types/HookFormInputProps/HookFormTextAreaInputProps.d.ts +0 -8
  296. package/dist/models/prop-types/HookFormInputProps/HookFormTextInputProps.d.ts +0 -5
  297. package/dist/models/prop-types/ImgProps.d.ts +0 -8
  298. package/dist/models/prop-types/InputContainerProps.d.ts +0 -25
  299. package/dist/models/prop-types/InputProps/CheckInputProps.d.ts +0 -6
  300. package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +0 -25
  301. package/dist/models/prop-types/InputProps/FileInputProps.d.ts +0 -7
  302. package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +0 -16
  303. package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +0 -14
  304. package/dist/models/prop-types/InputProps/RadioInputProps.d.ts +0 -7
  305. package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +0 -12
  306. package/dist/models/prop-types/InputProps/TextAreaInputProps.d.ts +0 -8
  307. package/dist/models/prop-types/InputProps/TextInputProps.d.ts +0 -12
  308. package/dist/models/prop-types/PageContainerProps.d.ts +0 -6
  309. package/dist/models/texts/AppSearchTexts.d.ts +0 -5
  310. package/dist/models/texts/AxiosTexts.d.ts +0 -8
  311. package/dist/models/texts/ClipboardTexts.d.ts +0 -5
  312. package/dist/models/texts/ComponentsContextTexts.d.ts +0 -34
  313. package/dist/models/texts/ConfirmTexts.d.ts +0 -7
  314. package/dist/models/texts/CustomSelectTexts.d.ts +0 -5
  315. package/dist/models/texts/DateTexts.d.ts +0 -8
  316. package/dist/models/texts/DocumentsTexts.d.ts +0 -45
  317. package/dist/models/texts/DropdownPickerTexts.d.ts +0 -5
  318. package/dist/models/texts/DynamicFormsTexts.d.ts +0 -13
  319. package/dist/models/texts/ErrorBoundaryTexts.d.ts +0 -7
  320. package/dist/models/texts/FormSubmitTexts.d.ts +0 -4
  321. package/dist/models/texts/FormValidationTexts.d.ts +0 -13
  322. package/dist/models/texts/HomeDashboardTexts.d.ts +0 -9
  323. package/dist/models/texts/MessageBoardTexts.d.ts +0 -4
  324. package/dist/models/texts/ReportsTexts.d.ts +0 -30
  325. package/dist/models/texts/WidgetTexts.d.ts +0 -4
  326. package/dist/models/types/ApiErrorResult.d.ts +0 -9
  327. package/dist/models/types/BaseMessageBoardModel.d.ts +0 -8
  328. package/dist/models/types/DashboardConfig.d.ts +0 -6
  329. package/dist/models/types/DashboardWidget.d.ts +0 -12
  330. package/dist/models/types/DashboardWidgetConfig.d.ts +0 -5
  331. package/dist/models/types/DropdownPickerOption.d.ts +0 -8
  332. package/dist/models/types/EmployeeIndexModel.d.ts +0 -14
  333. package/dist/models/types/ErrorField.d.ts +0 -5
  334. package/dist/models/types/FormSelectOption.d.ts +0 -5
  335. package/dist/models/types/FromTo.d.ts +0 -5
  336. package/dist/models/types/HookFormInputProps.d.ts +0 -10
  337. package/dist/models/types/LoginState.d.ts +0 -7
  338. package/dist/models/types/MenuItemType.d.ts +0 -10
  339. package/dist/models/types/MenuItemTypeExtended.d.ts +0 -7
  340. package/dist/models/types/NameIdIntModel.d.ts +0 -5
  341. package/dist/models/types/NameIdIntOptionalModel.d.ts +0 -5
  342. package/dist/models/types/NameIdStringModel.d.ts +0 -5
  343. package/dist/models/types/NameIdStringOptionalModel.d.ts +0 -5
  344. package/dist/models/types/PhotoAction.d.ts +0 -8
  345. package/dist/models/types/PhotoLibraryItemModel.d.ts +0 -7
  346. package/dist/models/types/PromptOptions.d.ts +0 -7
  347. package/dist/models/types/SaveFileFromResponseOptions.d.ts +0 -6
  348. package/dist/models/types/SearchResultGroupKeyModel.d.ts +0 -6
  349. package/dist/models/types/SearchResultGroupModel.d.ts +0 -8
  350. package/dist/models/types/SearchResultModel.d.ts +0 -9
  351. package/dist/models/types/SearchType.d.ts +0 -6
  352. package/dist/models/types/TimelineStep.d.ts +0 -11
  353. package/dist/models/types/TimelineStepState.d.ts +0 -5
  354. package/dist/models/types/ToLiteral.d.ts +0 -5
  355. package/dist/models/types/UseGetApiDataOptions.d.ts +0 -12
  356. package/dist/models/types/UseGetDataBoundOptions.d.ts +0 -5
  357. package/dist/models/types/UserLoginState.d.ts +0 -8
  358. package/dist/models/types/UserModel.d.ts +0 -12
  359. package/dist/models/types/common/NullsOptional.d.ts +0 -12
  360. package/dist/models/types/common/RequireAtLeastOne.d.ts +0 -4
  361. package/dist/models/types/common/SharedProperties.d.ts +0 -33
  362. package/dist/models/types/dynamicForms/CustomPickerProps.d.ts +0 -9
  363. package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormGroup.d.ts +0 -8
  364. package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItem.d.ts +0 -8
  365. package/dist/models/types/dynamicForms/index.d.ts +0 -8
  366. package/dist/models/types/dynamicForms/types/DynamicFormColumnDef.d.ts +0 -12
  367. package/dist/models/types/dynamicForms/types/DynamicFormColumnSchemaModel.d.ts +0 -13
  368. package/dist/models/types/dynamicForms/types/DynamicFormColumnValueSchemaModel.d.ts +0 -5
  369. package/dist/models/types/dynamicForms/types/DynamicFormFilters.d.ts +0 -4
  370. package/dist/models/types/dynamicForms/types/DynamicFormIndexModel.d.ts +0 -7
  371. package/dist/models/types/dynamicForms/types/DynamicFormSchemaModel.d.ts +0 -16
  372. package/dist/models/types/dynamicForms/types/DynamicFormValueTypes.d.ts +0 -12
  373. package/dist/searchUtils-CamATrfQ.cjs +0 -1
  374. package/dist/searchUtils-DaQgY8fs.js +0 -14
  375. package/dist/style.css +0 -1
  376. package/dist/useClickOutside-BmlXg38T.js +0 -14
  377. package/dist/useClickOutside-D0505nsm.cjs +0 -1
  378. package/dist/useClipboard-DPyvA4Ya.js +0 -60
  379. package/dist/useClipboard-DtPZtxpV.cjs +0 -1
  380. package/dist/useGetApiData-Bx0_4gT-.js +0 -52
  381. package/dist/useGetApiData-DK9Apz0I.cjs +0 -1
  382. package/dist/useLocalStorageState-BFc8Gc8H.cjs +0 -1
  383. package/dist/useLocalStorageState-Bt99kkCr.js +0 -17
  384. package/dist/useWindowSize-DYUZPhVO.cjs +0 -1
  385. package/dist/useWindowSize-DqS1g_16.js +0 -26
  386. package/dist/utils/apiErrorFields/apiErrorFieldsUtils.d.ts +0 -5
  387. package/dist/utils/bnfValueFormat/bnfValueFormat.d.ts +0 -7
  388. package/dist/utils/color/colorUtils.d.ts +0 -2
  389. package/dist/utils/date/dateUtils.d.ts +0 -47
  390. package/dist/utils/file/fileUtils.d.ts +0 -9
  391. package/dist/utils/hookForm/hookFormUtils.d.ts +0 -4
  392. package/dist/utils/index.d.ts +0 -11
  393. package/dist/utils/number/numberUtils.d.ts +0 -1
  394. package/dist/utils/object/objectUtils.d.ts +0 -6
  395. package/dist/utils/search/searchUtils.d.ts +0 -5
  396. package/dist/utils/text/string.d.ts +0 -18
  397. package/dist/utils/text/textUtils.d.ts +0 -11
  398. package/dist/utils.cjs.js +0 -1
  399. package/dist/utils.d.ts +0 -1
  400. package/dist/utils.es.js +0 -83
package/dist/main.es.js DELETED
@@ -1,4131 +0,0 @@
1
- import { j as n, c as b, t as je, a as vt, s as In, g as Dn, m as Cs, d as kt, b as ks, e as Is, f as Ve, h as Ds, i as $s, k as Es, l as Os, n as Ts, o as Fs, p as Ls, T as ur, q as fr, r as $n, E as Rs, u as mr, v as un, w as hr, x as As, y as me, z as Ft, A as Ms, B as gr, C as Lt, D as Bs, F as nn, G as pr, H as Vs, S as rn, N as xr, I as fn, J as mn, K as zs, L as Ps, M as Ws, O as Hs, P as Us, Q as vr, R as Ys, U as Gs, V as Ks, W as qs, X as Qs, Y as Zs, Z as Js, _ as sn, $ as Xs, a0 as Ht, a1 as X, a2 as he, a3 as an, a4 as ea, a5 as ta, a6 as na, a7 as jr, a8 as jt, a9 as se, aa as hn, ab as ye, ac as gn, ad as He, ae as ra, af as Ae, ag as yr, ah as sa, ai as wr, aj as aa, ak as oa, al as ia, am as pn, an as xn, ao as br, ap as et, aq as la, ar as nt, as as ca, at as $t, au as _r, av as Me, aw as da, ax as ua, ay as fa, az as ma, aA as Rt, aB as ha, aC as Nr, aD as ga, aE as rt, aF as pa, aG as Sr, aH as Cr, aI as kr, aJ as Ue, aK as xa, aL as va, aM as Fe, aN as ja, aO as yt, aP as ya, aQ as At, aR as Ir, aS as Mt, aT as Ut, aU as Ye, aV as En, aW as wa, aX as ba, aY as st, aZ as _a, a_ as Na, a$ as Sa, b0 as Ca, b1 as ka } from "./ResponsiveContextDropdown-CLWBQLuy.js";
2
- import { b5 as eu, b6 as tu, b3 as nu, b2 as ru, b7 as su, b8 as au, b4 as ou } from "./ResponsiveContextDropdown-CLWBQLuy.js";
3
- import * as oe from "react";
4
- import ke, { useCallback as S, useMemo as Q, useContext as Z, useRef as J, useEffect as B, useState as E, useId as Ia, Component as Da, isValidElement as On, Suspense as $a, useLayoutEffect as Ea } from "react";
5
- import { c as ze, L as Tn } from "./Loading-CLeYjOUz.js";
6
- import { InteractionType as Oa } from "@azure/msal-browser";
7
- import { MsalAuthenticationTemplate as Ta } from "@azure/msal-react";
8
- import { useNavigate as Dr, Link as tt, Navigate as St, generatePath as Et, useParams as Fa } from "react-router-dom";
9
- import { useFormContext as Ge, Controller as vn } from "react-hook-form";
10
- import { Pivot as La } from "react-flexmonster";
11
- import { s as wt, l as pt } from "./searchUtils-DaQgY8fs.js";
12
- import { S as Bt } from "./SimpleTooltip-_neXI0ly.js";
13
- import { u as $r } from "./useClickOutside-BmlXg38T.js";
14
- import { u as Ra, a as Er, b as Aa, c as Ma, d as Ba } from "./useClipboard-DPyvA4Ya.js";
15
- import Ot from "react-dom";
16
- import { u as Va } from "./useGetApiData-Bx0_4gT-.js";
17
- import { F as za } from "./FullScreenContainer-CmMf6Wz-.js";
18
- const dd = ({ fileLoader: e, fileName: t, children: r }) => {
19
- const s = S(async () => {
20
- var c, l;
21
- const a = await e();
22
- if (!a)
23
- return;
24
- const o = window.URL.createObjectURL(new Blob([a])), i = document.createElement("a");
25
- i.href = o, i.setAttribute("download", t), (c = document.body) == null || c.appendChild(i), i.click(), (l = document.body) == null || l.removeChild(i);
26
- }, [e, t]);
27
- return /* @__PURE__ */ n.jsx("div", { role: "button", onClick: s, children: r });
28
- }, Pa = ({ className: e, ...t }) => /* @__PURE__ */ n.jsxs("div", { className: b("luminus-loading", ze.loading, ze.loadingBlock, ze.loadingBlock), ...t, children: [
29
- /* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", ze.spinnerGrow, "text-primary"), role: "status" }),
30
- /* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", ze.spinnerGrow, "text-primary", ze.second), role: "status" }),
31
- /* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", ze.spinnerGrow, "text-primary", ze.third), role: "status" })
32
- ] });
33
- function Or(e, t) {
34
- const r = je(e);
35
- if (isNaN(t)) return vt(e, NaN);
36
- if (!t)
37
- return r;
38
- const s = r.getDate(), a = vt(e, r.getTime());
39
- a.setMonth(r.getMonth() + t + 1, 0);
40
- const o = a.getDate();
41
- return s >= o ? a : (r.setFullYear(
42
- a.getFullYear(),
43
- a.getMonth(),
44
- s
45
- ), r);
46
- }
47
- function Wa(e, t) {
48
- return Or(e, t * 12);
49
- }
50
- function Ha(e, t) {
51
- const r = je(e), s = je(t), a = r.getTime() - s.getTime();
52
- return a < 0 ? -1 : a > 0 ? 1 : a;
53
- }
54
- function Fn(e, t) {
55
- const r = je(e), s = je(t), a = r.getFullYear() - s.getFullYear(), o = r.getMonth() - s.getMonth();
56
- return a * 12 + o;
57
- }
58
- function Ln(e) {
59
- const t = je(e);
60
- return Math.trunc(t.getMonth() / 3) + 1;
61
- }
62
- function Yt(e, t) {
63
- const r = je(e), s = je(t), a = r.getFullYear() - s.getFullYear(), o = Ln(r) - Ln(s);
64
- return a * 4 + o;
65
- }
66
- function Rn(e, t, r) {
67
- const s = In(e, r), a = In(t, r), o = +s - Dn(s), i = +a - Dn(a);
68
- return Math.round((o - i) / Cs);
69
- }
70
- function Gt(e, t) {
71
- const r = je(e), s = je(t);
72
- return r.getFullYear() - s.getFullYear();
73
- }
74
- function Ua(e, t) {
75
- const r = je(e), s = je(t), a = An(r, s), o = Math.abs(kt(r, s));
76
- r.setDate(r.getDate() - a * o);
77
- const i = +(An(r, s) === -a), c = a * (o - i);
78
- return c === 0 ? 0 : c;
79
- }
80
- function An(e, t) {
81
- const r = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
82
- return r < 0 ? -1 : r > 0 ? 1 : r;
83
- }
84
- function jn(e) {
85
- return (t) => {
86
- const s = (e ? Math[e] : Math.trunc)(t);
87
- return s === 0 ? 0 : s;
88
- };
89
- }
90
- function yn(e, t) {
91
- return +je(e) - +je(t);
92
- }
93
- function Mn(e, t, r) {
94
- const s = yn(e, t) / ks;
95
- return jn(r == null ? void 0 : r.roundingMethod)(s);
96
- }
97
- function Bn(e, t, r) {
98
- const s = yn(e, t) / Is;
99
- return jn(r == null ? void 0 : r.roundingMethod)(s);
100
- }
101
- function Kt(e, t, r) {
102
- const s = yn(e, t) / 1e3;
103
- return jn(r == null ? void 0 : r.roundingMethod)(s);
104
- }
105
- function on(e, t) {
106
- const r = je(e);
107
- if (isNaN(r.getTime()))
108
- throw new RangeError("Invalid time value");
109
- const s = (t == null ? void 0 : t.format) ?? "extended", a = (t == null ? void 0 : t.representation) ?? "complete";
110
- let o = "", i = "";
111
- const c = s === "extended" ? "-" : "", l = s === "extended" ? ":" : "";
112
- if (a !== "time") {
113
- const d = Ve(r.getDate(), 2), u = Ve(r.getMonth() + 1, 2);
114
- o = `${Ve(r.getFullYear(), 4)}${c}${u}${c}${d}`;
115
- }
116
- if (a !== "date") {
117
- const d = r.getTimezoneOffset();
118
- if (d !== 0) {
119
- const p = Math.abs(d), h = Ve(Math.trunc(p / 60), 2), y = Ve(p % 60, 2);
120
- i = `${d < 0 ? "+" : "-"}${h}:${y}`;
121
- } else
122
- i = "Z";
123
- const u = Ve(r.getHours(), 2), m = Ve(r.getMinutes(), 2), x = Ve(r.getSeconds(), 2), f = o === "" ? "" : "T", g = [u, m, x].join(l);
124
- o = `${o}${f}${g}${i}`;
125
- }
126
- return o;
127
- }
128
- function Ya(e) {
129
- const t = je(e), r = t.getFullYear(), s = t.getMonth(), a = vt(e, 0);
130
- return a.setFullYear(r, s + 1, 0), a.setHours(0, 0, 0, 0), a.getDate();
131
- }
132
- function Ga(e, t, r) {
133
- let s = 0, a;
134
- const o = je(e), i = je(t);
135
- if (r != null && r.unit)
136
- a = r == null ? void 0 : r.unit, a === "second" ? s = Kt(o, i) : a === "minute" ? s = Bn(o, i) : a === "hour" ? s = Mn(o, i) : a === "day" ? s = kt(o, i) : a === "week" ? s = Rn(o, i) : a === "month" ? s = Fn(o, i) : a === "quarter" ? s = Yt(o, i) : a === "year" && (s = Gt(o, i));
137
- else {
138
- const l = Kt(o, i);
139
- Math.abs(l) < Ds ? (s = Kt(o, i), a = "second") : Math.abs(l) < $s ? (s = Bn(o, i), a = "minute") : Math.abs(l) < Es && Math.abs(kt(o, i)) < 1 ? (s = Mn(o, i), a = "hour") : Math.abs(l) < Os && (s = kt(o, i)) && Math.abs(s) < 7 ? a = "day" : Math.abs(l) < Ts ? (s = Rn(o, i), a = "week") : Math.abs(l) < Fs ? (s = Fn(o, i), a = "month") : Math.abs(l) < Ls && Yt(o, i) < 4 ? (s = Yt(o, i), a = "quarter") : (s = Gt(o, i), a = "year");
140
- }
141
- return new Intl.RelativeTimeFormat(r == null ? void 0 : r.locale, {
142
- localeMatcher: r == null ? void 0 : r.localeMatcher,
143
- numeric: (r == null ? void 0 : r.numeric) || "auto",
144
- style: r == null ? void 0 : r.style
145
- }).format(s, a);
146
- }
147
- function Ka(e, t) {
148
- const r = je(e), s = r.getFullYear(), a = r.getDate(), o = vt(e, 0);
149
- o.setFullYear(s, t, 15), o.setHours(0, 0, 0, 0);
150
- const i = Ya(o);
151
- return r.setMonth(t, Math.min(a, i)), r;
152
- }
153
- function Tr(e, t) {
154
- const r = je(e);
155
- return isNaN(+r) ? vt(e, NaN) : (r.setFullYear(t), r);
156
- }
157
- function gt(...e) {
158
- return e.filter((t) => t != null).reduce((t, r) => {
159
- if (typeof r != "function")
160
- throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");
161
- return t === null ? r : function(...a) {
162
- t.apply(this, a), r.apply(this, a);
163
- };
164
- }, null);
165
- }
166
- const qa = {
167
- height: ["marginTop", "marginBottom"],
168
- width: ["marginLeft", "marginRight"]
169
- };
170
- function Qa(e, t) {
171
- const r = `offset${e[0].toUpperCase()}${e.slice(1)}`, s = t[r], a = qa[e];
172
- return s + // @ts-ignore
173
- parseInt($n(t, a[0]), 10) + // @ts-ignore
174
- parseInt($n(t, a[1]), 10);
175
- }
176
- const Za = {
177
- [Rs]: "collapse",
178
- [mr]: "collapsing",
179
- [un]: "collapsing",
180
- [hr]: "collapse show"
181
- }, Fr = /* @__PURE__ */ ke.forwardRef(({
182
- onEnter: e,
183
- onEntering: t,
184
- onEntered: r,
185
- onExit: s,
186
- onExiting: a,
187
- className: o,
188
- children: i,
189
- dimension: c = "height",
190
- in: l = !1,
191
- timeout: d = 300,
192
- mountOnEnter: u = !1,
193
- unmountOnExit: m = !1,
194
- appear: x = !1,
195
- getDimensionValue: f = Qa,
196
- ...g
197
- }, p) => {
198
- const h = typeof c == "function" ? c() : c, y = Q(() => gt((k) => {
199
- k.style[h] = "0";
200
- }, e), [h, e]), w = Q(() => gt((k) => {
201
- const C = `scroll${h[0].toUpperCase()}${h.slice(1)}`;
202
- k.style[h] = `${k[C]}px`;
203
- }, t), [h, t]), j = Q(() => gt((k) => {
204
- k.style[h] = null;
205
- }, r), [h, r]), v = Q(() => gt((k) => {
206
- k.style[h] = `${f(h, k)}px`, As(k);
207
- }, s), [s, f, h]), _ = Q(() => gt((k) => {
208
- k.style[h] = null;
209
- }, a), [h, a]);
210
- return /* @__PURE__ */ n.jsx(ur, {
211
- ref: p,
212
- addEndListener: fr,
213
- ...g,
214
- "aria-expanded": g.role ? l : null,
215
- onEnter: y,
216
- onEntering: w,
217
- onEntered: j,
218
- onExit: v,
219
- onExiting: _,
220
- childRef: i.ref,
221
- in: l,
222
- timeout: d,
223
- mountOnEnter: u,
224
- unmountOnExit: m,
225
- appear: x,
226
- children: (k, C) => /* @__PURE__ */ ke.cloneElement(i, {
227
- ...C,
228
- className: b(o, i.props.className, Za[k], h === "width" && "collapse-horizontal")
229
- })
230
- });
231
- }), Lr = Ft("h4");
232
- Lr.displayName = "DivStyledAsH4";
233
- const Rr = /* @__PURE__ */ oe.forwardRef(({
234
- className: e,
235
- bsPrefix: t,
236
- as: r = Lr,
237
- ...s
238
- }, a) => (t = me(t, "alert-heading"), /* @__PURE__ */ n.jsx(r, {
239
- ref: a,
240
- className: b(e, t),
241
- ...s
242
- })));
243
- Rr.displayName = "AlertHeading";
244
- const Ar = /* @__PURE__ */ oe.forwardRef(({
245
- className: e,
246
- bsPrefix: t,
247
- as: r = Ms,
248
- ...s
249
- }, a) => (t = me(t, "alert-link"), /* @__PURE__ */ n.jsx(r, {
250
- ref: a,
251
- className: b(e, t),
252
- ...s
253
- })));
254
- Ar.displayName = "AlertLink";
255
- const Mr = /* @__PURE__ */ oe.forwardRef((e, t) => {
256
- const {
257
- bsPrefix: r,
258
- show: s = !0,
259
- closeLabel: a = "Close alert",
260
- closeVariant: o,
261
- className: i,
262
- children: c,
263
- variant: l = "primary",
264
- onClose: d,
265
- dismissible: u,
266
- transition: m = nn,
267
- ...x
268
- } = gr(e, {
269
- show: "onClose"
270
- }), f = me(r, "alert"), g = Lt((y) => {
271
- d && d(!1, y);
272
- }), p = m === !0 ? nn : m, h = /* @__PURE__ */ n.jsxs("div", {
273
- role: "alert",
274
- ...p ? void 0 : x,
275
- ref: t,
276
- className: b(i, f, l && `${f}-${l}`, u && `${f}-dismissible`),
277
- children: [u && /* @__PURE__ */ n.jsx(Bs, {
278
- onClick: g,
279
- "aria-label": a,
280
- variant: o
281
- }), c]
282
- });
283
- return p ? /* @__PURE__ */ n.jsx(p, {
284
- unmountOnExit: !0,
285
- ...x,
286
- ref: void 0,
287
- in: s,
288
- children: h
289
- }) : s ? h : null;
290
- });
291
- Mr.displayName = "Alert";
292
- const Ja = Object.assign(Mr, {
293
- Link: Ar,
294
- Heading: Rr
295
- }), wn = /* @__PURE__ */ oe.forwardRef(({
296
- className: e,
297
- bsPrefix: t,
298
- as: r = "div",
299
- ...s
300
- }, a) => (t = me(t, "card-body"), /* @__PURE__ */ n.jsx(r, {
301
- ref: a,
302
- className: b(e, t),
303
- ...s
304
- })));
305
- wn.displayName = "CardBody";
306
- const Br = /* @__PURE__ */ oe.forwardRef(({
307
- className: e,
308
- bsPrefix: t,
309
- as: r = "div",
310
- ...s
311
- }, a) => (t = me(t, "card-footer"), /* @__PURE__ */ n.jsx(r, {
312
- ref: a,
313
- className: b(e, t),
314
- ...s
315
- })));
316
- Br.displayName = "CardFooter";
317
- const Vr = /* @__PURE__ */ oe.createContext(null);
318
- Vr.displayName = "CardHeaderContext";
319
- const zr = /* @__PURE__ */ oe.forwardRef(({
320
- bsPrefix: e,
321
- className: t,
322
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
323
- as: r = "div",
324
- ...s
325
- }, a) => {
326
- const o = me(e, "card-header"), i = Q(() => ({
327
- cardHeaderBsPrefix: o
328
- }), [o]);
329
- return /* @__PURE__ */ n.jsx(Vr.Provider, {
330
- value: i,
331
- children: /* @__PURE__ */ n.jsx(r, {
332
- ref: a,
333
- ...s,
334
- className: b(t, o)
335
- })
336
- });
337
- });
338
- zr.displayName = "CardHeader";
339
- const Pr = /* @__PURE__ */ oe.forwardRef(
340
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
341
- ({
342
- bsPrefix: e,
343
- className: t,
344
- variant: r,
345
- as: s = "img",
346
- ...a
347
- }, o) => {
348
- const i = me(e, "card-img");
349
- return /* @__PURE__ */ n.jsx(s, {
350
- ref: o,
351
- className: b(r ? `${i}-${r}` : i, t),
352
- ...a
353
- });
354
- }
355
- );
356
- Pr.displayName = "CardImg";
357
- const Wr = /* @__PURE__ */ oe.forwardRef(({
358
- className: e,
359
- bsPrefix: t,
360
- as: r = "div",
361
- ...s
362
- }, a) => (t = me(t, "card-img-overlay"), /* @__PURE__ */ n.jsx(r, {
363
- ref: a,
364
- className: b(e, t),
365
- ...s
366
- })));
367
- Wr.displayName = "CardImgOverlay";
368
- const Hr = /* @__PURE__ */ oe.forwardRef(({
369
- className: e,
370
- bsPrefix: t,
371
- as: r = "a",
372
- ...s
373
- }, a) => (t = me(t, "card-link"), /* @__PURE__ */ n.jsx(r, {
374
- ref: a,
375
- className: b(e, t),
376
- ...s
377
- })));
378
- Hr.displayName = "CardLink";
379
- const Xa = Ft("h6"), Ur = /* @__PURE__ */ oe.forwardRef(({
380
- className: e,
381
- bsPrefix: t,
382
- as: r = Xa,
383
- ...s
384
- }, a) => (t = me(t, "card-subtitle"), /* @__PURE__ */ n.jsx(r, {
385
- ref: a,
386
- className: b(e, t),
387
- ...s
388
- })));
389
- Ur.displayName = "CardSubtitle";
390
- const Yr = /* @__PURE__ */ oe.forwardRef(({
391
- className: e,
392
- bsPrefix: t,
393
- as: r = "p",
394
- ...s
395
- }, a) => (t = me(t, "card-text"), /* @__PURE__ */ n.jsx(r, {
396
- ref: a,
397
- className: b(e, t),
398
- ...s
399
- })));
400
- Yr.displayName = "CardText";
401
- const eo = Ft("h5"), Gr = /* @__PURE__ */ oe.forwardRef(({
402
- className: e,
403
- bsPrefix: t,
404
- as: r = eo,
405
- ...s
406
- }, a) => (t = me(t, "card-title"), /* @__PURE__ */ n.jsx(r, {
407
- ref: a,
408
- className: b(e, t),
409
- ...s
410
- })));
411
- Gr.displayName = "CardTitle";
412
- const Kr = /* @__PURE__ */ oe.forwardRef(({
413
- bsPrefix: e,
414
- className: t,
415
- bg: r,
416
- text: s,
417
- border: a,
418
- body: o = !1,
419
- children: i,
420
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
421
- as: c = "div",
422
- ...l
423
- }, d) => {
424
- const u = me(e, "card");
425
- return /* @__PURE__ */ n.jsx(c, {
426
- ref: d,
427
- ...l,
428
- className: b(t, u, r && `bg-${r}`, s && `text-${s}`, a && `border-${a}`),
429
- children: o ? /* @__PURE__ */ n.jsx(wn, {
430
- children: i
431
- }) : i
432
- });
433
- });
434
- Kr.displayName = "Card";
435
- const Vn = Object.assign(Kr, {
436
- Img: Pr,
437
- Title: Gr,
438
- Subtitle: Ur,
439
- Body: wn,
440
- Link: Hr,
441
- Text: Yr,
442
- Header: zr,
443
- Footer: Br,
444
- ImgOverlay: Wr
445
- }), Vt = /* @__PURE__ */ oe.forwardRef(({
446
- className: e,
447
- bsPrefix: t,
448
- as: r = "span",
449
- ...s
450
- }, a) => (t = me(t, "input-group-text"), /* @__PURE__ */ n.jsx(r, {
451
- ref: a,
452
- className: b(e, t),
453
- ...s
454
- })));
455
- Vt.displayName = "InputGroupText";
456
- const to = (e) => /* @__PURE__ */ n.jsx(Vt, {
457
- children: /* @__PURE__ */ n.jsx(pr, {
458
- type: "checkbox",
459
- ...e
460
- })
461
- }), no = (e) => /* @__PURE__ */ n.jsx(Vt, {
462
- children: /* @__PURE__ */ n.jsx(pr, {
463
- type: "radio",
464
- ...e
465
- })
466
- }), qr = /* @__PURE__ */ oe.forwardRef(({
467
- bsPrefix: e,
468
- size: t,
469
- hasValidation: r,
470
- className: s,
471
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
472
- as: a = "div",
473
- ...o
474
- }, i) => {
475
- e = me(e, "input-group");
476
- const c = Q(() => ({}), []);
477
- return /* @__PURE__ */ n.jsx(Vs.Provider, {
478
- value: c,
479
- children: /* @__PURE__ */ n.jsx(a, {
480
- ref: i,
481
- ...o,
482
- className: b(s, e, t && `${e}-${t}`, r && "has-validation")
483
- })
484
- });
485
- });
486
- qr.displayName = "InputGroup";
487
- const It = Object.assign(qr, {
488
- Text: Vt,
489
- Radio: no,
490
- Checkbox: to
491
- }), Qr = /* @__PURE__ */ oe.createContext(null), ro = ["as", "active", "eventKey"];
492
- function so(e, t) {
493
- if (e == null) return {};
494
- var r = {};
495
- for (var s in e) if ({}.hasOwnProperty.call(e, s)) {
496
- if (t.indexOf(s) >= 0) continue;
497
- r[s] = e[s];
498
- }
499
- return r;
500
- }
501
- function Zr({
502
- key: e,
503
- onClick: t,
504
- active: r,
505
- id: s,
506
- role: a,
507
- disabled: o
508
- }) {
509
- const i = Z(rn), c = Z(xr), l = Z(Qr);
510
- let d = r;
511
- const u = {
512
- role: a
513
- };
514
- if (c) {
515
- !a && c.role === "tablist" && (u.role = "tab");
516
- const m = c.getControllerId(e ?? null), x = c.getControlledId(e ?? null);
517
- u[fn("event-key")] = e, u.id = m || s, d = r == null && e != null ? c.activeKey === e : r, (d || !(l != null && l.unmountOnExit) && !(l != null && l.mountOnEnter)) && (u["aria-controls"] = x);
518
- }
519
- return u.role === "tab" && (u["aria-selected"] = d, d || (u.tabIndex = -1), o && (u.tabIndex = -1, u["aria-disabled"] = !0)), u.onClick = Lt((m) => {
520
- o || (t == null || t(m), e != null && i && !m.isPropagationStopped() && i(e, m));
521
- }), [u, {
522
- isActive: d
523
- }];
524
- }
525
- const Jr = /* @__PURE__ */ oe.forwardRef((e, t) => {
526
- let {
527
- as: r = zs,
528
- active: s,
529
- eventKey: a
530
- } = e, o = so(e, ro);
531
- const [i, c] = Zr(Object.assign({
532
- key: mn(a, o.href),
533
- active: s
534
- }, o));
535
- return i[fn("active")] = c.isActive, /* @__PURE__ */ n.jsx(r, Object.assign({}, o, i, {
536
- ref: t
537
- }));
538
- });
539
- Jr.displayName = "NavItem";
540
- const ao = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
541
- function oo(e, t) {
542
- if (e == null) return {};
543
- var r = {};
544
- for (var s in e) if ({}.hasOwnProperty.call(e, s)) {
545
- if (t.indexOf(s) >= 0) continue;
546
- r[s] = e[s];
547
- }
548
- return r;
549
- }
550
- const zn = () => {
551
- }, Pn = fn("event-key"), Xr = /* @__PURE__ */ oe.forwardRef((e, t) => {
552
- let {
553
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
554
- as: r = "div",
555
- onSelect: s,
556
- activeKey: a,
557
- role: o,
558
- onKeyDown: i
559
- } = e, c = oo(e, ao);
560
- const l = Ps(), d = J(!1), u = Z(rn), m = Z(Qr);
561
- let x, f;
562
- m && (o = o || "tablist", a = m.activeKey, x = m.getControlledId, f = m.getControllerId);
563
- const g = J(null), p = (j) => {
564
- const v = g.current;
565
- if (!v) return null;
566
- const _ = Us(v, `[${Pn}]:not([aria-disabled=true])`), k = v.querySelector("[aria-selected=true]");
567
- if (!k || k !== document.activeElement) return null;
568
- const C = _.indexOf(k);
569
- if (C === -1) return null;
570
- let I = C + j;
571
- return I >= _.length && (I = 0), I < 0 && (I = _.length - 1), _[I];
572
- }, h = (j, v) => {
573
- j != null && (s == null || s(j, v), u == null || u(j, v));
574
- }, y = (j) => {
575
- if (i == null || i(j), !m)
576
- return;
577
- let v;
578
- switch (j.key) {
579
- case "ArrowLeft":
580
- case "ArrowUp":
581
- v = p(-1);
582
- break;
583
- case "ArrowRight":
584
- case "ArrowDown":
585
- v = p(1);
586
- break;
587
- default:
588
- return;
589
- }
590
- v && (j.preventDefault(), h(v.dataset[Hs("EventKey")] || null, j), d.current = !0, l());
591
- };
592
- B(() => {
593
- if (g.current && d.current) {
594
- const j = g.current.querySelector(`[${Pn}][aria-selected=true]`);
595
- j == null || j.focus();
596
- }
597
- d.current = !1;
598
- });
599
- const w = Ws(t, g);
600
- return /* @__PURE__ */ n.jsx(rn.Provider, {
601
- value: h,
602
- children: /* @__PURE__ */ n.jsx(xr.Provider, {
603
- value: {
604
- role: o,
605
- // used by NavLink to determine it's role
606
- activeKey: mn(a),
607
- getControlledId: x || zn,
608
- getControllerId: f || zn
609
- },
610
- children: /* @__PURE__ */ n.jsx(r, Object.assign({}, c, {
611
- onKeyDown: y,
612
- ref: w,
613
- role: o
614
- }))
615
- })
616
- });
617
- });
618
- Xr.displayName = "Nav";
619
- const io = Object.assign(Xr, {
620
- Item: Jr
621
- }), bn = /* @__PURE__ */ oe.forwardRef(({
622
- bsPrefix: e,
623
- active: t,
624
- disabled: r,
625
- eventKey: s,
626
- className: a,
627
- variant: o,
628
- action: i,
629
- as: c,
630
- ...l
631
- }, d) => {
632
- e = me(e, "list-group-item");
633
- const [u, m] = Zr({
634
- key: mn(s, l.href),
635
- active: t,
636
- ...l
637
- }), x = Lt((g) => {
638
- if (r) {
639
- g.preventDefault(), g.stopPropagation();
640
- return;
641
- }
642
- u.onClick(g);
643
- });
644
- r && l.tabIndex === void 0 && (l.tabIndex = -1, l["aria-disabled"] = !0);
645
- const f = c || (i ? l.href ? "a" : "button" : "div");
646
- return process.env.NODE_ENV !== "production" && vr(c || !(!i && l.href), "`action=false` and `href` should not be used together."), /* @__PURE__ */ n.jsx(f, {
647
- ref: d,
648
- ...l,
649
- ...u,
650
- onClick: x,
651
- className: b(a, e, m.isActive && "active", r && "disabled", o && `${e}-${o}`, i && `${e}-action`)
652
- });
653
- });
654
- bn.displayName = "ListGroupItem";
655
- const es = /* @__PURE__ */ oe.forwardRef((e, t) => {
656
- const {
657
- className: r,
658
- bsPrefix: s,
659
- variant: a,
660
- horizontal: o,
661
- numbered: i,
662
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
663
- as: c = "div",
664
- ...l
665
- } = gr(e, {
666
- activeKey: "onSelect"
667
- }), d = me(s, "list-group");
668
- let u;
669
- return o && (u = o === !0 ? "horizontal" : `horizontal-${o}`), process.env.NODE_ENV !== "production" && vr(!(o && a === "flush"), '`variant="flush"` and `horizontal` should not be used together.'), /* @__PURE__ */ n.jsx(io, {
670
- ref: t,
671
- ...l,
672
- as: c,
673
- className: b(r, d, a && `${d}-${a}`, u && `${d}-${u}`, i && `${d}-numbered`)
674
- });
675
- });
676
- es.displayName = "ListGroup";
677
- const lo = Object.assign(es, {
678
- Item: bn
679
- }), ln = /* @__PURE__ */ new WeakMap(), Wn = (e, t) => {
680
- if (!e || !t) return;
681
- const r = ln.get(t) || /* @__PURE__ */ new Map();
682
- ln.set(t, r);
683
- let s = r.get(e);
684
- return s || (s = t.matchMedia(e), s.refCount = 0, r.set(s.media, s)), s;
685
- };
686
- function co(e, t = typeof window > "u" ? void 0 : window) {
687
- const r = Wn(e, t), [s, a] = E(() => r ? r.matches : !1);
688
- return Ys(() => {
689
- let o = Wn(e, t);
690
- if (!o)
691
- return a(!1);
692
- let i = ln.get(t);
693
- const c = () => {
694
- a(o.matches);
695
- };
696
- return o.refCount++, o.addListener(c), c(), () => {
697
- o.removeListener(c), o.refCount--, o.refCount <= 0 && (i == null || i.delete(o.media)), o = void 0;
698
- };
699
- }, [e]), s;
700
- }
701
- function uo(e) {
702
- const t = Object.keys(e);
703
- function r(c, l) {
704
- return c === l ? l : c ? `${c} and ${l}` : l;
705
- }
706
- function s(c) {
707
- return t[Math.min(t.indexOf(c) + 1, t.length - 1)];
708
- }
709
- function a(c) {
710
- const l = s(c);
711
- let d = e[l];
712
- return typeof d == "number" ? d = `${d - 0.2}px` : d = `calc(${d} - 0.2px)`, `(max-width: ${d})`;
713
- }
714
- function o(c) {
715
- let l = e[c];
716
- return typeof l == "number" && (l = `${l}px`), `(min-width: ${l})`;
717
- }
718
- function i(c, l, d) {
719
- let u;
720
- typeof c == "object" ? (u = c, d = l, l = !0) : (l = l || !0, u = {
721
- [c]: l
722
- });
723
- let m = Q(() => Object.entries(u).reduce((x, [f, g]) => ((g === "up" || g === !0) && (x = r(x, o(f))), (g === "down" || g === !0) && (x = r(x, a(f))), x), ""), [JSON.stringify(u)]);
724
- return co(m, d);
725
- }
726
- return i;
727
- }
728
- const fo = uo({
729
- xs: 0,
730
- sm: 576,
731
- md: 768,
732
- lg: 992,
733
- xl: 1200,
734
- xxl: 1400
735
- }), ts = /* @__PURE__ */ oe.forwardRef(({
736
- className: e,
737
- bsPrefix: t,
738
- as: r = "div",
739
- ...s
740
- }, a) => (t = me(t, "offcanvas-body"), /* @__PURE__ */ n.jsx(r, {
741
- ref: a,
742
- className: b(e, t),
743
- ...s
744
- })));
745
- ts.displayName = "OffcanvasBody";
746
- const mo = {
747
- [un]: "show",
748
- [hr]: "show"
749
- }, ns = /* @__PURE__ */ oe.forwardRef(({
750
- bsPrefix: e,
751
- className: t,
752
- children: r,
753
- in: s = !1,
754
- mountOnEnter: a = !1,
755
- unmountOnExit: o = !1,
756
- appear: i = !1,
757
- ...c
758
- }, l) => (e = me(e, "offcanvas"), /* @__PURE__ */ n.jsx(ur, {
759
- ref: l,
760
- addEndListener: fr,
761
- in: s,
762
- mountOnEnter: a,
763
- unmountOnExit: o,
764
- appear: i,
765
- ...c,
766
- childRef: r.ref,
767
- children: (d, u) => /* @__PURE__ */ oe.cloneElement(r, {
768
- ...u,
769
- className: b(t, r.props.className, (d === un || d === mr) && `${e}-toggling`, mo[d])
770
- })
771
- })));
772
- ns.displayName = "OffcanvasToggling";
773
- const rs = /* @__PURE__ */ oe.forwardRef(({
774
- bsPrefix: e,
775
- className: t,
776
- closeLabel: r = "Close",
777
- closeButton: s = !1,
778
- ...a
779
- }, o) => (e = me(e, "offcanvas-header"), /* @__PURE__ */ n.jsx(Gs, {
780
- ref: o,
781
- ...a,
782
- className: b(t, e),
783
- closeLabel: r,
784
- closeButton: s
785
- })));
786
- rs.displayName = "OffcanvasHeader";
787
- const ho = Ft("h5"), ss = /* @__PURE__ */ oe.forwardRef(({
788
- className: e,
789
- bsPrefix: t,
790
- as: r = ho,
791
- ...s
792
- }, a) => (t = me(t, "offcanvas-title"), /* @__PURE__ */ n.jsx(r, {
793
- ref: a,
794
- className: b(e, t),
795
- ...s
796
- })));
797
- ss.displayName = "OffcanvasTitle";
798
- function go(e) {
799
- return /* @__PURE__ */ n.jsx(ns, {
800
- ...e
801
- });
802
- }
803
- function po(e) {
804
- return /* @__PURE__ */ n.jsx(nn, {
805
- ...e
806
- });
807
- }
808
- const as = /* @__PURE__ */ oe.forwardRef(({
809
- bsPrefix: e,
810
- className: t,
811
- children: r,
812
- "aria-labelledby": s,
813
- placement: a = "start",
814
- responsive: o,
815
- /* BaseModal props */
816
- show: i = !1,
817
- backdrop: c = !0,
818
- keyboard: l = !0,
819
- scroll: d = !1,
820
- onEscapeKeyDown: u,
821
- onShow: m,
822
- onHide: x,
823
- container: f,
824
- autoFocus: g = !0,
825
- enforceFocus: p = !0,
826
- restoreFocus: h = !0,
827
- restoreFocusOptions: y,
828
- onEntered: w,
829
- onExit: j,
830
- onExiting: v,
831
- onEnter: _,
832
- onEntering: k,
833
- onExited: C,
834
- backdropClassName: I,
835
- manager: O,
836
- renderStaticNode: D = !1,
837
- ...T
838
- }, $) => {
839
- const N = J();
840
- e = me(e, "offcanvas");
841
- const [M, re] = E(!1), L = Lt(x), z = fo(o || "xs", "up");
842
- B(() => {
843
- re(o ? i && !z : i);
844
- }, [i, o, z]);
845
- const R = Q(() => ({
846
- onHide: L
847
- }), [L]);
848
- function G() {
849
- return O || (d ? (N.current || (N.current = new Qs({
850
- handleContainerOverflow: !1
851
- })), N.current) : Zs());
852
- }
853
- const W = (H, ...F) => {
854
- H && (H.style.visibility = "visible"), _ == null || _(H, ...F);
855
- }, K = (H, ...F) => {
856
- H && (H.style.visibility = ""), C == null || C(...F);
857
- }, ee = S((H) => /* @__PURE__ */ n.jsx("div", {
858
- ...H,
859
- className: b(`${e}-backdrop`, I)
860
- }), [I, e]), P = (H) => /* @__PURE__ */ n.jsx("div", {
861
- ...H,
862
- ...T,
863
- className: b(t, o ? `${e}-${o}` : e, `${e}-${a}`),
864
- "aria-labelledby": s,
865
- children: r
866
- });
867
- return /* @__PURE__ */ n.jsxs(n.Fragment, {
868
- children: [!M && (o || D) && P({}), /* @__PURE__ */ n.jsx(Ks.Provider, {
869
- value: R,
870
- children: /* @__PURE__ */ n.jsx(qs, {
871
- show: M,
872
- ref: $,
873
- backdrop: c,
874
- container: f,
875
- keyboard: l,
876
- autoFocus: g,
877
- enforceFocus: p && !d,
878
- restoreFocus: h,
879
- restoreFocusOptions: y,
880
- onEscapeKeyDown: u,
881
- onShow: m,
882
- onHide: L,
883
- onEnter: W,
884
- onEntering: k,
885
- onEntered: w,
886
- onExit: j,
887
- onExiting: v,
888
- onExited: K,
889
- manager: G(),
890
- transition: go,
891
- backdropTransition: po,
892
- renderBackdrop: ee,
893
- renderDialog: P
894
- })
895
- })]
896
- });
897
- });
898
- as.displayName = "Offcanvas";
899
- const Hn = Object.assign(as, {
900
- Body: ts,
901
- Header: rs,
902
- Title: ss
903
- });
904
- function os({
905
- animation: e,
906
- bg: t,
907
- bsPrefix: r,
908
- size: s,
909
- ...a
910
- }) {
911
- r = me(r, "placeholder");
912
- const [{
913
- className: o,
914
- ...i
915
- }] = Js(a);
916
- return {
917
- ...i,
918
- className: b(o, e ? `${r}-${e}` : r, s && `${r}-${s}`, t && `bg-${t}`)
919
- };
920
- }
921
- const is = /* @__PURE__ */ oe.forwardRef((e, t) => {
922
- const r = os(e);
923
- return /* @__PURE__ */ n.jsx(sn, {
924
- ...r,
925
- ref: t,
926
- disabled: !0,
927
- tabIndex: -1
928
- });
929
- });
930
- is.displayName = "PlaceholderButton";
931
- const ls = /* @__PURE__ */ oe.forwardRef(({
932
- as: e = "span",
933
- ...t
934
- }, r) => {
935
- const s = os(t);
936
- return /* @__PURE__ */ n.jsx(e, {
937
- ...s,
938
- ref: r
939
- });
940
- });
941
- ls.displayName = "Placeholder";
942
- const Pe = Object.assign(ls, {
943
- Button: is
944
- }), _n = /* @__PURE__ */ oe.forwardRef(({
945
- bsPrefix: e,
946
- variant: t,
947
- animation: r = "border",
948
- size: s,
949
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
950
- as: a = "div",
951
- className: o,
952
- ...i
953
- }, c) => {
954
- e = me(e, "spinner");
955
- const l = `${e}-${r}`;
956
- return /* @__PURE__ */ n.jsx(a, {
957
- ref: c,
958
- ...i,
959
- className: b(o, l, s && `${l}-${s}`, t && `text-${t}`)
960
- });
961
- });
962
- _n.displayName = "Spinner";
963
- const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, popoverClassName: o, ...i }) => /* @__PURE__ */ n.jsx(Xs, { placement: r, overlay: /* @__PURE__ */ n.jsxs(Ht, { className: b("luminus-popover", o), onClick: (c) => c.stopPropagation(), children: [
964
- e && /* @__PURE__ */ n.jsx(Ht.Header, { children: typeof e == "string" ? /* @__PURE__ */ n.jsx(X, { variant: "h6", className: "text-primary", children: e }) : e }),
965
- /* @__PURE__ */ n.jsx(Ht.Body, { children: t })
966
- ] }), trigger: a ?? "hover", rootClose: !0, show: i.controlled ? i.isOpen : void 0, onToggle: i.controlled ? (c) => i.setIsOpen(c) : void 0, children: s }), xo = ({ children: e, onStorno: t, noSpacer: r }) => {
967
- const { texts: { formSubmit: s } } = Z(he);
968
- return /* @__PURE__ */ n.jsxs(wl, { noSpacer: r, children: [
969
- /* @__PURE__ */ n.jsxs(an, { as: "button", color: "primary", size: "lg", type: "submit", children: [
970
- /* @__PURE__ */ n.jsx(ea, {}),
971
- e
972
- ] }),
973
- t && /* @__PURE__ */ n.jsxs(an, { as: "button", color: "secondary", variant: "outlined", size: "lg", onClick: t, children: [
974
- /* @__PURE__ */ n.jsx(ta, {}),
975
- s.storno
976
- ] })
977
- ] });
978
- }, cs = ({ color: e = "primary", icon: t = /* @__PURE__ */ n.jsx(jr, { size: 12 }), inputId: r = "context-file-input", accept: s = "*", onUpload: a, className: o, children: i, multiple: c, ...l }) => {
979
- const d = (u) => {
980
- u.target.files && (a(u.target.files), u.target.value = "");
981
- };
982
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
983
- /* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: b(`luminus-context-button btn text-${e} ${o ?? ""}`, na.button), ...l, children: [
984
- t,
985
- i
986
- ] }),
987
- /* @__PURE__ */ n.jsx("input", { id: r, type: "file", accept: s, onChange: d, hidden: !0, multiple: c })
988
- ] });
989
- }, fd = ({ onUpload: e, accept: t, children: r, className: s, size: a = "md" }) => {
990
- const o = S(async (c) => {
991
- if (c.target.files)
992
- try {
993
- await e(c.target.files);
994
- } finally {
995
- c.target.value = "";
996
- }
997
- }, [e]), i = Ia();
998
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
999
- /* @__PURE__ */ n.jsx("label", { htmlFor: i, className: b("btn luminus-context-button text-primary", `btn-${a}`, s), children: r }),
1000
- /* @__PURE__ */ n.jsx("input", { id: i, type: "file", accept: t, onChange: o, hidden: !0 })
1001
- ] });
1002
- }, vo = "_select_dlv1t_1", qt = {
1003
- select: vo
1004
- }, jo = ({ month: e, onChangeMonth: t, locale: r, yearMin: s = 2e3, yearMax: a = 2050 }) => {
1005
- const o = S((l) => {
1006
- const d = Or(e, l);
1007
- d.getFullYear() < s || d.getFullYear() > a || t(d);
1008
- }, [e, t, s, a]), i = Q(() => {
1009
- const l = [];
1010
- for (let d = s; d <= a; d++)
1011
- l.push(d);
1012
- return l;
1013
- }, [s, a]), c = Q(() => {
1014
- const u = [];
1015
- for (let m = 0; m <= 11; m++)
1016
- u.push({
1017
- id: m,
1018
- name: jt(new Date(2024, m, 1), "LLLL", { locale: r })
1019
- });
1020
- return u;
1021
- }, [r]);
1022
- return /* @__PURE__ */ n.jsxs("div", { className: "card d-flex flex-row align-items-center m-0 p-1 gap-2", children: [
1023
- /* @__PURE__ */ n.jsx(se, { onClick: () => o(-1), disabled: e.getFullYear() < s || e.getFullYear() === s && e.getMonth() <= 0, children: /* @__PURE__ */ n.jsx(hn, {}) }),
1024
- /* @__PURE__ */ n.jsx(ye.Select, { value: e.getMonth(), onChange: (l) => {
1025
- var d;
1026
- return ((d = l.target) == null ? void 0 : d.value) && t(Ka(e, Number(l.target.value)));
1027
- }, className: b(qt.select, qt.month), children: c.map((l) => /* @__PURE__ */ n.jsx("option", { value: l.id, children: l.name }, l.id)) }),
1028
- /* @__PURE__ */ n.jsx(ye.Select, { value: e.getFullYear(), onChange: (l) => {
1029
- var d;
1030
- return ((d = l.target) == null ? void 0 : d.value) && t(Tr(e, Number(l.target.value)));
1031
- }, className: b(qt.select), children: i.map((l) => /* @__PURE__ */ n.jsx("option", { value: l, children: l }, l)) }),
1032
- /* @__PURE__ */ n.jsx(se, { onClick: () => o(1), disabled: e.getFullYear() > a || e.getFullYear() === a && e.getMonth() >= 11, children: /* @__PURE__ */ n.jsx(gn, {}) })
1033
- ] });
1034
- }, yo = "_select_pywmr_1", wo = {
1035
- select: yo
1036
- }, bo = ({ year: e, onChangeYear: t, optionMin: r = 2e3, optionMax: s = 2050, className: a }) => {
1037
- const o = S((c) => {
1038
- const l = e.getFullYear() + c;
1039
- l < r || l > s || t(Wa(e, c));
1040
- }, [e, t, s, r]), i = Q(() => {
1041
- const c = [];
1042
- for (let l = r; l <= s; l++)
1043
- c.push(l);
1044
- return c;
1045
- }, [r, s]);
1046
- return /* @__PURE__ */ n.jsxs("div", { className: b("card d-flex flex-row align-items-center m-0 p-1 gap-2", a ?? ""), children: [
1047
- /* @__PURE__ */ n.jsx(se, { onClick: () => o(-1), disabled: e.getFullYear() <= r, children: /* @__PURE__ */ n.jsx(hn, {}) }),
1048
- /* @__PURE__ */ n.jsx(ye.Select, { value: e.getFullYear(), onChange: (c) => {
1049
- var l;
1050
- return ((l = c.target) == null ? void 0 : l.value) && t(Tr(e, Number(c.target.value)));
1051
- }, className: wo.select, children: i.map((c) => /* @__PURE__ */ n.jsx("option", { value: c, children: c }, c)) }),
1052
- /* @__PURE__ */ n.jsx(se, { onClick: () => o(1), disabled: e.getFullYear() >= s, children: /* @__PURE__ */ n.jsx(gn, {}) })
1053
- ] });
1054
- }, _o = "_widget_etgh3_1", No = {
1055
- widget: _o
1056
- }, So = "_widgets-row_13gg1_1", Co = "_widget_13gg1_1", ko = "_widget-img_13gg1_5", Io = "_widget-title-spacer_13gg1_14", Do = "_widget-title_13gg1_14", $o = "_title_13gg1_28", De = {
1057
- "widgets-row": "_widgets-row_13gg1_1",
1058
- widgetsRow: So,
1059
- widget: Co,
1060
- "widget-img": "_widget-img_13gg1_5",
1061
- widgetImg: ko,
1062
- "widget-title-spacer": "_widget-title-spacer_13gg1_14",
1063
- widgetTitleSpacer: Io,
1064
- "widget-title": "_widget-title_13gg1_14",
1065
- widgetTitle: Do,
1066
- title: $o
1067
- }, Eo = ({ show: e, widgetGroups: t, widgets: r, handleClose: s, onWidgetPicked: a, texts: o }) => {
1068
- const [i, c] = E(""), l = Q(() => r.filter((u) => u.id !== -1 && wt(u.name, i)), [r, i]), d = Q(() => t.filter((u) => l.some((m) => m.group === u.id)), [t, l]);
1069
- return /* @__PURE__ */ n.jsxs(He, { show: e, onHide: () => s(), size: "lg", children: [
1070
- /* @__PURE__ */ n.jsxs(He.Header, { closeButton: !0, children: [
1071
- /* @__PURE__ */ n.jsx(He.Title, { className: "w-100", children: o.pickWidgetToAdd }),
1072
- /* @__PURE__ */ n.jsx(ye.Control, { type: "search", size: "sm", value: i, placeholder: o.searchPlaceholder, onChange: (u) => {
1073
- var m;
1074
- return c(((m = u.target) == null ? void 0 : m.value) ?? "");
1075
- }, className: "me-3", style: { maxWidth: "200px" } })
1076
- ] }),
1077
- /* @__PURE__ */ n.jsx(He.Body, { className: "flex-column gap-3", children: l.length === 0 ? /* @__PURE__ */ n.jsx(Nn, { variant: "warning", children: o.noWidgets }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1078
- d.map((u) => /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: u.name ?? "", children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: b("row gx-3 gy-3", De.widgetsRow), children: l.filter((m) => m.group === u.id).map((m) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: b("p-0 pt-2 bg-white rounded shadow-sm", De.widget), onClick: () => a(m.id), children: [
1079
- /* @__PURE__ */ n.jsx("div", { className: De.widgetImg, style: {
1080
- backgroundImage: m.img ? `url(${m.img})` : void 0
1081
- } }),
1082
- /* @__PURE__ */ n.jsx("div", { className: De.widgetTitleSpacer }),
1083
- /* @__PURE__ */ n.jsx("div", { className: b(De.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(X, { variant: "body", className: b(De.title, "text-white text-truncate"), children: m.name }) })
1084
- ] }, m.id) })) }) }) }, u.id)),
1085
- l.some((u) => u.group === void 0) && /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: o.otherWidgets, children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: b("row gx-3 gy-3", De.widgetsRow), children: l.filter((u) => u.group === void 0).map((u) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: b("p-0 pt-2 bg-white rounded shadow-sm", De.widget), onClick: () => a(u.id), children: [
1086
- /* @__PURE__ */ n.jsx("div", { className: De.widgetImg, style: {
1087
- backgroundImage: u.img ? `url(${u.img})` : void 0
1088
- } }),
1089
- /* @__PURE__ */ n.jsx("div", { className: De.widgetTitleSpacer }),
1090
- /* @__PURE__ */ n.jsx("div", { className: b(De.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(X, { variant: "body", className: b(De.title, "text-white text-truncate"), children: u.name }) })
1091
- ] }, u.id) })) }) }) })
1092
- ] }) })
1093
- ] });
1094
- }, Un = ({ widgetGroups: e, availableWidgets: t, onAdd: r, texts: s }) => {
1095
- const [a, o] = E(!1);
1096
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1097
- /* @__PURE__ */ n.jsx("div", { className: b("luminus-empty-widget", No.widget), children: /* @__PURE__ */ n.jsx(se, { onClick: () => o(!0), children: /* @__PURE__ */ n.jsx(ra, {}) }) }),
1098
- /* @__PURE__ */ n.jsx(Eo, { show: a, widgetGroups: e, widgets: t, handleClose: () => o(!1), onWidgetPicked: (i) => {
1099
- o(!1), r(i);
1100
- }, texts: s })
1101
- ] });
1102
- }, Oo = (e) => {
1103
- const [t, r] = E({ widgets: [] });
1104
- B(() => {
1105
- const a = localStorage.getItem("dashboardConfig");
1106
- a ? r(JSON.parse(a)) : e && r(e);
1107
- }, [e]);
1108
- const s = S((a) => {
1109
- r(a), localStorage.setItem("dashboardConfig", JSON.stringify(a));
1110
- }, []);
1111
- return { dashboardConfig: t, onChangeDashboardConfig: s };
1112
- }, To = "_dashboard_16plm_1", Fo = "_widgets-grid_16plm_1", Lo = "_widget-wrapper_16plm_8", Ro = "_full-width_16plm_13", Ao = "_widget-edit_16plm_16", Mo = "_remove-icon_16plm_19", Bo = "_full-width-icon_16plm_26", Vo = "_widget-edit-overlay_16plm_36", Le = {
1113
- dashboard: To,
1114
- "widgets-grid": "_widgets-grid_16plm_1",
1115
- widgetsGrid: Fo,
1116
- "widget-wrapper": "_widget-wrapper_16plm_8",
1117
- widgetWrapper: Lo,
1118
- "full-width": "_full-width_16plm_13",
1119
- fullWidth: Ro,
1120
- "widget-edit": "_widget-edit_16plm_16",
1121
- widgetEdit: Ao,
1122
- "remove-icon": "_remove-icon_16plm_19",
1123
- removeIcon: Mo,
1124
- "full-width-icon": "_full-width-icon_16plm_26",
1125
- fullWidthIcon: Bo,
1126
- "widget-edit-overlay": "_widget-edit-overlay_16plm_36",
1127
- widgetEditOverlay: Vo
1128
- };
1129
- class zo extends Da {
1130
- constructor(t) {
1131
- super(t), this.state = { hasError: !1, is404Error: !1 }, this.reload = this.reload.bind(this);
1132
- }
1133
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1134
- static getDerivedStateFromError(t) {
1135
- return { hasError: !0, is404Error: t.message === "404" };
1136
- }
1137
- componentDidUpdate(t) {
1138
- this.state.hasError && t.keyForErrorState !== this.props.keyForErrorState && this.setState({ hasError: !1, is404Error: !1 });
1139
- }
1140
- componentDidCatch(t, r) {
1141
- console.error("Error:", t, r);
1142
- }
1143
- reload() {
1144
- this.setState({ hasError: !1, is404Error: !1 });
1145
- }
1146
- render() {
1147
- const { fallback: t, fallbackOn404: r, children: s, texts: a, reloadButtonDisplay: o = "append-after-child" } = this.props;
1148
- return this.state.hasError ? o === "inject-to-child" && !this.state.is404Error && On(t) ? ke.cloneElement(t, {
1149
- ...t.props
1150
- }, /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
1151
- ...t.props.children,
1152
- /* @__PURE__ */ n.jsx("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ n.jsx(Ae, { type: "button", onClick: this.reload, children: a.reloadButtonContent }) })
1153
- ] })) : o === "inject-to-child" && this.state.is404Error && On(r) ? ke.cloneElement(r, {
1154
- ...r.props
1155
- }, /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
1156
- ...r.props.children,
1157
- /* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-2 justify-content-center", children: [
1158
- /* @__PURE__ */ n.jsx(Ae, { type: "button", onClick: this.reload, children: a.reloadButtonContent }),
1159
- /* @__PURE__ */ n.jsx(Ae, { type: "button", onClick: this.props.navigateBack, children: a.navigateBackButtonContent })
1160
- ] })
1161
- ] })) : /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
1162
- this.state.is404Error ? r : t,
1163
- /* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-2 justify-content-center", children: [
1164
- o === "none" ? null : /* @__PURE__ */ n.jsx(Ae, { type: "button", onClick: this.reload, children: a.reloadButtonContent }),
1165
- this.state.is404Error && /* @__PURE__ */ n.jsx(Ae, { type: "button", onClick: this.props.navigateBack, children: a.navigateBackButtonContent })
1166
- ] })
1167
- ] }) : s;
1168
- }
1169
- }
1170
- const Po = (e) => (r) => {
1171
- const { texts: { errorBoundary: s } } = Z(he);
1172
- return /* @__PURE__ */ n.jsx(e, { texts: s, ...r });
1173
- }, Wo = Po(zo), Ho = "_widget-card_e9tsb_1", Uo = {
1174
- "widget-card": "_widget-card_e9tsb_1",
1175
- widgetCard: Ho
1176
- }, Yn = ({ children: e, title: t, headerContent: r }) => /* @__PURE__ */ n.jsx(Pi, { className: b(Uo.widgetCard, "luminus-widget"), title: t, headerContent: r, contentClassName: "h-100 overflow-auto", children: e }), Yo = ({ children: e, title: t }) => {
1177
- const { texts: { widget: r } } = Z(he), s = Dr();
1178
- return /* @__PURE__ */ n.jsx(Wo, { fallback: /* @__PURE__ */ n.jsx(Yn, { title: t, children: r.fallbackError }), reloadButtonDisplay: "inject-to-child", navigateBack: () => s(-1), children: /* @__PURE__ */ n.jsx($a, { fallback: /* @__PURE__ */ n.jsx(Yn, { title: t, children: /* @__PURE__ */ n.jsx(Pa, {}) }), children: e }) });
1179
- }, md = ({ widgetGroups: e, availableWidgets: t, editMode: r, defaultDashboardConfig: s }) => {
1180
- var m;
1181
- const { texts: { homeDashboard: a } } = Z(he), { dashboardConfig: o, onChangeDashboardConfig: i } = Oo(s), c = S((x, f) => {
1182
- var g, p;
1183
- x === ((g = o.widgets) == null ? void 0 : g.length) ? i({
1184
- ...o,
1185
- widgets: [...o.widgets, { widgetId: f, fullWidth: !1 }]
1186
- }) : i({
1187
- ...o,
1188
- widgets: ((p = o.widgets) == null ? void 0 : p.map((h, y) => y === x ? { widgetId: f, fullWidth: !1 } : h)) ?? []
1189
- });
1190
- }, [o, i]), l = S((x) => {
1191
- var f, g;
1192
- ((f = o.widgets[x]) == null ? void 0 : f.widgetId) === -1 ? i({
1193
- ...o,
1194
- widgets: ((g = o.widgets) == null ? void 0 : g.filter((p, h) => h !== x)) ?? []
1195
- }) : c(x, -1);
1196
- }, [o, i, c]), d = S((x) => {
1197
- var f;
1198
- i({
1199
- ...o,
1200
- widgets: ((f = o.widgets) == null ? void 0 : f.map((g, p) => p === x ? { ...g, fullWidth: !g.fullWidth } : g)) ?? []
1201
- });
1202
- }, [o, i]), u = S((x, f, g) => x ? /* @__PURE__ */ n.jsxs("div", { className: b(Le.widgetWrapper, {
1203
- [Le.widgetEdit]: r && x.id !== -1
1204
- }, { [Le.fullWidth]: g }), children: [
1205
- r && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1206
- /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => l(f), className: b(Le.removeIcon), children: /* @__PURE__ */ n.jsx(yr, {}) }),
1207
- /* @__PURE__ */ n.jsx(se, { color: g ? "danger" : "primary", onClick: () => d(f), className: b(Le.fullWidthIcon), children: /* @__PURE__ */ n.jsx(sa, {}) })
1208
- ] }),
1209
- x.id === -1 ? r && /* @__PURE__ */ n.jsx("div", { className: Le.widgetWrapper, children: /* @__PURE__ */ n.jsx(Un, { widgetGroups: e, availableWidgets: t, onAdd: (p) => c(f, p), texts: a }) }) : /* @__PURE__ */ n.jsx(Yo, { title: x.title, children: /* @__PURE__ */ n.jsx(x.WidgetElement, { title: x.title }) }),
1210
- x.id > -1 && r && /* @__PURE__ */ n.jsx("div", { className: Le.widgetEditOverlay })
1211
- ] }, f) : /* @__PURE__ */ n.jsx(n.Fragment, {}), [
1212
- r,
1213
- e,
1214
- c,
1215
- l,
1216
- d,
1217
- t,
1218
- a
1219
- ]);
1220
- return /* @__PURE__ */ n.jsx("div", { className: Le.dashboard, children: /* @__PURE__ */ n.jsxs("div", { className: Le.widgetsGrid, children: [
1221
- (m = o.widgets) == null ? void 0 : m.map((x, f) => u(t.find((g) => g.id === x.widgetId), f, x.fullWidth)),
1222
- r && /* @__PURE__ */ n.jsx(Un, { widgetGroups: e, availableWidgets: t, onAdd: (x) => {
1223
- var f;
1224
- return c((f = o.widgets) == null ? void 0 : f.length, x);
1225
- }, texts: a })
1226
- ] }) });
1227
- }, Go = "_badge_193ci_1", Ko = "_sm_193ci_6", qo = "_md_193ci_10", Qo = "_lg_193ci_14", Zo = "_light_193ci_18", Qt = {
1228
- badge: Go,
1229
- sm: Ko,
1230
- md: qo,
1231
- lg: Qo,
1232
- light: Zo
1233
- }, hd = ({ children: e, color: t = "primary", size: r = "md", rounded: s, className: a, ...o }) => /* @__PURE__ */ n.jsx("span", { className: b(`luminus-badge badge bg-${t} ${a ?? ""}`, { "rounded-pill": s }, { "text-dark": t === "light" }, { [Qt.light]: t === "light" }, Qt.badge, Qt[r]), ...o, children: e }), Jo = "_collapse-icon_1ahhn_1", Xo = "_collapsed_1ahhn_6", Gn = {
1234
- "collapse-icon": "_collapse-icon_1ahhn_1",
1235
- collapseIcon: Jo,
1236
- collapsed: Xo
1237
- }, cn = ({ title: e, children: t, className: r, ...s }) => {
1238
- const a = s.controlled ? !1 : s.defaultOpen ?? !1, [o, i] = E(a), c = s.controlled ? s.isOpen : o;
1239
- return B(() => {
1240
- i(a);
1241
- }, [a]), /* @__PURE__ */ n.jsxs("div", { className: r ?? "", children: [
1242
- /* @__PURE__ */ n.jsxs("div", { role: "button", className: "d-flex align-items-center justify-content-between pb-3 pt-2", onClick: () => s.controlled ? s.onToggle(!s.isOpen) : i(!o), children: [
1243
- /* @__PURE__ */ n.jsx(X, { variant: "h6", children: e }),
1244
- /* @__PURE__ */ n.jsx(wr, { className: b(Gn.collapseIcon, {
1245
- [Gn.collapsed]: c
1246
- }) })
1247
- ] }),
1248
- /* @__PURE__ */ n.jsx(Fr, { in: c, children: /* @__PURE__ */ n.jsx("div", { children: t }) }),
1249
- /* @__PURE__ */ n.jsx("hr", { className: `my-0 ${c ? "mt-3" : ""}` })
1250
- ] });
1251
- };
1252
- function ei(e, t, r) {
1253
- var s = this, a = J(null), o = J(0), i = J(null), c = J([]), l = J(), d = J(), u = J(e), m = J(!0);
1254
- u.current = e;
1255
- var x = typeof window < "u", f = !t && t !== 0 && x;
1256
- if (typeof e != "function") throw new TypeError("Expected a function");
1257
- t = +t || 0;
1258
- var g = !!(r = r || {}).leading, p = !("trailing" in r) || !!r.trailing, h = "maxWait" in r, y = "debounceOnServer" in r && !!r.debounceOnServer, w = h ? Math.max(+r.maxWait || 0, t) : null;
1259
- B(function() {
1260
- return m.current = !0, function() {
1261
- m.current = !1;
1262
- };
1263
- }, []);
1264
- var j = Q(function() {
1265
- var v = function(D) {
1266
- var T = c.current, $ = l.current;
1267
- return c.current = l.current = null, o.current = D, d.current = u.current.apply($, T);
1268
- }, _ = function(D, T) {
1269
- f && cancelAnimationFrame(i.current), i.current = f ? requestAnimationFrame(D) : setTimeout(D, T);
1270
- }, k = function(D) {
1271
- if (!m.current) return !1;
1272
- var T = D - a.current;
1273
- return !a.current || T >= t || T < 0 || h && D - o.current >= w;
1274
- }, C = function(D) {
1275
- return i.current = null, p && c.current ? v(D) : (c.current = l.current = null, d.current);
1276
- }, I = function D() {
1277
- var T = Date.now();
1278
- if (k(T)) return C(T);
1279
- if (m.current) {
1280
- var $ = t - (T - a.current), N = h ? Math.min($, w - (T - o.current)) : $;
1281
- _(D, N);
1282
- }
1283
- }, O = function() {
1284
- if (x || y) {
1285
- var D = Date.now(), T = k(D);
1286
- if (c.current = [].slice.call(arguments), l.current = s, a.current = D, T) {
1287
- if (!i.current && m.current) return o.current = a.current, _(I, t), g ? v(a.current) : d.current;
1288
- if (h) return _(I, t), v(a.current);
1289
- }
1290
- return i.current || _(I, t), d.current;
1291
- }
1292
- };
1293
- return O.cancel = function() {
1294
- i.current && (f ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0, c.current = a.current = l.current = i.current = null;
1295
- }, O.isPending = function() {
1296
- return !!i.current;
1297
- }, O.flush = function() {
1298
- return i.current ? C(Date.now()) : d.current;
1299
- }, O;
1300
- }, [g, h, t, w, p, f, x, y]);
1301
- return j;
1302
- }
1303
- function ti(e, t) {
1304
- return e === t;
1305
- }
1306
- function ds(e, t, r) {
1307
- var s = ti, a = J(e), o = E({})[1], i = ei(S(function(l) {
1308
- a.current = l, o({});
1309
- }, [o]), t, r), c = J(e);
1310
- return s(c.current, e) || (i(e), c.current = e), [a.current, i];
1311
- }
1312
- const ni = "_wrapper_1kgb8_1", ri = "_open_1kgb8_9", si = "_dropdown_1kgb8_13", ai = "_search-input-container_1kgb8_19", oi = "_search-input_1kgb8_19", ii = "_loading-container_1kgb8_25", li = "_items-container_1kgb8_32", ci = "_header-row_1kgb8_38", di = "_item_1kgb8_32", ui = "_name_1kgb8_57", fi = "_column-item_1kgb8_62", mi = "_icon_1kgb8_66", hi = "_action-buttons-container_1kgb8_74", gi = "_reverse_1kgb8_82", pi = "_action-button_1kgb8_74", Ne = {
1313
- wrapper: ni,
1314
- open: ri,
1315
- dropdown: si,
1316
- "search-input-container": "_search-input-container_1kgb8_19",
1317
- searchInputContainer: ai,
1318
- "search-input": "_search-input_1kgb8_19",
1319
- searchInput: oi,
1320
- "loading-container": "_loading-container_1kgb8_25",
1321
- loadingContainer: ii,
1322
- "items-container": "_items-container_1kgb8_32",
1323
- itemsContainer: li,
1324
- "header-row": "_header-row_1kgb8_38",
1325
- headerRow: ci,
1326
- item: di,
1327
- name: ui,
1328
- "column-item": "_column-item_1kgb8_62",
1329
- columnItem: fi,
1330
- icon: mi,
1331
- "action-buttons-container": "_action-buttons-container_1kgb8_74",
1332
- actionButtonsContainer: hi,
1333
- reverse: gi,
1334
- "action-button": "_action-button_1kgb8_74",
1335
- actionButton: pi
1336
- }, zt = ({ show: e, onCancel: t, items: r, currentSelection: s, onSelectionChange: a, onSearchQueryChange: o, texts: i, itemsNameWidth: c, additionalColumns: l, displayIdAsName: d = !1, autoHideSearch: u = !1, allItemsLength: m, disabled: x, isLoading: f = !1, inputRef: g, archiveColumn: p = "archive" }) => {
1337
- var Ke;
1338
- const h = J(null), y = J(null), w = J(null), j = J(null), v = J(null), [_, k] = E(""), [C] = ds(_, 500), [, I] = E(!1), { copyToClipboard: O } = Ra(), D = (Ke = g.current) == null ? void 0 : Ke.getBoundingClientRect(), T = (D == null ? void 0 : D.x) ?? 0, $ = ((D == null ? void 0 : D.x) ?? 0) + ((D == null ? void 0 : D.width) ?? 0), N = (D == null ? void 0 : D.y) ?? 0, M = ((D == null ? void 0 : D.y) ?? 0) + ((D == null ? void 0 : D.height) ?? 0), re = (D == null ? void 0 : D.width) ?? 0, L = (D == null ? void 0 : D.height) ?? 0, z = 5, R = Q(() => T ? T > window.innerWidth / 2 : !1, [T]), G = Q(() => N ? N > window.innerHeight / 2 : !1, [N]);
1339
- B(() => {
1340
- var U;
1341
- e && ((U = j.current) == null || U.focus());
1342
- }, [j, e]), B(() => {
1343
- e || k("");
1344
- }, [e]), B(() => {
1345
- o && o(C);
1346
- }, [C, o]);
1347
- const [W, K] = E(null);
1348
- B(() => {
1349
- e && r.length > 0 ? K(0) : K(null);
1350
- }, [r, e]);
1351
- const ee = Q(() => W !== null ? r.at(W) ?? null : null, [W, r]), P = S((U, pe) => {
1352
- var at, A;
1353
- const _e = document.getElementById(`item-${U}`);
1354
- if (_e) {
1355
- const V = _e.clientHeight ?? 0;
1356
- pe === "down" ? (at = v.current) == null || at.scrollBy({
1357
- left: 0,
1358
- top: V,
1359
- behavior: "smooth"
1360
- }) : (A = v.current) == null || A.scrollBy({
1361
- left: 0,
1362
- top: -V,
1363
- behavior: "smooth"
1364
- });
1365
- }
1366
- }, []), H = S((U) => {
1367
- if (W === null || x)
1368
- return;
1369
- const pe = W + U;
1370
- pe < 0 || pe >= r.length || K((_e) => (_e !== null && P(_e, U > 0 ? "down" : "up"), pe));
1371
- }, [W, r, x, P]), F = S((U) => {
1372
- if (e)
1373
- switch (U.key) {
1374
- case "Escape":
1375
- U.stopPropagation(), U.preventDefault(), t();
1376
- break;
1377
- case "Enter":
1378
- U.stopPropagation(), U.preventDefault(), x || a(ee);
1379
- break;
1380
- case "ArrowUp":
1381
- U.stopPropagation(), U.preventDefault(), H(-1);
1382
- break;
1383
- case "ArrowDown":
1384
- U.stopPropagation(), U.preventDefault(), H(1);
1385
- break;
1386
- }
1387
- }, [t, e, H, ee, x, a]), ne = S(() => {
1388
- I((U) => !U);
1389
- }, []);
1390
- B(() => (window.addEventListener("scroll", ne), () => {
1391
- window.removeEventListener("scroll", ne);
1392
- }), [ne]), B(() => (window.addEventListener("resize", ne), () => {
1393
- window.removeEventListener("resize", ne);
1394
- }), [ne]), Er(F), $r([h, y, w], t);
1395
- const ge = c ?? (l && l.length > 0 ? 250 : 0), fe = (l == null ? void 0 : l.reduce((U, pe) => U + (pe.width ?? 100), 0)) ?? 0, te = `calc(max(${re}px, ${ge}px + ${fe}px))`, we = Q(() => (s && e && !x) ?? !1, [s, e, x]), Ce = Q(() => (s && e) ?? !1, [s, e]);
1396
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1397
- /* @__PURE__ */ n.jsx(ms, { show: e, onClick: t }),
1398
- /* @__PURE__ */ n.jsxs("div", { className: b("luminus-dropdown-picker-actions", Ne.actionButtonsContainer, {
1399
- [Ne.reverse]: R
1400
- }), style: {
1401
- top: `calc(${N}px + ${L / 2}px - 12px)`,
1402
- left: R ? we && Ce ? `calc(${T}px - 24px - 8px - 24px - 4px)` : `calc(${T}px - 24px - 8px)` : `calc(${$}px + 8px)`
1403
- }, children: [
1404
- we && /* @__PURE__ */ n.jsx("button", { ref: y, type: "button", className: b("luminus-dropdown-picker-clear-button", Ne.actionButton), onClick: () => !x && a(null), children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ n.jsx(yr, { size: 16 }) }) }),
1405
- Ce && /* @__PURE__ */ n.jsx("button", { ref: w, type: "button", className: b("luminus-dropdown-picker-copy-button", Ne.actionButton), onClick: () => {
1406
- var U, pe;
1407
- O(d ? ((U = s == null ? void 0 : s.id) == null ? void 0 : U.toString()) ?? "" : ((pe = s == null ? void 0 : s.name) == null ? void 0 : pe.toString()) ?? ""), t();
1408
- }, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-info", children: /* @__PURE__ */ n.jsx(aa, { size: 16 }) }) })
1409
- ] }),
1410
- /* @__PURE__ */ n.jsx("div", { className: b("luminus-dropdown-picker", Ne.wrapper, {
1411
- [Ne.open]: e
1412
- }), style: {
1413
- top: G ? `calc(${N}px - 50vh - 8px)` : `calc(${M}px + 8px)`,
1414
- left: R ? `calc(${$}px - ${te})` : T,
1415
- right: R ? `${$}px` : `calc(${T}px + ${te})`,
1416
- width: te,
1417
- justifyContent: G ? "flex-end" : "flex-start"
1418
- }, children: /* @__PURE__ */ n.jsx("div", { ref: h, className: b("shadow rounded", Ne.dropdown), children: !x && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1419
- !o || u && (m ?? r.length) <= z ? null : /* @__PURE__ */ n.jsx("div", { className: b("search-input-container border-bottom", Ne.searchInputContainer), children: /* @__PURE__ */ n.jsx(ye.Control, { ref: j, type: "search", size: "sm", className: Ne.searchInput, placeholder: i.searchPlaceholder, value: _, onChange: (U) => {
1420
- var pe;
1421
- return k(((pe = U.target) == null ? void 0 : pe.value) ?? "");
1422
- } }) }),
1423
- f ? /* @__PURE__ */ n.jsx("div", { className: Ne.loadingContainer, children: /* @__PURE__ */ n.jsx(_n, { animation: "border", variant: "primary" }) }) : r.length > 0 && /* @__PURE__ */ n.jsxs("div", { ref: v, className: b("items", Ne.itemsContainer), children: [
1424
- l && l.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: b("header-row border-bottom", Ne.headerRow), children: [
1425
- /* @__PURE__ */ n.jsx("div", { className: Ne.name }),
1426
- l == null ? void 0 : l.filter((U) => U.key !== p).map((U) => /* @__PURE__ */ n.jsx("div", { className: Ne.columnItem, style: {
1427
- width: `${U.width ?? 100}px`,
1428
- minWidth: `${U.width ?? 100}px`,
1429
- maxWidth: `${U.width ?? 100}px`
1430
- }, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", children: U.name }) }, U.key))
1431
- ] }),
1432
- r == null ? void 0 : r.map((U, pe) => /* @__PURE__ */ n.jsxs("button", { id: `item-${pe}`, type: "button", className: b("item cursor-pointer", Ne.item, {
1433
- [Ne.focused]: W === pe
1434
- }, {
1435
- focused: W === pe
1436
- }, {
1437
- archive: U.additionalColumns ? U.additionalColumns[p] : !1
1438
- }), onClick: () => !x && a(U), onMouseEnter: () => K(pe), children: [
1439
- /* @__PURE__ */ n.jsx("div", { className: Ne.name, children: /* @__PURE__ */ n.jsx(X, { variant: "body2", children: d ? U.id : U.name }) }),
1440
- l == null ? void 0 : l.filter((_e) => _e.key !== p).map((_e) => /* @__PURE__ */ n.jsx("div", { className: Ne.columnItem, style: {
1441
- width: `${_e.width ?? 100}px`,
1442
- minWidth: `${_e.width ?? 100}px`,
1443
- maxWidth: `${_e.width ?? 100}px`
1444
- }, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: b("text-muted"), children: U.additionalColumns && U.additionalColumns[_e.key] }) }, _e.key))
1445
- ] }, U.id))
1446
- ] })
1447
- ] }) }) })
1448
- ] });
1449
- }, xi = "_input-group_1lkfy_1", vi = "_input-group-text_1lkfy_5", ji = "_left_1lkfy_9", yi = "_right_1lkfy_13", wi = "_input_1lkfy_1", bi = "_submit-button_1lkfy_20", qe = {
1450
- "input-group": "_input-group_1lkfy_1",
1451
- inputGroup: xi,
1452
- "input-group-text": "_input-group-text_1lkfy_5",
1453
- inputGroupText: vi,
1454
- left: ji,
1455
- right: yi,
1456
- input: wi,
1457
- "submit-button": "_submit-button_1lkfy_20",
1458
- submitButton: bi
1459
- }, gd = ({ color: e = "primary", icon: t = /* @__PURE__ */ n.jsx(jr, { size: 12 }), inputId: r = "context-file-input", accept: s = "*", onUpload: a, multiple: o, className: i, children: c, ...l }) => {
1460
- const d = (u) => {
1461
- u.target.files && (a(u.target.files), u.target.value = "");
1462
- };
1463
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1464
- /* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: b(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${i ?? ""}`, oa.item), ...l, children: [
1465
- t,
1466
- c
1467
- ] }),
1468
- /* @__PURE__ */ n.jsx("input", { id: r, type: "file", accept: s, onChange: d, hidden: !0, multiple: o })
1469
- ] });
1470
- }, _i = "_divider_1e6rk_1", Ni = {
1471
- divider: _i
1472
- }, pd = ({ className: e }) => /* @__PURE__ */ n.jsx(ia.Divider, { className: b("luminus-dropdown-divider", e, Ni.divider) }), Si = ({ searchTypes: e, selectedType: t, setSelectedType: r }) => /* @__PURE__ */ n.jsx(pn, { toggle: /* @__PURE__ */ n.jsx(xn, { as: br, icon: null, text: t == null ? void 0 : t.text }), children: e.map((s) => /* @__PURE__ */ n.jsx(et, { icon: null, onClick: () => r(s.key), children: s.text }, s.key)) }), Ci = "_dropdown_1ddrg_1", ki = "_open_1ddrg_12", Ii = "_loading-container_1ddrg_15", Di = "_groups-container_1ddrg_22", $i = "_group_1ddrg_22", Ei = "_header_1ddrg_26", Oi = "_item_1ddrg_33", Qe = {
1473
- dropdown: Ci,
1474
- open: ki,
1475
- "loading-container": "_loading-container_1ddrg_15",
1476
- loadingContainer: Ii,
1477
- "groups-container": "_groups-container_1ddrg_22",
1478
- groupsContainer: Di,
1479
- group: $i,
1480
- header: Ei,
1481
- item: Oi
1482
- }, Ti = ({ show: e, query: t, onCancel: r, groups: s, isLoading: a, searchTypes: o }) => {
1483
- const { texts: { appSearch: i } } = Z(he), c = J(null), l = S((d) => {
1484
- var m;
1485
- const u = (m = o.find((x) => x.key === d.type)) == null ? void 0 : m.toPath;
1486
- return u ? `${u}/${d.searchKey}` : "/not-found";
1487
- }, [o]);
1488
- return $r([c], r), /* @__PURE__ */ n.jsx("div", { ref: c, className: b("luminus-app-search-dropdown shadow rounded", Qe.dropdown, {
1489
- [Qe.open]: e
1490
- }), children: a ? /* @__PURE__ */ n.jsx("div", { className: Qe.loadingContainer, children: /* @__PURE__ */ n.jsx(_n, { animation: "border", variant: "primary" }) }) : /* @__PURE__ */ n.jsx("div", { className: Qe.groupsContainer, children: s == null ? void 0 : s.map((d) => {
1491
- var u;
1492
- return /* @__PURE__ */ n.jsxs("div", { className: b(Qe.group), children: [
1493
- /* @__PURE__ */ n.jsxs(tt, { to: `/search?query=${t}&type=${d.key.category}`, className: b("group-header", Qe.header), onClick: r, children: [
1494
- /* @__PURE__ */ n.jsx(X, { variant: "body", className: "text-primary", children: d.key.categoryName }),
1495
- /* @__PURE__ */ n.jsxs(X, { variant: "caption", children: [
1496
- d.items.length,
1497
- " ",
1498
- i.amountFrom,
1499
- " ",
1500
- d.key.totalCount
1501
- ] })
1502
- ] }),
1503
- (u = d.items) == null ? void 0 : u.map((m, x) => /* @__PURE__ */ n.jsxs(
1504
- tt,
1505
- {
1506
- to: l(m),
1507
- className: b("search-item d-flex gap-3 align-items-center justify-content-between", Qe.item),
1508
- onClick: r,
1509
- children: [
1510
- /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "text-nowrap text-truncate", children: m.name }),
1511
- /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ n.jsx(la, {}) })
1512
- ]
1513
- },
1514
- x
1515
- ))
1516
- ] }, d.key.category);
1517
- }) }) });
1518
- }, Fi = (e, t) => {
1519
- const r = nt(), [s, a] = E(!1), [o, i] = E([]), c = !e || !e.key, l = S(() => {
1520
- if (t.length < 3) {
1521
- i([]);
1522
- return;
1523
- }
1524
- a(!0), r.get(`/search/${t}?count=${c ? 5 : 20}${c ? "" : `&type=${e.key}`}`).then(({ data: d }) => {
1525
- i(d), a(!1);
1526
- }).catch(() => {
1527
- a(!1);
1528
- });
1529
- }, [e, t, r, c]);
1530
- return B(() => {
1531
- l();
1532
- }, [l]), { isLoading: s, searchItems: o };
1533
- }, xd = ({ searchTypes: e, navigateFunction: t, currentPath: r, homePath: s = "/", className: a }) => {
1534
- var w;
1535
- const { texts: { appSearch: o } } = Z(he), [i, c] = E(e.length > 0 ? ((w = e.at(0)) == null ? void 0 : w.key) ?? null : null), l = Q(() => e.find((j) => j.key === i) ?? null, [e, i]), [d, u] = E(""), [m, x] = ds(d, 500), { isLoading: f, searchItems: g } = Fi(l, m), [p, h] = E(!1);
1536
- B(() => {
1537
- (g.length > 0 || f) && h(!0);
1538
- }, [g, f]);
1539
- const y = J(null);
1540
- return B(() => {
1541
- var j;
1542
- u(""), r === s && ((j = y.current) == null || j.focus());
1543
- }, [r, s]), /* @__PURE__ */ n.jsx(ye, { onSubmit: (j) => {
1544
- j.preventDefault(), j.stopPropagation(), x.flush(), h(!1), d.length > 2 && t(`/search?query=${d}${l && l.key && `&type=${l == null ? void 0 : l.key}`}`);
1545
- }, children: /* @__PURE__ */ n.jsxs(It, { className: b(qe.inputGroup, a), children: [
1546
- /* @__PURE__ */ n.jsx(It.Text, { className: b("p-1 rounded", qe.inputGroupText, qe.left), children: /* @__PURE__ */ n.jsx(Si, { searchTypes: e, selectedType: l, setSelectedType: c }) }),
1547
- /* @__PURE__ */ n.jsx(ye.Control, { ref: y, placeholder: o.searchPlaceholder, type: "text", size: "sm", className: b("luminus-app-search-input", qe.input), value: d, onChange: (j) => {
1548
- var v;
1549
- return u(((v = j.target) == null ? void 0 : v.value) ?? "");
1550
- }, onFocus: () => g.length > 0 && h(!0) }),
1551
- /* @__PURE__ */ n.jsx(It.Text, { className: b("p-0 rounded", qe.inputGroupText, qe.right), children: /* @__PURE__ */ n.jsx("button", { type: "submit", className: b("text-primary", qe.submitButton), children: /* @__PURE__ */ n.jsx(ca, {}) }) }),
1552
- /* @__PURE__ */ n.jsx(Ti, { query: m, searchTypes: e, show: p, onCancel: () => h(!1), groups: g, isLoading: f })
1553
- ] }) });
1554
- }, Li = "_card_19733_1", Ri = "_header_19733_6", Ai = "_header-content_19733_13", Mi = "_title_19733_19", Bi = "_collapse-icon_19733_22", Vi = "_collapsed_19733_27", zi = "_content_19733_30", Ze = {
1555
- card: Li,
1556
- header: Ri,
1557
- "header-content": "_header-content_19733_13",
1558
- headerContent: Ai,
1559
- title: Mi,
1560
- "collapse-icon": "_collapse-icon_19733_22",
1561
- collapseIcon: Bi,
1562
- collapsed: Vi,
1563
- content: zi
1564
- }, Pi = ({ title: e, headerContent: t, children: r, className: s, headerClassName: a, contentClassName: o, dontRenderIfNoChildren: i, ...c }) => {
1565
- const l = c.collapsible ? c.controlled ? !1 : c.defaultOpen ?? !1 : !0, [d, u] = E(l), m = c.collapsible ? c.controlled ? c.isOpen : d : !0;
1566
- B(() => {
1567
- u(l);
1568
- }, [l]);
1569
- const x = Q(() => !r || !r.toString() || r.toString().split(",").filter((f) => f && f !== "false").length === 0, [r]);
1570
- return i && x ? null : /* @__PURE__ */ n.jsxs("div", { className: b("luminus-card rounded shadow-sm", Ze.card, {
1571
- [s ?? ""]: s
1572
- }), children: [
1573
- /* @__PURE__ */ n.jsxs("div", { role: c.collapsible ? "button" : void 0, className: b("header", Ze.header, {
1574
- [a ?? ""]: a
1575
- }), onClick: () => {
1576
- c.collapsible && (c.controlled ? c.onToggle(!c.isOpen) : u(!d));
1577
- }, children: [
1578
- /* @__PURE__ */ n.jsxs("div", { className: b("header-content", Ze.headerContent), children: [
1579
- /* @__PURE__ */ n.jsx(X, { variant: "h6", className: b("text-primary", Ze.title), children: e }),
1580
- t ?? null
1581
- ] }),
1582
- c.collapsible && /* @__PURE__ */ n.jsx(wr, { className: b(Ze.collapseIcon, {
1583
- [Ze.collapsed]: m
1584
- }) })
1585
- ] }),
1586
- /* @__PURE__ */ n.jsx(Fr, { in: m, children: /* @__PURE__ */ n.jsx("div", { className: b("card-content border-top border-primary", Ze.content, {
1587
- [o ?? ""]: o
1588
- }), children: r }) })
1589
- ] });
1590
- };
1591
- var Wi = !!(typeof window < "u" && window.document && window.document.createElement), Hi = /* @__PURE__ */ function() {
1592
- function e(t, r) {
1593
- for (var s = 0; s < r.length; s++) {
1594
- var a = r[s];
1595
- a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(t, a.key, a);
1596
- }
1597
- }
1598
- return function(t, r, s) {
1599
- return r && e(t.prototype, r), s && e(t, s), t;
1600
- };
1601
- }();
1602
- function Ui(e, t) {
1603
- if (!(e instanceof t))
1604
- throw new TypeError("Cannot call a class as a function");
1605
- }
1606
- function Yi(e, t) {
1607
- if (!e)
1608
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1609
- return t && (typeof t == "object" || typeof t == "function") ? t : e;
1610
- }
1611
- function Gi(e, t) {
1612
- if (typeof t != "function" && t !== null)
1613
- throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1614
- e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1615
- }
1616
- var us = function(e) {
1617
- Gi(t, e);
1618
- function t() {
1619
- return Ui(this, t), Yi(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));
1620
- }
1621
- return Hi(t, [{
1622
- key: "componentWillUnmount",
1623
- value: function() {
1624
- this.defaultNode && document.body.removeChild(this.defaultNode), this.defaultNode = null;
1625
- }
1626
- }, {
1627
- key: "render",
1628
- value: function() {
1629
- return Wi ? (!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode)), Ot.createPortal(this.props.children, this.props.node || this.defaultNode)) : null;
1630
- }
1631
- }]), t;
1632
- }(ke.Component);
1633
- us.propTypes = {
1634
- children: $t.node.isRequired,
1635
- node: $t.any
1636
- };
1637
- var Ki = /* @__PURE__ */ function() {
1638
- function e(t, r) {
1639
- for (var s = 0; s < r.length; s++) {
1640
- var a = r[s];
1641
- a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(t, a.key, a);
1642
- }
1643
- }
1644
- return function(t, r, s) {
1645
- return r && e(t.prototype, r), s && e(t, s), t;
1646
- };
1647
- }();
1648
- function qi(e, t) {
1649
- if (!(e instanceof t))
1650
- throw new TypeError("Cannot call a class as a function");
1651
- }
1652
- function Qi(e, t) {
1653
- if (!e)
1654
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1655
- return t && (typeof t == "object" || typeof t == "function") ? t : e;
1656
- }
1657
- function Zi(e, t) {
1658
- if (typeof t != "function" && t !== null)
1659
- throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1660
- e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1661
- }
1662
- var fs = function(e) {
1663
- Zi(t, e);
1664
- function t() {
1665
- return qi(this, t), Qi(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));
1666
- }
1667
- return Ki(t, [{
1668
- key: "componentDidMount",
1669
- value: function() {
1670
- this.renderPortal();
1671
- }
1672
- }, {
1673
- key: "componentDidUpdate",
1674
- value: function(s) {
1675
- this.renderPortal();
1676
- }
1677
- }, {
1678
- key: "componentWillUnmount",
1679
- value: function() {
1680
- Ot.unmountComponentAtNode(this.defaultNode || this.props.node), this.defaultNode && document.body.removeChild(this.defaultNode), this.defaultNode = null, this.portal = null;
1681
- }
1682
- }, {
1683
- key: "renderPortal",
1684
- value: function(s) {
1685
- !this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode));
1686
- var a = this.props.children;
1687
- typeof this.props.children.type == "function" && (a = ke.cloneElement(this.props.children)), this.portal = Ot.unstable_renderSubtreeIntoContainer(this, a, this.props.node || this.defaultNode);
1688
- }
1689
- }, {
1690
- key: "render",
1691
- value: function() {
1692
- return null;
1693
- }
1694
- }]), t;
1695
- }(ke.Component);
1696
- fs.propTypes = {
1697
- children: $t.node.isRequired,
1698
- node: $t.any
1699
- };
1700
- var dn = void 0;
1701
- Ot.createPortal ? dn = us : dn = fs;
1702
- const Ji = "_lightbox_14acg_1", Xi = "_show_14acg_16", el = "_header_14acg_20", tl = "_photo-actions_14acg_26", nl = "_photo-container_14acg_31", rl = "_photo_14acg_26", sl = "_nav-button_14acg_41", al = "_photos-preview_14acg_49", ol = "_selected_14acg_62", il = "_default-indicator_14acg_66", $e = {
1703
- lightbox: Ji,
1704
- show: Xi,
1705
- header: el,
1706
- "photo-actions": "_photo-actions_14acg_26",
1707
- photoActions: tl,
1708
- "photo-container": "_photo-container_14acg_31",
1709
- photoContainer: nl,
1710
- photo: rl,
1711
- "nav-button": "_nav-button_14acg_41",
1712
- navButton: sl,
1713
- "photos-preview": "_photos-preview_14acg_49",
1714
- photosPreview: al,
1715
- selected: ol,
1716
- "default-indicator": "_default-indicator_14acg_66",
1717
- defaultIndicator: il
1718
- }, ll = "_backdrop_3huvf_1", cl = "_show_3huvf_11", Kn = {
1719
- backdrop: ll,
1720
- show: cl
1721
- }, ms = ({ show: e, onClick: t }) => /* @__PURE__ */ n.jsx("div", { className: b("luminus-backdrop", Kn.backdrop, {
1722
- [Kn.show]: e
1723
- }), onClick: () => t && t() }), hs = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: e ?? a }), dl = ({ show: e, onClose: t, photos: r, defaultIndex: s, uploadPhotosText: a, noPhotosText: o, onUploadPhotos: i, photoActions: c, baseUrl: l, customToken: d, placeholder: u, ImgComponent: m = hs }) => {
1724
- const x = J(null), [f, g] = E(s), p = r.at(f), h = f > 0, y = f < r.length - 1;
1725
- B(() => {
1726
- e && g(s);
1727
- }, [s, e]), B(() => {
1728
- f >= r.length && g(r.length - 1);
1729
- }, [r, f]);
1730
- const w = S((j) => {
1731
- switch (j.key) {
1732
- case "ArrowLeft":
1733
- j.stopPropagation(), h && g((v) => v - 1);
1734
- break;
1735
- case "ArrowRight":
1736
- j.stopPropagation(), y && g((v) => v + 1);
1737
- break;
1738
- case "Escape":
1739
- j.stopPropagation(), t();
1740
- break;
1741
- }
1742
- }, [y, h, t]);
1743
- return Er(w), /* @__PURE__ */ n.jsxs(dn, { children: [
1744
- /* @__PURE__ */ n.jsx(ms, { show: e, onClick: t }),
1745
- /* @__PURE__ */ n.jsx("div", { ref: x, className: b("luminus-lightbox rounded shadow", $e.lightbox, {
1746
- [$e.show]: e
1747
- }), children: e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1748
- /* @__PURE__ */ n.jsxs("div", { className: $e.header, children: [
1749
- /* @__PURE__ */ n.jsxs("div", { className: b("rounded", $e.photoActions), children: [
1750
- i && /* @__PURE__ */ n.jsx(cs, { accept: ".jpg,.jpeg,.png", onUpload: (j) => {
1751
- j.length > 0 && i(Array.from(j));
1752
- }, icon: /* @__PURE__ */ n.jsx(_r, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: a ?? null }),
1753
- p && (c == null ? void 0 : c.map(({ label: j, onClick: v, ..._ }, k) => /* @__PURE__ */ n.jsx(
1754
- Ae,
1755
- {
1756
- onClick: () => v(p.id),
1757
- ..._,
1758
- children: j
1759
- },
1760
- `action-${k}`
1761
- )))
1762
- ] }),
1763
- /* @__PURE__ */ n.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ n.jsx(Me, { style: { fontSize: "32px" } }) })
1764
- ] }),
1765
- r.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ n.jsx(X, { variant: "body", children: o ?? "No photos available" }) }),
1766
- p && /* @__PURE__ */ n.jsxs("div", { className: $e.photoContainer, children: [
1767
- /* @__PURE__ */ n.jsx("div", { role: h ? "button" : void 0, className: b("align-items-start", $e.navButton), onClick: () => h && g((j) => j - 1), children: h && /* @__PURE__ */ n.jsx(hn, { style: { fontSize: "40px" } }) }),
1768
- /* @__PURE__ */ n.jsx(m, { src: p.lgSrc, alt: p.alt, className: b("rounded", $e.photo), baseUrl: l, customToken: d, placeholder: u }),
1769
- /* @__PURE__ */ n.jsx("div", { role: y ? "button" : void 0, className: b("align-items-end", $e.navButton), onClick: () => y && g((j) => j + 1), children: y && /* @__PURE__ */ n.jsx(gn, { style: { fontSize: "40px" } }) })
1770
- ] }),
1771
- /* @__PURE__ */ n.jsx("div", { className: $e.photosPreview, children: r.map((j, v) => /* @__PURE__ */ n.jsxs("div", { role: "button", onClick: () => g(v), className: "position-relative", children: [
1772
- /* @__PURE__ */ n.jsx(m, { role: v !== f ? "button" : void 0, src: j.smSrc, alt: j.alt, className: b("rounded", $e.photo, {
1773
- [$e.selected]: v === f
1774
- }), baseUrl: l, customToken: d, placeholder: u }, j.id),
1775
- j.isDefault && /* @__PURE__ */ n.jsx("div", { className: b("text-primary", $e.defaultIndicator), children: /* @__PURE__ */ n.jsx(da, {}) })
1776
- ] })) })
1777
- ] }) })
1778
- ] });
1779
- }, ul = ({ photos: e, onUploadPhotos: t, uploadPhotosText: r, noPhotosText: s, photoActions: a, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l = hs, noLightboxOnlyButtonOnEmpty: d = !1, hideLightbox: u = !1 }) => {
1780
- const [m, x] = E(null), f = m !== null ? e[m] : null, [g, p] = E(!1);
1781
- return B(() => {
1782
- if (e.length === 0) {
1783
- x(null);
1784
- return;
1785
- }
1786
- const h = e.findIndex((y) => y.isDefault);
1787
- x(h > -1 ? h : 0);
1788
- }, [e]), !f && t && d ? /* @__PURE__ */ n.jsx(cs, { accept: ".jpg,.jpeg,.png", onUpload: (h) => {
1789
- h.length > 0 && t(Array.from(h));
1790
- }, icon: /* @__PURE__ */ n.jsx(_r, { style: { fontSize: 18 } }), multiple: !0, children: r ?? null }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1791
- f ? /* @__PURE__ */ n.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () => p(!0), children: [
1792
- /* @__PURE__ */ n.jsx(l, { src: f.smSrc, alt: f.alt, className: "rounded w-100", baseUrl: o, customToken: i, placeholder: c }),
1793
- e.length > 1 && /* @__PURE__ */ n.jsx("div", { className: "position-absolute rounded p-1", style: {
1794
- top: 0,
1795
- right: 0,
1796
- color: "white",
1797
- textShadow: "-2px 2px 4px #696969",
1798
- background: "rgba(105,105,105,0.5)"
1799
- }, children: /* @__PURE__ */ n.jsx(ua, { fontSize: 24 }) })
1800
- ] }) : /* @__PURE__ */ n.jsx(Bt, { text: r ?? "", placement: "left", children: /* @__PURE__ */ n.jsx("div", { role: "button", className: b("rounded p-3 d-flex justify-content-center"), onClick: () => p(!0), children: /* @__PURE__ */ n.jsx("img", { src: c, alt: "placeholder", className: "rounded w-25" }) }) }),
1801
- /* @__PURE__ */ n.jsx(dl, { show: g && !u, onClose: () => p(!1), photos: e, defaultIndex: m ?? 0, uploadPhotosText: r, noPhotosText: s, onUploadPhotos: t, photoActions: a, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l })
1802
- ] });
1803
- }, vd = ({ children: e }) => {
1804
- var c, l, d;
1805
- const { useMsal: t, msalScopes: r } = Z(fa), { isAuthenticated: s } = ma(), { userLoginState: a } = Z(Rt), o = a.state === ha.LOGGING_IN, i = a.user && ((c = a.user) == null ? void 0 : c.permissions) && ((d = (l = a.user) == null ? void 0 : l.permissions) == null ? void 0 : d.length) > 0;
1806
- return t ? /* @__PURE__ */ n.jsx(Ta, { interactionType: Oa.Redirect, authenticationRequest: { scopes: r }, children: o || !s() ? /* @__PURE__ */ n.jsx(Tn, {}) : a.user ? i ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e }) : /* @__PURE__ */ n.jsx(St, { to: "/user-not-permitted", replace: !0 }) : /* @__PURE__ */ n.jsx(St, { to: "/no-user-login", replace: !0 }) }) : o ? /* @__PURE__ */ n.jsx(Tn, {}) : !s() || !a.user ? /* @__PURE__ */ n.jsx(St, { to: "/login", replace: !0 }) : i ? e : /* @__PURE__ */ n.jsx(St, { to: "/user-not-permitted", replace: !0 });
1807
- }, Nn = (e) => {
1808
- const { variant: t, children: r, className: s, size: a = "md", typographyVariant: o = a === "sm" ? "body2" : "body", ...i } = { ...e };
1809
- return /* @__PURE__ */ n.jsx(Ja, { variant: t, className: `text-center ${a === "sm" ? "p-1" : a === "md" ? "p-3" : "p-4"} bg-${t} bg-opacity-10 border-none ${s ?? ""}`, ...i, children: /* @__PURE__ */ n.jsx(X, { variant: o, children: r }) });
1810
- }, fl = "_item_z9z4m_1", ml = "_level-success_z9z4m_4", hl = "_level-info_z9z4m_10", gl = "_level-warning_z9z4m_16", pl = "_level-danger_z9z4m_22", xl = "_type-icon_z9z4m_28", Zt = {
1811
- item: fl,
1812
- "level-success": "_level-success_z9z4m_4",
1813
- levelSuccess: ml,
1814
- "level-info": "_level-info_z9z4m_10",
1815
- levelInfo: hl,
1816
- "level-warning": "_level-warning_z9z4m_16",
1817
- levelWarning: gl,
1818
- "level-danger": "_level-danger_z9z4m_22",
1819
- levelDanger: pl,
1820
- "type-icon": "_type-icon_z9z4m_28",
1821
- typeIcon: xl
1822
- }, vl = ({ level: e, children: t, customIcon: r, noIcon: s }) => {
1823
- const { ProjectIconComponent: a } = Z(he), o = S(() => {
1824
- switch (e) {
1825
- case "info":
1826
- return /* @__PURE__ */ n.jsx(a, { icon: "info" });
1827
- case "warning":
1828
- return /* @__PURE__ */ n.jsx(a, { icon: "warning" });
1829
- case "danger":
1830
- return /* @__PURE__ */ n.jsx(a, { icon: "danger" });
1831
- default:
1832
- return /* @__PURE__ */ n.jsx(a, { icon: "check" });
1833
- }
1834
- }, [a, e]);
1835
- return /* @__PURE__ */ n.jsxs("div", { className: b("p-2 rounded d-flex gap-1 align-items-center justify-content-between", { "ps-1": !s }, Zt.item, Zt[`level-${e}`]), children: [
1836
- !s && /* @__PURE__ */ n.jsx("div", { className: b(Zt.typeIcon), children: r ?? o() }),
1837
- /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "w-100", children: t })
1838
- ] });
1839
- }, jd = ({ version: e }) => /* @__PURE__ */ n.jsx("div", { className: "rounded", style: {
1840
- position: "fixed",
1841
- right: "0px",
1842
- bottom: "0px",
1843
- zIndex: "10000",
1844
- backgroundColor: "rgba(255, 255, 255, 0.5)",
1845
- padding: "4px",
1846
- pointerEvents: "all"
1847
- }, children: /* @__PURE__ */ n.jsxs(X, { variant: "caption", className: "w-100 text-end", children: [
1848
- "verze ",
1849
- e
1850
- ] }) }), jl = "_submit-container_a9slg_1", yl = "_spacer_a9slg_14", qn = {
1851
- "submit-container": "_submit-container_a9slg_1",
1852
- submitContainer: jl,
1853
- spacer: yl
1854
- }, wl = ({ children: e, noSpacer: t = !1 }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1855
- !t && /* @__PURE__ */ n.jsx("div", { className: qn.spacer }),
1856
- /* @__PURE__ */ n.jsx("div", { className: b("luminus-floating-action-container shadow", qn.submitContainer), children: e })
1857
- ] }), bl = "_timeline_g1754_1", _l = "_step-container_g1754_1", Nl = "_step-date_g1754_1", Sl = "_step-content_g1754_4", Cl = "_content-header_g1754_8", kl = "_content-text_g1754_11", Il = "_step-icon_g1754_14", Je = {
1858
- timeline: bl,
1859
- "step-container": "_step-container_g1754_1",
1860
- stepContainer: _l,
1861
- "step-date": "_step-date_g1754_1",
1862
- stepDate: Nl,
1863
- "step-content": "_step-content_g1754_4",
1864
- stepContent: Sl,
1865
- "content-header": "_content-header_g1754_8",
1866
- contentHeader: Cl,
1867
- "content-text": "_content-text_g1754_11",
1868
- contentText: kl,
1869
- "step-icon": "_step-icon_g1754_14",
1870
- stepIcon: Il
1871
- }, yd = ({ steps: e }) => /* @__PURE__ */ n.jsx("div", { className: Je.timeline, children: e.sort((t, r) => Ha(t.date ?? /* @__PURE__ */ new Date(), r.date ?? /* @__PURE__ */ new Date())).map((t, r) => /* @__PURE__ */ n.jsxs("div", { className: b("row g-0 gx-3", Je.stepContainer), children: [
1872
- /* @__PURE__ */ n.jsx("div", { className: "col-3", children: t.date && /* @__PURE__ */ n.jsxs(X, { variant: "caption", className: b("h-100 d-flex flex-column align-items-end justify-content-center gap-0", Je.stepDate), children: [
1873
- /* @__PURE__ */ n.jsx("div", { children: jt(t.date, "dd.MM.yyyy") }),
1874
- /* @__PURE__ */ n.jsx("div", { children: jt(t.date, "HH:mm") })
1875
- ] }) }),
1876
- /* @__PURE__ */ n.jsx("div", { className: "col-9", children: /* @__PURE__ */ n.jsxs("div", { className: b("h-100 d-flex flex-column gap-1 border-start border-2 p-3", Je.stepContent), children: [
1877
- /* @__PURE__ */ n.jsxs("div", { className: b("d-flex gap-2 align-items-center", Je.contentHeader), children: [
1878
- t.person && /* @__PURE__ */ n.jsx(Nr, { name: t.person.name ?? "", size: 22, fontSize: 12 }),
1879
- typeof t.title == "string" ? /* @__PURE__ */ n.jsx(X, { variant: "body", className: "fw-bold", children: t.title }) : t.title
1880
- ] }),
1881
- t.text && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: Je.contentText, children: t.text }),
1882
- /* @__PURE__ */ n.jsx("div", { className: b("text-primary", Je.stepIcon), children: t.icon ?? /* @__PURE__ */ n.jsx(ga, {}) })
1883
- ] }) })
1884
- ] }, r)) }), Dl = (e, t, r, s = !0) => {
1885
- const a = nt({ silent: s, differentBaseUrl: t, customToken: r }), [o, i] = E(!1), [c, l] = E(null), d = S(async (u) => {
1886
- i(!0), l(null), a.get(e, {
1887
- signal: u,
1888
- responseType: "blob"
1889
- }).then((m) => {
1890
- i(!1), l(m.data);
1891
- }).catch(() => {
1892
- i(!1), l(null);
1893
- });
1894
- }, [a, e]);
1895
- return B(() => {
1896
- const u = new AbortController();
1897
- return d(u.signal), () => {
1898
- u.abort();
1899
- };
1900
- }, [d]), { data: c, setData: l, reloadData: d, isLoading: o };
1901
- }, Qn = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => {
1902
- const { data: i } = Dl(e, r, s), [c, l] = E(null);
1903
- return B(() => {
1904
- let d = null;
1905
- return i !== null ? (d = URL.createObjectURL(i), l(d)) : l(null), () => {
1906
- d !== null && URL.revokeObjectURL(d);
1907
- };
1908
- }, [i]), c === null && !a ? null : /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: c ?? a });
1909
- }, gs = ({ currentSelection: e, selectedItemNavigateTo: t, children: r }) => {
1910
- if (!e || !e.id || !t)
1911
- return /* @__PURE__ */ n.jsx("div", { className: "luminus-input-container position-relative w-100", children: r });
1912
- const s = t(e);
1913
- return /* @__PURE__ */ n.jsx(tt, { to: s, className: "luminus-input-container position-relative w-100 text-decoration-none", children: r });
1914
- }, ps = ({ InputContainer: e = rt, label: t, value: r, onChange: s, hidden: a, disabled: o, className: i, type: c, withoutLabel: l, indeterminate: d }) => {
1915
- const u = J(null);
1916
- return B(() => {
1917
- u.current && (u.current.indeterminate = d ?? !1);
1918
- }, [u, d]), /* @__PURE__ */ n.jsx(e, { isForCheckInput: !0, hidden: a, label: t ?? "", withoutLabel: l, className: i, children: /* @__PURE__ */ n.jsx(ye.Check, { ref: u, id: `check-${t}`, type: c ?? "checkbox", label: t ?? "", checked: r, onChange: (m) => {
1919
- var x;
1920
- s && s(((x = m.target) == null ? void 0 : x.checked) ?? !1);
1921
- }, className: i ?? "", hidden: a ?? !1, disabled: o ?? !1 }) });
1922
- }, it = ({ InputContainer: e = rt, type: t, value: r, onChange: s, debounceMs: a, label: o, withoutLabel: i, placeholder: c, size: l, hidden: d, disabled: u, showClearIcon: m, clearValue: x, list: f, className: g, step: p, minLength: h, maxLength: y, noSelectOnFocus: w }) => {
1923
- const j = t === "number", v = S(() => {
1924
- if (!s)
1925
- return;
1926
- const N = x ?? null;
1927
- s(j ? N ? Number(N) : null : (N == null ? void 0 : N.toString()) ?? "");
1928
- }, [x, j, s]), _ = J(null), [k, C] = E((r == null ? void 0 : r.toString()) ?? ""), I = S((N) => {
1929
- const M = N;
1930
- s && (j && s(M == null || M === "" ? null : Number(M)), s(M || null));
1931
- }, [j, s]), O = S((N) => {
1932
- var re;
1933
- const M = (re = N.target) == null ? void 0 : re.value;
1934
- if (!a) {
1935
- I(M);
1936
- return;
1937
- }
1938
- C(M), _.current !== null && window.clearTimeout(_.current), _.current = window.setTimeout(() => {
1939
- I(M);
1940
- }, a);
1941
- }, [a, I]);
1942
- B(() => {
1943
- C(r === null ? "" : r.toString());
1944
- }, [r]);
1945
- const [D, T] = E(!1), $ = pa(t, r ? r.toString() ?? null : null, D);
1946
- return /* @__PURE__ */ n.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: d, className: g, children: [
1947
- /* @__PURE__ */ n.jsx(ye.Control, { type: $, placeholder: c ?? o, size: l, value: a ? k : (r == null ? void 0 : r.toString()) ?? "", onChange: O, className: g ?? "", hidden: d, disabled: u ?? !1, list: f, onFocus: (N) => {
1948
- T(!0), !w && N.target.select();
1949
- }, onBlur: () => T(!1), step: p, minLength: h, maxLength: y }),
1950
- m && r !== null && s && !u && /* @__PURE__ */ n.jsx("div", { className: `luminus-input-remove-icon ${t !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
1951
- ] });
1952
- }, Tt = ({
1953
- InputContainer: e = rt,
1954
- value: t,
1955
- options: r,
1956
- onChange: s,
1957
- label: a,
1958
- withoutLabel: o,
1959
- isNumber: i,
1960
- size: c,
1961
- hidden: l,
1962
- disabled: d,
1963
- noSortOptions: u,
1964
- className: m,
1965
- suffixIdToName: x,
1966
- noEmptyOption: f,
1967
- // it will still add the empty option if there is no value provided or value is empty string or null
1968
- appendCurrentSelectionWithName: g,
1969
- dropdownWidth: p
1970
- }) => {
1971
- const { texts: { customSelect: h } } = Z(he), [y, w] = E(!1), [j, v] = E(""), _ = S(($) => {
1972
- v($);
1973
- }, []), k = Q(() => r.find(($) => $.id === t) ?? null, [r, t]), C = S(($) => {
1974
- var N;
1975
- return $ === null ? "" : !$.name || $.name.length === 0 ? ((N = $.id) == null ? void 0 : N.toString()) ?? "" : x ? `${$.name} (${$.id})` : $.name;
1976
- }, [x]), I = Q(() => {
1977
- const $ = r ?? [];
1978
- return g !== void 0 && t !== void 0 && t !== null && ($.some((N) => N.id === t) || $.push({ id: t, name: g })), $.map((N) => ({
1979
- id: N.id,
1980
- name: C(N)
1981
- })).filter((N) => wt(N.name, j)).sort((N, M) => u ? 0 : (N.name ?? "").localeCompare(M.name ?? ""));
1982
- }, [r, u, j, C, g, t]), O = S(($) => {
1983
- var N;
1984
- s && s(($ == null ? void 0 : $.id) === void 0 || ($ == null ? void 0 : $.id) === null ? null : i ? Number($.id) : (N = $.id) == null ? void 0 : N.toString());
1985
- }, [s, i]), D = S(($) => {
1986
- w(!1), O($);
1987
- }, [O]), T = J(null);
1988
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: l, inputContainerClassName: b({ "luminus-dropdown-select-open": y }), className: m, children: [
1989
- /* @__PURE__ */ n.jsxs(ye.Select, { ref: T, size: c, value: t ?? "", onMouseDown: ($) => {
1990
- $.currentTarget.focus(), $.preventDefault();
1991
- }, onClick: () => {
1992
- !d && w(!0);
1993
- }, className: b("w-100", {
1994
- "luminus-dropdown-picker-disabled": d
1995
- }), hidden: l, children: [
1996
- f && !(t == null || t === "") ? void 0 : /* @__PURE__ */ n.jsx("option", { value: "" }),
1997
- t != null && /* @__PURE__ */ n.jsx("option", { value: t, children: C(k) })
1998
- ] }),
1999
- T.current && /* @__PURE__ */ n.jsx(zt, { show: y, onCancel: () => w(!1), items: I, currentSelection: k ?? null, onSelectionChange: D, onSearchQueryChange: _, texts: h, disabled: d, inputRef: T, autoHideSearch: !0, allItemsLength: r.length, itemsNameWidth: p })
2000
- ] }) });
2001
- }, wd = ({ InputContainer: e = rt, items: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: o, value: i, onSelect: c, label: l, withoutLabel: d, size: u, dropdownItemsNameWidth: m, additionalColumns: x, hidden: f, disabled: g, displayIdAsName: p, CustomOnChangeComponent: h, className: y, archiveColumn: w, icon: j }) => {
2002
- const [v, _] = E(!1), k = S(($) => {
2003
- c && c($);
2004
- }, [c]), C = S(($) => {
2005
- _(!1), k($);
2006
- }, [k]), I = J(null), O = r !== void 0, D = O && i !== null, T = Q(() => {
2007
- var $, N;
2008
- return p ? (($ = i == null ? void 0 : i.id) == null ? void 0 : $.toString()) ?? "" : i != null && i.name && i.name.length > 0 ? i.name : ((N = i == null ? void 0 : i.id) == null ? void 0 : N.toString()) ?? "";
2009
- }, [i, p]);
2010
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: d, label: l ?? "", hidden: f, inputContainerClassName: b({ "luminus-dropdown-select-open": v }), className: y, children: [
2011
- /* @__PURE__ */ n.jsxs(gs, { currentSelection: i, selectedItemNavigateTo: r, children: [
2012
- p && (i == null ? void 0 : i.name) && /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: i.name }),
2013
- /* @__PURE__ */ n.jsxs(
2014
- ye.Select,
2015
- {
2016
- ref: I,
2017
- size: u,
2018
- value: (i == null ? void 0 : i.id) ?? "",
2019
- onMouseDown: ($) => {
2020
- $.currentTarget.focus(), $.preventDefault();
2021
- },
2022
- onClick: () => {
2023
- !O && !g && _(!0);
2024
- },
2025
- className: b("w-100", {
2026
- "luminus-dropdown-picker-disabled": g,
2027
- "luminus-dropdown-picker-link": D
2028
- }),
2029
- hidden: f,
2030
- children: [
2031
- /* @__PURE__ */ n.jsx("option", { value: "" }),
2032
- i && /* @__PURE__ */ n.jsx("option", { value: i.id ?? void 0, children: T })
2033
- ]
2034
- }
2035
- ),
2036
- h || !g && O ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
2037
- !h && !g && O && /* @__PURE__ */ n.jsx(se, { size: "sm", color: "secondary", onClick: ($) => {
2038
- $.preventDefault(), $.stopPropagation(), _(!0);
2039
- }, children: j ?? /* @__PURE__ */ n.jsx(Sr, {}) }),
2040
- h ?? null
2041
- ] }) : null
2042
- ] }),
2043
- I.current && /* @__PURE__ */ n.jsx(zt, { show: v, onCancel: () => _(!1), items: t, currentSelection: i, onSelectionChange: C, onSearchQueryChange: s, texts: a, itemsNameWidth: m, additionalColumns: x, isLoading: o, disabled: g, inputRef: I, archiveColumn: w, displayIdAsName: p })
2044
- ] }) });
2045
- }, bd = ({ InputContainer: e = rt, value: t, onChange: r, label: s, size: a, showClearIcon: o, clearValue: i, hidden: c, disabled: l, rows: d, withoutLabel: u, debounceMs: m, minLength: x, maxLength: f, className: g }) => {
2046
- const p = S(() => {
2047
- if (!r)
2048
- return;
2049
- const _ = i ?? null;
2050
- r((_ == null ? void 0 : _.toString()) ?? "");
2051
- }, [i, r]), h = J(null), [y, w] = E((t == null ? void 0 : t.toString()) ?? ""), j = S((_) => {
2052
- const k = _;
2053
- r && r(k || null);
2054
- }, [r]), v = S((_) => {
2055
- var C;
2056
- const k = (C = _.target) == null ? void 0 : C.value;
2057
- if (!m) {
2058
- j(k);
2059
- return;
2060
- }
2061
- w(k), h.current !== null && window.clearTimeout(h.current), h.current = window.setTimeout(() => {
2062
- j(k);
2063
- }, m);
2064
- }, [m, j]);
2065
- return B(() => {
2066
- w(t === null ? "" : t.toString());
2067
- }, [t]), /* @__PURE__ */ n.jsxs(e, { label: s ?? "", hidden: c, withoutLabel: u, className: g, isForTextAreaInput: !0, children: [
2068
- /* @__PURE__ */ n.jsx(ye.Control, { as: "textarea", size: a, value: m ? y : t ?? "", onChange: v, hidden: c, disabled: l, rows: d ?? 2, className: "w-100", minLength: x, maxLength: f }),
2069
- o && t && r && !l && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: p, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
2070
- ] });
2071
- }, _d = ({ InputContainer: e = rt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: d, showClearIcon: u, clearValue: m, className: x, step: f, stepperStep: g = 1, min: p, max: h }) => {
2072
- const y = S(() => {
2073
- if (!r)
2074
- return;
2075
- const C = m ?? null;
2076
- r(C ? Number(C) : null);
2077
- }, [m, r]), w = J(null), [j, v] = E((t == null ? void 0 : t.toString()) ?? ""), _ = S((C) => {
2078
- const I = C;
2079
- r && r(I == null || I === "" ? null : pt(Number(I), p, h));
2080
- }, [h, p, r]), k = S((C) => {
2081
- var O;
2082
- const I = (O = C.target) == null ? void 0 : O.value;
2083
- if (!s) {
2084
- _(I);
2085
- return;
2086
- }
2087
- v(pt(Number(I), p, h).toString()), w.current !== null && window.clearTimeout(w.current), w.current = window.setTimeout(() => {
2088
- _(I);
2089
- }, s);
2090
- }, [s, _, h, p]);
2091
- return B(() => {
2092
- v(t === null ? "" : pt(t, p, h).toString());
2093
- }, [h, p, t]), /* @__PURE__ */ n.jsx(e, { withoutLabel: o, label: a ?? "", hidden: l, className: x, children: /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
2094
- /* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: i ?? a, size: c, value: s ? j : t ?? "", onChange: k, className: `luminus-numeric-stepper ${x ?? ""}`, hidden: l, disabled: d ?? !1, step: f }),
2095
- /* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (C) => {
2096
- C.preventDefault(), C.stopPropagation(), _(((t ?? 0) - g).toString());
2097
- }, children: /* @__PURE__ */ n.jsx(Cr, {}) }) }),
2098
- /* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (C) => {
2099
- C.preventDefault(), C.stopPropagation(), _(((t ?? 0) + g).toString());
2100
- }, children: /* @__PURE__ */ n.jsx(kr, {}) }) }),
2101
- u && t && r && !d && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
2102
- ] }) });
2103
- };
2104
- function xs(e, t) {
2105
- var r = {};
2106
- for (var s in e)
2107
- Object.prototype.hasOwnProperty.call(e, s) && t.indexOf(s) < 0 && (r[s] = e[s]);
2108
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
2109
- for (var a = 0, s = Object.getOwnPropertySymbols(e); a < s.length; a++)
2110
- t.indexOf(s[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, s[a]) && (r[s[a]] = e[s[a]]);
2111
- return r;
2112
- }
2113
- var bt;
2114
- (function(e) {
2115
- e.event = "event", e.props = "prop";
2116
- })(bt || (bt = {}));
2117
- function We() {
2118
- }
2119
- function $l(e) {
2120
- var t, r = void 0;
2121
- return function() {
2122
- for (var s = [], a = arguments.length; a--; ) s[a] = arguments[a];
2123
- return t && s.length === t.length && s.every(function(o, i) {
2124
- return o === t[i];
2125
- }) || (t = s, r = e.apply(void 0, s)), r;
2126
- };
2127
- }
2128
- function _t(e) {
2129
- return !!(e || "").match(/\d/);
2130
- }
2131
- function lt(e) {
2132
- return e == null;
2133
- }
2134
- function El(e) {
2135
- return typeof e == "number" && isNaN(e);
2136
- }
2137
- function vs(e) {
2138
- return lt(e) || El(e) || typeof e == "number" && !isFinite(e);
2139
- }
2140
- function js(e) {
2141
- return e.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
2142
- }
2143
- function Ol(e) {
2144
- switch (e) {
2145
- case "lakh":
2146
- return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
2147
- case "wan":
2148
- return /(\d)(?=(\d{4})+(?!\d))/g;
2149
- case "thousand":
2150
- default:
2151
- return /(\d)(?=(\d{3})+(?!\d))/g;
2152
- }
2153
- }
2154
- function Tl(e, t, r) {
2155
- var s = Ol(r), a = e.search(/[1-9]/);
2156
- return a = a === -1 ? e.length : a, e.substring(0, a) + e.substring(a, e.length).replace(s, "$1" + t);
2157
- }
2158
- function Fl(e) {
2159
- var t = J(e);
2160
- t.current = e;
2161
- var r = J(function() {
2162
- for (var s = [], a = arguments.length; a--; ) s[a] = arguments[a];
2163
- return t.current.apply(t, s);
2164
- });
2165
- return r.current;
2166
- }
2167
- function Sn(e, t) {
2168
- t === void 0 && (t = !0);
2169
- var r = e[0] === "-", s = r && t;
2170
- e = e.replace("-", "");
2171
- var a = e.split("."), o = a[0], i = a[1] || "";
2172
- return {
2173
- beforeDecimal: o,
2174
- afterDecimal: i,
2175
- hasNegation: r,
2176
- addNegation: s
2177
- };
2178
- }
2179
- function Ll(e) {
2180
- if (!e)
2181
- return e;
2182
- var t = e[0] === "-";
2183
- t && (e = e.substring(1, e.length));
2184
- var r = e.split("."), s = r[0].replace(/^0+/, "") || "0", a = r[1] || "";
2185
- return (t ? "-" : "") + s + (a ? "." + a : "");
2186
- }
2187
- function ys(e, t, r) {
2188
- for (var s = "", a = r ? "0" : "", o = 0; o <= t - 1; o++)
2189
- s += e[o] || a;
2190
- return s;
2191
- }
2192
- function Zn(e, t) {
2193
- return Array(t + 1).join(e);
2194
- }
2195
- function ws(e) {
2196
- var t = e + "", r = t[0] === "-" ? "-" : "";
2197
- r && (t = t.substring(1));
2198
- var s = t.split(/[eE]/g), a = s[0], o = s[1];
2199
- if (o = Number(o), !o)
2200
- return r + a;
2201
- a = a.replace(".", "");
2202
- var i = 1 + o, c = a.length;
2203
- return i < 0 ? a = "0." + Zn("0", Math.abs(i)) + a : i >= c ? a = a + Zn("0", i - c) : a = (a.substring(0, i) || "0") + "." + a.substring(i), r + a;
2204
- }
2205
- function Jn(e, t, r) {
2206
- if (["", "-"].indexOf(e) !== -1)
2207
- return e;
2208
- var s = (e.indexOf(".") !== -1 || r) && t, a = Sn(e), o = a.beforeDecimal, i = a.afterDecimal, c = a.hasNegation, l = parseFloat("0." + (i || "0")), d = i.length <= t ? "0." + i : l.toFixed(t), u = d.split("."), m = o;
2209
- o && Number(u[0]) && (m = o.split("").reverse().reduce(function(p, h, y) {
2210
- return p.length > y ? (Number(p[0]) + Number(h)).toString() + p.substring(1, p.length) : h + p;
2211
- }, u[0]));
2212
- var x = ys(u[1] || "", t, r), f = c ? "-" : "", g = s ? "." : "";
2213
- return "" + f + m + g + x;
2214
- }
2215
- function Xe(e, t) {
2216
- if (e.value = e.value, e !== null) {
2217
- if (e.createTextRange) {
2218
- var r = e.createTextRange();
2219
- return r.move("character", t), r.select(), !0;
2220
- }
2221
- return e.selectionStart || e.selectionStart === 0 ? (e.focus(), e.setSelectionRange(t, t), !0) : (e.focus(), !1);
2222
- }
2223
- }
2224
- var bs = $l(function(e, t) {
2225
- for (var r = 0, s = 0, a = e.length, o = t.length; e[r] === t[r] && r < a; )
2226
- r++;
2227
- for (; e[a - 1 - s] === t[o - 1 - s] && o - s > r && a - s > r; )
2228
- s++;
2229
- return {
2230
- from: { start: r, end: a - s },
2231
- to: { start: r, end: o - s }
2232
- };
2233
- }), Rl = function(e, t) {
2234
- var r = Math.min(e.selectionStart, t);
2235
- return {
2236
- from: { start: r, end: e.selectionEnd },
2237
- to: { start: r, end: t }
2238
- };
2239
- };
2240
- function Al(e, t, r) {
2241
- return Math.min(Math.max(e, t), r);
2242
- }
2243
- function Jt(e) {
2244
- return Math.max(e.selectionStart, e.selectionEnd);
2245
- }
2246
- function Ml() {
2247
- return typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
2248
- }
2249
- function Bl(e) {
2250
- return {
2251
- from: {
2252
- start: 0,
2253
- end: 0
2254
- },
2255
- to: {
2256
- start: 0,
2257
- end: e.length
2258
- },
2259
- lastValue: ""
2260
- };
2261
- }
2262
- function Vl(e) {
2263
- var t = e.currentValue, r = e.formattedValue, s = e.currentValueIndex, a = e.formattedValueIndex;
2264
- return t[s] === r[a];
2265
- }
2266
- function zl(e, t, r, s, a, o, i) {
2267
- i === void 0 && (i = Vl);
2268
- var c = a.findIndex(function(v) {
2269
- return v;
2270
- }), l = e.slice(0, c);
2271
- !t && !r.startsWith(l) && (t = l, r = l + r, s = s + l.length);
2272
- for (var d = r.length, u = e.length, m = {}, x = new Array(d), f = 0; f < d; f++) {
2273
- x[f] = -1;
2274
- for (var g = 0, p = u; g < p; g++) {
2275
- var h = i({
2276
- currentValue: r,
2277
- lastValue: t,
2278
- formattedValue: e,
2279
- currentValueIndex: f,
2280
- formattedValueIndex: g
2281
- });
2282
- if (h && m[g] !== !0) {
2283
- x[f] = g, m[g] = !0;
2284
- break;
2285
- }
2286
- }
2287
- }
2288
- for (var y = s; y < d && (x[y] === -1 || !o(r[y])); )
2289
- y++;
2290
- var w = y === d || x[y] === -1 ? u : x[y];
2291
- for (y = s - 1; y > 0 && x[y] === -1; )
2292
- y--;
2293
- var j = y === -1 || x[y] === -1 ? 0 : x[y] + 1;
2294
- return j > w ? w : s - j < w - s ? j : w;
2295
- }
2296
- function Xn(e, t, r, s) {
2297
- var a = e.length;
2298
- if (t = Al(t, 0, a), s === "left") {
2299
- for (; t >= 0 && !r[t]; )
2300
- t--;
2301
- t === -1 && (t = r.indexOf(!0));
2302
- } else {
2303
- for (; t <= a && !r[t]; )
2304
- t++;
2305
- t > a && (t = r.lastIndexOf(!0));
2306
- }
2307
- return t === -1 && (t = a), t;
2308
- }
2309
- function Pl(e) {
2310
- for (var t = Array.from({ length: e.length + 1 }).map(function() {
2311
- return !0;
2312
- }), r = 0, s = t.length; r < s; r++)
2313
- t[r] = !!(_t(e[r]) || _t(e[r - 1]));
2314
- return t;
2315
- }
2316
- function _s(e, t, r, s, a, o) {
2317
- o === void 0 && (o = We);
2318
- var i = Fl(function(g, p) {
2319
- var h, y;
2320
- return vs(g) ? (y = "", h = "") : typeof g == "number" || p ? (y = typeof g == "number" ? ws(g) : g, h = s(y)) : (y = a(g, void 0), h = s(y)), { formattedValue: h, numAsString: y };
2321
- }), c = E(function() {
2322
- return i(lt(e) ? t : e, r);
2323
- }), l = c[0], d = c[1], u = function(g, p) {
2324
- g.formattedValue !== l.formattedValue && d({
2325
- formattedValue: g.formattedValue,
2326
- numAsString: g.value
2327
- }), o(g, p);
2328
- }, m = e, x = r;
2329
- lt(e) && (m = l.numAsString, x = !0);
2330
- var f = i(m, x);
2331
- return Q(function() {
2332
- d(f);
2333
- }, [f.formattedValue]), [l, u];
2334
- }
2335
- function Wl(e) {
2336
- return e.replace(/[^0-9]/g, "");
2337
- }
2338
- function Hl(e) {
2339
- return e;
2340
- }
2341
- function Ul(e) {
2342
- var t = e.type;
2343
- t === void 0 && (t = "text");
2344
- var r = e.displayType;
2345
- r === void 0 && (r = "input");
2346
- var s = e.customInput, a = e.renderText, o = e.getInputRef, i = e.format;
2347
- i === void 0 && (i = Hl);
2348
- var c = e.removeFormatting;
2349
- c === void 0 && (c = Wl);
2350
- var l = e.defaultValue, d = e.valueIsNumericString, u = e.onValueChange, m = e.isAllowed, x = e.onChange;
2351
- x === void 0 && (x = We);
2352
- var f = e.onKeyDown;
2353
- f === void 0 && (f = We);
2354
- var g = e.onMouseUp;
2355
- g === void 0 && (g = We);
2356
- var p = e.onFocus;
2357
- p === void 0 && (p = We);
2358
- var h = e.onBlur;
2359
- h === void 0 && (h = We);
2360
- var y = e.value, w = e.getCaretBoundary;
2361
- w === void 0 && (w = Pl);
2362
- var j = e.isValidInputCharacter;
2363
- j === void 0 && (j = _t);
2364
- var v = e.isCharacterSame, _ = xs(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), k = _s(y, l, !!d, i, c, u), C = k[0], I = C.formattedValue, O = C.numAsString, D = k[1], T = J(), $ = J({ formattedValue: I, numAsString: O }), N = function(A, V) {
2365
- $.current = { formattedValue: A.formattedValue, numAsString: A.value }, D(A, V);
2366
- }, M = E(!1), re = M[0], L = M[1], z = J(null), R = J({
2367
- setCaretTimeout: null,
2368
- focusTimeout: null
2369
- });
2370
- B(function() {
2371
- return L(!0), function() {
2372
- clearTimeout(R.current.setCaretTimeout), clearTimeout(R.current.focusTimeout);
2373
- };
2374
- }, []);
2375
- var G = i, W = function(A, V) {
2376
- var q = parseFloat(V);
2377
- return {
2378
- formattedValue: A,
2379
- value: V,
2380
- floatValue: isNaN(q) ? void 0 : q
2381
- };
2382
- }, K = function(A, V, q) {
2383
- A.selectionStart === 0 && A.selectionEnd === A.value.length || (Xe(A, V), R.current.setCaretTimeout = setTimeout(function() {
2384
- A.value === q && A.selectionStart !== V && Xe(A, V);
2385
- }, 0));
2386
- }, ee = function(A, V, q) {
2387
- return Xn(A, V, w(A), q);
2388
- }, P = function(A, V, q) {
2389
- var ce = w(V), Se = zl(V, I, A, q, ce, j, v);
2390
- return Se = Xn(V, Se, ce), Se;
2391
- }, H = function(A) {
2392
- var V = A.formattedValue;
2393
- V === void 0 && (V = "");
2394
- var q = A.input, ce = A.source, Se = A.event, de = A.numAsString, ae;
2395
- if (q) {
2396
- var Ie = A.inputValue || q.value, Ee = Jt(q);
2397
- q.value = V, ae = P(Ie, V, Ee), ae !== void 0 && K(q, ae, V);
2398
- }
2399
- V !== I && N(W(V, de), { event: Se, source: ce });
2400
- };
2401
- B(function() {
2402
- var A = $.current, V = A.formattedValue, q = A.numAsString;
2403
- (I !== V || O !== q) && N(W(I, O), {
2404
- event: void 0,
2405
- source: bt.props
2406
- });
2407
- }, [I, O]);
2408
- var F = z.current ? Jt(z.current) : void 0, ne = typeof window < "u" ? Ea : B;
2409
- ne(function() {
2410
- var A = z.current;
2411
- if (I !== $.current.formattedValue && A) {
2412
- var V = P($.current.formattedValue, I, F);
2413
- A.value = I, K(A, V, I);
2414
- }
2415
- }, [I]);
2416
- var ge = function(A, V, q) {
2417
- var ce = V.target, Se = T.current ? Rl(T.current, ce.selectionEnd) : bs(I, A), de = Object.assign(Object.assign({}, Se), { lastValue: I }), ae = c(A, de), Ie = G(ae);
2418
- if (ae = c(Ie, void 0), m && !m(W(Ie, ae))) {
2419
- var Ee = V.target, Oe = Jt(Ee), Y = P(A, I, Oe);
2420
- return Ee.value = I, K(Ee, Y, I), !1;
2421
- }
2422
- return H({
2423
- formattedValue: Ie,
2424
- numAsString: ae,
2425
- inputValue: A,
2426
- event: V,
2427
- source: q,
2428
- input: V.target
2429
- }), !0;
2430
- }, fe = function(A, V) {
2431
- V === void 0 && (V = 0);
2432
- var q = A.selectionStart, ce = A.selectionEnd;
2433
- T.current = { selectionStart: q, selectionEnd: ce + V };
2434
- }, te = function(A) {
2435
- var V = A.target, q = V.value, ce = ge(q, A, bt.event);
2436
- ce && x(A), T.current = void 0;
2437
- }, we = function(A) {
2438
- var V = A.target, q = A.key, ce = V.selectionStart, Se = V.selectionEnd, de = V.value;
2439
- de === void 0 && (de = "");
2440
- var ae;
2441
- q === "ArrowLeft" || q === "Backspace" ? ae = Math.max(ce - 1, 0) : q === "ArrowRight" ? ae = Math.min(ce + 1, de.length) : q === "Delete" && (ae = ce);
2442
- var Ie = 0;
2443
- q === "Delete" && ce === Se && (Ie = 1);
2444
- var Ee = q === "ArrowLeft" || q === "ArrowRight";
2445
- if (ae === void 0 || ce !== Se && !Ee) {
2446
- f(A), fe(V, Ie);
2447
- return;
2448
- }
2449
- var Oe = ae;
2450
- if (Ee) {
2451
- var Y = q === "ArrowLeft" ? "left" : "right";
2452
- Oe = ee(de, ae, Y), Oe !== ae && A.preventDefault();
2453
- } else q === "Delete" && !j(de[ae]) ? Oe = ee(de, ae, "right") : q === "Backspace" && !j(de[ae]) && (Oe = ee(de, ae, "left"));
2454
- Oe !== ae && K(V, Oe, de), f(A), fe(V, Ie);
2455
- }, Ce = function(A) {
2456
- var V = A.target, q = function() {
2457
- var ce = V.selectionStart, Se = V.selectionEnd, de = V.value;
2458
- if (de === void 0 && (de = ""), ce === Se) {
2459
- var ae = ee(de, ce);
2460
- ae !== ce && K(V, ae, de);
2461
- }
2462
- };
2463
- q(), requestAnimationFrame(function() {
2464
- q();
2465
- }), g(A), fe(V);
2466
- }, Ke = function(A) {
2467
- A.persist && A.persist();
2468
- var V = A.target, q = A.currentTarget;
2469
- z.current = V, R.current.focusTimeout = setTimeout(function() {
2470
- var ce = V.selectionStart, Se = V.selectionEnd, de = V.value;
2471
- de === void 0 && (de = "");
2472
- var ae = ee(de, ce);
2473
- ae !== ce && !(ce === 0 && Se === de.length) && K(V, ae, de), p(Object.assign(Object.assign({}, A), { currentTarget: q }));
2474
- }, 0);
2475
- }, U = function(A) {
2476
- z.current = null, clearTimeout(R.current.focusTimeout), clearTimeout(R.current.setCaretTimeout), h(A);
2477
- }, pe = re && Ml() ? "numeric" : void 0, _e = Object.assign({ inputMode: pe }, _, {
2478
- type: t,
2479
- value: I,
2480
- onChange: te,
2481
- onKeyDown: we,
2482
- onMouseUp: Ce,
2483
- onFocus: Ke,
2484
- onBlur: U
2485
- });
2486
- if (r === "text")
2487
- return a ? ke.createElement(ke.Fragment, null, a(I, _) || null) : ke.createElement("span", Object.assign({}, _, { ref: o }), I);
2488
- if (s) {
2489
- var at = s;
2490
- return ke.createElement(at, Object.assign({}, _e, { ref: o }));
2491
- }
2492
- return ke.createElement("input", Object.assign({}, _e, { ref: o }));
2493
- }
2494
- function er(e, t) {
2495
- var r = t.decimalScale, s = t.fixedDecimalScale, a = t.prefix;
2496
- a === void 0 && (a = "");
2497
- var o = t.suffix;
2498
- o === void 0 && (o = "");
2499
- var i = t.allowNegative, c = t.thousandsGroupStyle;
2500
- if (c === void 0 && (c = "thousand"), e === "" || e === "-")
2501
- return e;
2502
- var l = Pt(t), d = l.thousandSeparator, u = l.decimalSeparator, m = r !== 0 && e.indexOf(".") !== -1 || r && s, x = Sn(e, i), f = x.beforeDecimal, g = x.afterDecimal, p = x.addNegation;
2503
- return r !== void 0 && (g = ys(g, r, !!s)), d && (f = Tl(f, d, c)), a && (f = a + f), o && (g = g + o), p && (f = "-" + f), e = f + (m && u || "") + g, e;
2504
- }
2505
- function Pt(e) {
2506
- var t = e.decimalSeparator;
2507
- t === void 0 && (t = ".");
2508
- var r = e.thousandSeparator, s = e.allowedDecimalSeparators;
2509
- return r === !0 && (r = ","), s || (s = [t, "."]), {
2510
- decimalSeparator: t,
2511
- thousandSeparator: r,
2512
- allowedDecimalSeparators: s
2513
- };
2514
- }
2515
- function Yl(e, t) {
2516
- e === void 0 && (e = "");
2517
- var r = new RegExp("(-)"), s = new RegExp("(-)(.)*(-)"), a = r.test(e), o = s.test(e);
2518
- return e = e.replace(/-/g, ""), a && !o && t && (e = "-" + e), e;
2519
- }
2520
- function Gl(e, t) {
2521
- return new RegExp("(^-)|[0-9]|" + js(e), "g");
2522
- }
2523
- function Kl(e, t, r) {
2524
- return e === "" ? !0 : !(t != null && t.match(/\d/)) && !(r != null && r.match(/\d/)) && typeof e == "string" && !isNaN(Number(e));
2525
- }
2526
- function ql(e, t, r) {
2527
- var s;
2528
- t === void 0 && (t = Bl(e));
2529
- var a = r.allowNegative, o = r.prefix;
2530
- o === void 0 && (o = "");
2531
- var i = r.suffix;
2532
- i === void 0 && (i = "");
2533
- var c = r.decimalScale, l = t.from, d = t.to, u = d.start, m = d.end, x = Pt(r), f = x.allowedDecimalSeparators, g = x.decimalSeparator, p = e[m] === g;
2534
- if (_t(e) && (e === o || e === i) && t.lastValue === "")
2535
- return e;
2536
- if (m - u === 1 && f.indexOf(e[u]) !== -1) {
2537
- var h = c === 0 ? "" : g;
2538
- e = e.substring(0, u) + h + e.substring(u + 1, e.length);
2539
- }
2540
- var y = function(z, R, G) {
2541
- var W = !1, K = !1;
2542
- o.startsWith("-") ? W = !1 : z.startsWith("--") ? (W = !1, K = !0) : i.startsWith("-") && z.length === i.length ? W = !1 : z[0] === "-" && (W = !0);
2543
- var ee = W ? 1 : 0;
2544
- return K && (ee = 2), ee && (z = z.substring(ee), R -= ee, G -= ee), { value: z, start: R, end: G, hasNegation: W };
2545
- }, w = y(e, u, m), j = w.hasNegation;
2546
- s = w, e = s.value, u = s.start, m = s.end;
2547
- var v = y(t.lastValue, l.start, l.end), _ = v.start, k = v.end, C = v.value, I = e.substring(u, m);
2548
- e.length && C.length && (_ > C.length - i.length || k < o.length) && !(I && i.startsWith(I)) && (e = C);
2549
- var O = 0;
2550
- e.startsWith(o) ? O += o.length : u < o.length && (O = u), e = e.substring(O), m -= O;
2551
- var D = e.length, T = e.length - i.length;
2552
- e.endsWith(i) ? D = T : (m > T || m > e.length - i.length) && (D = m), e = e.substring(0, D), e = Yl(j ? "-" + e : e, a), e = (e.match(Gl(g)) || []).join("");
2553
- var $ = e.indexOf(g);
2554
- e = e.replace(new RegExp(js(g), "g"), function(z, R) {
2555
- return R === $ ? "." : "";
2556
- });
2557
- var N = Sn(e, a), M = N.beforeDecimal, re = N.afterDecimal, L = N.addNegation;
2558
- return d.end - d.start < l.end - l.start && M === "" && p && !parseFloat(re) && (e = L ? "-" : ""), e;
2559
- }
2560
- function Ql(e, t) {
2561
- var r = t.prefix;
2562
- r === void 0 && (r = "");
2563
- var s = t.suffix;
2564
- s === void 0 && (s = "");
2565
- var a = Array.from({ length: e.length + 1 }).map(function() {
2566
- return !0;
2567
- }), o = e[0] === "-";
2568
- a.fill(!1, 0, r.length + (o ? 1 : 0));
2569
- var i = e.length;
2570
- return a.fill(!1, i - s.length + 1, i + 1), a;
2571
- }
2572
- function Zl(e) {
2573
- var t = Pt(e), r = t.thousandSeparator, s = t.decimalSeparator, a = e.prefix;
2574
- a === void 0 && (a = "");
2575
- var o = e.allowNegative;
2576
- if (o === void 0 && (o = !0), r === s)
2577
- throw new Error(`
2578
- Decimal separator can't be same as thousand separator.
2579
- thousandSeparator: ` + r + ` (thousandSeparator = {true} is same as thousandSeparator = ",")
2580
- decimalSeparator: ` + s + ` (default value for decimalSeparator is .)
2581
- `);
2582
- return a.startsWith("-") && o && (console.error(`
2583
- Prefix can't start with '-' when allowNegative is true.
2584
- prefix: ` + a + `
2585
- allowNegative: ` + o + `
2586
- `), o = !1), Object.assign(Object.assign({}, e), { allowNegative: o });
2587
- }
2588
- function Jl(e) {
2589
- e = Zl(e), e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle;
2590
- var t = e.suffix, r = e.allowNegative, s = e.allowLeadingZeros, a = e.onKeyDown;
2591
- a === void 0 && (a = We);
2592
- var o = e.onBlur;
2593
- o === void 0 && (o = We);
2594
- var i = e.thousandSeparator, c = e.decimalScale, l = e.fixedDecimalScale, d = e.prefix;
2595
- d === void 0 && (d = "");
2596
- var u = e.defaultValue, m = e.value, x = e.valueIsNumericString, f = e.onValueChange, g = xs(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), p = Pt(e), h = p.decimalSeparator, y = p.allowedDecimalSeparators, w = function(L) {
2597
- return er(L, e);
2598
- }, j = function(L, z) {
2599
- return ql(L, z, e);
2600
- }, v = lt(m) ? u : m, _ = x ?? Kl(v, d, t);
2601
- lt(m) ? lt(u) || (_ = _ || typeof u == "number") : _ = _ || typeof m == "number";
2602
- var k = function(L) {
2603
- return vs(L) ? L : (typeof L == "number" && (L = ws(L)), _ && typeof c == "number" ? Jn(L, c, !!l) : L);
2604
- }, C = _s(k(m), k(u), !!_, w, j, f), I = C[0], O = I.numAsString, D = I.formattedValue, T = C[1], $ = function(L) {
2605
- var z = L.target, R = L.key, G = z.selectionStart, W = z.selectionEnd, K = z.value;
2606
- if (K === void 0 && (K = ""), (R === "Backspace" || R === "Delete") && W < d.length) {
2607
- L.preventDefault();
2608
- return;
2609
- }
2610
- if (G !== W) {
2611
- a(L);
2612
- return;
2613
- }
2614
- R === "Backspace" && K[0] === "-" && G === d.length + 1 && r && Xe(z, 1), c && l && (R === "Backspace" && K[G - 1] === h ? (Xe(z, G - 1), L.preventDefault()) : R === "Delete" && K[G] === h && L.preventDefault()), y != null && y.includes(R) && K[G] === h && Xe(z, G + 1);
2615
- var ee = i === !0 ? "," : i;
2616
- R === "Backspace" && K[G - 1] === ee && Xe(z, G - 1), R === "Delete" && K[G] === ee && Xe(z, G + 1), a(L);
2617
- }, N = function(L) {
2618
- var z = O;
2619
- if (z.match(/\d/g) || (z = ""), s || (z = Ll(z)), l && c && (z = Jn(z, c, l)), z !== O) {
2620
- var R = er(z, e);
2621
- T({
2622
- formattedValue: R,
2623
- value: z,
2624
- floatValue: parseFloat(z)
2625
- }, {
2626
- event: L,
2627
- source: bt.event
2628
- });
2629
- }
2630
- o(L);
2631
- }, M = function(L) {
2632
- return L === h ? !0 : _t(L);
2633
- }, re = function(L) {
2634
- var z = L.currentValue, R = L.lastValue, G = L.formattedValue, W = L.currentValueIndex, K = L.formattedValueIndex, ee = z[W], P = G[K], H = bs(R, z), F = H.to, ne = function(ge) {
2635
- return j(ge).indexOf(".") + d.length;
2636
- };
2637
- return m === 0 && l && c && z[F.start] === h && ne(z) < W && ne(G) > K ? !1 : W >= F.start && W < F.end && y && y.includes(ee) && P === h ? !0 : ee === P;
2638
- };
2639
- return Object.assign(Object.assign({}, g), {
2640
- value: D,
2641
- valueIsNumericString: !1,
2642
- isValidInputCharacter: M,
2643
- isCharacterSame: re,
2644
- onValueChange: T,
2645
- format: w,
2646
- removeFormatting: j,
2647
- getCaretBoundary: function(L) {
2648
- return Ql(L, e);
2649
- },
2650
- onKeyDown: $,
2651
- onBlur: N
2652
- });
2653
- }
2654
- function Cn(e) {
2655
- var t = Jl(e);
2656
- return ke.createElement(Ul, Object.assign({}, t));
2657
- }
2658
- const Nd = ({ InputContainer: e = rt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: d, showClearIcon: u, clearValue: m, className: x, step: f, noSelectOnFocus: g, decimalScale: p, numberPrefix: h, numberSuffix: y, min: w, max: j }) => {
2659
- const v = S(() => {
2660
- if (!r)
2661
- return;
2662
- const D = m ?? null;
2663
- r(D ? Number(D) : null);
2664
- }, [m, r]), _ = J(null), [k, C] = E((t == null ? void 0 : t.toString()) ?? ""), I = S((D) => {
2665
- const T = D;
2666
- r && r(T == null || T === "" ? null : Number(T));
2667
- }, [r]), O = S((D) => {
2668
- var $, N;
2669
- let T = parseFloat(((N = ($ = D.target) == null ? void 0 : $.value) == null ? void 0 : N.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
2670
- if (Number.isNaN(T) && (T = 0), !s) {
2671
- I(T.toString());
2672
- return;
2673
- }
2674
- C(T.toString()), _.current !== null && window.clearTimeout(_.current), _.current = window.setTimeout(() => {
2675
- I(T.toString());
2676
- }, s);
2677
- }, [s, I]);
2678
- return B(() => {
2679
- C(t === null ? "" : t.toString());
2680
- }, [j, w, t]), B(() => {
2681
- j !== void 0 && Number(k) > j && C(j.toString()), w !== void 0 && Number(k) < w && C(w.toString());
2682
- }, [k, j, w, C]), B(() => {
2683
- !r || t === null || (j !== void 0 && t > j && r(j), w !== void 0 && t < w && r(w));
2684
- }, [t, j, w, r]), /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: l, className: x, children: [
2685
- /* @__PURE__ */ n.jsx(Cn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: p, prefix: h, suffix: y, defaultValue: "", value: s ? k : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? a, onFocus: (D) => {
2686
- !g && D.target.select();
2687
- }, onChange: O, hidden: l, disabled: d, className: b("form-control text-end w-100", {
2688
- [`form-control-${c}`]: c
2689
- }), step: f, min: w, max: j }),
2690
- u && t !== null && r && !d && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
2691
- ] });
2692
- }, tr = [
2693
- ["D", "day"],
2694
- // ['W', 'week'],
2695
- ["M", "month"],
2696
- ["Y", "year"],
2697
- ["C", "custom"]
2698
- ], Xl = "_wrapper_qfqux_1", ec = "_lg_qfqux_7", tc = "_sm_qfqux_11", nc = "_md_qfqux_14", nr = {
2699
- wrapper: Xl,
2700
- lg: ec,
2701
- sm: tc,
2702
- md: nc
2703
- }, Dt = (e) => {
2704
- const t = new Date(e), r = Ue(t.toISOString());
2705
- t.setMonth(t.getMonth() + 1), t.setDate(t.getDate() - 1);
2706
- const s = Ue(t.toISOString());
2707
- return { from: r, to: s };
2708
- }, xt = (e) => {
2709
- const t = new Date(e), r = Ue(t.toISOString());
2710
- t.setFullYear(t.getFullYear() + 1), t.setDate(t.getDate() - 1);
2711
- const s = Ue(t.toISOString());
2712
- return { from: r, to: s };
2713
- }, rc = (e, t) => {
2714
- if (e === null || t === null)
2715
- return "C";
2716
- if (e === t)
2717
- return "D";
2718
- const r = new Date(e);
2719
- return Dt(r).to === t ? "M" : xt(r).to === t ? "Y" : (console.log(xt(r), t), "C");
2720
- }, sc = (e, t, r) => {
2721
- const s = S((i, c) => {
2722
- if (e === "C") {
2723
- r((l) => ({ ...l, [i]: c }));
2724
- return;
2725
- }
2726
- switch (i) {
2727
- case "from":
2728
- r((l) => {
2729
- if (c === null)
2730
- return l;
2731
- const d = new Date(c);
2732
- if (e === "D") {
2733
- const u = Ue(d.toISOString());
2734
- return {
2735
- from: u,
2736
- to: u
2737
- };
2738
- }
2739
- return e === "M" ? Dt(d) : e === "Y" ? xt(d) : l;
2740
- });
2741
- break;
2742
- case "to":
2743
- t("C"), r((l) => ({ ...l, [i]: c }));
2744
- break;
2745
- }
2746
- }, [e, r, t]), a = S((i) => {
2747
- r((c) => {
2748
- if (c.from === null || c.to === null)
2749
- return c;
2750
- const l = new Date(c.from);
2751
- l.setHours(l.getHours() - l.getTimezoneOffset() / 60);
2752
- const d = new Date(c.to);
2753
- if (e === "D") {
2754
- l.setDate(l.getDate() + i);
2755
- const u = Ue(l.toISOString());
2756
- return {
2757
- from: u,
2758
- to: u
2759
- };
2760
- }
2761
- return e === "M" ? (l.setMonth(l.getMonth() + i), Dt(l)) : e === "Y" ? (l.setFullYear(l.getFullYear() + i), xt(l)) : {
2762
- from: Ue(l.toISOString()),
2763
- to: Ue(d.toISOString())
2764
- };
2765
- });
2766
- }, [e, r]), o = S((i) => {
2767
- i === "D" ? r((c) => ({ from: c.from, to: c.from })) : i === "M" ? r((c) => {
2768
- if (c.from === null)
2769
- return c;
2770
- const l = xa(c.from);
2771
- return Dt(l);
2772
- }) : i === "Y" && r((c) => {
2773
- if (c.from === null)
2774
- return c;
2775
- const l = va(new Date(c.from).getFullYear());
2776
- return xt(l);
2777
- }), t(i);
2778
- }, [r, t]);
2779
- return { setFromToProp: s, handleArrowClick: a, handleRangeChange: o };
2780
- }, Sd = ({ fromtoState: [e, t], className: r, size: s }) => {
2781
- const { texts: { date: a }, ProjectIconComponent: o } = Z(he), [i, c] = E("C"), { handleArrowClick: l, handleRangeChange: d, setFromToProp: u } = sc(i, c, t), m = Q(() => i === "C", [i]), x = J(!0);
2782
- return B(() => {
2783
- if (x.current) {
2784
- const f = rc(e.from, e.to);
2785
- c(f), x.current = !1;
2786
- }
2787
- }, [e.from, e.to]), /* @__PURE__ */ n.jsxs("div", { className: b("d-inline-flex align-items-center gap-1", nr.wrapper, nr[s ?? "md"], r), children: [
2788
- /* @__PURE__ */ n.jsx(se, { disabled: m, onClick: () => {
2789
- l(-1);
2790
- }, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-left" }) }),
2791
- /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
2792
- /* @__PURE__ */ n.jsx(it, { type: "date", value: e.from, onChange: (f) => u("from", f === null ? null : f.toString()), InputContainer: Fe, size: s }),
2793
- /* @__PURE__ */ n.jsx(pn, { toggle: /* @__PURE__ */ n.jsx(xn, { text: a[tr.find((f) => f[0] === i)[1]].substring(0, 1), as: ja }), children: tr.map((f) => /* @__PURE__ */ n.jsx(et, { disabled: f[0] === i, className: b(f[0] === i ? "text-black-50" : ""), onClick: () => d(f[0]), role: "button", children: a[f[1]] }, f[0])) }),
2794
- /* @__PURE__ */ n.jsx(it, { type: "date", value: e.to, onChange: (f) => u("to", f === null ? null : f.toString()), InputContainer: Fe, size: s })
2795
- ] }) }),
2796
- /* @__PURE__ */ n.jsx(se, { disabled: m, onClick: () => {
2797
- l(1);
2798
- }, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-right" }) })
2799
- ] });
2800
- }, Cd = ({ defaultMonth: e, searchKey: t = "monthFrom", yearMin: r, yearMax: s }) => {
2801
- const { localizationContext: a } = Z(he), { dateFnsLocale: o } = Z(a), { searchParams: i, setSearch: c } = Aa(), l = i.get(t), d = l ? yt(l) : e, u = S((m) => {
2802
- c(t, on(m, { representation: "date" }));
2803
- }, [t, c]);
2804
- return /* @__PURE__ */ n.jsx(jo, { month: d, onChangeMonth: u, locale: o, yearMin: r, yearMax: s });
2805
- }, kd = ({ defaultYear: e, searchKey: t = "yearFrom", optionMin: r, optionMax: s, className: a }) => {
2806
- const [o, i] = Ma(t, on(e, { representation: "date" })), c = o ? yt(o) : e, l = S((d) => {
2807
- i(on(d, { representation: "date" }));
2808
- }, [i]);
2809
- return /* @__PURE__ */ n.jsx(bo, { year: c, onChangeYear: l, optionMin: r, optionMax: s, className: a });
2810
- }, Id = ({ data: e, showLegend: t = !1, legendPosition: r = "left", onClick: s }) => {
2811
- const { chartColorPalette: a } = Z(he);
2812
- return /* @__PURE__ */ n.jsx(ya, { data: e, margin: {
2813
- top: 50,
2814
- right: t && r === "right" ? 200 : 100,
2815
- bottom: 50,
2816
- left: t && r === "left" ? 200 : 100
2817
- }, innerRadius: 0.4, padAngle: 4, cornerRadius: 2, activeOuterRadiusOffset: 10, borderWidth: 2, borderColor: {
2818
- from: "color",
2819
- modifiers: [["darker", 0.5]]
2820
- }, colors: a, arcLinkLabelsSkipAngle: 10, arcLinkLabelsTextColor: { from: "color", modifiers: [["darker", 0.5]] }, arcLinkLabelsThickness: 2, arcLinkLabelsColor: { from: "color" }, enableArcLabels: !1, legends: t ? [
2821
- {
2822
- anchor: r,
2823
- direction: r === "left" || r === "right" ? "column" : "row",
2824
- justify: !1,
2825
- translateX: r === "left" ? -200 : r === "right" ? 200 : 0,
2826
- translateY: r === "top" ? -50 : r === "bottom" ? 50 : 0,
2827
- itemsSpacing: 4,
2828
- itemWidth: 120,
2829
- itemHeight: 18,
2830
- itemTextColor: "#1e2832",
2831
- itemDirection: "left-to-right",
2832
- itemOpacity: 1,
2833
- symbolSize: 18,
2834
- symbolShape: "circle",
2835
- padding: 10
2836
- }
2837
- ] : [], onClick: (o) => s && s(o.data) });
2838
- }, ac = ({ errors: e, schema: t }) => {
2839
- const r = (s) => {
2840
- var a, o;
2841
- return s.toLowerCase() === "others" ? "Obecné" : ((o = (a = t.columns) == null ? void 0 : a.find((i) => i.field === s)) == null ? void 0 : o.caption) ?? s;
2842
- };
2843
- return /* @__PURE__ */ n.jsx("div", { className: "alert alert-danger w-100 m-0 p-2", children: /* @__PURE__ */ n.jsx("table", { children: /* @__PURE__ */ n.jsx("tbody", { children: e.map((s) => /* @__PURE__ */ n.jsxs("tr", { children: [
2844
- /* @__PURE__ */ n.jsx("td", { className: "fw-bold pe-2", children: /* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
2845
- r(s.name),
2846
- ":"
2847
- ] }) }),
2848
- /* @__PURE__ */ n.jsx("td", { className: "", children: /* @__PURE__ */ n.jsx(X, { variant: "body", children: s.errors }) })
2849
- ] }, s.name)) }) }) });
2850
- }, Ns = (e) => {
2851
- const t = {};
2852
- return Object.keys(e).forEach((r) => {
2853
- if (e[r].value === !0) {
2854
- t[r] = 1;
2855
- return;
2856
- }
2857
- if (e[r].value === !1) {
2858
- t[r] = 0;
2859
- return;
2860
- }
2861
- t[r] = e[r].value;
2862
- }), t;
2863
- }, rr = (e, t) => {
2864
- const r = {};
2865
- return Object.keys(e).forEach((s) => {
2866
- var i;
2867
- const a = e[s], o = (i = t.columns) == null ? void 0 : i.find((c) => c.field === s);
2868
- if ((o == null ? void 0 : o.type) === "BIT" && (a === 1 || a === 0)) {
2869
- r[s] = { value: a === 1, defaultValue: a === 1 };
2870
- return;
2871
- }
2872
- r[s] = { value: a, defaultValue: a };
2873
- }), r;
2874
- }, oc = "_table_1klfy_1", ic = "_table-header_1klfy_10", lc = "_table-row_1klfy_10", cc = "_table-head_1klfy_10", dc = "_filters-row_1klfy_19", uc = "_table-body_1klfy_30", fc = "_table-cell_1klfy_30", mc = "_action-column_1klfy_43", hc = "_sticky-top_1klfy_47", gc = "_sticky-first_1klfy_54", pc = "_sticky-last_1klfy_61", xc = "_sticky-bottom_1klfy_68", ue = {
2875
- table: oc,
2876
- "table-header": "_table-header_1klfy_10",
2877
- tableHeader: ic,
2878
- "table-row": "_table-row_1klfy_10",
2879
- tableRow: lc,
2880
- "table-head": "_table-head_1klfy_10",
2881
- tableHead: cc,
2882
- "filters-row": "_filters-row_1klfy_19",
2883
- filtersRow: dc,
2884
- "table-body": "_table-body_1klfy_30",
2885
- tableBody: uc,
2886
- "table-cell": "_table-cell_1klfy_30",
2887
- tableCell: fc,
2888
- "action-column": "_action-column_1klfy_43",
2889
- actionColumn: mc,
2890
- "sticky-top": "_sticky-top_1klfy_47",
2891
- stickyTop: hc,
2892
- "sticky-first": "_sticky-first_1klfy_54",
2893
- stickyFirst: gc,
2894
- "sticky-last": "_sticky-last_1klfy_61",
2895
- stickyLast: pc,
2896
- "sticky-bottom": "_sticky-bottom_1klfy_68",
2897
- stickyBottom: xc
2898
- }, vc = "_input_pxkkh_1", Re = {
2899
- input: vc
2900
- }, Ss = ({ type: e, value: t, field: r, isPrimary: s, isReadonly: a, primaryEditable: o = !1, valuesForSelect: i, addValueToValuesForSelect: c, onChangeHandler: l, hideClearIcon: d, clearValue: u, customPickers: m }) => {
2901
- var x;
2902
- switch (e) {
2903
- case "NUM":
2904
- return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Tt, { withoutLabel: !0, InputContainer: Fe, className: Re.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, f === null ? null : Number(f)), options: i, disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Fe, className: Re.input, size: "sm", type: "number", value: t === null ? null : Number(t), onChange: (f) => l(r, f === null ? null : Number(f)), disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u });
2905
- case "STR":
2906
- return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Tt, { withoutLabel: !0, InputContainer: Fe, className: Re.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), options: i, disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Fe, className: b(Re.input, Re.longer), size: "sm", type: "text", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u });
2907
- case "BIT":
2908
- return /* @__PURE__ */ n.jsx(ps, { InputContainer: Fe, className: Re.input, value: t === !0, onChange: (f) => l(r, f), disabled: a || o ? !1 : s });
2909
- case "DT":
2910
- return /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Fe, className: Re.input, size: "sm", type: "date", value: t ? t.toString().split("T")[0] ?? "" : "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u });
2911
- default: {
2912
- const f = m == null ? void 0 : m.find((g) => g.type === e);
2913
- return f ? /* @__PURE__ */ n.jsx(f.picker, { className: b(Re.input, Re.longer), value: t ? {
2914
- id: (t == null ? void 0 : t.toString()) ?? null,
2915
- name: ((x = i == null ? void 0 : i.find((g) => {
2916
- var p;
2917
- return ((p = g.id) == null ? void 0 : p.toString()) === (t == null ? void 0 : t.toString());
2918
- })) == null ? void 0 : x.name) ?? ""
2919
- } : null, onChange: (g) => {
2920
- var p;
2921
- l(r, (g == null ? void 0 : g.id) ?? null), console.log(g, i == null ? void 0 : i.some((h) => {
2922
- var y, w;
2923
- return ((y = h.id) == null ? void 0 : y.toString()) === ((w = g == null ? void 0 : g.id) == null ? void 0 : w.toString());
2924
- }), c), g && !(i != null && i.some((h) => {
2925
- var y, w;
2926
- return ((y = h.id) == null ? void 0 : y.toString()) === ((w = g == null ? void 0 : g.id) == null ? void 0 : w.toString());
2927
- })) && c && (console.log("adding to values for select"), c({ id: ((p = g.id) == null ? void 0 : p.toString()) ?? "", name: g.name }));
2928
- }, disabled: a || o ? !1 : s }) : /* @__PURE__ */ n.jsx("div", { className: "alert alert-warning p-1 m-0", children: /* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
2929
- "Neznámý typ ",
2930
- e
2931
- ] }) });
2932
- }
2933
- }
2934
- }, jc = ({ schema: e, columns: t, setColumns: r, initialItem: s, onEdit: a, onDelete: o, customPickers: i }) => {
2935
- const { ProjectIconComponent: c } = Z(he), [l, d] = E(s), u = S((f, g) => {
2936
- console.log("changeValue", f, g), d((p) => ({
2937
- ...p,
2938
- [f]: {
2939
- ...p[f],
2940
- value: g
2941
- }
2942
- }));
2943
- }, []), m = (f) => (f == null ? void 0 : f.value) !== (f == null ? void 0 : f.defaultValue), x = S(() => Object.keys(l).some((f) => m(l[f])), [l]);
2944
- return B(() => {
2945
- d(s);
2946
- }, [s]), /* @__PURE__ */ n.jsxs("tr", { className: b("table-row", ue.tableRow), children: [
2947
- /* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell, ue.stickyFirst), children: x() && /* @__PURE__ */ n.jsx(se, { color: "success", onClick: () => a(Ns(l)), children: /* @__PURE__ */ n.jsx(c, { icon: "check" }) }) }),
2948
- t.map((f) => {
2949
- var g, p;
2950
- return /* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell), children: /* @__PURE__ */ n.jsx(Ss, { type: f.type, value: (g = l[f.field ?? ""]) == null ? void 0 : g.value, field: f.field, isReadonly: f.readOnly, isPrimary: e.primaryKey === f.field, valuesForSelect: f.valuesForSelect, addValueToValuesForSelect: (h) => {
2951
- r(t.map((y) => y.field === f.field ? { ...y, valuesForSelect: [...y.valuesForSelect ?? [], h] } : y));
2952
- }, onChangeHandler: u, hideClearIcon: !m(l[f.field ?? ""]), clearValue: (p = l[f.field ?? ""].defaultValue) == null ? void 0 : p.toString(), customPickers: i }) }, `${e.id}-${f.field}`);
2953
- }),
2954
- /* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell, ue.stickyLast), children: /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => o(l[e.primaryKey ?? ""].value), children: /* @__PURE__ */ n.jsx(c, { icon: "delete" }) }) })
2955
- ] });
2956
- }, yc = ({ schema: e, columns: t, setColumns: r, onCreate: s, customPickers: a }) => {
2957
- const { ProjectIconComponent: o } = Z(he), [i, c] = E(null), l = S(() => {
2958
- var m;
2959
- const u = {};
2960
- (m = e.columns) == null || m.forEach((x) => {
2961
- const f = x.type === "BIT" ? !1 : x.type === "NUM" ? 0 : x.type === "STR" ? "" : null;
2962
- u[x.field ?? ""] = {
2963
- value: f,
2964
- defaultValue: f
2965
- };
2966
- }), c(u);
2967
- }, [e]), d = S((u, m) => {
2968
- c((x) => x && {
2969
- ...x,
2970
- [u]: {
2971
- ...x[u],
2972
- value: m
2973
- }
2974
- });
2975
- }, []);
2976
- return i ? /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
2977
- /* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(se, { color: "success", onClick: async () => {
2978
- const u = Ns(i);
2979
- u && await s(u) && c(null);
2980
- }, children: /* @__PURE__ */ n.jsx(o, { icon: "check" }) }) }),
2981
- t.map((u) => /* @__PURE__ */ n.jsx("td", { children: /* @__PURE__ */ n.jsx(Ss, { type: u.type, value: i[u.field ?? ""].value, field: u.field, isReadonly: u.readOnly, isPrimary: e.primaryKey === u.field, valuesForSelect: u.valuesForSelect, addValueToValuesForSelect: (m) => {
2982
- r(t.map((x) => x.field === u.field ? { ...x, valuesForSelect: [...x.valuesForSelect ?? [], m] } : x));
2983
- }, onChangeHandler: d, primaryEditable: !0, customPickers: a }) }, `${e.id}-${u.field}`)),
2984
- /* @__PURE__ */ n.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => c(null), children: /* @__PURE__ */ n.jsx(o, { icon: "cancel" }) }) })
2985
- ] }) : /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
2986
- /* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(se, { onClick: l, children: /* @__PURE__ */ n.jsx(o, { icon: "add" }) }) }),
2987
- /* @__PURE__ */ n.jsx("td", { colSpan: t.length + 1 })
2988
- ] });
2989
- }, wc = "_resizer_ref0b_1", bc = "_content_ref0b_11", _c = "_dragging_ref0b_16", Ct = {
2990
- resizer: wc,
2991
- content: bc,
2992
- dragging: _c
2993
- }, Nc = ({ cellRef: e, defaultWidth: t }) => {
2994
- const [r, s] = E(t), [, a] = E(null);
2995
- return B(() => {
2996
- s(t);
2997
- }, [t]), B(() => {
2998
- e.current && (e.current.style.minWidth = `${r}px`);
2999
- }, [r, e]), /* @__PURE__ */ n.jsx("div", { className: b("luminus-column-resizer", Ct.resizer), draggable: !0, onDragStart: (o) => {
3000
- a(o.currentTarget.getBoundingClientRect().x), o.currentTarget.classList.add(Ct.dragging);
3001
- }, onDrag: (o) => {
3002
- a((i) => (e.current && s((c) => c + o.clientX - (i ?? 0)), o.clientX));
3003
- }, onDragEnd: (o) => {
3004
- a(null), o.currentTarget.classList.remove(Ct.dragging);
3005
- }, children: /* @__PURE__ */ n.jsx("div", { className: b("content", Ct.content) }) });
3006
- }, Sc = ({ column: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(Bt, { placement: "bottom", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Cc = ({ column: e, sortByField: t, sortByType: r, setSortBy: s }) => {
3007
- const { ProjectIconComponent: a } = Z(he), o = J(null), i = Q(() => {
3008
- if (e.valuesForSelect && e.valuesForSelect.length > 0)
3009
- return 200;
3010
- switch (e.type) {
3011
- case "NUM":
3012
- return 80;
3013
- case "STR":
3014
- return 200;
3015
- case "BIT":
3016
- return 50;
3017
- case "DT":
3018
- return 100;
3019
- default:
3020
- return 100;
3021
- }
3022
- }, [e.type, e.valuesForSelect]);
3023
- return /* @__PURE__ */ n.jsxs("th", { ref: o, className: b("table-head", ue.tableHead), onClick: () => {
3024
- const c = t === e.field ? r : null;
3025
- if (c === "asc") {
3026
- s(e.field, "desc");
3027
- return;
3028
- }
3029
- if (c === "desc") {
3030
- s(e.field, null);
3031
- return;
3032
- }
3033
- s(e.field, "asc");
3034
- }, children: [
3035
- /* @__PURE__ */ n.jsx(Sc, { column: e, children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
3036
- e.label,
3037
- t === e.field && /* @__PURE__ */ n.jsx(a, { icon: r === "asc" ? "chevron-up" : "chevron-down" })
3038
- ] }) }),
3039
- /* @__PURE__ */ n.jsx(Nc, { cellRef: o, defaultWidth: i })
3040
- ] });
3041
- }, kc = ({ schema: e, items: t, onEditItem: r, onDeleteItem: s, onCreateItem: a, filters: o, setFilter: i, sortByField: c, sortByType: l, setSortBy: d, selectedMaster: u, customPickers: m }) => {
3042
- const { texts: { dynamicForms: x } } = Z(he), [f, g] = E([]);
3043
- return B(() => {
3044
- var p, h, y;
3045
- g([
3046
- ...((y = (h = (p = e.columns) == null ? void 0 : p.filter((w) => !w.hidden)) == null ? void 0 : h.filter((w) => e.masterReference ? w.field !== e.masterReferenceColumn : !0)) == null ? void 0 : y.map((w) => {
3047
- var j;
3048
- return {
3049
- label: w.caption ?? "",
3050
- width: 100,
3051
- description: w.description ?? null,
3052
- field: w.field ?? "",
3053
- type: w.type,
3054
- readOnly: w.readOnly,
3055
- valuesForSelect: ((j = w.values) == null ? void 0 : j.filter((v) => w.valuesFilteredByMaster ? v.masterValue === u : !0).map((v) => ({ id: v.id ?? "", name: v.name }))) ?? void 0
3056
- };
3057
- })) ?? []
3058
- ]);
3059
- }, [e, u]), /* @__PURE__ */ n.jsxs("table", { id: `dynamic-table-${e.id}`, className: b("table table-borderless luminus-df-table", ue.table), children: [
3060
- /* @__PURE__ */ n.jsxs("thead", { className: b("text-nowrap table-header", ue.stickyTop, ue.tableHeader), children: [
3061
- /* @__PURE__ */ n.jsxs("tr", { className: b("table-row", ue.tableRow), children: [
3062
- /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
3063
- f.map((p) => /* @__PURE__ */ n.jsx(Cc, { column: p, sortByField: c, sortByType: l, setSortBy: d }, `${e.id}-${p.field}`)),
3064
- /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
3065
- ] }),
3066
- /* @__PURE__ */ n.jsxs("tr", { className: b("table-row filters-row", ue.tableRow, ue.filtersRow), children: [
3067
- /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
3068
- f.map((p) => /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead), children: p.valuesForSelect && p.valuesForSelect.length > 0 || p.type === "BIT" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(Tt, { InputContainer: Fe, withoutLabel: !0, size: "sm", value: o[p.field] ?? "", onChange: (h) => i(p.field, (h == null ? void 0 : h.toString()) ?? null), options: p.type === "BIT" ? [
3069
- { id: 1, name: x.yes },
3070
- { id: 0, name: x.no }
3071
- ] : p.valuesForSelect ?? [], isNumber: p.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(it, { InputContainer: Fe, withoutLabel: !0, size: "sm", type: p.type === "NUM" ? "number" : p.type === "DT" ? "date" : "text", value: o[p.field] ?? "", onChange: (h) => i(p.field, (h == null ? void 0 : h.toString()) ?? null) }) }) }, `${e.id}-${p.field}`)),
3072
- /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
3073
- ] })
3074
- ] }),
3075
- /* @__PURE__ */ n.jsxs("tbody", { className: b("table-body", ue.tableBody), children: [
3076
- t.filter((p) => p[e.primaryKey ?? ""]).map((p) => /* @__PURE__ */ n.jsx(jc, { schema: e, columns: f, setColumns: g, initialItem: p, onEdit: r, onDelete: s, customPickers: m }, `${e.id}-${p[e.primaryKey ?? ""].value}`)),
3077
- /* @__PURE__ */ n.jsx(yc, { schema: e, columns: f, setColumns: g, onCreate: a, customPickers: m })
3078
- ] })
3079
- ] });
3080
- }, Ic = ({ master: e, onChange: t, options: r, label: s }) => /* @__PURE__ */ n.jsx("div", { style: { minWidth: "200px" }, children: /* @__PURE__ */ n.jsx(Tt, { label: s, value: e, onChange: (a) => t(a ? a.toString() : null), options: r, size: "sm" }) }), Dc = "_pagination_gujwe_1", sr = {
3081
- pagination: Dc
3082
- }, ar = {
3083
- appDetail: "/settings/:id"
3084
- }, ot = {
3085
- apiSchemaGet: "/dynamicForms/schema",
3086
- apiDataGet: "/dynamicForms/data",
3087
- apiItemPost: "/dynamicForms/update",
3088
- apiItemDelete: "/dynamicForms/delete",
3089
- apiItemCreate: "/dynamicForms/insert"
3090
- }, Dd = ({ id: e, page: t, setPage: r, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: c, appUrls: { appDetail: l = ar.appDetail } = ar, apiUrls: { apiSchemaGet: d = ot.apiSchemaGet, apiDataGet: u = ot.apiDataGet, apiItemPost: m = ot.apiItemPost, apiItemDelete: x = ot.apiItemDelete, apiItemCreate: f = ot.apiItemCreate } = ot, customPickers: g }) => {
3091
- var Se, de, ae, Ie, Ee, Oe;
3092
- const { texts: { dynamicForms: p }, ProjectIconComponent: h } = Z(he), y = nt(), { startLoading: w, stopLoading: j } = Z(At), [v, _] = E(null), [k, C] = E(null), [I, O] = E(null), [D, T] = E(null), [$, N] = E(!1), { addNotification: M } = Ir(), [re, L] = E([]), { confirm: z } = Mt(), R = 20, G = R + 1, W = D ? Math.ceil(D.length / R) : 1, K = t ? t > 1 : !1, ee = t ? t < W : !1, P = t ? (t - 1) * R : 0, H = t ? t * R : R, [F, ne] = E(!1), ge = F ? D == null ? void 0 : D.slice(P, H) : D, [fe, te] = E(null);
3093
- B(() => {
3094
- _(null), C(null), N(!1), L([]), te(null);
3095
- }, [e]);
3096
- const we = S(async () => {
3097
- w("dynamicFormSchema"), await y.get(`${d}?id=${e}`).then(({ data: Y }) => {
3098
- _(Y), j("dynamicFormSchema");
3099
- }).catch(() => j("dynamicFormSchema"));
3100
- }, [y, e, w, j, d]), Ce = S(async () => {
3101
- var Y;
3102
- if (!(v === null || ((Y = v.id) == null ? void 0 : Y.toString()) !== e)) {
3103
- if (v.masterReference && !fe) {
3104
- C([]);
3105
- return;
3106
- }
3107
- w("dynamicFormData"), await y.get(`${u}?id=${e}&showArchive=${$}${v.masterReference ? `&master=${fe}` : ""}`).then(({ data: le }) => {
3108
- const xe = le.map((ie) => {
3109
- var ve;
3110
- return Object.fromEntries(((ve = v.columns) == null ? void 0 : ve.filter((be) => be.field).map((be) => [
3111
- be.field,
3112
- { value: ie[be.field ?? ""], defaultValue: ie[be.field ?? ""] }
3113
- ])) ?? []);
3114
- });
3115
- C(xe), j("dynamicFormData");
3116
- }).catch(() => j("dynamicFormData"));
3117
- }
3118
- }, [y, e, v, w, j, $, fe, u]), Ke = S(async (Y) => (w("dynamicFormEdit"), y.post(`${m}?id=${e}`, Y).then(() => (j("dynamicFormEdit"), L([]), !0)).catch((le) => (j("dynamicFormEdit"), L(Ut(le)), !1))), [y, e, w, j, m]), U = S(async (Y) => (w("dynamicFormDelete"), y.delete(`${x}?id=${e}&pk=${Y}`).then(() => (j("dynamicFormDelete"), L([]), !0)).catch((le) => (j("dynamicFormDelete"), L(Ut(le)), !1))), [y, e, w, j, x]), pe = S(async (Y) => (w("dynamicFormCreate"), y.post(`${f}?id=${e}`, Y).then(({ data: le }) => (j("dynamicFormCreate"), L([]), le)).catch((le) => (j("dynamicFormCreate"), L(Ut(le)), null))), [y, e, w, j, f]), _e = S(async (Y) => {
3119
- v && await Ke(v.masterReference ? { ...Y, [v.masterReferenceColumn ?? ""]: fe } : Y) && (M(p.editSuccess, "success"), C((le) => le && le.map((xe) => {
3120
- var ie;
3121
- return ((ie = xe[(v == null ? void 0 : v.primaryKey) ?? ""]) == null ? void 0 : ie.value) === Y[(v == null ? void 0 : v.primaryKey) ?? ""] ? rr(Y, v) : xe;
3122
- })));
3123
- }, [M, Ke, v, fe, p]), at = S(async (Y) => {
3124
- await z(p.deleteConfirm) && await U(Y) && (M(p.deleteSuccess, "success"), C((le) => le && le.filter((xe) => {
3125
- var ie;
3126
- return ((ie = xe[(v == null ? void 0 : v.primaryKey) ?? ""]) == null ? void 0 : ie.value) !== Y;
3127
- })));
3128
- }, [M, U, p, z, v]), A = S(async (Y) => {
3129
- if (!v)
3130
- return !1;
3131
- const le = await pe(v.masterReference ? { ...Y, [v.masterReferenceColumn ?? ""]: fe } : Y);
3132
- if (le !== null) {
3133
- M(p.createSuccess, "success");
3134
- const xe = rr(Y, v);
3135
- return xe[(v == null ? void 0 : v.primaryKey) ?? ""] = { value: le, defaultValue: le }, C((ie) => [...ie ?? [], xe]), !0;
3136
- }
3137
- return !1;
3138
- }, [M, pe, p, v, fe]), V = (Y) => {
3139
- Y > W ? r(W) : Y < 1 && r(1), r(Y);
3140
- }, q = S(() => {
3141
- if (!k || !v) {
3142
- O(null);
3143
- return;
3144
- }
3145
- const Y = k.filter((le) => Object.entries(s).every(([xe, ie]) => {
3146
- var ut, ft, mt;
3147
- if (ie === null)
3148
- return !0;
3149
- const ve = (ut = le[xe]) == null ? void 0 : ut.value;
3150
- if (ve == null)
3151
- return !1;
3152
- const be = (ft = v.columns) == null ? void 0 : ft.find((Nt) => Nt.field === xe), ct = be == null ? void 0 : be.type, dt = (be == null ? void 0 : be.values) && ((mt = be == null ? void 0 : be.values) == null ? void 0 : mt.length) > 0;
3153
- if (!ct)
3154
- return !1;
3155
- switch (ct) {
3156
- case "STR":
3157
- return dt ? ve === ie : ve.toString().toLowerCase().includes(ie.toLowerCase());
3158
- case "NUM":
3159
- return dt ? Number(ve) === Number(ie) : ve.toString().toLowerCase().includes(ie.toLowerCase());
3160
- case "DT":
3161
- return ve.toString().toLowerCase().includes(ie.toLowerCase());
3162
- case "BIT":
3163
- return Number(ve) === Number(ie);
3164
- default:
3165
- return ve.toString().toLowerCase().includes(ie.toLowerCase());
3166
- }
3167
- }));
3168
- O(Y);
3169
- }, [k, s, v]), ce = S(() => {
3170
- if (!I || !v) {
3171
- T([]);
3172
- return;
3173
- }
3174
- if (!o) {
3175
- T(I);
3176
- return;
3177
- }
3178
- T([...I].sort((Y, le) => {
3179
- var ct, dt, ut, ft, mt, Nt;
3180
- const xe = ((dt = (ct = Y[o]) == null ? void 0 : ct.value) == null ? void 0 : dt.toString()) ?? "", ie = ((ft = (ut = le[o]) == null ? void 0 : ut.value) == null ? void 0 : ft.toString()) ?? "", ve = v.columns.find((Te) => Te.field === o), be = ve == null ? void 0 : ve.type;
3181
- if (!ve || !be || !xe && !ie)
3182
- return 0;
3183
- if (!xe)
3184
- return 1;
3185
- if (!ie)
3186
- return -1;
3187
- if (ve.values && ve.values.length > 0) {
3188
- const Te = ((mt = ve.values.find((Wt) => {
3189
- var ht;
3190
- return ((ht = Wt.id) == null ? void 0 : ht.toString()) === xe;
3191
- })) == null ? void 0 : mt.name) ?? "", Be = ((Nt = ve.values.find((Wt) => {
3192
- var ht;
3193
- return ((ht = Wt.id) == null ? void 0 : ht.toString()) === ie;
3194
- })) == null ? void 0 : Nt.name) ?? "";
3195
- return i === "asc" ? Te.localeCompare(Be) : Be.localeCompare(Te);
3196
- }
3197
- if (be === "NUM") {
3198
- const Te = Number(xe), Be = Number(ie);
3199
- return i === "asc" ? Te - Be : Be - Te;
3200
- }
3201
- if (be === "DT") {
3202
- const Te = yt(xe == null ? void 0 : xe.toString()).getTime(), Be = yt(ie == null ? void 0 : ie.toString()).getTime();
3203
- return i === "asc" ? Te - Be : Be - Te;
3204
- }
3205
- return i === "asc" ? xe.toString().localeCompare(ie.toString()) : ie.toString().localeCompare(xe.toString());
3206
- }));
3207
- }, [I, v, o, i]);
3208
- return B(() => {
3209
- we();
3210
- }, [we]), B(() => {
3211
- Ce();
3212
- }, [Ce]), B(() => {
3213
- q();
3214
- }, [q]), B(() => {
3215
- ce();
3216
- }, [ce]), B(() => {
3217
- D && D.length > G ? (ne(!0), t || r(1)) : (ne(!1), D && r(null));
3218
- }, [D, r, t, G]), B(() => {
3219
- !F || !t || (t > W && r(W), t < 1 && r(1));
3220
- }, [t, F, W, r]), /* @__PURE__ */ n.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
3221
- /* @__PURE__ */ n.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-center", children: [
3222
- /* @__PURE__ */ n.jsx(X, { variant: "h3", children: (v == null ? void 0 : v.name) ?? "" }),
3223
- /* @__PURE__ */ n.jsx(ps, { label: p.showArchived, value: $ === !0, onChange: (Y) => N(Y) })
3224
- ] }),
3225
- (v == null ? void 0 : v.description) && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "mb-3", children: v == null ? void 0 : v.description }),
3226
- (v == null ? void 0 : v.masterReference) && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex", children: /* @__PURE__ */ n.jsx(Ic, { label: ((de = (Se = v.columns) == null ? void 0 : Se.find((Y) => Y.field === v.masterReferenceColumn)) == null ? void 0 : de.caption) ?? "", options: ((Ie = (ae = v.columns) == null ? void 0 : ae.find((Y) => Y.field === v.masterReferenceColumn)) == null ? void 0 : Ie.values) ?? [], master: fe, onChange: (Y) => te(Y) }) }),
3227
- (v == null ? void 0 : v.slaves) && v.slaves.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex align-items-center flex-start gap-1", children: v.slaves.map((Y) => {
3228
- var le;
3229
- return /* @__PURE__ */ n.jsx(Ae, { as: "link", href: `${Et(l, { id: (le = Y.id) == null ? void 0 : le.toString() })}?type=dynamic-form`, children: Y.name }, Y.id);
3230
- }) }),
3231
- v != null && v.masterReference && !fe ? /* @__PURE__ */ n.jsx(Nn, { variant: "warning", children: p.selectMaster(((Oe = (Ee = v.columns) == null ? void 0 : Ee.find((Y) => Y.field === v.masterReferenceColumn)) == null ? void 0 : Oe.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3232
- v && re.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-2", children: /* @__PURE__ */ n.jsx(ac, { errors: re, schema: v }) }),
3233
- v && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3234
- /* @__PURE__ */ n.jsx("div", { className: b("rounded border overflow-auto", sr.tableContainer), children: /* @__PURE__ */ n.jsx(kc, { schema: v, items: (F ? ge : D) ?? [], onEditItem: _e, onDeleteItem: at, onCreateItem: A, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: c, selectedMaster: (fe == null ? void 0 : fe.toString()) ?? null, customPickers: g }) }),
3235
- F && t && /* @__PURE__ */ n.jsxs("div", { className: b(sr.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
3236
- /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
3237
- /* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(1), disabled: !K, children: /* @__PURE__ */ n.jsx(h, { icon: "chevron-double-left" }) }),
3238
- /* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(t - 1), disabled: !K, children: /* @__PURE__ */ n.jsx(h, { icon: "chevron-left" }) }),
3239
- /* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(t + 1), disabled: !ee, children: /* @__PURE__ */ n.jsx(h, { icon: "chevron-right" }) }),
3240
- /* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(W), disabled: !ee, children: /* @__PURE__ */ n.jsx(h, { icon: "chevron-double-right" }) })
3241
- ] }),
3242
- /* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
3243
- p.tablePage,
3244
- " ",
3245
- t,
3246
- " ",
3247
- p.tablePageFrom,
3248
- " ",
3249
- W
3250
- ] })
3251
- ] })
3252
- ] })
3253
- ] })
3254
- ] });
3255
- }, or = {
3256
- appDetail: "/settings/:id"
3257
- }, ir = {
3258
- apiDynamicFormsGet: "/dynamicForms"
3259
- }, $c = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(Bt, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), $d = ({ activeId: e, otherForms: t = [], groupsDefs: r = [], searchQuery: s, fullSize: a, appUrls: { appDetail: o = or.appDetail } = or, apiUrls: { apiDynamicFormsGet: i = ir.apiDynamicFormsGet } = ir }) => {
3260
- const c = nt(), { startLoading: l, stopLoading: d } = Z(At), [u, m] = E(null), x = Q(() => [
3261
- ...(u == null ? void 0 : u.map((p) => ({
3262
- ...p,
3263
- type: "dynamic-form"
3264
- }))) ?? [],
3265
- ...t
3266
- ].filter((p) => wt(p.name, s) || wt(p.description, s)).sort((p, h) => (p.name ?? "").localeCompare(h.name ?? "")) ?? [], [u, t, s]), f = Q(() => r.map((p) => ({
3267
- id: p.id,
3268
- name: p.name ?? "",
3269
- items: x.filter((h) => h.group === p.id)
3270
- })).filter((p) => p.items.length > 0), [r, x]), g = S(async () => {
3271
- l("dynamicForms"), await c.get(i).then(({ data: p }) => {
3272
- m(p), d("dynamicForms");
3273
- }).catch(() => d("dynamicForms"));
3274
- }, [c, l, d, i]);
3275
- return B(() => {
3276
- !u && g();
3277
- }, [g, u]), x.length > 0 ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: f.map((p) => /* @__PURE__ */ n.jsx(cn, { title: p.name, defaultOpen: !0, children: p.items.map((h) => {
3278
- var y, w, j, v;
3279
- return a ? /* @__PURE__ */ n.jsxs(tt, { to: `${Et(o, { id: (y = h.id) == null ? void 0 : y.toString() })}?type=${h.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((w = h.id) == null ? void 0 : w.toString()) ? "active" : ""}`, children: [
3280
- /* @__PURE__ */ n.jsx(X, { variant: "body", children: h.name }),
3281
- h.description && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "text-muted mt-2", children: h.description })
3282
- ] }, h.id) : /* @__PURE__ */ n.jsx($c, { item: h, children: /* @__PURE__ */ n.jsx(tt, { to: `${Et(o, { id: (j = h.id) == null ? void 0 : j.toString() })}?type=${h.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((v = h.id) == null ? void 0 : v.toString()) ? "active" : ""}`, children: /* @__PURE__ */ n.jsx(X, { variant: "body2", children: h.name }) }) }, h.id);
3283
- }) }, p.id)) }) }) : null;
3284
- }, Ed = ({ label: e, to: t, value: r }) => /* @__PURE__ */ n.jsxs(Ye, { label: e, children: [
3285
- /* @__PURE__ */ n.jsx("input", { disabled: !0, className: "form-control d-none" }),
3286
- t ? /* @__PURE__ */ n.jsx(tt, { to: t, className: "border-bottom luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: r }) : /* @__PURE__ */ n.jsx("div", { className: "luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: r })
3287
- ] }), Od = () => {
3288
- const { localizationContext: e } = Z(he), { language: t, setLanguage: r } = Z(e), s = (a) => {
3289
- r(a);
3290
- };
3291
- return /* @__PURE__ */ n.jsx(et, { onClick: (a) => {
3292
- s(t === "cz" ? "en" : "cz"), a.stopPropagation();
3293
- }, children: t === "cz" ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3294
- /* @__PURE__ */ n.jsx("strong", { children: "CZ" }),
3295
- /* @__PURE__ */ n.jsx(En, {}),
3296
- /* @__PURE__ */ n.jsx("span", { children: "EN" })
3297
- ] }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3298
- /* @__PURE__ */ n.jsx("strong", { children: "EN" }),
3299
- /* @__PURE__ */ n.jsx(En, {}),
3300
- /* @__PURE__ */ n.jsx("span", { children: "CZ" })
3301
- ] }) });
3302
- }, Td = ({ controlId: e, ...t }) => /* @__PURE__ */ n.jsx(ye.Group, { controlId: e, ...t }), Fd = ({ employeeId: e, alt: t, noPhotoImage: r, cafmApiUrl: s, showLargeInLightBox: a = !1 }) => {
3303
- const { user: o } = Z(Rt), { photoPath: i, photoPathSm: c } = Ba(e);
3304
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: e && /* @__PURE__ */ n.jsx(n.Fragment, { children: a ? /* @__PURE__ */ n.jsx(ul, { baseUrl: s, customToken: o.cafmToken ?? void 0, photos: [
3305
- {
3306
- id: e.toString(),
3307
- alt: t ?? "",
3308
- isDefault: !0,
3309
- smSrc: c,
3310
- lgSrc: i
3311
- }
3312
- ], placeholder: r, ImgComponent: Qn }) : /* @__PURE__ */ n.jsx(Qn, { baseUrl: s, customToken: o.cafmToken ?? void 0, src: c, alt: t, placeholder: r, className: "rounded w-100" }) }) });
3313
- }, Ld = ({ text: e, setText: t, onSearchButtonClick: r, className: s }) => {
3314
- const a = (o) => {
3315
- t(o);
3316
- };
3317
- return /* @__PURE__ */ n.jsxs(It, { className: `${s}`, children: [
3318
- /* @__PURE__ */ n.jsx(ye.Control, { value: e, onChange: (o) => t(o.target.value) }),
3319
- e && /* @__PURE__ */ n.jsx(sn, { onClick: () => a(""), variant: "link", className: "border text-muted", children: /* @__PURE__ */ n.jsx(Me, {}) }),
3320
- /* @__PURE__ */ n.jsx(sn, { onClick: () => r && r(e), variant: "link", className: "border", children: /* @__PURE__ */ n.jsx(wa, {}) })
3321
- ] });
3322
- }, Rd = ({ value: e, numberPrefix: t, numberSuffix: r, decimalScale: s = 2, className: a }) => /* @__PURE__ */ n.jsx(Cn, { value: e, displayType: "text", thousandSeparator: " ", decimalScale: s, defaultValue: "", prefix: t, suffix: r, className: a, decimalSeparator: "," }), Ad = ({ data: e, keys: t, colors: r, tooltipLabel: s }) => /* @__PURE__ */ n.jsx(ba, { data: e.map((a) => ({ name: a.name, ...a.values })), indexBy: "name", keys: t, margin: {
3323
- top: 20,
3324
- right: 50,
3325
- bottom: 30,
3326
- left: 150
3327
- }, layout: "horizontal", colors: r, padding: 0.2, borderRadius: 2, borderWidth: 2, borderColor: {
3328
- from: "color",
3329
- modifiers: [["darker", 0.5]]
3330
- }, axisTop: null, axisRight: null, axisBottom: {
3331
- tickSize: 5,
3332
- tickPadding: 5,
3333
- tickRotation: 0
3334
- }, axisLeft: {
3335
- tickSize: 5,
3336
- tickPadding: 5,
3337
- tickRotation: 0
3338
- }, labelSkipWidth: 12, labelSkipHeight: 12, labelTextColor: {
3339
- from: "color",
3340
- modifiers: [["darker", 1.6]]
3341
- }, tooltipLabel: s }), Md = ({ InputContainer: e = Ye, formField: t, label: r, resetsFields: s, type: a, required: o, hidden: i, disabled: c, withoutLabel: l, className: d }) => {
3342
- const { register: u, formState: m, setValue: x } = Ge(), [f, g] = E(void 0), [p, h] = E(!1);
3343
- B(() => {
3344
- const w = t.split(".");
3345
- let j = m.errors;
3346
- w.forEach((v) => {
3347
- j !== void 0 && (j = j[v]);
3348
- }), g(j);
3349
- }, [m, t]), B(() => {
3350
- m.isSubmitted && h(!0);
3351
- }, [m]);
3352
- const y = f !== void 0;
3353
- return /* @__PURE__ */ n.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${r}${o ? " *" : ""}`, isInvalid: y, withoutLabel: l, className: d, children: [
3354
- /* @__PURE__ */ n.jsx(ye.Check, { id: `check-${t}`, type: a ?? "checkbox", label: `${r}${o ? " *" : ""}`, ...u(t, {
3355
- onChange: () => {
3356
- s && s.forEach((w) => x(w, null, { shouldDirty: !0, shouldValidate: p }));
3357
- }
3358
- }), isInvalid: y, hidden: i, disabled: c, className: "w-100" }),
3359
- f && /* @__PURE__ */ n.jsx(st, { message: f.message })
3360
- ] });
3361
- }, Bd = ({ InputContainer: e = Ye, label: t, formField: r, options: s, resetsFields: a, required: o, disabled: i, hidden: c, className: l }) => {
3362
- const { register: d, formState: u, setValue: m, watch: x } = Ge(), [f, g] = E(void 0), [p, h] = E(!1), y = Q(() => s, [s]);
3363
- B(() => {
3364
- const j = r.split(".");
3365
- let v = u.errors;
3366
- j.forEach((_) => {
3367
- v !== void 0 && (v = v[_]);
3368
- }), g(v);
3369
- }, [u, r]), B(() => {
3370
- u.isSubmitted && h(!0);
3371
- }, [u]);
3372
- const w = f !== void 0;
3373
- return /* @__PURE__ */ n.jsxs(e, { isForRadioInput: !0, hidden: c, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid: w, className: l, children: [
3374
- y.map((j) => /* @__PURE__ */ n.jsx(ye.Check, { id: `radio-${j.id}`, label: j.name, type: "radio", value: j.id ?? "", checked: x(r) === j.id, ...d(r, {
3375
- onChange: () => {
3376
- a && a.forEach((v) => m(v, null, { shouldDirty: !0, shouldValidate: p }));
3377
- }
3378
- }), isInvalid: w, hidden: c, disabled: i, className: "w-100" }, j.id)),
3379
- f && /* @__PURE__ */ n.jsx(st, { message: f.message })
3380
- ] });
3381
- }, Vd = ({ InputContainer: e = Ye, formField: t, label: r, size: s, defaultSelection: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: d, items: u, onSearchQueryChange: m, selectedItemNavigateTo: x, texts: f, dropdownItemsNameWidth: g, isLoading: p, withoutLabel: h, additionalColumns: y, CustomOnChangeComponent: w, icon: j, displayIdAsName: v, onSelect: _, className: k, archiveColumn: C }) => {
3382
- const { formState: I, setValue: O, watch: D, control: T } = Ge(), [$, N] = E(void 0), [M, re] = E(!1), [L, z] = E(!1), R = D(t) ?? null, G = R === (a == null ? void 0 : a.id) ? a == null ? void 0 : a.name : D(`${t}-DropdownName`), W = Q(() => R == null ? null : { id: R ?? null, name: G ?? "" }, [R, G]), K = S(() => {
3383
- const te = t.split(".");
3384
- let we = I.errors;
3385
- te.forEach((Ce) => {
3386
- we !== void 0 && (we = we[Ce]);
3387
- }), N(we);
3388
- }, [I, t]), ee = S((te) => {
3389
- if ((te == null ? void 0 : te.id) === R)
3390
- return;
3391
- if (_ && _(te), o && o.forEach((Ce) => O(Ce, null, { shouldDirty: !0, shouldValidate: L })), te === null) {
3392
- O(t, null, {
3393
- shouldDirty: !0,
3394
- shouldValidate: L
3395
- }), O(`${t}-DropdownName`, null);
3396
- return;
3397
- }
3398
- let we = null;
3399
- i ? we = (te == null ? void 0 : te.id) !== null && (te == null ? void 0 : te.id) !== "" ? parseInt(te.id.toString(), 10) : null : we = te.id === null || te.id === void 0 || te.id === "" ? null : te.id, O(t, we, {
3400
- shouldDirty: !0,
3401
- shouldValidate: L
3402
- }), O(`${t}-DropdownName`, te.name ?? "");
3403
- }, [O, t, L, i, o, R, _]), P = S((te) => {
3404
- re(!1), ee(te);
3405
- }, [ee]), H = S(() => {
3406
- re(!1);
3407
- }, []);
3408
- B(() => {
3409
- K();
3410
- }, [K]), B(() => {
3411
- I.isSubmitted && z(!0);
3412
- }, [I]);
3413
- const F = J(null), ne = $ !== void 0, ge = x !== void 0, fe = ge && W !== null;
3414
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel: h, isInvalid: ne, inputContainerClassName: b({ "luminus-dropdown-select-open": M }), className: k, children: [
3415
- /* @__PURE__ */ n.jsxs(gs, { currentSelection: W, selectedItemNavigateTo: x, children: [
3416
- v && (W == null ? void 0 : W.name) && /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: W.name }),
3417
- /* @__PURE__ */ n.jsx(vn, { control: T, name: t, render: () => /* @__PURE__ */ n.jsx(ye.Select, { size: s, onMouseDown: (te) => {
3418
- te.currentTarget.focus(), te.preventDefault();
3419
- }, onClick: () => {
3420
- !ge && !d && re(!0);
3421
- }, ref: F, value: R ?? "", onChange: () => {
3422
- }, isInvalid: ne, hidden: l, className: b("w-100", {
3423
- "luminus-dropdown-picker-disabled": d,
3424
- "luminus-dropdown-picker-link": fe
3425
- }), children: /* @__PURE__ */ n.jsx("option", { value: R, children: v ? R : (G == null ? void 0 : G.length) > 0 ? G : R }) }) }),
3426
- w || !d && ge ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
3427
- !w && !d && ge && /* @__PURE__ */ n.jsx(se, { size: "sm", color: "secondary", onClick: (te) => {
3428
- te.preventDefault(), te.stopPropagation(), re(!0);
3429
- }, children: j ?? /* @__PURE__ */ n.jsx(Sr, {}) }),
3430
- w ?? null
3431
- ] }) : null
3432
- ] }),
3433
- $ && /* @__PURE__ */ n.jsx(st, { message: $.message }),
3434
- F.current && /* @__PURE__ */ n.jsx(zt, { show: M, onCancel: H, items: u, currentSelection: W, onSelectionChange: P, onSearchQueryChange: m, texts: f, itemsNameWidth: g, additionalColumns: y, displayIdAsName: v, isLoading: p, disabled: d, inputRef: F, archiveColumn: C })
3435
- ] }) });
3436
- }, zd = ({ InputContainer: e = Ye, label: t, formField: r, hidden: s, required: a, placeholder: o, disabled: i, showClearIcon: c, resetsFields: l, multiple: d, accept: u, withoutLabel: m, className: x }) => {
3437
- const { watch: f, setValue: g, register: p, formState: h } = Ge(), [y, w] = E(!1), [j, v] = E(void 0), _ = S(() => {
3438
- g(r, "");
3439
- }, [g, r]), k = S(() => {
3440
- const I = r.split(".");
3441
- let O = h.errors;
3442
- I.forEach((D) => {
3443
- O !== void 0 && (O = O[D]);
3444
- }), v(O);
3445
- }, [h, r]);
3446
- B(k, [k]), B(() => {
3447
- h.isSubmitted && w(!0);
3448
- }, [h]);
3449
- const C = j !== void 0;
3450
- return /* @__PURE__ */ n.jsxs(e, { label: `${t}${a ? "*" : ""}`, hidden: s, withoutLabel: m, isInvalid: C, className: x, children: [
3451
- /* @__PURE__ */ n.jsx(_a, { type: "file", multiple: d, accept: u.join(", "), placeholder: o ?? t, isInvalid: C, hidden: s, disabled: i, className: "w-100", ...p(r, {
3452
- onChange: () => {
3453
- l && l.forEach((I) => g(I, null, { shouldDirty: !0, shouldValidate: y }));
3454
- }
3455
- }) }),
3456
- c && f(r) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: _, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
3457
- j && /* @__PURE__ */ n.jsx(st, { message: j.message })
3458
- ] });
3459
- }, Pd = ({ children: e, onStorno: t, noSpacer: r }) => {
3460
- const { formState: s } = Ge(), [a, o] = E(!1);
3461
- return B(() => {
3462
- o(Object.keys(s.dirtyFields).length > 0);
3463
- }, [s]), a ? /* @__PURE__ */ n.jsx(xo, { onStorno: t, noSpacer: r, children: e }) : null;
3464
- }, Wd = ({ InputContainer: e = Ye, options: t, formField: r, label: s, size: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: d, withoutLabel: u, noSortOptions: m, suffixIdToName: x, onSelect: f, className: g, appendCurrentSelectionWithName: p }) => {
3465
- const { texts: { customSelect: h } } = Z(he), { formState: y, setValue: w, watch: j, control: v } = Ge(), [_, k] = E(void 0), [C, I] = E(!1), [O, D] = E(!1), [T, $] = E(""), N = j(r), M = Q(() => t.find((P) => P.id === N) ?? null, [t, N]), re = S(() => {
3466
- const P = r.split(".");
3467
- let H = y.errors;
3468
- P.forEach((F) => {
3469
- H !== void 0 && (H = H[F]);
3470
- }), k(H);
3471
- }, [y, r]), L = S((P) => {
3472
- if ((P == null ? void 0 : P.id) === N)
3473
- return;
3474
- if (f && f(P), o && o.forEach((F) => w(F, null, { shouldDirty: !0, shouldValidate: O })), P === null) {
3475
- w(r, null, {
3476
- shouldDirty: !0,
3477
- shouldValidate: O
3478
- });
3479
- return;
3480
- }
3481
- let H = null;
3482
- i ? H = (P == null ? void 0 : P.id) !== null && (P == null ? void 0 : P.id) !== "" ? parseInt(P.id.toString(), 10) : null : H = P.id === null || P.id === void 0 || P.id === "" ? null : P.id, w(r, H, {
3483
- shouldDirty: !0,
3484
- shouldValidate: O
3485
- });
3486
- }, [w, r, i, o, N, O, f]), z = S((P) => {
3487
- I(!1), L(P);
3488
- }, [L]), R = S((P) => {
3489
- $(P);
3490
- }, []);
3491
- B(() => {
3492
- re();
3493
- }, [re]), B(() => {
3494
- y.isSubmitted && D(!0);
3495
- }, [y]);
3496
- const G = S((P) => {
3497
- var H;
3498
- return P === null ? "" : !P.name || P.name.length === 0 ? ((H = P.id) == null ? void 0 : H.toString()) ?? "" : x ? `${P.name} (${P.id})` : P.name;
3499
- }, [x]), W = Q(() => {
3500
- const P = t ?? [];
3501
- return p !== void 0 && N && (P.some((H) => H.id === N) || P.push({ id: N, name: p })), P.map((H) => ({
3502
- id: H.id,
3503
- name: G(H)
3504
- })).filter((H) => wt(H.name, T)).sort((H, F) => m ? 0 : (H.name ?? "").localeCompare(F.name ?? ""));
3505
- }, [
3506
- t,
3507
- m,
3508
- T,
3509
- G,
3510
- p,
3511
- N
3512
- ]), K = J(null), ee = _ !== void 0;
3513
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${s}${c ? " *" : ""}`, hidden: l, withoutLabel: u, isInvalid: ee, inputContainerClassName: b({ "luminus-dropdown-select-open": C }), className: g, children: [
3514
- /* @__PURE__ */ n.jsx(vn, { control: v, name: r, render: () => /* @__PURE__ */ n.jsx(ye.Select, { size: a, onMouseDown: (P) => {
3515
- P.currentTarget.focus(), P.preventDefault();
3516
- }, onClick: () => {
3517
- I(!0);
3518
- }, ref: K, value: N ?? "", onChange: () => {
3519
- }, isInvalid: ee, hidden: l, disabled: d, className: "w-100", children: /* @__PURE__ */ n.jsx("option", { value: (M == null ? void 0 : M.id) ?? "", children: G(M) }) }) }),
3520
- _ && /* @__PURE__ */ n.jsx(st, { message: _.message }),
3521
- K.current && /* @__PURE__ */ n.jsx(zt, { show: C, onCancel: () => I(!1), items: W, currentSelection: M ?? null, onSelectionChange: z, onSearchQueryChange: R, texts: h, disabled: d, inputRef: K, autoHideSearch: !0, allItemsLength: t.length })
3522
- ] }) });
3523
- }, Hd = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, size: a, resetsFields: o, showClearIcon: i, clearValue: c, required: l, hidden: d, disabled: u, withoutLabel: m, step: x, stepperStep: f = 1, className: g, min: p, max: h }) => {
3524
- const { register: y, formState: w, setValue: j, watch: v } = Ge(), [_, k] = E(void 0), [C, I] = E(!1), O = S((M, re, L) => {
3525
- j(M, pt(re, p, h), L);
3526
- }, [h, p, j]), D = S(() => {
3527
- const M = c ?? null;
3528
- O(t, M !== null ? Number(M) : null, {
3529
- shouldDirty: !0,
3530
- shouldValidate: C
3531
- });
3532
- }, [c, O, t, C]), T = S(() => {
3533
- const M = t.split(".");
3534
- let re = w.errors;
3535
- M.forEach((L) => {
3536
- re !== void 0 && (re = re[L]);
3537
- }), k(re);
3538
- }, [w, t]);
3539
- B(() => {
3540
- T();
3541
- }, [T]), B(() => {
3542
- w.isSubmitted && I(!0);
3543
- }, [w]);
3544
- const $ = _ !== void 0, N = v(t);
3545
- return /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: d, withoutLabel: m, isInvalid: $, className: g, children: [
3546
- /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
3547
- /* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: s ?? r, size: a, ...y(t, {
3548
- setValueAs: (M) => M == null || M === "" ? null : pt(Number(M), p, h),
3549
- min: p,
3550
- max: h,
3551
- onChange: () => {
3552
- o && o.forEach((M) => j(M, null, { shouldDirty: !0, shouldValidate: C }));
3553
- }
3554
- }), isInvalid: $, hidden: d, disabled: u, className: "w-100 luminus-numeric-stepper", step: x, min: p, max: h }),
3555
- /* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (M) => {
3556
- M.preventDefault(), M.stopPropagation(), O(t, ((N ? Number(N) : 0) - f).toString(), { shouldDirty: !0, shouldValidate: C });
3557
- }, children: /* @__PURE__ */ n.jsx(Cr, {}) }) }),
3558
- /* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (M) => {
3559
- M.preventDefault(), M.stopPropagation(), O(t, ((N ? Number(N) : 0) + f).toString(), { shouldDirty: !0, shouldValidate: C });
3560
- }, children: /* @__PURE__ */ n.jsx(kr, {}) }) })
3561
- ] }),
3562
- i && v(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: D, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
3563
- _ && /* @__PURE__ */ n.jsx(st, { message: _.message })
3564
- ] });
3565
- }, Ud = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, resetsFields: a, showClearIcon: o, clearValue: i, required: c, hidden: l, disabled: d, withoutLabel: u, step: m, size: x, CustomOnChangeComponent: f, noSelectOnFocus: g, className: p, decimalScale: h = 2, numberPrefix: y, numberSuffix: w, min: j, max: v }) => {
3566
- const { formState: _, setValue: k, watch: C, control: I } = Ge(), [O, D] = E(void 0), [T, $] = E(!1), N = S(() => {
3567
- const z = i ?? null;
3568
- k(t, z !== null ? Number(z) : null, {
3569
- shouldDirty: !0,
3570
- shouldValidate: T
3571
- });
3572
- }, [i, k, t, T]), M = S(() => {
3573
- const z = t.split(".");
3574
- let R = _.errors;
3575
- z.forEach((G) => {
3576
- R !== void 0 && (R = R[G]);
3577
- }), D(R);
3578
- }, [_, t]);
3579
- B(() => {
3580
- M();
3581
- }, [M]), B(() => {
3582
- _.isSubmitted && $(!0);
3583
- }, [_]);
3584
- const re = C(t);
3585
- B(() => {
3586
- v !== void 0 && re > v && k(t, v), j !== void 0 && re < j && k(t, j);
3587
- }, [t, re, v, j, k]);
3588
- const L = O !== void 0;
3589
- return /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel: u, isInvalid: L, className: p, children: [
3590
- /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
3591
- /* @__PURE__ */ n.jsx(vn, { control: I, name: t, render: ({ field: { ref: z, onChange: R, name: G, value: W } }) => /* @__PURE__ */ n.jsx(Cn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, prefix: y, suffix: w, defaultValue: "", name: G, value: W ?? "", placeholder: s ?? r, onFocus: (K) => {
3592
- !g && K.target.select();
3593
- }, onChange: (K) => {
3594
- var P, H;
3595
- const ee = parseFloat(((H = (P = K.target) == null ? void 0 : P.value) == null ? void 0 : H.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
3596
- a && a.forEach((F) => k(F, null, { shouldDirty: !0, shouldValidate: T })), R(ee == null || Number.isNaN(ee) ? null : Number(ee));
3597
- }, hidden: l, disabled: d, className: b("form-control text-end w-100", {
3598
- "is-invalid": L
3599
- }, {
3600
- [`form-control-${x}`]: x
3601
- }), step: m, getInputRef: z, min: j, max: v }) }),
3602
- f && /* @__PURE__ */ n.jsx("div", { className: "custom-picker-button", children: f })
3603
- ] }),
3604
- o && C(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
3605
- O && /* @__PURE__ */ n.jsx(st, { message: O.message })
3606
- ] });
3607
- }, kn = ["slice", "options", "formats", "conditions"], lr = (e) => {
3608
- const t = e.current.flexmonster.getReport({ withDefaults: !0 });
3609
- if (typeof t == "string")
3610
- throw alert("report is string"), new Error("report is string");
3611
- const r = {};
3612
- return kn.forEach((s) => {
3613
- r[s] = t[s];
3614
- }), JSON.stringify(r);
3615
- }, Ec = (e) => {
3616
- if (e.settings) {
3617
- const t = JSON.parse(e.settings);
3618
- return kn.forEach((r) => {
3619
- t[r] === void 0 && (t[r] = null);
3620
- }), t;
3621
- }
3622
- return {};
3623
- }, Oc = (e) => {
3624
- const t = {};
3625
- return kn.forEach((r) => {
3626
- t[r] = (e == null ? void 0 : e[r]) ?? void 0;
3627
- }), t;
3628
- }, Tc = ({ dataSource: e, settings: t, pivotRef: r, localization: s, licenseKey: a, hyperlinkColumn: o, enabled: i = !0 }) => {
3629
- const { texts: { reports: c } } = Z(he), [l, d] = E(!1), u = J(null), m = r ?? u, x = Q(() => ({
3630
- localization: s
3631
- }), [s]), f = S((h) => {
3632
- delete h[0], delete h[1], delete h[2];
3633
- const y = [
3634
- {
3635
- id: "fm-tab-expand",
3636
- title: c.expandAll,
3637
- handler: m.current.flexmonster.expandAllData,
3638
- icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/><path fill="none" d="M0 0h24v24H0V0z"/></svg>'
3639
- },
3640
- {
3641
- id: "fm-tab-collapse",
3642
- title: c.collapseAll,
3643
- handler: m.current.flexmonster.collapseAllData,
3644
- icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'
3645
- }
3646
- ];
3647
- return h.unshift({
3648
- id: "fm-tab-expand",
3649
- title: c.expand,
3650
- icon: '<svg height="42" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d=" M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z "/></svg>',
3651
- menu: y,
3652
- rightGroup: !0
3653
- }), h;
3654
- }, [m, c.collapseAll, c.expand, c.expandAll]), g = (h) => {
3655
- const y = h.getTabs();
3656
- h.getTabs = () => f(y);
3657
- };
3658
- B(() => {
3659
- var h;
3660
- l && i && ((h = m.current) == null || h.flexmonster.updateData(e), console.log("Updating flexmonster dataSource to: ", e));
3661
- }, [e, i, l, m]), B(() => {
3662
- var h, y, w;
3663
- if (l && i) {
3664
- const { options: j, conditions: v, formats: _, slice: k, ...C } = (h = m.current) == null ? void 0 : h.flexmonster.getReport();
3665
- if (C === void 0 || typeof C == "string")
3666
- return;
3667
- const I = Oc(t);
3668
- I.options = {
3669
- ...t == null ? void 0 : t.options,
3670
- grid: { ...(y = t == null ? void 0 : t.options) == null ? void 0 : y.grid, autoSwitchToCompact: !1 }
3671
- };
3672
- const O = { ...C, ...I };
3673
- (w = m.current) == null || w.flexmonster.setReport(O), console.log("Refreshing flexmonster settings. New report: ", O);
3674
- }
3675
- }, [i, l, m, t]);
3676
- const p = S((h, y) => {
3677
- var k, C;
3678
- if (!o || !(y.hierarchy && y.hierarchy.uniqueName === o.idColumn))
3679
- return;
3680
- const w = (k = y.escapedLabel) == null ? void 0 : k.toString();
3681
- if (w === void 0)
3682
- return;
3683
- const _ = `<a href='${typeof o.url == "function" ? o.url(w) : o.url.replace(":id", ((C = y.escapedLabel) == null ? void 0 : C.toString()) ?? "")}' style='color: #00a45a; text-decoration: underline; cursor: pointer;' target='_blank' onclick='event.stopImmediatePropagation()'>${y.escapedLabel}</a>`;
3684
- h.text = _;
3685
- }, [o]);
3686
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(
3687
- La,
3688
- {
3689
- ref: m,
3690
- global: x,
3691
- licenseKey: a,
3692
- toolbar: !0,
3693
- height: "100%",
3694
- beforetoolbarcreated: g,
3695
- ready: () => {
3696
- d(!0);
3697
- },
3698
- width: "100%",
3699
- customizeCell: p
3700
- }
3701
- ) });
3702
- }, Fc = (e, t, r, s) => {
3703
- const { texts: { reports: a } } = Z(he), { prompt: o } = Na(), { confirm: i } = Mt(), c = nt(), { user: l } = Z(Rt), { startLoading: d, stopLoading: u } = Z(At), { addNotification: m } = Ir(), x = S(async (y) => {
3704
- d("report-versionSavingAs");
3705
- try {
3706
- const w = await c.post("/reports/version", y);
3707
- m(a.saveSuccessful, "success"), await s(w.data);
3708
- } finally {
3709
- u("report-versionSavingAs");
3710
- }
3711
- }, [m, s, c, a.saveSuccessful, d, u]), f = S(async () => {
3712
- if (r === null) {
3713
- m("none open", "warning");
3714
- return;
3715
- }
3716
- if (!await i(a.confirmOverwriteSave))
3717
- return;
3718
- const w = lr(t);
3719
- x({
3720
- reportSourceName: e,
3721
- reportVersionId: r,
3722
- settings: w
3723
- });
3724
- }, [
3725
- m,
3726
- i,
3727
- t,
3728
- e,
3729
- a.confirmOverwriteSave,
3730
- x,
3731
- r
3732
- ]), g = S(async () => {
3733
- const y = await o(a.enterName, { input: "input", required: !0 });
3734
- if (y === null)
3735
- return;
3736
- const w = lr(t);
3737
- x({
3738
- reportSourceName: e,
3739
- name: y,
3740
- settings: w
3741
- });
3742
- }, [t, o, e, a.enterName, x]), p = S(async () => {
3743
- d("report-versionSavingAs");
3744
- try {
3745
- await c.post("/reports/version", {
3746
- reportVersionId: r ?? void 0,
3747
- reportSourceName: e,
3748
- isArchived: !0
3749
- }), m(a.deleteSuccessful, "success");
3750
- } finally {
3751
- u("report-versionSavingAs");
3752
- }
3753
- }, [
3754
- m,
3755
- c,
3756
- e,
3757
- a.deleteSuccessful,
3758
- r,
3759
- d,
3760
- u
3761
- ]), h = S(async () => {
3762
- d("report-versionSavingAs");
3763
- try {
3764
- await c.post("/reports/version-restrictions", {
3765
- reportVersionId: r ?? void 0,
3766
- userRestricts: [
3767
- {
3768
- employeeId: l.personalNumber,
3769
- addRights: !1
3770
- }
3771
- ]
3772
- }), m(a.detachSuccessful, "success");
3773
- } finally {
3774
- u("report-versionSavingAs");
3775
- }
3776
- }, [
3777
- m,
3778
- c,
3779
- a.detachSuccessful,
3780
- r,
3781
- d,
3782
- u,
3783
- l.personalNumber
3784
- ]);
3785
- return { saveAs: g, save: f, archive: p, detach: h };
3786
- }, Lc = (e) => {
3787
- const t = nt(), { startLoading: r, stopLoading: s } = Z(At);
3788
- return { changeEmployeeRights: S(async (o, i) => {
3789
- let c = null;
3790
- r("reportSharing-addPerson");
3791
- try {
3792
- c = (await t.post("/reports/version-restrictions", {
3793
- reportVersionId: e,
3794
- userRestricts: [
3795
- {
3796
- employeeId: o,
3797
- addRights: i
3798
- }
3799
- ]
3800
- })).data;
3801
- } finally {
3802
- s("reportSharing-addPerson");
3803
- }
3804
- return c;
3805
- }, [t, e, r, s]) };
3806
- }, Rc = ({ isOpen: e, onHide: t, usersData: r, setUsersData: s, reportVersionId: a, EmployeePicker: o }) => {
3807
- const { ProjectIconComponent: i, texts: { reports: c } } = Z(he), { confirm: l } = Mt(), [d, u] = E(null), { changeEmployeeRights: m } = Lc(a), x = S(async () => {
3808
- if (d === null)
3809
- return;
3810
- const g = await m(d, !0);
3811
- s(a, g);
3812
- }, [d, m, a, s]), f = S(async (g) => {
3813
- if (!await l(c.removeSharingWith(g)))
3814
- return;
3815
- const h = await m(g, !1);
3816
- s(a, h);
3817
- }, [m, l, a, c, s]);
3818
- return /* @__PURE__ */ n.jsxs(He, { show: e, onHide: t, children: [
3819
- /* @__PURE__ */ n.jsx(He.Header, { closeButton: !0, children: /* @__PURE__ */ n.jsx(He.Title, { children: c.reportSharing }) }),
3820
- /* @__PURE__ */ n.jsxs(He.Body, { children: [
3821
- /* @__PURE__ */ n.jsx(X, { variant: "h6", children: c.sharedWith }),
3822
- /* @__PURE__ */ n.jsxs(lo, { variant: "flush", children: [
3823
- r && r.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-2", children: c.noone.toLowerCase() }) : null,
3824
- r == null ? void 0 : r.map((g) => /* @__PURE__ */ n.jsxs(bn, { className: "d-flex justify-content-between align-items-center gap-3 border-bottom px-2 py-1", children: [
3825
- g.lastName,
3826
- " ",
3827
- g.firstName,
3828
- " [",
3829
- g.id,
3830
- "]",
3831
- /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => f(g.id), children: /* @__PURE__ */ n.jsx(i, { icon: "delete" }) })
3832
- ] }, g.id))
3833
- ] }),
3834
- /* @__PURE__ */ n.jsx(X, { variant: "h6", className: "mt-2 mb-2", children: c.addSharing }),
3835
- /* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-2 align-items-center", children: [
3836
- /* @__PURE__ */ n.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ n.jsx(o, { defaultSelection: null, label: c.shareWith, onSelect: (g) => {
3837
- u(g === null ? null : Number(g.id));
3838
- } }) }),
3839
- /* @__PURE__ */ n.jsx(an, { onClick: x, disabled: d === null, children: c.add })
3840
- ] })
3841
- ] })
3842
- ] });
3843
- }, Ac = (e, t) => {
3844
- const [r, s] = E(null);
3845
- return B(() => {
3846
- e.then(({ default: a }) => {
3847
- const o = t !== void 0 ? t(a) : a;
3848
- s(o);
3849
- });
3850
- }, [t, e]), { mappings: r };
3851
- }, Yd = ({ reportType: e, title: t, data: r, filterElements: s, getReportRoute: a, localization: o, licenseKey: i, EmployeePicker: c, localizationJsonFile: l, localizationTransformer: d, hyperlinkColumn: u }) => {
3852
- const { texts: { reports: m } } = Z(he), { confirm: x } = Mt(), f = Dr(), { id: g } = Fa(), p = Q(() => g === void 0 ? null : Number(g), [g]), h = S((F) => {
3853
- const ne = F === null ? "" : F.toString();
3854
- f(Et(a(e), { id: ne }), {
3855
- replace: !0
3856
- });
3857
- }, [a, f, e]), [y, w] = E(!1), j = J(null), { user: v } = Z(Rt), { data: _, reloadData: k, setData: C } = Va(`/reports/${e}`), { mappings: I } = Ac(l, d), [O, D] = E({}), T = S((F) => {
3858
- if (_ === null)
3859
- return;
3860
- const ne = F.target.value, ge = ne === "" ? null : Number(ne);
3861
- h(ge);
3862
- }, [_, h]), $ = S(async (F) => {
3863
- await k(), h(F);
3864
- }, [k, h]), N = Q(() => {
3865
- if (_ === null)
3866
- return null;
3867
- const F = _.reportVersions.find((ne) => ne.reportVersionId === p);
3868
- return F === void 0 ? null : F;
3869
- }, [_, p]);
3870
- B(() => {
3871
- var ne;
3872
- if (_ === null)
3873
- return;
3874
- if (N === null) {
3875
- D({});
3876
- return;
3877
- }
3878
- const F = Ec(N) ?? {};
3879
- D(F), (ne = j.current) == null || ne.flexmonster.refresh();
3880
- }, [_, N, p]);
3881
- const { save: M, saveAs: re, archive: L, detach: z } = Fc(e, j, p, $), R = Q(() => ({
3882
- data: r ?? [],
3883
- mapping: I ?? void 0
3884
- }), [r, I]), G = S(async () => {
3885
- var ne;
3886
- await x(m.confirmRevertChanges) && ((ne = j.current) == null || ne.flexmonster.setReport({ dataSource: R, ...O }));
3887
- }, [x, R, m.confirmRevertChanges, O]), W = Q(() => (N == null ? void 0 : N.ownerId) === v.personalNumber, [N == null ? void 0 : N.ownerId, v.personalNumber]), K = Q(() => {
3888
- var F;
3889
- return (F = N == null ? void 0 : N.users) == null ? void 0 : F.some((ne) => ne.id === v.personalNumber && !ne.isReportOwner);
3890
- }, [N == null ? void 0 : N.users, v.personalNumber]), ee = S((F, ne) => {
3891
- C((ge) => {
3892
- const fe = ge == null ? void 0 : ge.reportVersions.findIndex((Ce) => Ce.reportVersionId === F);
3893
- if (fe === void 0 || ge === null)
3894
- return ge;
3895
- const te = {
3896
- ...ge.reportVersions[fe],
3897
- users: ne.filter((Ce) => Ce.isReportOwner === !1)
3898
- }, we = [...ge.reportVersions];
3899
- return we[fe] = te, {
3900
- ...ge,
3901
- reportVersions: we
3902
- };
3903
- });
3904
- }, [C]), P = S(async () => {
3905
- await x(m.confirmDelete(N == null ? void 0 : N.name)) && (await L(), h(null), await k());
3906
- }, [L, x, k, N == null ? void 0 : N.name, m, h]), H = S(async () => {
3907
- await x(m.confirmDetach(N == null ? void 0 : N.name)) && (await z(), h(null), await k());
3908
- }, [x, z, k, N == null ? void 0 : N.name, m, h]);
3909
- return B(() => {
3910
- var F;
3911
- p === null && h(((F = _ == null ? void 0 : _.reportVersions.find((ne) => ne.isSystem === !0)) == null ? void 0 : F.reportVersionId) ?? null);
3912
- }, [_ == null ? void 0 : _.reportVersions, p, h]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3913
- /* @__PURE__ */ n.jsx(za, { title: /* @__PURE__ */ n.jsxs("div", { className: "d-flex justify-content-start gap-3", children: [
3914
- /* @__PURE__ */ n.jsx(X, { variant: "h3", children: t }),
3915
- s,
3916
- /* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
3917
- /* @__PURE__ */ n.jsxs(Sa, { size: "sm", value: p ?? void 0, onChange: T, children: [
3918
- /* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSystem, children: _ == null ? void 0 : _.reportVersions.filter((F) => F.isSystem === !0).map((F) => /* @__PURE__ */ n.jsx("option", { value: F.reportVersionId, children: F.name }, F.reportVersionId)) }),
3919
- /* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectYour, children: _ == null ? void 0 : _.reportVersions.filter((F) => F.ownerId === v.personalNumber).map((F) => /* @__PURE__ */ n.jsx("option", { value: F.reportVersionId, children: F.name }, F.reportVersionId)) }),
3920
- /* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSharedWithYou, children: _ == null ? void 0 : _.reportVersions.filter((F) => F.isSystem === !1 && F.ownerId !== v.personalNumber).map((F) => /* @__PURE__ */ n.jsx("option", { value: F.reportVersionId, children: `${F.name} [${F.ownerId}]` }, F.reportVersionId)) })
3921
- ] }),
3922
- /* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(Ca, {}), onClick: M, disabled: p === null || (N == null ? void 0 : N.isSystem) || !W, children: m.save }),
3923
- /* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(ka, {}), onClick: re, className: "flex-shrink-0", children: m.saveAs }),
3924
- /* @__PURE__ */ n.jsxs(pn, { toggle: /* @__PURE__ */ n.jsx(xn, { as: br }), children: [
3925
- /* @__PURE__ */ n.jsx(et, { onClick: G, children: m.revertChanges }),
3926
- /* @__PURE__ */ n.jsx(et, { onClick: () => w(!0), disabled: !W || (N == null ? void 0 : N.isSystem), children: m.share }),
3927
- W && !(N != null && N.isSystem) ? /* @__PURE__ */ n.jsx(et, { color: "danger", onClick: P, children: m.delete }) : null,
3928
- K && !(N != null && N.isSystem) ? /* @__PURE__ */ n.jsx(et, { color: "danger", onClick: H, children: m.detach }) : null
3929
- ] })
3930
- ] })
3931
- ] }), children: /* @__PURE__ */ n.jsx("div", { className: b("h-100 w-100", R.data && R.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ n.jsx(Tc, { dataSource: R, settings: O, pivotRef: j, enabled: R.data && R.data.length > 0, localization: o, licenseKey: i, hyperlinkColumn: u }) }) }),
3932
- N !== null ? /* @__PURE__ */ n.jsx(Rc, { isOpen: y, onHide: () => w(!1), usersData: N.users ?? null, setUsersData: ee, reportVersionId: N == null ? void 0 : N.reportVersionId, EmployeePicker: c }) : null
3933
- ] });
3934
- }, Gd = ({ cell: { value: e } }) => /* @__PURE__ */ n.jsx(n.Fragment, { children: e ? /* @__PURE__ */ n.jsx(Nr, { name: e, size: 21, fontSize: 12 }) : /* @__PURE__ */ n.jsx(n.Fragment, {}) }), Mc = ({ knownTypes: e, typeFilters: t, onChangeTypeFilters: r }) => /* @__PURE__ */ n.jsx("div", { className: "mb-1 d-flex justify-content-center gap-2", children: e.map((s) => /* @__PURE__ */ n.jsx("div", { role: "button", style: {
3935
- height: "14px",
3936
- width: "14px",
3937
- borderRadius: "50%",
3938
- border: "2px solid transparent",
3939
- backgroundColor: "transparent"
3940
- }, className: b(`border-${s}`, t.includes(s) && `bg-${s}`), onClick: () => {
3941
- t.includes(s) ? r(t.filter((a) => a !== s)) : r([...t, s]);
3942
- } }, s)) }), Bc = ({ linksTo: e, onClick: t, children: r }) => e ? /* @__PURE__ */ n.jsx(tt, { to: e, className: "text-decoration-none", onClick: t, children: r }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: r }), Vc = ({ message: e, onDeleteMessage: t, onClickMessage: r, getIcon: s, getLinksTo: a }) => {
3943
- const { ProjectIconComponent: o, localizationContext: i } = Z(he), { dateFnsLocale: c } = Z(i), l = e.dateTime ? yt(e.dateTime) : null, d = l ? Ua(new Date(Date.now()), l) : 0;
3944
- return /* @__PURE__ */ n.jsxs("div", { children: [
3945
- l && /* @__PURE__ */ n.jsx("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ n.jsx(Bt, { text: jt(l, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(X, { variant: "caption", children: d > 2 ? jt(l, "dd.MM.yyyy") : Ga(l, new Date(Date.now()), {
3946
- locale: c.code
3947
- }) }) }) }) }),
3948
- /* @__PURE__ */ n.jsx(Bc, { linksTo: a(e) ?? void 0, onClick: r, children: /* @__PURE__ */ n.jsx(vl, { level: e.type, noIcon: !0, children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-start gap-2", children: [
3949
- s(e),
3950
- /* @__PURE__ */ n.jsxs("div", { className: "d-flex flex-column gap-1 w-100", children: [
3951
- /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-start justify-content-between gap-3", children: [
3952
- /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "fw-bold", children: e.subject }),
3953
- /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (u) => {
3954
- u.preventDefault(), u.stopPropagation(), t(e.id);
3955
- }, children: /* @__PURE__ */ n.jsx(o, { icon: "delete" }) })
3956
- ] }),
3957
- /* @__PURE__ */ n.jsx(X, { variant: "body2", children: e.text })
3958
- ] })
3959
- ] }) }) })
3960
- ] });
3961
- }, cr = ["info", "warning", "danger"], dr = ({ messages: e, isLoading: t, onDeleteMessage: r, onClickMessage: s, getIcon: a, getLinksTo: o }) => {
3962
- const { texts: { messageBoard: i } } = Z(he), [c, l] = E(cr), d = Q(() => e.filter((u) => c.includes(u.type ?? "")), [c, e]);
3963
- return /* @__PURE__ */ n.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
3964
- /* @__PURE__ */ n.jsx(Mc, { knownTypes: cr, typeFilters: c, onChangeTypeFilters: (u) => l(u) }),
3965
- t && /* @__PURE__ */ n.jsxs("div", { className: "p-3 w-100", children: [
3966
- /* @__PURE__ */ n.jsx(Pe, { as: Vn.Title, animation: "glow", children: /* @__PURE__ */ n.jsx(Pe, { xs: 6 }) }),
3967
- /* @__PURE__ */ n.jsxs(Pe, { as: Vn.Text, animation: "glow", children: [
3968
- /* @__PURE__ */ n.jsx(Pe, { xs: 7 }),
3969
- " ",
3970
- /* @__PURE__ */ n.jsx(Pe, { xs: 4 }),
3971
- " ",
3972
- /* @__PURE__ */ n.jsx(Pe, { xs: 4 }),
3973
- " ",
3974
- /* @__PURE__ */ n.jsx(Pe, { xs: 6 }),
3975
- " ",
3976
- /* @__PURE__ */ n.jsx(Pe, { xs: 8 })
3977
- ] })
3978
- ] }),
3979
- !t && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3980
- e.length === 0 && /* @__PURE__ */ n.jsx(Nn, { variant: "info", size: "sm", className: "mt-2", children: i.noMessages }),
3981
- /* @__PURE__ */ n.jsx("div", { className: "h-100 overflow-y-auto d-flex flex-column gap-2 luminus-thin-scrollbar", children: d.map((u) => /* @__PURE__ */ n.jsx(Vc, { message: u, onDeleteMessage: r, onClickMessage: s, getIcon: a, getLinksTo: o }, u.id)) })
3982
- ] })
3983
- ] });
3984
- }, Xt = {
3985
- apiGet: "/messageBoard",
3986
- apiDelete: "/messageBoard/"
3987
- }, Kd = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: r = Xt.apiGet, apiDelete: s = Xt.apiDelete } = Xt, getIcon: a, getLinksTo: o }) => {
3988
- const c = nt(), [l, d] = E([]), [u, m] = E(!1), [x, f] = E(!1), [g, p] = E(!1), h = S(async () => {
3989
- f(!0), await c.get(r).then(({ data: _ }) => {
3990
- d(_), m(!0), f(!1);
3991
- }).catch(() => {
3992
- d([]), f(!1);
3993
- });
3994
- }, [r, c]), y = S(async (_) => c.delete(`${s}${_}`).then(() => !0).catch(() => !1), [s, c]), w = S((_) => {
3995
- y(_).then((k) => {
3996
- k && d(l.filter((C) => C.id !== _));
3997
- });
3998
- }, [y, l]);
3999
- B(() => {
4000
- h();
4001
- const _ = setInterval(() => h(), 60 * 1e3);
4002
- return () => {
4003
- clearInterval(_);
4004
- };
4005
- }, [h]);
4006
- const j = l.filter((_) => _.type === "danger").length, v = u ? !1 : x;
4007
- return e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
4008
- /* @__PURE__ */ n.jsxs("div", { className: "position-relative", children: [
4009
- /* @__PURE__ */ n.jsx(se, { size: "md", onClick: () => p(!g), children: t }),
4010
- j > 0 && /* @__PURE__ */ n.jsx("div", { className: "badge rounded-pill bg-danger p-1 px-2 text-white", style: { position: "absolute", top: "-6px", right: "-10px", fontSize: "10px" }, children: j })
4011
- ] }),
4012
- /* @__PURE__ */ n.jsx(Hn, { show: g, onHide: () => p(!1), placement: "end", children: /* @__PURE__ */ n.jsx(Hn.Body, { children: /* @__PURE__ */ n.jsx(dr, { messages: l, isLoading: v, onDeleteMessage: w, onClickMessage: () => p(!1), getIcon: a, getLinksTo: o }) }) })
4013
- ] }) : /* @__PURE__ */ n.jsx(dr, { messages: l, isLoading: v, onDeleteMessage: w, getIcon: a, getLinksTo: o });
4014
- }, zc = "_tab-panel_d8l8q_1", Pc = "_full-height-no-overflow_d8l8q_5", Wc = "_disabled_d8l8q_12", en = {
4015
- "tab-panel": "_tab-panel_d8l8q_1",
4016
- tabPanel: zc,
4017
- "full-height-no-overflow": "_full-height-no-overflow_d8l8q_5",
4018
- fullHeightNoOverflow: Pc,
4019
- disabled: Wc
4020
- }, qd = ({ eventKey: e, activeTab: t, fullHeightNoOverflow: r, disabled: s, className: a, children: o }) => e !== t ? null : /* @__PURE__ */ n.jsx("div", { className: b("luminus-tab-panel", en.tabPanel, { [en.fullHeightNoOverflow]: r }, { disabled: s }, { [en.disabled]: s }, a), children: o }), Hc = "_join-line_1q9e8_1", Uc = {
4021
- "join-line": "_join-line_1q9e8_1",
4022
- joinLine: Hc
4023
- }, Qd = ({ activeTab: e, onSelect: t, children: r, vertical: s, verticalStepper: a }) => /* @__PURE__ */ n.jsx("div", { className: b("luminus-tabs d-flex mb-2", { "gap-1": !a }, { "gap-0": a }, {
4024
- "flex-column": s || a
4025
- }), children: r.map((o, i) => {
4026
- const c = o.type, l = o.props;
4027
- if (!l)
4028
- return null;
4029
- const d = l.eventKey, u = l.children, m = l.className, x = l.onClick;
4030
- return /* @__PURE__ */ n.jsxs(ke.Fragment, { children: [
4031
- /* @__PURE__ */ n.jsx(c, { ...l, className: b({ active: e === d }, m), onClick: () => {
4032
- t(d), x && x(d);
4033
- }, vertical: s || a, children: u }),
4034
- a && i < r.length - 1 && /* @__PURE__ */ n.jsx("div", { className: b("join-line", Uc.joinLine) })
4035
- ] }, l.eventKey);
4036
- }) }), Yc = "_tab_1tbi7_1", Gc = "_disabled_1tbi7_7", Kc = "_vertical_1tbi7_13", tn = {
4037
- tab: Yc,
4038
- disabled: Gc,
4039
- vertical: Kc
4040
- }, Zd = ({ eventKey: e, className: t, onClick: r, disabled: s, vertical: a, children: o }) => /* @__PURE__ */ n.jsx("div", { role: "button", className: b("luminus-tab text-primary rounded", tn.tab, t, {
4041
- disabled: s
4042
- }, { [tn.disabled]: s }, { vertical: a }, { [tn.vertical]: a }), onClick: () => r && !s && r(e), children: typeof o == "string" ? /* @__PURE__ */ n.jsx(X, { variant: a ? "body" : "h6", className: a ? "" : "text-primary", children: o }) : o });
4043
- export {
4044
- Nn as Alert,
4045
- vl as AlertItem,
4046
- dd as ApiFileDownloadButton,
4047
- xd as AppSearch,
4048
- vd as AuthTemplate,
4049
- Nr as AvatarIcon,
4050
- ms as Backdrop,
4051
- hd as Badge,
4052
- Ad as BarChart,
4053
- Pi as Card,
4054
- ps as CheckInput,
4055
- cn as Collapse,
4056
- Nc as ColumnResizer,
4057
- Ae as ContextButton,
4058
- Ed as DisabledRowLabelLink,
4059
- eu as Documents,
4060
- pn as Dropdown,
4061
- pd as DropdownDivider,
4062
- et as DropdownItem,
4063
- wd as DropdownPicker,
4064
- xn as DropdownToggle,
4065
- Dd as DynamicForm,
4066
- Fd as EmployeeSmallPhoto,
4067
- Wo as ErrorBoundary,
4068
- tu as FileExtensionIcon,
4069
- fd as FileUploadButton,
4070
- cs as FileUploadContextButton,
4071
- gd as FileUploadDropdownItem,
4072
- Tc as Flexmonster,
4073
- wl as FloatingActionContainer,
4074
- xo as FloatingFormSubmit,
4075
- rt as FloatingLabelInput,
4076
- Sd as FromToDatePicker,
4077
- md as HomeDashboard,
4078
- Md as HookFormCheckInput,
4079
- Vd as HookFormDropdownPicker,
4080
- zd as HookFormFileInput,
4081
- Pd as HookFormFloatingSubmit,
4082
- Hd as HookFormNumericStepperInput,
4083
- Ud as HookFormNumericTextInput,
4084
- Bd as HookFormRadioInput,
4085
- Wd as HookFormSelectInput,
4086
- nu as HookFormTextAreaInput,
4087
- ru as HookFormTextInput,
4088
- ud as HtmlTooltip,
4089
- se as IconButton,
4090
- Qn as ImgApi,
4091
- hs as ImgDirect,
4092
- st as InvalidFeedback,
4093
- Od as LanguageSwitch,
4094
- Tn as Loading,
4095
- Pa as LoadingBlock,
4096
- Kd as MessageBoard,
4097
- jo as MonthPicker,
4098
- Cd as MonthPickerSearchParams,
4099
- Fe as NoInputContainer,
4100
- Rd as NumericFormat,
4101
- _d as NumericStepperInput,
4102
- Nd as NumericTextInput,
4103
- ul as PhotoLibrary,
4104
- dl as PhotoLightbox,
4105
- Id as PieChart,
4106
- an as PrimaryButton,
4107
- Yd as ReportPage,
4108
- su as ResponsiveContextDropdown,
4109
- au as ResponsiveContextDropdownItem,
4110
- Ye as RowLabelInput,
4111
- Ld as SearchBox,
4112
- Tt as SelectInput,
4113
- $d as SettingsFormPicker,
4114
- zt as SimplePicker,
4115
- br as SimpleToggle,
4116
- Bt as SimpleTooltip,
4117
- Zd as Tab,
4118
- qd as TabPanel,
4119
- Qd as Tabs,
4120
- bd as TextAreaInput,
4121
- it as TextInput,
4122
- yd as Timeline,
4123
- Td as TypedFormGroup,
4124
- X as Typography,
4125
- ou as UserAvatarToggle,
4126
- Gd as UserAvatarValueFormat,
4127
- jd as VersionInfo,
4128
- Yn as WidgetCard,
4129
- bo as YearPicker,
4130
- kd as YearPickerSearchParams
4131
- };