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