react-luminus-components 1.3.89 → 1.3.90
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/.vite/manifest.json +183 -0
- package/dist/FullScreenContainer-BHOMIeza.cjs +1 -0
- package/dist/FullScreenContainer-DalqTwrK.js +27 -0
- package/dist/Loading-BDj5dLz0.js +17 -0
- package/dist/Loading-BgYSq3VS.cjs +1 -0
- package/dist/ResponsiveContextDropdown-D7dyws1-.js +24266 -0
- package/dist/ResponsiveContextDropdown-ZEwJJoab.cjs +279 -0
- package/dist/SimpleTooltip-BLerwS-Y.js +5 -0
- package/dist/SimpleTooltip-sYuU_O38.cjs +1 -0
- package/dist/components/BnfTableValueFormats/UserAvatarValueFormat/UserAvatarValueFormat.d.ts +4 -0
- package/dist/components/BnfTableValueFormats/index.d.ts +1 -0
- package/dist/components/Buttons/ContextButton/ContextButton.d.ts +13 -0
- package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +11 -0
- package/dist/components/Buttons/FileUploadButton/FileUploadButton.d.ts +11 -0
- package/dist/components/Buttons/FloatingSubmit/FloatingFormSubmit.d.ts +9 -0
- package/dist/components/Buttons/IconButton/IconButton.d.ts +12 -0
- package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +13 -0
- package/dist/components/Buttons/index.d.ts +6 -0
- package/dist/components/Documents/Documents.d.ts +10 -0
- package/dist/components/Documents/components/DocumentDirectory/DocumentDirectory.d.ts +5 -0
- package/dist/components/Documents/components/DocumentDirectory/components/DocumentDirectoryLabel/DocumentDirectoryLabel.d.ts +7 -0
- package/dist/components/Documents/components/DocumentDirectory/components/index.d.ts +1 -0
- package/dist/components/Documents/components/DocumentsActions/DocumentsActions.d.ts +7 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocActionButton/DocActionButton.d.ts +10 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/DocumentsUpload.d.ts +10 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/componenets/UploadFilesModal/UploadFilesModal.d.ts +7 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/componenets/UploadFilesModal/hooks/useUploadFilesFormSchema.d.ts +18 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/componenets/index.d.ts +1 -0
- package/dist/components/Documents/components/DocumentsActions/components/index.d.ts +2 -0
- package/dist/components/Documents/components/DocumentsFilesTable/DocumentsFilesTable.d.ts +6 -0
- package/dist/components/Documents/components/DocumentsFilesTable/hooks/useDocumentsFilesColumns.d.ts +11 -0
- package/dist/components/Documents/components/DocumentsModals/DocumentsModals.d.ts +2 -0
- package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/CreateFolderModal.d.ts +5 -0
- package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/hooks/useDocCreateFolderForm.d.ts +13 -0
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/EditFileModal.d.ts +5 -0
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/EditFileModalInner.d.ts +8 -0
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/hooks/useEditFileForm.d.ts +18 -0
- package/dist/components/Documents/components/DocumentsModals/components/index.d.ts +2 -0
- package/dist/components/Documents/components/DocumentsModals/types/DocumentsModalType.d.ts +2 -0
- package/dist/components/Documents/components/DocumentsRoot/DocumentsRoot.d.ts +5 -0
- package/dist/components/Documents/components/FileExtensionIcon/FileExtensionIcon.d.ts +7 -0
- package/dist/components/Documents/components/index.d.ts +6 -0
- package/dist/components/Documents/contexts/DocumentsContext.d.ts +13 -0
- package/dist/components/Documents/hooks/useDocContextApiActions.d.ts +17 -0
- package/dist/components/Documents/hooks/useDocumentsApiActions.d.ts +7 -0
- package/dist/components/Documents/hooks/useDocumentsDrag.d.ts +19 -0
- package/dist/components/Documents/hooks/useDocumentsReducer.d.ts +91 -0
- package/dist/components/Documents/index.d.ts +2 -0
- package/dist/components/Documents/types/ui/DocumentFile.d.ts +6 -0
- package/dist/components/Documents/types/ui/DocumentFolder.d.ts +10 -0
- package/dist/components/Documents/types/ui/DocumentState.d.ts +2 -0
- package/dist/components/Documents/types/ui/DocumentsActionsObj.d.ts +14 -0
- package/dist/components/Documents/types/ui/DocumentsFolderId.d.ts +2 -0
- package/dist/components/Documents/types/ui/FileDirType.d.ts +2 -0
- package/dist/components/Documents/utils/documentsConstants.d.ts +1 -0
- package/dist/components/Documents/utils/documentsDataUtils.d.ts +12 -0
- package/dist/components/Documents/utils/documentsTypeUtils.d.ts +4 -0
- package/dist/components/Documents/utils/documentsUtils.d.ts +7 -0
- package/dist/components/Dropdown/Dropdown.d.ts +8 -0
- package/dist/components/Dropdown/comps/DropdownDivider/DropdownDivider.d.ts +7 -0
- package/dist/components/Dropdown/comps/DropdownItem/DropdownItem.d.ts +10 -0
- package/dist/components/Dropdown/comps/DropdownItem/FileUploadDropdownItem.d.ts +11 -0
- package/dist/components/Dropdown/comps/DropdownToggle/DropdownToggle.d.ts +7 -0
- package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +11 -0
- package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +9 -0
- package/dist/components/Dropdown/comps/index.d.ts +6 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Flexmonster/Flexmonster.d.ts +15 -0
- package/dist/components/Flexmonster/ReportPage.d.ts +16 -0
- package/dist/components/Flexmonster/components/ReportSharingModal/ReportSharingModal.d.ts +12 -0
- package/dist/components/Flexmonster/components/ReportSharingModal/hooks/useReportSharingApi.d.ts +6 -0
- package/dist/components/Flexmonster/components/index.d.ts +1 -0
- package/dist/components/Flexmonster/hooks/useReportMappings.d.ts +4 -0
- package/dist/components/Flexmonster/hooks/useReportVersionApi.d.ts +10 -0
- package/dist/components/Flexmonster/index.d.ts +2 -0
- package/dist/components/Flexmonster/types/api/ReportModel.d.ts +7 -0
- package/dist/components/Flexmonster/types/api/ReportRestrictItem.d.ts +4 -0
- package/dist/components/Flexmonster/types/api/ReportRestrictModel.d.ts +6 -0
- package/dist/components/Flexmonster/types/api/ReportVersionModel.d.ts +15 -0
- package/dist/components/Flexmonster/types/api/ReportVersionUserModel.d.ts +7 -0
- package/dist/components/Flexmonster/types/ui/ReportSettings.d.ts +5 -0
- package/dist/components/Flexmonster/utils/flexMonsterUtils.d.ts +12 -0
- package/dist/components/Form/CheckInput/CheckInput.d.ts +4 -0
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +4 -0
- package/dist/components/Form/NumericStepperInput/NumericStepperInput.d.ts +4 -0
- package/dist/components/Form/NumericTextInput/NumericTextInput.d.ts +4 -0
- package/dist/components/Form/SelectInput/SelectInput.d.ts +4 -0
- package/dist/components/Form/TextAreaInput/TextAreaInput.d.ts +4 -0
- package/dist/components/Form/TextInput/TextInput.d.ts +4 -0
- package/dist/components/Form/index.d.ts +7 -0
- package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +4 -0
- package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +4 -0
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +5 -0
- package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +4 -0
- package/dist/components/HookForm/FloatingSubmit/HookFormFloatingSubmit.d.ts +9 -0
- package/dist/components/HookForm/NumericStepperInput/HookFormNumericStepperInput.d.ts +4 -0
- package/dist/components/HookForm/NumericTextInput/HookFormNumericTextInput.d.ts +4 -0
- package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +4 -0
- package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +4 -0
- package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +4 -0
- package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +4 -0
- package/dist/components/HookForm/index.d.ts +11 -0
- package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +33 -0
- package/dist/components/InputContainers/InputAnchorContainer/InputAnchorContainer.d.ts +9 -0
- package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +33 -0
- package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +33 -0
- package/dist/components/InputContainers/index.d.ts +4 -0
- package/dist/components/Layout/MessageBoard/MessageBoard.d.ts +15 -0
- package/dist/components/Layout/MessageBoard/components/MessageList/MessageList.d.ts +12 -0
- package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageFilters/MessageFilters.d.ts +7 -0
- package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageItem/MessageItem.d.ts +11 -0
- package/dist/components/Layout/MessageBoard/components/MessageList/comps/index.d.ts +2 -0
- package/dist/components/Layout/MessageBoard/components/index.d.ts +1 -0
- package/dist/components/Layout/index.d.ts +1 -0
- package/dist/components/NewTabs/Tab/Tab.d.ts +12 -0
- package/dist/components/NewTabs/TabPanel/TabPanel.d.ts +10 -0
- package/dist/components/NewTabs/Tabs/Tabs.d.ts +13 -0
- package/dist/components/NewTabs/index.d.ts +3 -0
- package/dist/components/ResponsiveContextDropdown/ResponsiveContextDropdown.d.ts +13 -0
- package/dist/components/ResponsiveContextDropdown/components/ResponsiveContextDropdownItem/ResponsiveContextDropdownItem.d.ts +22 -0
- package/dist/components/ResponsiveContextDropdown/components/index.d.ts +1 -0
- package/dist/components/ResponsiveContextDropdown/index.d.ts +2 -0
- package/dist/components/ResponsiveContextDropdown/utils/responsiveContextDropdownUtils.d.ts +5 -0
- package/dist/components/Tabs/Tabs.d.ts +9 -0
- package/dist/components/Tabs/comps/Tab/Tab.d.ts +7 -0
- package/dist/components/Tabs/comps/index.d.ts +1 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +25 -0
- package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +9 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/UserAvatar/AvatarIcon/AvatarIcon.d.ts +7 -0
- package/dist/components/UserAvatar/index.d.ts +1 -0
- package/dist/components/common/Alert/Alert.d.ts +8 -0
- package/dist/components/common/AlertItem/AlertItem.d.ts +8 -0
- package/dist/components/common/ApiFileDownloadButton/ApiFileDownloadButton.d.ts +9 -0
- package/dist/components/common/AppSearch/AppSearch.d.ts +9 -0
- package/dist/components/common/AppSearch/comps/AutocompleteWindow/AutocompleteWindow.d.ts +12 -0
- package/dist/components/common/AppSearch/comps/TypeSelector/TypeSelector.d.ts +10 -0
- package/dist/components/common/AppSearch/comps/index.d.ts +2 -0
- package/dist/components/common/AppSearch/hooks/useSearchItems.d.ts +7 -0
- package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +7 -0
- package/dist/components/common/Backdrop/Backdrop.d.ts +6 -0
- package/dist/components/common/Badge/Badge.d.ts +9 -0
- package/dist/components/common/BarChart/BarChart.d.ts +14 -0
- package/dist/components/common/Card/Card.d.ts +28 -0
- package/dist/components/common/Collapse/Collapse.d.ts +19 -0
- package/dist/components/common/ConfirmDialog/ConfirmDialog.d.ts +2 -0
- package/dist/components/common/DisabledRowLabelLink/DisabledRowLabelLink.d.ts +9 -0
- package/dist/components/common/DynamicForm/DynamicForm.d.ts +24 -0
- package/dist/components/common/DynamicForm/comps/DynamicFormErrors/DynamicFormErrors.d.ts +9 -0
- package/dist/components/common/DynamicForm/comps/DynamicFormMasterPicker/DynamicFormMasterPicker.d.ts +10 -0
- package/dist/components/common/DynamicForm/comps/DynamicFormTable/DynamicFormTable.d.ts +17 -0
- package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/DynamicFormCreateTableRow/DynamicFormCreateTableRow.d.ts +9 -0
- package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/DynamicFormTableRow/DynamicFormTableRow.d.ts +11 -0
- package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/comps/DynamicFormInput/DynamicFormInput.d.ts +17 -0
- package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/comps/index.d.ts +1 -0
- package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/index.d.ts +2 -0
- package/dist/components/common/DynamicForm/comps/index.d.ts +3 -0
- package/dist/components/common/DynamicForm/utils/itemTransformers.d.ts +4 -0
- package/dist/components/common/EmployeeSmallPhoto/EmployeeSmallPhoto.d.ts +9 -0
- package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +10 -0
- package/dist/components/common/FloatingActionContainer/FloatingActionContainer.d.ts +6 -0
- package/dist/components/common/FromToDatePicker/FromToDatePicker.d.ts +11 -0
- package/dist/components/common/FromToDatePicker/components/FromToDatePickerDropdownToggle/FromToDatePickerDropdownToggle.d.ts +8 -0
- package/dist/components/common/FromToDatePicker/components/index.d.ts +1 -0
- package/dist/components/common/FromToDatePicker/constants/TimeRanges.d.ts +3 -0
- package/dist/components/common/FromToDatePicker/hooks/useFromToDatePicker.d.ts +10 -0
- package/dist/components/common/FromToDatePicker/utils/utilsFromToDatePicker.d.ts +11 -0
- package/dist/components/common/HomeDashboard/HomeDashboard.d.ts +10 -0
- package/dist/components/common/HomeDashboard/comps/FreeSpaceWidget/FreeSpaceWidget.d.ts +9 -0
- package/dist/components/common/HomeDashboard/comps/WidgetPicker/WidgetPicker.d.ts +11 -0
- package/dist/components/common/HomeDashboard/comps/index.d.ts +1 -0
- package/dist/components/common/HomeDashboard/hooks/useUserDashboard.d.ts +7 -0
- package/dist/components/common/ImgApi/ImgApi.d.ts +4 -0
- package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +9 -0
- package/dist/components/common/ImgDirect/ImgDirect.d.ts +4 -0
- package/dist/components/common/InvalidFeedback/InvalidFeedback.d.ts +5 -0
- package/dist/components/common/LanguageSwitch/LanguageSwitch.d.ts +2 -0
- package/dist/components/common/Loading/Loading.d.ts +2 -0
- package/dist/components/common/Loading/LoadingBlock.d.ts +5 -0
- package/dist/components/common/MonthPicker/MonthPicker.d.ts +11 -0
- package/dist/components/common/MonthPickerSearchParams/MonthPickerSearchParams.d.ts +8 -0
- package/dist/components/common/NumericFormat/NumericFormat.d.ts +9 -0
- package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +14 -0
- package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +18 -0
- package/dist/components/common/PieChart/PieChart.d.ts +12 -0
- package/dist/components/common/PromptDialog/PromptDialog.d.ts +2 -0
- package/dist/components/common/SearchBox/SearchBox.d.ts +8 -0
- package/dist/components/common/SettingsFormPicker/SettingsFormPicker.d.ts +19 -0
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +26 -0
- package/dist/components/common/Timeline/Timeline.d.ts +7 -0
- package/dist/components/common/TypedFormGroup/TypedFormGroup.d.ts +9 -0
- package/dist/components/common/Typography/Typography.d.ts +8 -0
- package/dist/components/common/VersionInfo/VersionInfo.d.ts +5 -0
- package/dist/components/common/Widget/WidgetCard.d.ts +9 -0
- package/dist/components/common/Widget/WidgetWrapper.d.ts +8 -0
- package/dist/components/common/YearPicker/YearPicker.d.ts +9 -0
- package/dist/components/common/YearPickerSearchParams/YearPickerSearchParams.d.ts +9 -0
- package/dist/components/common/index.d.ts +41 -0
- package/dist/contexts/auth/AuthContext.d.ts +9 -0
- package/dist/contexts/auth/AuthProvider.d.ts +16 -0
- package/dist/contexts/confirm/ConfirmContext.d.ts +8 -0
- package/dist/contexts/confirm/ConfirmProvider.d.ts +5 -0
- package/dist/contexts/delegation/DelegationContext.d.ts +24 -0
- package/dist/contexts/delegation/DelegationProvider.d.ts +6 -0
- package/dist/contexts/index.d.ts +12 -0
- package/dist/contexts/loading/LoadingContext.d.ts +7 -0
- package/dist/contexts/loading/LoadingProvider.d.ts +5 -0
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +22 -0
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +18 -0
- package/dist/contexts/prompt/PromptContext.d.ts +13 -0
- package/dist/contexts/prompt/PromptProvider.d.ts +7 -0
- package/dist/contexts/user/UserContext.d.ts +11 -0
- package/dist/contexts/user/UserProvider.d.ts +5 -0
- package/dist/contexts.cjs.js +1 -0
- package/dist/contexts.d.ts +1 -0
- package/dist/contexts.es.js +280 -0
- package/dist/hooks/index.d.ts +17 -0
- package/dist/hooks/useAuth/hooks/useDevAuth.d.ts +7 -0
- package/dist/hooks/useAuth/hooks/useMsalAuth.d.ts +8 -0
- package/dist/hooks/useAuth/useAuth.d.ts +8 -0
- package/dist/hooks/useAxios/useAxios.d.ts +12 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +4 -0
- package/dist/hooks/useClipboard/useClipboard.d.ts +4 -0
- package/dist/hooks/useConfirm/useConfirm.d.ts +8 -0
- package/dist/hooks/useEmployeePhotoPath/useEmployeePhotoPath.d.ts +5 -0
- package/dist/hooks/useFormControlType/useFormControlType.d.ts +2 -0
- package/dist/hooks/useGetApiData/useGetApiData.d.ts +9 -0
- package/dist/hooks/useGetDataBound/useGetDataBound.d.ts +4 -0
- package/dist/hooks/useKeyPress/useKeyPress.d.ts +2 -0
- package/dist/hooks/useLocalStorageState/useLocalStorageState.d.ts +2 -0
- package/dist/hooks/useNotifications/useNotifications.d.ts +4 -0
- package/dist/hooks/usePermissions/usePermissions.d.ts +4 -0
- package/dist/hooks/usePrompt/usePrompt.d.ts +9 -0
- package/dist/hooks/useSearchQuery/useSearchQuery.d.ts +5 -0
- package/dist/hooks/useSearchQueryState/useSearchQueryState.d.ts +15 -0
- package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +75 -0
- package/dist/hooks.cjs.js +1 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.es.js +60 -0
- package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +4 -0
- package/dist/layout/MainContainer/MainContainer.d.ts +4 -0
- package/dist/layout/PageTitle/PageTitle.d.ts +7 -0
- package/dist/layout/SideContentBar/SideContentBar.d.ts +8 -0
- package/dist/layout/SideMenu/MenuItem/MenuItem.d.ts +11 -0
- package/dist/layout/SideMenu/SideMenu.d.ts +12 -0
- package/dist/layout/TopBar/TopBar.d.ts +8 -0
- package/dist/layout/index.d.ts +5 -0
- package/dist/layout.cjs.js +1 -0
- package/dist/layout.d.ts +1 -0
- package/dist/layout.es.js +124 -0
- package/dist/main.cjs.js +9 -0
- package/dist/main.d.ts +49 -0
- package/dist/main.es.js +3976 -0
- package/dist/models/api/documents/DocType.d.ts +6 -0
- package/dist/models/api/documents/DocumentFileModel.d.ts +18 -0
- package/dist/models/api/documents/DocumentFolderModel.d.ts +9 -0
- package/dist/models/api/documents/DocumentListModel.d.ts +8 -0
- package/dist/models/api/documents/DocumentUploadModel.d.ts +6 -0
- package/dist/models/api/documents/DocumentsCreateFolderModel.d.ts +8 -0
- package/dist/models/index.d.ts +83 -0
- package/dist/models/luminus-context-types/CommonLuminusIcons.d.ts +2 -0
- package/dist/models/luminus-context-types/ILocalizationContext.d.ts +8 -0
- package/dist/models/prop-types/ContainerProps.d.ts +11 -0
- package/dist/models/prop-types/DashboardWidgetCommonProps.d.ts +6 -0
- package/dist/models/prop-types/FormInputProps/FormCheckInputProps.d.ts +8 -0
- package/dist/models/prop-types/FormInputProps/FormFileInputProps.d.ts +12 -0
- package/dist/models/prop-types/FormInputProps/FormNumericStepperInputProps.d.ts +9 -0
- package/dist/models/prop-types/FormInputProps/FormNumericTextInputProps.d.ts +8 -0
- package/dist/models/prop-types/FormInputProps/FormRadioInputProps.d.ts +7 -0
- package/dist/models/prop-types/FormInputProps/FormSelectInputProps.d.ts +8 -0
- package/dist/models/prop-types/FormInputProps/FormTextAreaInputProps.d.ts +8 -0
- package/dist/models/prop-types/FormInputProps/FormTextInputProps.d.ts +8 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormCheckInputProps.d.ts +5 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormDropdownPickerProps.d.ts +5 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormFileInputProps.d.ts +5 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormInputBaseProps.d.ts +8 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormInputProps.d.ts +10 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormNumericStepperInputProps.d.ts +5 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormNumericTextInputProps.d.ts +5 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormRadioInputProps.d.ts +5 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormSelectInputProps.d.ts +5 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormTextAreaInputProps.d.ts +8 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormTextInputProps.d.ts +5 -0
- package/dist/models/prop-types/ImgProps.d.ts +8 -0
- package/dist/models/prop-types/InputContainerProps.d.ts +25 -0
- package/dist/models/prop-types/InputProps/CheckInputProps.d.ts +6 -0
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +24 -0
- package/dist/models/prop-types/InputProps/FileInputProps.d.ts +7 -0
- package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +16 -0
- package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +14 -0
- package/dist/models/prop-types/InputProps/RadioInputProps.d.ts +7 -0
- package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +10 -0
- package/dist/models/prop-types/InputProps/TextAreaInputProps.d.ts +6 -0
- package/dist/models/prop-types/InputProps/TextInputProps.d.ts +10 -0
- package/dist/models/texts/AppSearchTexts.d.ts +5 -0
- package/dist/models/texts/AxiosTexts.d.ts +8 -0
- package/dist/models/texts/ClipboardTexts.d.ts +5 -0
- package/dist/models/texts/ComponentsContextTexts.d.ts +34 -0
- package/dist/models/texts/ConfirmTexts.d.ts +7 -0
- package/dist/models/texts/CustomSelectTexts.d.ts +5 -0
- package/dist/models/texts/DateTexts.d.ts +8 -0
- package/dist/models/texts/DocumentsTexts.d.ts +45 -0
- package/dist/models/texts/DropdownPickerTexts.d.ts +5 -0
- package/dist/models/texts/DynamicFormsTexts.d.ts +13 -0
- package/dist/models/texts/ErrorBoundaryTexts.d.ts +6 -0
- package/dist/models/texts/FormSubmitTexts.d.ts +4 -0
- package/dist/models/texts/FormValidationTexts.d.ts +7 -0
- package/dist/models/texts/HomeDashboardTexts.d.ts +6 -0
- package/dist/models/texts/MessageBoardTexts.d.ts +4 -0
- package/dist/models/texts/ReportsTexts.d.ts +30 -0
- package/dist/models/texts/WidgetTexts.d.ts +4 -0
- package/dist/models/types/ApiErrorResult.d.ts +9 -0
- package/dist/models/types/BaseMessageBoardModel.d.ts +8 -0
- package/dist/models/types/DashboardConfig.d.ts +6 -0
- package/dist/models/types/DashboardWidget.d.ts +10 -0
- package/dist/models/types/DashboardWidgetConfig.d.ts +5 -0
- package/dist/models/types/DropdownPickerOption.d.ts +8 -0
- package/dist/models/types/EmployeeIndexModel.d.ts +14 -0
- package/dist/models/types/ErrorField.d.ts +5 -0
- package/dist/models/types/FormSelectOption.d.ts +5 -0
- package/dist/models/types/FromTo.d.ts +5 -0
- package/dist/models/types/HookFormInputProps.d.ts +10 -0
- package/dist/models/types/LoginState.d.ts +7 -0
- package/dist/models/types/MenuItemType.d.ts +10 -0
- package/dist/models/types/MenuItemTypeExtended.d.ts +7 -0
- package/dist/models/types/NameIdIntModel.d.ts +5 -0
- package/dist/models/types/NameIdIntOptionalModel.d.ts +5 -0
- package/dist/models/types/NameIdStringModel.d.ts +5 -0
- package/dist/models/types/NameIdStringOptionalModel.d.ts +5 -0
- package/dist/models/types/PhotoAction.d.ts +8 -0
- package/dist/models/types/PhotoLibraryItemModel.d.ts +7 -0
- package/dist/models/types/PromptOptions.d.ts +7 -0
- package/dist/models/types/SaveFileFromResponseOptions.d.ts +6 -0
- package/dist/models/types/SearchResultGroupKeyModel.d.ts +6 -0
- package/dist/models/types/SearchResultGroupModel.d.ts +8 -0
- package/dist/models/types/SearchResultModel.d.ts +9 -0
- package/dist/models/types/SearchType.d.ts +6 -0
- package/dist/models/types/TimelineStep.d.ts +11 -0
- package/dist/models/types/TimelineStepState.d.ts +5 -0
- package/dist/models/types/ToLiteral.d.ts +5 -0
- package/dist/models/types/UseGetApiDataOptions.d.ts +11 -0
- package/dist/models/types/UseGetDataBoundOptions.d.ts +5 -0
- package/dist/models/types/UserLoginState.d.ts +8 -0
- package/dist/models/types/UserModel.d.ts +12 -0
- package/dist/models/types/common/NullsOptional.d.ts +12 -0
- package/dist/models/types/common/RequireAtLeastOne.d.ts +4 -0
- package/dist/models/types/common/SharedProperties.d.ts +33 -0
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormGroup.d.ts +8 -0
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItem.d.ts +8 -0
- package/dist/models/types/dynamicForms/index.d.ts +8 -0
- package/dist/models/types/dynamicForms/types/DynamicFormColumnDef.d.ts +12 -0
- package/dist/models/types/dynamicForms/types/DynamicFormColumnSchemaModel.d.ts +13 -0
- package/dist/models/types/dynamicForms/types/DynamicFormColumnValueSchemaModel.d.ts +5 -0
- package/dist/models/types/dynamicForms/types/DynamicFormFilters.d.ts +4 -0
- package/dist/models/types/dynamicForms/types/DynamicFormIndexModel.d.ts +7 -0
- package/dist/models/types/dynamicForms/types/DynamicFormSchemaModel.d.ts +16 -0
- package/dist/models/types/dynamicForms/types/DynamicFormValueTypes.d.ts +12 -0
- package/dist/searchUtils-DuVe5YHX.js +14 -0
- package/dist/searchUtils-GR6YgdCs.cjs +1 -0
- package/dist/style.css +1 -0
- package/dist/useClipboard-BdDtrG_v.cjs +1 -0
- package/dist/useClipboard-Cn05DXm8.js +70 -0
- package/dist/useGetApiData-BhzRnuk9.js +52 -0
- package/dist/useGetApiData-DFCqg0Qo.cjs +1 -0
- package/dist/useLocalStorageState-BFc8Gc8H.cjs +1 -0
- package/dist/useLocalStorageState-Bt99kkCr.js +17 -0
- package/dist/usePermissions-DpgiUP05.js +20 -0
- package/dist/usePermissions-MVy72H28.cjs +1 -0
- package/dist/utils/apiErrorFields/apiErrorFieldsUtils.d.ts +5 -0
- package/dist/utils/bnfValueFormat/bnfValueFormat.d.ts +7 -0
- package/dist/utils/color/colorUtils.d.ts +2 -0
- package/dist/utils/date/dateUtils.d.ts +47 -0
- package/dist/utils/file/fileUtils.d.ts +9 -0
- package/dist/utils/hookForm/hookFormUtils.d.ts +4 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/number/numberUtils.d.ts +1 -0
- package/dist/utils/object/objectUtils.d.ts +6 -0
- package/dist/utils/search/searchUtils.d.ts +5 -0
- package/dist/utils/text/string.d.ts +18 -0
- package/dist/utils/text/textUtils.d.ts +11 -0
- package/dist/utils.cjs.js +1 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.es.js +83 -0
- package/dist/variables.scss +171 -171
- package/package.json +115 -115
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { t as b, b9 as B, j as r, ba as F, a3 as T, a_ as H, bb as U, ae as g, aZ as q, a4 as L, bc as V, aQ as J, as as Q, ay as _, bd as M, az as K, aB as w, aA as W, be as Z, aO as G, bf as $, aS as X } from "./ResponsiveContextDropdown-D7dyws1-.js";
|
|
2
|
+
import { useState as v, useCallback as d, useMemo as S, useContext as y, useEffect as C, useRef as R } from "react";
|
|
3
|
+
import { EventType as P } from "@azure/msal-browser";
|
|
4
|
+
import { MsalProvider as Y } from "@azure/msal-react";
|
|
5
|
+
import "react-router-dom";
|
|
6
|
+
import "react-hook-form";
|
|
7
|
+
import "react-flexmonster";
|
|
8
|
+
import { L as ee } from "./Loading-BDj5dLz0.js";
|
|
9
|
+
import { u as te } from "./useGetApiData-BhzRnuk9.js";
|
|
10
|
+
import { u as se } from "./useLocalStorageState-Bt99kkCr.js";
|
|
11
|
+
function ne(e) {
|
|
12
|
+
const a = b(e);
|
|
13
|
+
return a.setHours(23, 59, 59, 999), a;
|
|
14
|
+
}
|
|
15
|
+
function oe() {
|
|
16
|
+
return ne(Date.now());
|
|
17
|
+
}
|
|
18
|
+
function ae(e, a) {
|
|
19
|
+
const t = +b(e), [s, n] = [
|
|
20
|
+
+b(a.start),
|
|
21
|
+
+b(a.end)
|
|
22
|
+
].sort((o, i) => o - i);
|
|
23
|
+
return t >= s && t <= n;
|
|
24
|
+
}
|
|
25
|
+
function re() {
|
|
26
|
+
return B(Date.now());
|
|
27
|
+
}
|
|
28
|
+
const ie = ({ children: e }) => {
|
|
29
|
+
const [a, t] = v(!1), [s, n] = v(""), o = d((c) => {
|
|
30
|
+
t(!0), n(c);
|
|
31
|
+
}, []), i = d(() => {
|
|
32
|
+
t(!1);
|
|
33
|
+
}, []), l = S(() => ({ show: a, text: s, showConfirm: o, hideConfirm: i }), [a, s, o, i]);
|
|
34
|
+
return /* @__PURE__ */ r.jsxs(F.Provider, { value: l, children: [
|
|
35
|
+
/* @__PURE__ */ r.jsx(ue, {}),
|
|
36
|
+
e
|
|
37
|
+
] });
|
|
38
|
+
}, le = () => {
|
|
39
|
+
const { texts: { confirm: e } } = y(T), { isShown: a, text: t, onFinish: s } = H(), { options: n } = y(U), [o, i] = v(n.defaultValue ?? ""), l = d(() => {
|
|
40
|
+
s(null);
|
|
41
|
+
}, [s]), c = d((x) => {
|
|
42
|
+
x.preventDefault(), !(n.required && !o) && s(o);
|
|
43
|
+
}, [s, n.required, o]);
|
|
44
|
+
C(() => {
|
|
45
|
+
a === !0 && i(n.defaultValue ?? "");
|
|
46
|
+
}, [a, n.defaultValue]);
|
|
47
|
+
const m = S(() => ({
|
|
48
|
+
value: o,
|
|
49
|
+
onChange: (x) => i(x.currentTarget.value),
|
|
50
|
+
className: "w-100",
|
|
51
|
+
autoFocus: !0,
|
|
52
|
+
tabIndex: 0
|
|
53
|
+
}), [o]);
|
|
54
|
+
return /* @__PURE__ */ r.jsxs(g, { show: a, size: "sm", centered: !0, onHide: l, children: [
|
|
55
|
+
/* @__PURE__ */ r.jsx(g.Header, { className: "justify-content-center", children: /* @__PURE__ */ r.jsx(g.Title, { children: t }) }),
|
|
56
|
+
/* @__PURE__ */ r.jsxs("form", { onSubmit: c, children: [
|
|
57
|
+
/* @__PURE__ */ r.jsxs(g.Body, { children: [
|
|
58
|
+
n.input === "textarea" ? /* @__PURE__ */ r.jsx("textarea", { ...m, rows: 5 }) : void 0,
|
|
59
|
+
n.input === "input" ? /* @__PURE__ */ r.jsx(q, { ...m, type: n.type }) : void 0
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ r.jsxs(g.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
62
|
+
/* @__PURE__ */ r.jsx(L, { variant: "outlined", color: "secondary", onClick: l, className: "flex-grow-1", children: e.cancel }),
|
|
63
|
+
/* @__PURE__ */ r.jsx(L, { color: "primary", disabled: n.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
|
|
64
|
+
] })
|
|
65
|
+
] })
|
|
66
|
+
] });
|
|
67
|
+
}, ce = ({ children: e }) => {
|
|
68
|
+
const [a, t] = v(!1), [s, n] = v(""), [o, i] = v({ input: "textarea", type: "text" }), l = R(() => {
|
|
69
|
+
}), c = d((h) => {
|
|
70
|
+
n(h), t(!0);
|
|
71
|
+
}, []), m = d(() => {
|
|
72
|
+
t(!1);
|
|
73
|
+
}, []), x = S(() => ({
|
|
74
|
+
isShown: a,
|
|
75
|
+
text: s,
|
|
76
|
+
showPrompt: c,
|
|
77
|
+
hidePrompt: m,
|
|
78
|
+
resolveRef: l,
|
|
79
|
+
options: o,
|
|
80
|
+
setOptions: i
|
|
81
|
+
}), [a, s, c, m, o]);
|
|
82
|
+
return /* @__PURE__ */ r.jsxs(U.Provider, { value: x, children: [
|
|
83
|
+
e,
|
|
84
|
+
/* @__PURE__ */ r.jsx(le, {})
|
|
85
|
+
] });
|
|
86
|
+
}, ye = ({ cookieDomain: e, axiosOptions: a, language: t, texts: s, ProjectIconComponent: n, localizationContext: o, chartColorPalette: i, children: l }) => {
|
|
87
|
+
const c = S(() => ({
|
|
88
|
+
axiosOptions: a,
|
|
89
|
+
cookieDomain: e,
|
|
90
|
+
language: t,
|
|
91
|
+
texts: s,
|
|
92
|
+
ProjectIconComponent: n,
|
|
93
|
+
localizationContext: o,
|
|
94
|
+
chartColorPalette: i
|
|
95
|
+
}), [
|
|
96
|
+
a,
|
|
97
|
+
e,
|
|
98
|
+
t,
|
|
99
|
+
n,
|
|
100
|
+
o,
|
|
101
|
+
s,
|
|
102
|
+
i
|
|
103
|
+
]);
|
|
104
|
+
return /* @__PURE__ */ r.jsx(T.Provider, { value: c, children: /* @__PURE__ */ r.jsx(ie, { children: /* @__PURE__ */ r.jsxs(ce, { children: [
|
|
105
|
+
/* @__PURE__ */ r.jsx(V, {}),
|
|
106
|
+
l
|
|
107
|
+
] }) }) });
|
|
108
|
+
}, je = ({ children: e }) => {
|
|
109
|
+
const [a, t] = v(!1), [s] = v(/* @__PURE__ */ new Set()), n = d((l) => {
|
|
110
|
+
s.add(l), t(!0);
|
|
111
|
+
}, [s]), o = d((l) => {
|
|
112
|
+
s.delete(l), s.size === 0 && t(!1);
|
|
113
|
+
}, [s]), i = S(() => ({ isLoading: a, startLoading: n, stopLoading: o }), [a, n, o]);
|
|
114
|
+
return /* @__PURE__ */ r.jsxs(J.Provider, { value: i, children: [
|
|
115
|
+
a && /* @__PURE__ */ r.jsx(ee, {}),
|
|
116
|
+
e
|
|
117
|
+
] });
|
|
118
|
+
}, Ie = ({ children: e }) => {
|
|
119
|
+
const a = Q(), { msalInstance: t } = y(_), { delegation: s, setDelegation: n, setAvailableDelegations: o, refreshAvailableDelegations: i } = y(M), { getToken: l } = K(), [c, m] = v(null), x = d(async () => {
|
|
120
|
+
const u = await l();
|
|
121
|
+
u && m(u);
|
|
122
|
+
}, [l]);
|
|
123
|
+
C(() => {
|
|
124
|
+
x();
|
|
125
|
+
}, [x]);
|
|
126
|
+
const p = d(() => {
|
|
127
|
+
const u = localStorage.getItem("user") ?? null;
|
|
128
|
+
return u ? JSON.parse(u ?? "") : null;
|
|
129
|
+
}, [])(), [N, D] = v({
|
|
130
|
+
state: p ? w.LOGGED_IN : w.LOGGING_IN,
|
|
131
|
+
user: p
|
|
132
|
+
}), A = d(async (u) => {
|
|
133
|
+
let f = null;
|
|
134
|
+
return await a.get("/user/detail", u ? { headers: { Authorization: `Bearer ${u}` } } : void 0).then((O) => {
|
|
135
|
+
f = O.data;
|
|
136
|
+
}).catch(() => {
|
|
137
|
+
f = null;
|
|
138
|
+
}), f;
|
|
139
|
+
}, [a]), E = d(() => {
|
|
140
|
+
localStorage.removeItem("user"), D({
|
|
141
|
+
state: w.LOGGED_OUT,
|
|
142
|
+
user: null
|
|
143
|
+
}), n(null), o(null);
|
|
144
|
+
}, [o, n]), j = d(async (u) => {
|
|
145
|
+
D({
|
|
146
|
+
state: w.LOGGING_IN,
|
|
147
|
+
user: null
|
|
148
|
+
});
|
|
149
|
+
const f = await A(u);
|
|
150
|
+
return f ? (D({
|
|
151
|
+
state: w.LOGGED_IN,
|
|
152
|
+
user: f
|
|
153
|
+
}), localStorage.setItem("user", JSON.stringify(f)), await i(), !0) : (D({
|
|
154
|
+
state: w.LOGIN_FAILED,
|
|
155
|
+
user: null
|
|
156
|
+
}), !1);
|
|
157
|
+
}, [A, i]), I = d(() => {
|
|
158
|
+
E();
|
|
159
|
+
}, [E]);
|
|
160
|
+
C(() => {
|
|
161
|
+
if (t) {
|
|
162
|
+
const u = t.addEventCallback((f) => {
|
|
163
|
+
if (f.eventType === P.LOGIN_SUCCESS && f.payload) {
|
|
164
|
+
const O = f.payload;
|
|
165
|
+
m(O.accessToken);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
return () => {
|
|
169
|
+
u && t.removeEventCallback(u);
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
return () => {
|
|
173
|
+
};
|
|
174
|
+
}, [t, j, I]);
|
|
175
|
+
const k = d(async (u) => {
|
|
176
|
+
u && await j(u).catch(() => {
|
|
177
|
+
I(), n(null);
|
|
178
|
+
});
|
|
179
|
+
}, [j, I, n]);
|
|
180
|
+
C(() => {
|
|
181
|
+
k(c);
|
|
182
|
+
}, [c, s == null ? void 0 : s.id, k]);
|
|
183
|
+
const z = S(() => ({
|
|
184
|
+
user: N.user,
|
|
185
|
+
userLoginState: N,
|
|
186
|
+
loginUser: j,
|
|
187
|
+
logoutUser: I
|
|
188
|
+
}), [N, j, I]);
|
|
189
|
+
return /* @__PURE__ */ r.jsx(W.Provider, { value: z, children: e });
|
|
190
|
+
}, pe = ({ ...e }) => {
|
|
191
|
+
const { cookieDomain: a } = y(T), [, t] = Z(["Authorization"]), s = S(() => ({
|
|
192
|
+
useMsal: e.useMsal ?? !1,
|
|
193
|
+
msalInstance: e.useMsal ? e.msalInstance ?? null : null,
|
|
194
|
+
msalScopes: e.useMsal ? e.msalScopes ?? [] : []
|
|
195
|
+
}), [e]);
|
|
196
|
+
return C(() => {
|
|
197
|
+
if (e.useMsal) {
|
|
198
|
+
const n = e.msalInstance.addEventCallback((o) => {
|
|
199
|
+
if (o.eventType === P.LOGIN_SUCCESS || o.eventType === P.ACQUIRE_TOKEN_SUCCESS && o.payload) {
|
|
200
|
+
const i = o.payload, l = i.account;
|
|
201
|
+
e.msalInstance.setActiveAccount(l);
|
|
202
|
+
const c = i.accessToken, m = i.expiresOn;
|
|
203
|
+
t("Authorization", c, {
|
|
204
|
+
path: "/",
|
|
205
|
+
secure: !0,
|
|
206
|
+
sameSite: "none",
|
|
207
|
+
domain: a,
|
|
208
|
+
expires: m ?? void 0
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
o.error && console.error("AuthProvider MSAL Error", o);
|
|
212
|
+
});
|
|
213
|
+
return () => {
|
|
214
|
+
n && e.msalInstance.removeEventCallback(n);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
return () => {
|
|
218
|
+
};
|
|
219
|
+
}, [e, t, a]), /* @__PURE__ */ r.jsx(_.Provider, { value: s, children: e.useMsal ? /* @__PURE__ */ r.jsx(Y, { instance: e.msalInstance, children: e.children }) : e.children });
|
|
220
|
+
}, De = ({ children: e, relativeEndpoint: a }) => {
|
|
221
|
+
const [t, s, n] = se("user-delegation", null), o = S(() => {
|
|
222
|
+
if (!t)
|
|
223
|
+
return null;
|
|
224
|
+
const h = t.from ? G(t.from) : re(), p = t.to ? G(t.to) : oe();
|
|
225
|
+
return ae(new Date(Date.now()), { start: h, end: p }) ? t : (s(null), null);
|
|
226
|
+
}, [t, s]), { data: i, setData: l, reloadData: c } = te(a, {
|
|
227
|
+
nullStateBeforeLoad: !1,
|
|
228
|
+
nullStateOnFail: !0
|
|
229
|
+
}), m = R(null);
|
|
230
|
+
C(() => {
|
|
231
|
+
const h = () => {
|
|
232
|
+
c(), m.current = window.setTimeout(h, $() + 5e3);
|
|
233
|
+
};
|
|
234
|
+
return h(), () => {
|
|
235
|
+
m.current !== null && window.clearTimeout(m.current);
|
|
236
|
+
};
|
|
237
|
+
}, [c]), C(() => {
|
|
238
|
+
const h = () => {
|
|
239
|
+
n();
|
|
240
|
+
};
|
|
241
|
+
return window.addEventListener("focus", h), () => {
|
|
242
|
+
window.removeEventListener("focus", h);
|
|
243
|
+
};
|
|
244
|
+
}, [n, c]);
|
|
245
|
+
const x = S(() => ({
|
|
246
|
+
delegation: o,
|
|
247
|
+
setDelegation: s,
|
|
248
|
+
availableDelegations: i,
|
|
249
|
+
setAvailableDelegations: l,
|
|
250
|
+
refreshAvailableDelegations: c
|
|
251
|
+
}), [
|
|
252
|
+
o,
|
|
253
|
+
s,
|
|
254
|
+
i,
|
|
255
|
+
l,
|
|
256
|
+
c
|
|
257
|
+
]);
|
|
258
|
+
return /* @__PURE__ */ r.jsx(M.Provider, { value: x, children: e });
|
|
259
|
+
}, ue = () => {
|
|
260
|
+
const { texts: { confirm: e } } = y(T), { onConfirm: a, onCancel: t, text: s, show: n } = X();
|
|
261
|
+
return /* @__PURE__ */ r.jsxs(g, { show: n, size: "sm", centered: !0, onHide: t, children: [
|
|
262
|
+
/* @__PURE__ */ r.jsx(g.Header, { className: "justify-content-center", children: /* @__PURE__ */ r.jsx(g.Title, { children: s }) }),
|
|
263
|
+
/* @__PURE__ */ r.jsx(g.Body, { children: /* @__PURE__ */ r.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
264
|
+
/* @__PURE__ */ r.jsx(L, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: t, children: e.no }),
|
|
265
|
+
/* @__PURE__ */ r.jsx(L, { type: "button", color: "primary", onClick: a, className: "w-100 ml", children: e.yes })
|
|
266
|
+
] }) })
|
|
267
|
+
] });
|
|
268
|
+
};
|
|
269
|
+
export {
|
|
270
|
+
_ as AuthContext,
|
|
271
|
+
pe as AuthProvider,
|
|
272
|
+
M as DelegationContext,
|
|
273
|
+
De as DelegationProvider,
|
|
274
|
+
J as LoadingContext,
|
|
275
|
+
je as LoadingProvider,
|
|
276
|
+
T as LuminusComponentsContext,
|
|
277
|
+
ye as LuminusComponentsProvider,
|
|
278
|
+
W as UserContext,
|
|
279
|
+
Ie as UserProvider
|
|
280
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { default as useAuth } from './useAuth/useAuth';
|
|
2
|
+
export { default as useNotifications } from './useNotifications/useNotifications';
|
|
3
|
+
export { useAxios, cancelToken } from './useAxios/useAxios';
|
|
4
|
+
export { default as useConfirm } from './useConfirm/useConfirm';
|
|
5
|
+
export { default as usePrompt } from './usePrompt/usePrompt';
|
|
6
|
+
export { default as useZodSchemaTypes } from './useZodSchemaTypes/useZodSchemaTypes';
|
|
7
|
+
export { default as useClickOutside } from './useClickOutside/useClickOutside';
|
|
8
|
+
export { default as usePermissions } from './usePermissions/usePermissions';
|
|
9
|
+
export { default as useKeyPress } from './useKeyPress/useKeyPress';
|
|
10
|
+
export { default as useGetApiData } from './useGetApiData/useGetApiData';
|
|
11
|
+
export { default as useGetDataBound } from './useGetDataBound/useGetDataBound';
|
|
12
|
+
export { default as useFormControlType } from './useFormControlType/useFormControlType';
|
|
13
|
+
export { default as useLocalStorageState } from './useLocalStorageState/useLocalStorageState';
|
|
14
|
+
export { default as useSearchQuery } from './useSearchQuery/useSearchQuery';
|
|
15
|
+
export { default as useSearchQueryState } from './useSearchQueryState/useSearchQueryState';
|
|
16
|
+
export { default as useEmployeePhotoPath } from './useEmployeePhotoPath/useEmployeePhotoPath';
|
|
17
|
+
export { default as useClipboard } from './useClipboard/useClipboard';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const useAuth: () => {
|
|
2
|
+
isAuthenticated: () => boolean;
|
|
3
|
+
isAuthenticating: () => boolean;
|
|
4
|
+
getToken: (() => string | null) | (() => Promise<string | null>);
|
|
5
|
+
login: (kid: string, password: string) => Promise<string | null>;
|
|
6
|
+
logout: () => void;
|
|
7
|
+
};
|
|
8
|
+
export default useAuth;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CancelTokenStatic } from 'axios';
|
|
2
|
+
|
|
3
|
+
export declare const cancelToken: CancelTokenStatic;
|
|
4
|
+
type Config = {
|
|
5
|
+
authenticated?: boolean;
|
|
6
|
+
differentBaseUrl?: string;
|
|
7
|
+
silent?: boolean;
|
|
8
|
+
customToken?: string;
|
|
9
|
+
ignoreDelegation?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const useAxios: (useAxiosConfig?: Config) => import('axios').AxiosInstance;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UseGetApiDataOptions } from '../../models/index';
|
|
2
|
+
import { GenericAbortSignal } from 'axios';
|
|
3
|
+
|
|
4
|
+
declare const useGetApiData: <T>(uri: string, { loadOnInit, enabled, silent, nullStateBeforeLoad, nullStateOnFail, customApiUrl, customBearerToken, dataTransformer, }?: UseGetApiDataOptions<T>) => {
|
|
5
|
+
data: T | null;
|
|
6
|
+
setData: import('react').Dispatch<import('react').SetStateAction<T | null>>;
|
|
7
|
+
reloadData: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export default useGetApiData;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as PromptOptions } from '../../models/types/PromptOptions';
|
|
2
|
+
|
|
3
|
+
declare const usePrompt: () => {
|
|
4
|
+
isShown: boolean;
|
|
5
|
+
text: string;
|
|
6
|
+
prompt: (t: string, options?: PromptOptions) => Promise<string | null>;
|
|
7
|
+
onFinish: (userResponse: string | null) => void;
|
|
8
|
+
};
|
|
9
|
+
export default usePrompt;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as ToLiteral } from '../../models/types/ToLiteral';
|
|
2
|
+
import { SetStateAction } from 'react';
|
|
3
|
+
|
|
4
|
+
type SupportedTypes = number | string | boolean | null | object;
|
|
5
|
+
/**
|
|
6
|
+
* Setting two states at once results in unexpected behaviour. For that case use react-router-dom setSearchParams of useSearchParams
|
|
7
|
+
* It might not always return correct state for Union of different types or numbers in string (for example '50' returns as 50).
|
|
8
|
+
* @template T type to apply to returned state and parameter of setState
|
|
9
|
+
* @param paramKey key by which the value gets saved in query param
|
|
10
|
+
* @param defaultState value of state if query param is absent or invalid
|
|
11
|
+
* @returns [T extends SupportedTypes, (newState: T) => void]
|
|
12
|
+
* @todo fix a bug when you call setState on 2 different queryStates at once - it doesn't set up values properly; seems to be problem with setSearch - it doesn't get updated and second setState is called stale; #USQSdup
|
|
13
|
+
*/
|
|
14
|
+
declare const useSearchQueryState: <T extends SupportedTypes>(paramKey: string, defaultState: T, typeOverride?: ToLiteral<SupportedTypes>) => readonly [T, (newValue: SetStateAction<T> | T) => void];
|
|
15
|
+
export default useSearchQueryState;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
type CustomTypeProps = {
|
|
4
|
+
useCoerce?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type NumberTypeProps = CustomTypeProps & {
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
};
|
|
10
|
+
type ZFileProps = {
|
|
11
|
+
required: boolean;
|
|
12
|
+
multiple: boolean;
|
|
13
|
+
maxFileSize: number;
|
|
14
|
+
};
|
|
15
|
+
declare const useZodSchemaTypes: () => {
|
|
16
|
+
zString: (props?: CustomTypeProps) => z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>, string | null, string | null | undefined>;
|
|
17
|
+
zStringRequired: (props?: CustomTypeProps) => z.ZodEffects<z.ZodString, string, string>;
|
|
18
|
+
zNumber: (props?: NumberTypeProps) => z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | null, number | null | undefined>;
|
|
19
|
+
zNumberRequired: (props?: NumberTypeProps) => z.ZodNumber;
|
|
20
|
+
zBool: (props?: CustomTypeProps) => z.ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
21
|
+
zDate: (props?: CustomTypeProps) => z.ZodEffects<z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>, string | null, string | null>;
|
|
22
|
+
zDateRequired: (props?: CustomTypeProps) => z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
23
|
+
zEnum: (options: [string, ...string[]], props?: CustomTypeProps) => z.ZodEffects<z.ZodNullable<z.ZodEffects<z.ZodEnum<[string, ...string[]]>, string, string>>, string | null, string | null>;
|
|
24
|
+
zEnumRequired: (options: [string, ...string[]], _props?: CustomTypeProps) => z.ZodEffects<z.ZodEnum<[string, ...string[]]>, string, string>;
|
|
25
|
+
zObjectIdInt: (_props?: CustomTypeProps) => z.ZodEffects<z.ZodNullable<z.ZodObject<{
|
|
26
|
+
id: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | null, number | null | undefined>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
id: number | null;
|
|
29
|
+
}, {
|
|
30
|
+
id?: number | null | undefined;
|
|
31
|
+
}>>, {
|
|
32
|
+
id: number | null;
|
|
33
|
+
} | null, {
|
|
34
|
+
id?: number | null | undefined;
|
|
35
|
+
} | null>;
|
|
36
|
+
zObjectIdIntRequired: (_props?: CustomTypeProps) => z.ZodEffects<z.ZodObject<{
|
|
37
|
+
id: z.ZodNumber;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
id: number;
|
|
40
|
+
}, {
|
|
41
|
+
id: number;
|
|
42
|
+
}>, {
|
|
43
|
+
id: number;
|
|
44
|
+
}, {
|
|
45
|
+
id: number;
|
|
46
|
+
}>;
|
|
47
|
+
zObjectIdStr: (_props?: CustomTypeProps) => z.ZodEffects<z.ZodNullable<z.ZodObject<{
|
|
48
|
+
id: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>, string | null, string | null | undefined>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
id: string | null;
|
|
51
|
+
}, {
|
|
52
|
+
id?: string | null | undefined;
|
|
53
|
+
}>>, {
|
|
54
|
+
id: string | null;
|
|
55
|
+
} | null, {
|
|
56
|
+
id?: string | null | undefined;
|
|
57
|
+
} | null>;
|
|
58
|
+
zObjectIdStrRequired: (_props?: CustomTypeProps) => z.ZodEffects<z.ZodObject<{
|
|
59
|
+
id: z.ZodEffects<z.ZodString, string, string>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
id: string;
|
|
62
|
+
}, {
|
|
63
|
+
id: string;
|
|
64
|
+
}>, {
|
|
65
|
+
id: string;
|
|
66
|
+
}, {
|
|
67
|
+
id: string;
|
|
68
|
+
}>;
|
|
69
|
+
zFile: <T extends ZFileProps>({ required, multiple, maxFileSize }: T) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodAny, File[], any>, File[], any>, File[], any>, File[], any>, (T extends {
|
|
70
|
+
multiple: true;
|
|
71
|
+
} ? File[] : File) | (T extends {
|
|
72
|
+
required: false;
|
|
73
|
+
} ? null : never), any>;
|
|
74
|
+
};
|
|
75
|
+
export default useZodSchemaTypes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./ResponsiveContextDropdown-ZEwJJoab.cjs"),u=require("./useClipboard-BdDtrG_v.cjs"),l=require("./usePermissions-MVy72H28.cjs"),m=require("./useGetApiData-DFCqg0Qo.cjs"),c=require("react"),d=require("./useLocalStorageState-BFc8Gc8H.cjs"),h=a=>{let e="pending",t;const o=a.then(r=>{e="success",t=r},r=>{e="error",t=r});return()=>{switch(e){case"pending":throw o;case"success":return t;case"error":throw t;default:throw new Error("Unknown status")}}};function S(a,e){const t=s.useAxios({silent:!0,differentBaseUrl:e==null?void 0:e.customBaseUrl,customToken:e==null?void 0:e.customToken}),[o,r]=c.useState(null);return c.useEffect(()=>{(async()=>{const n=t.get(a).then(i=>i.data);r(h(n))})()},[t,a]),o}exports.cancelToken=s.cancelToken;exports.useAuth=s.useAuth;exports.useAxios=s.useAxios;exports.useConfirm=s.useConfirm;exports.useFormControlType=s.useFormControlType;exports.useNotifications=s.useNotifications;exports.usePrompt=s.usePrompt;exports.useZodSchemaTypes=s.useZodSchemaTypes;exports.useClickOutside=u.useClickOutside;exports.useClipboard=u.useClipboard;exports.useEmployeePhotoPath=u.useEmployeePhotoPath;exports.useKeyPress=u.useKeyPress;exports.useSearchQuery=u.useSearchQuery;exports.useSearchQueryState=u.useSearchQueryState;exports.usePermissions=l.usePermissions;exports.useGetApiData=m.useGetApiData;exports.useLocalStorageState=d.useLocalStorageState;exports.useGetDataBound=S;
|
package/dist/hooks.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hooks/index'
|
package/dist/hooks.es.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { as as c } from "./ResponsiveContextDropdown-D7dyws1-.js";
|
|
2
|
+
import { bg as S, az as g, aS as y, aF as w, aR as k, a_ as D, bh as P } from "./ResponsiveContextDropdown-D7dyws1-.js";
|
|
3
|
+
import { b, u as C, e as A, a as B, c as E, d as U } from "./useClipboard-Cn05DXm8.js";
|
|
4
|
+
import { u as G } from "./usePermissions-DpgiUP05.js";
|
|
5
|
+
import { u as z } from "./useGetApiData-BhzRnuk9.js";
|
|
6
|
+
import { useState as n, useEffect as m } from "react";
|
|
7
|
+
import { u as L } from "./useLocalStorageState-Bt99kkCr.js";
|
|
8
|
+
const f = (t) => {
|
|
9
|
+
let e = "pending", s;
|
|
10
|
+
const r = t.then((a) => {
|
|
11
|
+
e = "success", s = a;
|
|
12
|
+
}, (a) => {
|
|
13
|
+
e = "error", s = a;
|
|
14
|
+
});
|
|
15
|
+
return () => {
|
|
16
|
+
switch (e) {
|
|
17
|
+
case "pending":
|
|
18
|
+
throw r;
|
|
19
|
+
case "success":
|
|
20
|
+
return s;
|
|
21
|
+
case "error":
|
|
22
|
+
throw s;
|
|
23
|
+
default:
|
|
24
|
+
throw new Error("Unknown status");
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
function d(t, e) {
|
|
29
|
+
const s = c({
|
|
30
|
+
silent: !0,
|
|
31
|
+
differentBaseUrl: e == null ? void 0 : e.customBaseUrl,
|
|
32
|
+
customToken: e == null ? void 0 : e.customToken
|
|
33
|
+
}), [r, a] = n(null);
|
|
34
|
+
return m(() => {
|
|
35
|
+
(async () => {
|
|
36
|
+
const u = s.get(t).then((o) => o.data);
|
|
37
|
+
a(f(u));
|
|
38
|
+
})();
|
|
39
|
+
}, [s, t]), r;
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
S as cancelToken,
|
|
43
|
+
g as useAuth,
|
|
44
|
+
c as useAxios,
|
|
45
|
+
b as useClickOutside,
|
|
46
|
+
C as useClipboard,
|
|
47
|
+
y as useConfirm,
|
|
48
|
+
A as useEmployeePhotoPath,
|
|
49
|
+
w as useFormControlType,
|
|
50
|
+
z as useGetApiData,
|
|
51
|
+
d as useGetDataBound,
|
|
52
|
+
B as useKeyPress,
|
|
53
|
+
L as useLocalStorageState,
|
|
54
|
+
k as useNotifications,
|
|
55
|
+
G as usePermissions,
|
|
56
|
+
D as usePrompt,
|
|
57
|
+
E as useSearchQuery,
|
|
58
|
+
U as useSearchQueryState,
|
|
59
|
+
P as useZodSchemaTypes
|
|
60
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MenuItemTypeExtended } from '../../../models/index';
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
item: MenuItemTypeExtended;
|
|
5
|
+
menuExpanded: boolean;
|
|
6
|
+
collapsed: boolean;
|
|
7
|
+
onCollapse: () => void;
|
|
8
|
+
currentPath: string;
|
|
9
|
+
};
|
|
10
|
+
declare const MenuItem: ({ item, menuExpanded, collapsed, onCollapse, currentPath }: Props) => import("react").JSX.Element;
|
|
11
|
+
export default MenuItem;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MenuItemType } from '../../models/index';
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
headerItem: React.ReactNode;
|
|
5
|
+
mainItems: MenuItemType[];
|
|
6
|
+
secondaryItems: MenuItemType[];
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
setExpanded: (expanded: boolean) => void;
|
|
9
|
+
currentPath: string;
|
|
10
|
+
};
|
|
11
|
+
declare const SideMenu: ({ headerItem, mainItems, secondaryItems, expanded, setExpanded, currentPath, }: Props) => import("react").JSX.Element;
|
|
12
|
+
export default SideMenu;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
appName: string;
|
|
3
|
+
leftOffset?: number;
|
|
4
|
+
centerContent?: React.ReactNode;
|
|
5
|
+
rightContent?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const TopBar: ({ appName, leftOffset, centerContent, rightContent }: Props) => import("react").JSX.Element;
|
|
8
|
+
export default TopBar;
|