@solidstarters/solid-core-ui 1.1.211 → 1.1.212
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/dist/components/Svg/DevDocs.tsx +9 -0
- package/dist/components/Svg/DocsSvg.tsx +9 -0
- package/dist/components/Svg/ExcelSvg.tsx +15 -0
- package/dist/components/Svg/FieldSvg.tsx +9 -0
- package/dist/components/Svg/FileSvg.tsx +18 -0
- package/dist/components/Svg/HomePageModuleSvg.tsx +179 -0
- package/dist/components/Svg/ModelSvg.tsx +9 -0
- package/dist/components/Svg/ModuleSvg.tsx +9 -0
- package/dist/components/Svg/PDFSvg.tsx +15 -0
- package/dist/components/Svg/RightArrowSvg.tsx +9 -0
- package/dist/components/Svg/SettingsSvg.tsx +9 -0
- package/dist/components/auth/AuthLayout.tsx +223 -0
- package/dist/components/auth/ForgotPasswordThankYou.tsx +33 -0
- package/dist/components/auth/GoogleAuthChecking.tsx +63 -0
- package/dist/components/auth/SolidChangeForcePassword.tsx +222 -0
- package/dist/components/auth/SolidForgotPassword.tsx +127 -0
- package/dist/components/auth/SolidInitialLoginOtp.tsx +271 -0
- package/dist/components/auth/SolidInitiateRegisterOtp.tsx +218 -0
- package/dist/components/auth/SolidLogin.d.ts.map +1 -1
- package/dist/components/auth/SolidLogin.js +14 -8
- package/dist/components/auth/SolidLogin.js.map +1 -1
- package/dist/components/auth/SolidLogin.tsx +428 -0
- package/dist/components/auth/SolidOTPVerify.tsx +133 -0
- package/dist/components/auth/SolidRegister.tsx +454 -0
- package/dist/components/auth/SolidResetPassword.tsx +194 -0
- package/dist/components/common/AuthBanner.tsx +41 -0
- package/dist/components/common/AutoCompleteField.tsx +79 -0
- package/dist/components/common/BackButton.tsx +72 -0
- package/dist/components/common/CancelButton.tsx +61 -0
- package/dist/components/common/CodeEditor.tsx +38 -0
- package/dist/components/common/CreateButton.tsx +17 -0
- package/dist/components/common/DownloadProgressToast.tsx +55 -0
- package/dist/components/common/DropzonePlaceholder.tsx +31 -0
- package/dist/components/common/DropzoneUpload.tsx +11 -0
- package/dist/components/common/FileReaderExt.tsx +20 -0
- package/dist/components/common/GeneralSettings.tsx +1225 -0
- package/dist/components/common/HeaderDynamicTitles.tsx +13 -0
- package/dist/components/common/MarkdownViewer.tsx +84 -0
- package/dist/components/common/MultipleSelectAutoCompleteField.tsx +64 -0
- package/dist/components/common/NotFound.tsx +22 -0
- package/dist/components/common/SingleSelectAutoCompleteField.tsx +73 -0
- package/dist/components/common/SocialMediaLogin.tsx +53 -0
- package/dist/components/common/SolidAdmin.tsx +6 -0
- package/dist/components/common/SolidBreadcrumb.tsx +129 -0
- package/dist/components/common/SolidExport.tsx +563 -0
- package/dist/components/common/SolidExportStepper.tsx +135 -0
- package/dist/components/common/SolidFieldTooltip.tsx +23 -0
- package/dist/components/common/SolidFormHeader.tsx +25 -0
- package/dist/components/common/SolidFormStepper.tsx +350 -0
- package/dist/components/common/SolidModuleHome.tsx +128 -0
- package/dist/components/common/SolidPopupContainer.tsx +37 -0
- package/dist/components/common/SolidSettings/LlmSettings/AnthropicProviderComponent.tsx +45 -0
- package/dist/components/common/SolidSettings/LlmSettings/OpenAiProviderComponent.tsx +45 -0
- package/dist/components/common/SolidSettings/SettingDropzoneActivePlaceholder.tsx +20 -0
- package/dist/components/common/SolidSettings/SettingsImageRemoveButton.tsx +15 -0
- package/dist/components/common/SolidSettings/SolidUploadedImage.tsx +16 -0
- package/dist/components/common/SolidThemeLink.tsx +6 -0
- package/dist/components/common/SolidThemeProvider.tsx +44 -0
- package/dist/components/common/StepperArrows/ActiveArrowStep.tsx +18 -0
- package/dist/components/common/StepperArrows/ActiveBeforeStepArrow.tsx +18 -0
- package/dist/components/common/StepperArrows/InactiveStepArrow.tsx +19 -0
- package/dist/components/common/error.tsx +30 -0
- package/dist/components/common/useHandleFormCustomButtonClick.ts +40 -0
- package/dist/components/common/useHandleListCustomButtonClick.ts +42 -0
- package/dist/components/core/chatter/SolidChatter.tsx +248 -0
- package/dist/components/core/chatter/SolidChatterAuditMessage.tsx +35 -0
- package/dist/components/core/chatter/SolidChatterCustomMessage.tsx +46 -0
- package/dist/components/core/chatter/SolidChatterDateDivider.tsx +16 -0
- package/dist/components/core/chatter/SolidChatterHeader.tsx +218 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.tsx +163 -0
- package/dist/components/core/chatter/SolidMessageComposer.tsx +146 -0
- package/dist/components/core/common/AvatarWidget.tsx +55 -0
- package/dist/components/core/common/DateFieldViewComponent.tsx +36 -0
- package/dist/components/core/common/FilterComponent.tsx +458 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.tsx +70 -0
- package/dist/components/core/common/PDFViewer.tsx +117 -0
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.tsx +89 -0
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.tsx +188 -0
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.tsx +139 -0
- package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.tsx +311 -0
- package/dist/components/core/common/SolidCreateButton.tsx +48 -0
- package/dist/components/core/common/SolidGenericImport/DocumentSvg.tsx +15 -0
- package/dist/components/core/common/SolidGenericImport/SolidGenericImport.tsx +64 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.tsx +125 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportInstructions.tsx +122 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportStepper.tsx +217 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.tsx +205 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportTransactionStatus.tsx +158 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.tsx +29 -0
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +1470 -0
- package/dist/components/core/common/SolidLayoutViews.tsx +87 -0
- package/dist/components/core/common/SolidListViewOptions.tsx +31 -0
- package/dist/components/core/common/SolidLoaders/SolidCircularLoader.tsx +7 -0
- package/dist/components/core/common/SolidPasswordHelperText.tsx +34 -0
- package/dist/components/core/common/SolidSaveCustomFilterForm.tsx +75 -0
- package/dist/components/core/common/SolidSearchBox.tsx +17 -0
- package/dist/components/core/common/SolidViewLayoutManager.ts +421 -0
- package/dist/components/core/common/SolidXAiIframe.tsx +77 -0
- package/dist/components/core/dashboard/SolidDashboard.tsx +332 -0
- package/dist/components/core/dashboard/SolidDashboardBody.tsx +117 -0
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.tsx +28 -0
- package/dist/components/core/dashboard/SolidDashboardHeader.tsx +10 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.tsx +55 -0
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.tsx +32 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.tsx +29 -0
- package/dist/components/core/dashboard/SolidDashboardVariable.tsx +256 -0
- package/dist/components/core/dashboard/SolidQuestionRenderer.tsx +78 -0
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.tsx +18 -0
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.tsx +54 -0
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.ts +25 -0
- package/dist/components/core/dashboard/dashboard-utils.ts +39 -0
- package/dist/components/core/extension/solid-core/CustomIcon/StatusIcon.tsx +17 -0
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.tsx +36 -0
- package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeChangeHandler.ts +18 -0
- package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeLoad.ts +18 -0
- package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.tsx +114 -0
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.tsx +213 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.tsx +138 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.tsx +209 -0
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +131 -0
- package/dist/components/core/field/FieldListViewData.tsx +313 -0
- package/dist/components/core/filter/SolidBooleanFilterElement.tsx +30 -0
- package/dist/components/core/filter/SolidFilterFields.tsx +131 -0
- package/dist/components/core/filter/SolidManyToManyFilterElement.tsx +64 -0
- package/dist/components/core/filter/SolidManyToOneFilterElement.tsx +61 -0
- package/dist/components/core/filter/SolidSelectionDynamicFilterElement.tsx +50 -0
- package/dist/components/core/filter/SolidSelectionStaticFilterElement.tsx +32 -0
- package/dist/components/core/filter/SolidVarInputsFilterElement.tsx +209 -0
- package/dist/components/core/filter/fields/SolidBigintField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidBooleanField.tsx +68 -0
- package/dist/components/core/filter/fields/SolidComputedField.tsx +23 -0
- package/dist/components/core/filter/fields/SolidDateField.tsx +63 -0
- package/dist/components/core/filter/fields/SolidDatetimeField.tsx +54 -0
- package/dist/components/core/filter/fields/SolidDecimalField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidExternalIdField.tsx +52 -0
- package/dist/components/core/filter/fields/SolidFloatField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidIdField.tsx +46 -0
- package/dist/components/core/filter/fields/SolidIntField.tsx +61 -0
- package/dist/components/core/filter/fields/SolidLongTextField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidMediaMultipleField.tsx +60 -0
- package/dist/components/core/filter/fields/SolidMediaSingleField.tsx +62 -0
- package/dist/components/core/filter/fields/SolidRelationField.tsx +17 -0
- package/dist/components/core/filter/fields/SolidRichTextField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidSelectionDynamicField.tsx +52 -0
- package/dist/components/core/filter/fields/SolidSelectionStaticField.tsx +54 -0
- package/dist/components/core/filter/fields/SolidShortTextField.tsx +60 -0
- package/dist/components/core/filter/fields/SolidTimeField.tsx +48 -0
- package/dist/components/core/filter/fields/SolidUuidField.tsx +51 -0
- package/dist/components/core/filter/fields/relations/SolidRelationManyToManyField.tsx +62 -0
- package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.tsx +84 -0
- package/dist/components/core/form/SolidFormActionHeader.tsx +497 -0
- package/dist/components/core/form/SolidFormFieldRender.tsx +53 -0
- package/dist/components/core/form/SolidFormFieldRenderExtension.tsx +26 -0
- package/dist/components/core/form/SolidFormFooter.tsx +162 -0
- package/dist/components/core/form/SolidFormLayouts.tsx +104 -0
- package/dist/components/core/form/SolidFormUserViewLayout.tsx +84 -0
- package/dist/components/core/form/SolidFormView.tsx +1856 -0
- package/dist/components/core/form/SolidFormViewContextMenuHeaderButton.tsx +52 -0
- package/dist/components/core/form/SolidFormViewNormalHeaderButton.tsx +52 -0
- package/dist/components/core/form/SolidFormViewShimmerLoading.tsx +109 -0
- package/dist/components/core/form/fields/ISolidField.tsx +71 -0
- package/dist/components/core/form/fields/SolidBooleanField.tsx +434 -0
- package/dist/components/core/form/fields/SolidDateField.tsx +247 -0
- package/dist/components/core/form/fields/SolidDateTimeField.tsx +229 -0
- package/dist/components/core/form/fields/SolidDecimalField.tsx +171 -0
- package/dist/components/core/form/fields/SolidEmailField.tsx +176 -0
- package/dist/components/core/form/fields/SolidIntegerField.tsx +282 -0
- package/dist/components/core/form/fields/SolidJsonField.tsx +185 -0
- package/dist/components/core/form/fields/SolidLongTextField.tsx +618 -0
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +663 -0
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +547 -0
- package/dist/components/core/form/fields/SolidPasswordField.tsx +390 -0
- package/dist/components/core/form/fields/SolidRelationField.tsx +56 -0
- package/dist/components/core/form/fields/SolidRichTextField.tsx +188 -0
- package/dist/components/core/form/fields/SolidSelectionDynamicField.tsx +340 -0
- package/dist/components/core/form/fields/SolidSelectionStaticField.tsx +462 -0
- package/dist/components/core/form/fields/SolidShortTextField.tsx +399 -0
- package/dist/components/core/form/fields/SolidTimeField.tsx +245 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +453 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +1036 -0
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +627 -0
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.tsx +38 -0
- package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.ts +64 -0
- package/dist/components/core/form/fields/widgets/SolidAiInteractionMessageFieldFormWidget.tsx +135 -0
- package/dist/components/core/form/fields/widgets/SolidAiInteractionMetadataFieldFormWidget.tsx +144 -0
- package/dist/components/core/form/fields/widgets/SolidIconEditWidget.tsx +265 -0
- package/dist/components/core/form/fields/widgets/SolidIconViewWidget.tsx +32 -0
- package/dist/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.tsx +50 -0
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.tsx +222 -0
- package/dist/components/core/form/fields/widgets/SolidShortTextFieldAvatarWidget.tsx +70 -0
- package/dist/components/core/form/widgets/CustomHtml.tsx +20 -0
- package/dist/components/core/kanban/KanbanBoard.tsx +150 -0
- package/dist/components/core/kanban/KanbanCard.tsx +279 -0
- package/dist/components/core/kanban/KanbanColumn.tsx +139 -0
- package/dist/components/core/kanban/KanbanUserViewLayout.tsx +84 -0
- package/dist/components/core/kanban/SolidKanbanView.tsx +894 -0
- package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +154 -0
- package/dist/components/core/kanban/SolidKanbanViewFields.tsx +164 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +59 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +50 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.tsx +32 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.tsx +184 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.tsx +16 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.tsx +23 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.tsx +12 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.tsx +20 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +140 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +164 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +121 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.tsx +12 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +16 -0
- package/dist/components/core/list/ListViewRowActionPopup.tsx +41 -0
- package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.tsx +242 -0
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.tsx +111 -0
- package/dist/components/core/list/SolidListView.tsx +2007 -0
- package/dist/components/core/list/SolidListViewColumn.tsx +165 -0
- package/dist/components/core/list/SolidListViewConfigure.tsx +339 -0
- package/dist/components/core/list/SolidListViewHeaderButton.tsx +31 -0
- package/dist/components/core/list/SolidListViewHeaderContextMenuButton.tsx +30 -0
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +41 -0
- package/dist/components/core/list/SolidListViewShimmerLoading.tsx +78 -0
- package/dist/components/core/list/SolidListingHeader.tsx +42 -0
- package/dist/components/core/list/SolidManyToOneFilterElement.tsx +60 -0
- package/dist/components/core/list/SolidSelectionDynamicFilterElement.tsx +50 -0
- package/dist/components/core/list/SolidSelectionStaticFilterElement.tsx +32 -0
- package/dist/components/core/list/SolidTableRowCell.tsx +35 -0
- package/dist/components/core/list/SolidVarInputsFilterElement.tsx +184 -0
- package/dist/components/core/list/columns/SolidBigintColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidBooleanColumn.tsx +90 -0
- package/dist/components/core/list/columns/SolidComputedColumn.tsx +27 -0
- package/dist/components/core/list/columns/SolidDateColumn.tsx +90 -0
- package/dist/components/core/list/columns/SolidDatetimeColumn.tsx +79 -0
- package/dist/components/core/list/columns/SolidDecimalColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidExternalIdColumn.tsx +80 -0
- package/dist/components/core/list/columns/SolidFloatColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidIdColumn.tsx +79 -0
- package/dist/components/core/list/columns/SolidIntColumn.tsx +87 -0
- package/dist/components/core/list/columns/SolidLongTextColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +301 -0
- package/dist/components/core/list/columns/SolidMediaSingleColumn.tsx +170 -0
- package/dist/components/core/list/columns/SolidRelationColumn.tsx +21 -0
- package/dist/components/core/list/columns/SolidRichTextColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.tsx +80 -0
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.tsx +81 -0
- package/dist/components/core/list/columns/SolidShortTextColumn.tsx +160 -0
- package/dist/components/core/list/columns/SolidTimeColumn.tsx +78 -0
- package/dist/components/core/list/columns/SolidUuidColumn.tsx +79 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToManyColumn.tsx +106 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +117 -0
- package/dist/components/core/list/columns/relations/SolidRelationOneToManyColumn.tsx +110 -0
- package/dist/components/core/list/widgets/SolidManyToManyRelationAvatarListWidget.tsx +30 -0
- package/dist/components/core/list/widgets/SolidManyToOneRelationAvatarListWidget.tsx +30 -0
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.tsx +70 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.tsx +21 -0
- package/dist/components/core/locales/SolidChatterLocaleTabView.tsx +91 -0
- package/dist/components/core/locales/SolidLocale.tsx +127 -0
- package/dist/components/core/model/CreateModel.tsx +495 -0
- package/dist/components/core/model/FieldMetaData.tsx +263 -0
- package/dist/components/core/model/FieldMetaDataForm.tsx +3509 -0
- package/dist/components/core/model/FieldSelector.tsx +62 -0
- package/dist/components/core/model/ModelListViewData.tsx +384 -0
- package/dist/components/core/model/ModelMetaData.tsx +921 -0
- package/dist/components/core/module/CreateModule.tsx +617 -0
- package/dist/components/core/module/ModuleListViewData.tsx +431 -0
- package/dist/components/core/solid-ai/SolidAiMainWrapper.tsx +8 -0
- package/dist/components/core/solid-ai/SolidXAIIcon.tsx +37 -0
- package/dist/components/core/users/CreateUser.tsx +467 -0
- package/dist/components/core/users/CreateUserRole.tsx +212 -0
- package/dist/components/core/users/UserListView.tsx +376 -0
- package/dist/components/layout/AdminLayout.tsx +57 -0
- package/dist/components/layout/AdminSidebar.tsx +65 -0
- package/dist/components/layout/AppConfig.tsx +104 -0
- package/dist/components/layout/AppSidebar.tsx +232 -0
- package/dist/components/layout/ButtonLoader.tsx +7 -0
- package/dist/components/layout/CustomPagination.tsx +55 -0
- package/dist/components/layout/DashboardHeader.tsx +89 -0
- package/dist/components/layout/FilterMenu.tsx +122 -0
- package/dist/components/layout/Footer.tsx +13 -0
- package/dist/components/layout/GlobalSearch.tsx +37 -0
- package/dist/components/layout/Header.tsx +8 -0
- package/dist/components/layout/Layout.tsx +205 -0
- package/dist/components/layout/ListingHeader.tsx +204 -0
- package/dist/components/layout/Loader.tsx +16 -0
- package/dist/components/layout/UserSidebar.tsx +53 -0
- package/dist/components/layout/context/layoutcontext.tsx +52 -0
- package/dist/components/layout/navbar-one.tsx +258 -0
- package/dist/components/layout/navbar-two-menu.tsx +72 -0
- package/dist/components/layout/navbar-two.tsx +37 -0
- package/dist/components/layout/user-profile-menu.tsx +213 -0
- package/dist/components/layout/user-profile.tsx +7 -0
- package/dist/components/modelsComponents/filterIcon.tsx +9 -0
- package/dist/constants/error-messages.ts +238 -0
- package/dist/declarations.d.ts +22 -0
- package/dist/helpers/AppTitle.tsx +12 -0
- package/dist/helpers/ToastContainer.tsx +94 -0
- package/dist/helpers/autoCompleteVirtualScroll.ts +41 -0
- package/dist/helpers/countries.tsx +260 -0
- package/dist/helpers/downloadFileWithProgress.ts +91 -0
- package/dist/helpers/downloadMediaFile.tsx +21 -0
- package/dist/helpers/getAcceptedFileTypes.tsx +22 -0
- package/dist/helpers/getRandomColors.tsx +68 -0
- package/dist/helpers/helpers.ts +61 -0
- package/dist/helpers/hydrateRelationRules.ts +120 -0
- package/dist/helpers/permissions.ts +7 -0
- package/dist/helpers/registry.ts +337 -0
- package/dist/helpers/resendOtpHelper.tsx +5 -0
- package/dist/helpers/revalidate.ts +7 -0
- package/dist/helpers/rolesHelper.ts +17 -0
- package/dist/helpers/solidIcons.tsx +1831 -0
- package/dist/helpers/updatePasswordField.ts +41 -0
- package/dist/index.ts +421 -0
- package/dist/nextAuth/authProviders.d.ts.map +1 -1
- package/dist/nextAuth/authProviders.js +6 -5
- package/dist/nextAuth/authProviders.js.map +1 -1
- package/dist/nextAuth/authProviders.tsx +232 -0
- package/dist/nextAuth/handleLogout.tsx +39 -0
- package/dist/nextAuth/refreshAccessToken.tsx +28 -0
- package/dist/redux/api/aiInteractionApi.ts +59 -0
- package/dist/redux/api/authApi.ts +131 -0
- package/dist/redux/api/dashboardApi.ts +56 -0
- package/dist/redux/api/dashboardQuestionApi.ts +17 -0
- package/dist/redux/api/exportTemplateApi.tsx +59 -0
- package/dist/redux/api/fetchBaseQuery.tsx +118 -0
- package/dist/redux/api/fieldApi.ts +86 -0
- package/dist/redux/api/importTransactionApi.tsx +69 -0
- package/dist/redux/api/mediaApi.ts +55 -0
- package/dist/redux/api/mediaStorageProviderApi.ts +55 -0
- package/dist/redux/api/modelApi.ts +80 -0
- package/dist/redux/api/moduleApi.ts +72 -0
- package/dist/redux/api/permissionApi.ts +32 -0
- package/dist/redux/api/pincodeApi.tsx +56 -0
- package/dist/redux/api/roleApi.ts +58 -0
- package/dist/redux/api/solidActionApi.ts +66 -0
- package/dist/redux/api/solidChatterMessageApi.ts +25 -0
- package/dist/redux/api/solidEntityApi.tsx +164 -0
- package/dist/redux/api/solidMenuApi.ts +71 -0
- package/dist/redux/api/solidServiceApi.ts +31 -0
- package/dist/redux/api/solidSettingsApi.tsx +83 -0
- package/dist/redux/api/solidViewApi.ts +73 -0
- package/dist/redux/api/stateApi.tsx +56 -0
- package/dist/redux/api/testApi.ts +21 -0
- package/dist/redux/api/userApi.ts +135 -0
- package/dist/redux/features/authSlice.ts +19 -0
- package/dist/redux/features/dataViewSlice.ts +26 -0
- package/dist/redux/features/navbarSlice.ts +21 -0
- package/dist/redux/features/popupSlice.ts +37 -0
- package/dist/redux/features/settingsSlice.ts +60 -0
- package/dist/redux/features/themeSlice.ts +17 -0
- package/dist/redux/features/userSlice.ts +28 -0
- package/dist/redux/hooks/useSolidPopup.ts +20 -0
- package/dist/redux/store/defaultStoreConfig.ts +62 -0
- package/dist/styles.ts +4 -0
- package/dist/types/handlebars.d.ts +4 -0
- package/dist/types/index.d.ts +76 -0
- package/dist/types/layout.d.ts +94 -0
- package/dist/types/next-auth.d.ts +0 -0
- package/dist/types/next.d.ts +46 -0
- package/dist/types/solid-core.d.ts +320 -0
- package/package.json +1 -1
- package/src/components/auth/SolidLogin.tsx +26 -13
- package/src/nextAuth/authProviders.tsx +9 -5
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { ToastContainer } from "../../helpers/ToastContainer";
|
|
2
|
+
import { useGetSolidMenuBasedOnRoleQuery } from "../../redux/api/solidMenuApi";
|
|
3
|
+
import { showNavbar, toggleNavbar, hideNavbar } from "../../redux/features/navbarSlice";
|
|
4
|
+
import { setIsAuthenticated, setUser } from "../../redux/features/userSlice";
|
|
5
|
+
import { signOut, useSession } from "next-auth/react";
|
|
6
|
+
import { useEffect, useRef, useState } from "react";
|
|
7
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
8
|
+
import NavbarTwoMenu from "./navbar-two-menu";
|
|
9
|
+
import UserProfileMenu from "./user-profile-menu";
|
|
10
|
+
import Image from "next/image";
|
|
11
|
+
import AppBuilderSvg from '../../resources/images/menu/app-builder.svg'
|
|
12
|
+
import SettingImage from '../../resources/images/Navigation/SolidSettinsIcon.svg'
|
|
13
|
+
import { Avatar } from "primereact/avatar";
|
|
14
|
+
import { usePathname } from "next/navigation";
|
|
15
|
+
|
|
16
|
+
// import menu from "../../helpers/menu";
|
|
17
|
+
|
|
18
|
+
const AppSidebar = () => {
|
|
19
|
+
const dispatch = useDispatch();
|
|
20
|
+
const pathname = usePathname();
|
|
21
|
+
// const [show, setShow] = useState(false);
|
|
22
|
+
const visibleNavbar = useSelector(
|
|
23
|
+
(state: any) => state.navbarState.visibleNavbar
|
|
24
|
+
);
|
|
25
|
+
const { data: menu } = useGetSolidMenuBasedOnRoleQuery("");
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const [currentMenu, setCurrentMenu] = useState();
|
|
29
|
+
const [currentMainMenu, setCurrentMainMenu] = useState();
|
|
30
|
+
const [searchTerm, setSearchTerm] = useState("");
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (menu) {
|
|
34
|
+
setCurrentMenu(menu && menu.data.length > 0 && menu.data.filter((m: any) => m.key === process.env.NEXT_PUBLIC_DEFAULT_MENU_KEY)[0]?.children);
|
|
35
|
+
setCurrentMainMenu(menu && menu.data.length > 0 && menu.data.filter((m: any) => m.key === process.env.NEXT_PUBLIC_DEFAULT_MENU_KEY)[0]?.title)
|
|
36
|
+
}
|
|
37
|
+
}, [menu])
|
|
38
|
+
|
|
39
|
+
const { data } = useSession();
|
|
40
|
+
|
|
41
|
+
// const handleToggle = () => setShow(!show);
|
|
42
|
+
const handleToggle = () => dispatch(toggleNavbar());
|
|
43
|
+
const handleMenu = (m: any) => {
|
|
44
|
+
// setShow(true);
|
|
45
|
+
dispatch(showNavbar());
|
|
46
|
+
setCurrentMainMenu(m.title);
|
|
47
|
+
setCurrentMenu(m.children);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
// Check if screen is small at the time of route change
|
|
52
|
+
if (window.innerWidth <= 1199) {
|
|
53
|
+
dispatch(hideNavbar());
|
|
54
|
+
}
|
|
55
|
+
}, [pathname, dispatch]);
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (data) {
|
|
60
|
+
dispatch(setUser(data?.user));
|
|
61
|
+
dispatch(setIsAuthenticated(true));
|
|
62
|
+
}
|
|
63
|
+
}, [data]);
|
|
64
|
+
|
|
65
|
+
const logoutHandler = () => {
|
|
66
|
+
signOut();
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const handleSearch = () => {
|
|
70
|
+
// TODO: Handle the search logic here
|
|
71
|
+
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const [isSearchShow, setSearchShow] = useState(false);
|
|
75
|
+
const searchRef = useRef<HTMLDivElement>(null);
|
|
76
|
+
|
|
77
|
+
const handleClickOutside = (event: any) => {
|
|
78
|
+
if (searchRef.current && !searchRef.current.contains(event.target)) {
|
|
79
|
+
setSearchShow(false);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
if (isSearchShow) {
|
|
85
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
86
|
+
} else {
|
|
87
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return () => {
|
|
91
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
92
|
+
};
|
|
93
|
+
}, [isSearchShow]);
|
|
94
|
+
|
|
95
|
+
const additionalMenu = {
|
|
96
|
+
title: "General Settings",
|
|
97
|
+
key: "general-settings",
|
|
98
|
+
children: [
|
|
99
|
+
{
|
|
100
|
+
title: "Settings",
|
|
101
|
+
path: "",
|
|
102
|
+
key: "settings-menu-item",
|
|
103
|
+
children: [
|
|
104
|
+
{
|
|
105
|
+
title: "App Settings",
|
|
106
|
+
path: "/admin/settings/app-settings",
|
|
107
|
+
key: "app-setting"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
title: "Authentication Settings",
|
|
111
|
+
path: "/admin/settings/authentication-settings",
|
|
112
|
+
key: "auth-setting"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
title: "Misc",
|
|
116
|
+
path: "/admin/settings/misc-settings",
|
|
117
|
+
key: "misc-setting"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
icon: process.env.NEXT_PUBLIC_SETTINGS_ICON ? process.env.NEXT_PUBLIC_SETTINGS_ICON : SettingImage
|
|
123
|
+
};
|
|
124
|
+
const updatedMenuData = menu?.data
|
|
125
|
+
? [...menu.data, ...(process.env.NEXT_PUBLIC_SHOW_SETTINGS === "true" ? [additionalMenu] : [])]
|
|
126
|
+
: process.env.NEXT_PUBLIC_SHOW_SETTINGS === "true"
|
|
127
|
+
? [additionalMenu]
|
|
128
|
+
: [];
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<>
|
|
134
|
+
<ToastContainer />
|
|
135
|
+
{visibleNavbar && (
|
|
136
|
+
<div
|
|
137
|
+
className="sidebar-backdrop"
|
|
138
|
+
onClick={handleToggle}
|
|
139
|
+
/>
|
|
140
|
+
)}
|
|
141
|
+
{/* commented this as this is not working properly @Jenendar to figure this out... */}
|
|
142
|
+
{(visibleNavbar || currentMainMenu) && (
|
|
143
|
+
<div
|
|
144
|
+
className={`sidebar-toggle-button ${!visibleNavbar || !currentMainMenu ? "s-collapsed hidden md:flex" : ""}`}
|
|
145
|
+
onClick={handleToggle}
|
|
146
|
+
// severity="secondary"
|
|
147
|
+
>
|
|
148
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
149
|
+
<rect x="0.3" y="0.3" width="23.4" height="23.4" rx="2.1" fill="white" />
|
|
150
|
+
<rect x="0.3" y="0.3" width="23.4" height="23.4" rx="2.1" stroke="#D8E2EA" strokeWidth="0.6" />
|
|
151
|
+
<path d="M5.09735 16V14.6667H13.5929V16H5.09735ZM5.09735 12.6667V11.3333H11.6324V12.6667H5.09735ZM5.09735 9.33333V8H13.5929V9.33333H5.09735Z" fill="#8D9199" />
|
|
152
|
+
<path d="M16.2621 12L18.9026 14.3L18.099 15L14.6549 12L18.099 9L18.9026 9.7L16.2621 12Z" fill="#8D9199" />
|
|
153
|
+
</svg>
|
|
154
|
+
</div>
|
|
155
|
+
)}
|
|
156
|
+
|
|
157
|
+
<div className={`sidebar-left ${visibleNavbar ? "open" : ""}`}>
|
|
158
|
+
<div className="navbar-menu">
|
|
159
|
+
{menu?.data.length > 0 && menu?.data.map((m: any) => {
|
|
160
|
+
const iconSrc =
|
|
161
|
+
typeof m.icon === "string"
|
|
162
|
+
? m.icon
|
|
163
|
+
: m.icon && typeof m.icon.src === "string"
|
|
164
|
+
? m.icon.src
|
|
165
|
+
: null;
|
|
166
|
+
return (
|
|
167
|
+
<a
|
|
168
|
+
key={m.title}
|
|
169
|
+
className={`flex align-items-center menu-item ${currentMainMenu === m.title ? "active-menu-image" : ""}`}
|
|
170
|
+
onClick={() => handleMenu(m)}
|
|
171
|
+
style={{cursor:'pointer'}}
|
|
172
|
+
>
|
|
173
|
+
{m.icon ?
|
|
174
|
+
<Image
|
|
175
|
+
src={iconSrc.startsWith("/") ? iconSrc : `${process.env.API_URL}/${iconSrc}`}
|
|
176
|
+
alt={m.title}
|
|
177
|
+
height={30}
|
|
178
|
+
width={30}
|
|
179
|
+
className="relative"
|
|
180
|
+
unoptimized
|
|
181
|
+
/>
|
|
182
|
+
:
|
|
183
|
+
<div>
|
|
184
|
+
<Avatar label={m.title.charAt(0)} shape="circle" style={{ backgroundColor: 'var(--primary-color)', fontWeight: 500 }} />
|
|
185
|
+
</div>
|
|
186
|
+
}
|
|
187
|
+
</a>
|
|
188
|
+
)
|
|
189
|
+
})}
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<UserProfileMenu></UserProfileMenu>
|
|
193
|
+
</div>
|
|
194
|
+
{currentMenu && (
|
|
195
|
+
<div className={`sidebar-right ${visibleNavbar ? "open" : ""}`}>
|
|
196
|
+
|
|
197
|
+
<div className="flex relative justify-content-between align-items-center py-3 xl:py-4 px-3">
|
|
198
|
+
<div className="text-base sidebar-title font-semibold">{currentMainMenu && currentMainMenu}</div>
|
|
199
|
+
{/* <button
|
|
200
|
+
className="sidebar-toggle-button"
|
|
201
|
+
onClick={handleToggle}
|
|
202
|
+
>
|
|
203
|
+
<img
|
|
204
|
+
style={{ cursor: "pointer" }}
|
|
205
|
+
src={`/images/menu-toggle.png`}
|
|
206
|
+
alt="Solid"
|
|
207
|
+
/>
|
|
208
|
+
</button> */}
|
|
209
|
+
</div>
|
|
210
|
+
{/* <div className="w-full px-3 mb-3" style={{ position: 'relative' }} ref={searchRef}>
|
|
211
|
+
<IconField iconPosition="left">
|
|
212
|
+
<InputIcon className="pi pi-search text-sm"> </InputIcon>
|
|
213
|
+
<InputText placeholder="Search" className="small-input text-sm w-full pr-6" />
|
|
214
|
+
</IconField>
|
|
215
|
+
<div className="absolute max-h-1rem" style={{ top: 5, right: 20 }}>
|
|
216
|
+
<img
|
|
217
|
+
style={{ cursor: "pointer", maxHeight: '1.3rem' }}
|
|
218
|
+
src="/images/icons/jump-to-icon.png"
|
|
219
|
+
alt="Solid"
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
</div> */}
|
|
223
|
+
<div className="px-3 solid-sidebar-menuitems-wrapper">
|
|
224
|
+
<NavbarTwoMenu menuItems={currentMenu}></NavbarTwoMenu>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
)}
|
|
228
|
+
</>
|
|
229
|
+
);
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
export default AppSidebar;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// "use client";
|
|
2
|
+
|
|
3
|
+
// import { useRouter, useSearchParams } from "next/navigation";
|
|
4
|
+
// import Pagination from "react-js-pagination";
|
|
5
|
+
|
|
6
|
+
// interface Props {
|
|
7
|
+
// resPerPage: number;
|
|
8
|
+
// filteredRoomsCount: number;
|
|
9
|
+
// }
|
|
10
|
+
|
|
11
|
+
// const CustomPagination = ({ resPerPage, filteredRoomsCount }: Props) => {
|
|
12
|
+
// const router = useRouter();
|
|
13
|
+
// const searchParams = useSearchParams();
|
|
14
|
+
// let page = searchParams.get("page") || 1;
|
|
15
|
+
// page = Number(page);
|
|
16
|
+
|
|
17
|
+
// let queryParams;
|
|
18
|
+
|
|
19
|
+
// const handlePageChange = (currentPage: string) => {
|
|
20
|
+
// if (typeof window !== "undefined") {
|
|
21
|
+
// queryParams = new URLSearchParams(window.location.search);
|
|
22
|
+
|
|
23
|
+
// if (queryParams.has("page")) {
|
|
24
|
+
// queryParams.set("page", currentPage);
|
|
25
|
+
// } else {
|
|
26
|
+
// queryParams.append("page", currentPage);
|
|
27
|
+
// }
|
|
28
|
+
|
|
29
|
+
// const path = `${window.location.pathname}?${queryParams.toString()}`;
|
|
30
|
+
// router.push(path);
|
|
31
|
+
// }
|
|
32
|
+
// };
|
|
33
|
+
// return (
|
|
34
|
+
// <div>
|
|
35
|
+
// {resPerPage < filteredRoomsCount && (
|
|
36
|
+
// <div className="d-flex justify-content-center mt-5">
|
|
37
|
+
// <Pagination
|
|
38
|
+
// activePage={page}
|
|
39
|
+
// itemsCountPerPage={resPerPage}
|
|
40
|
+
// totalItemsCount={filteredRoomsCount}
|
|
41
|
+
// onChange={handlePageChange}
|
|
42
|
+
// nextPageText={"Next"}
|
|
43
|
+
// prevPageText={"Prev"}
|
|
44
|
+
// firstPageText={"First"}
|
|
45
|
+
// lastPageText={"Last"}
|
|
46
|
+
// itemClass="page-item"
|
|
47
|
+
// linkClass="page-link"
|
|
48
|
+
// />
|
|
49
|
+
// </div>
|
|
50
|
+
// )}
|
|
51
|
+
// </div>
|
|
52
|
+
// );
|
|
53
|
+
// };
|
|
54
|
+
|
|
55
|
+
// export default CustomPagination;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "primereact/button";
|
|
3
|
+
import { Menu } from "primereact/menu";
|
|
4
|
+
import { useRef } from "react";
|
|
5
|
+
|
|
6
|
+
const DashboardHeader = () => {
|
|
7
|
+
|
|
8
|
+
const menuLeft = useRef<any>(null);
|
|
9
|
+
const toast = useRef(null);
|
|
10
|
+
const items = [
|
|
11
|
+
{
|
|
12
|
+
label: 'Options',
|
|
13
|
+
items: [
|
|
14
|
+
{
|
|
15
|
+
label: 'Refresh',
|
|
16
|
+
icon: 'pi pi-refresh'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: 'Export',
|
|
20
|
+
icon: 'pi pi-upload'
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div className="flex justify-content-between align-items-center px-5 surface-0 border-bottom-1 surface-border relative lg:static" style={{ height: "60px" }}>
|
|
28
|
+
<div className="flex align-items-center">
|
|
29
|
+
<Button label="New" size="small" type="submit" className="small-button" />
|
|
30
|
+
<Menu model={items} popup ref={menuLeft} id="popup_menu_left" />
|
|
31
|
+
<div className="ml-2">
|
|
32
|
+
<div style={{ position: "relative" }}>
|
|
33
|
+
<a onClick={(event: any) => menuLeft.current.toggle(event)}>
|
|
34
|
+
<i className="pi pi-cog"></i>
|
|
35
|
+
</a>
|
|
36
|
+
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
</div>
|
|
41
|
+
<div className="flex align-items-center">
|
|
42
|
+
<div className="bgCircle">
|
|
43
|
+
<div style={{ position: "relative" }}>
|
|
44
|
+
<i className="pi pi-bell"></i>
|
|
45
|
+
<span className="topbar-badge">
|
|
46
|
+
</span>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div className="bgCircle ml-3">
|
|
50
|
+
<div style={{ position: "relative" }}>
|
|
51
|
+
<i className="pi pi-envelope"></i>
|
|
52
|
+
<span className="topbar-badge">
|
|
53
|
+
</span>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div className="topbar-profile">
|
|
57
|
+
<button className="topbar-profile-button p-link" type="button">
|
|
58
|
+
<img alt="avatar" src="/images/dashboard/Ellipse 1.svg" />
|
|
59
|
+
<span className="profile-details">
|
|
60
|
+
<span className="profile-name">Gene Russell</span>
|
|
61
|
+
<span className="profile-email">ben95@example.com</span>
|
|
62
|
+
</span>
|
|
63
|
+
<i className="pi pi-angle-down"></i>
|
|
64
|
+
</button>
|
|
65
|
+
<ul className="list-none p-3 m-0 border-round shadow-2 absolute surface-overlay origin-top w-full sm:w-12rem mt-2 right-0 top-auto hidden">
|
|
66
|
+
<li>
|
|
67
|
+
<a className="p-ripple flex p-2 border-round align-items-center hover:surface-hover transition-colors transition-duration-150 cursor-pointer">
|
|
68
|
+
<i className="pi pi-user mr-3"></i>
|
|
69
|
+
<span>Profile</span>
|
|
70
|
+
</a>
|
|
71
|
+
<a className="p-ripple flex p-2 border-round align-items-center hover:surface-hover transition-colors transition-duration-150 cursor-pointer">
|
|
72
|
+
<i className="pi pi-inbox mr-3"></i>
|
|
73
|
+
<span>Inbox</span></a>
|
|
74
|
+
<a className="p-ripple flex p-2 border-round align-items-center hover:surface-hover transition-colors transition-duration-150 cursor-pointer">
|
|
75
|
+
<i className="pi pi-cog mr-3"></i>
|
|
76
|
+
<span>Settings</span>
|
|
77
|
+
</a>
|
|
78
|
+
<a className="p-ripple flex p-2 border-round align-items-center hover:surface-hover transition-colors transition-duration-150 cursor-pointer">
|
|
79
|
+
<i className="pi pi-power-off mr-3"></i>
|
|
80
|
+
<span>Sign Out</span>
|
|
81
|
+
</a>
|
|
82
|
+
</li>
|
|
83
|
+
</ul>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
export default DashboardHeader;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "primereact/button";
|
|
3
|
+
import { Dialog } from "primereact/dialog";
|
|
4
|
+
import { OverlayPanel } from "primereact/overlaypanel";
|
|
5
|
+
import { useRef, useState } from "react";
|
|
6
|
+
|
|
7
|
+
const FilterMenu = () => {
|
|
8
|
+
const op = useRef<any>(null);
|
|
9
|
+
const [visible, setVisible] = useState(false);
|
|
10
|
+
|
|
11
|
+
const filters = [
|
|
12
|
+
{ label: 'On Time Off', onClick: () => handleFilterClick('On Time Off') },
|
|
13
|
+
{ label: 'At Work', onClick: () => handleFilterClick('At Work') },
|
|
14
|
+
{ label: 'My Team', onClick: () => handleFilterClick('My Team') },
|
|
15
|
+
{ label: 'My Departments', onClick: () => handleFilterClick('My Departments') },
|
|
16
|
+
{ label: 'Newly Hired', onClick: () => handleFilterClick('Newly Hired') },
|
|
17
|
+
{ label: 'Fixed Hours', onClick: () => handleFilterClick('Fixed Hours') },
|
|
18
|
+
{ label: 'Flexible Hours', onClick: () => handleFilterClick('Flexible Hours') },
|
|
19
|
+
{ label: 'Add Custom Filters', onClick: () => handleFilterClick('Add Custom Filters') }
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const groupBy = [
|
|
23
|
+
{ label: 'Manager', onClick: () => handleGroupByClick('Manager') },
|
|
24
|
+
{ label: 'Department', onClick: () => handleGroupByClick('Department') },
|
|
25
|
+
{ label: 'Job', onClick: () => handleGroupByClick('Job') },
|
|
26
|
+
{ label: 'Skills', onClick: () => handleGroupByClick('Skills') },
|
|
27
|
+
{ label: 'Start Date', onClick: () => handleGroupByClick('Start Date') },
|
|
28
|
+
{ label: 'Tags', onClick: () => handleGroupByClick('Tags') }
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const favourites = [
|
|
32
|
+
{ label: 'Save Current Search', onClick: () => handleFavouritesClick('Save Current Search') }
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
// Example function definitions
|
|
36
|
+
function handleFilterClick(filter: string) {
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
switch (filter) {
|
|
40
|
+
case 'Add Custom Filters':
|
|
41
|
+
setVisible(true);
|
|
42
|
+
break;
|
|
43
|
+
|
|
44
|
+
default:
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function handleGroupByClick(group: string) {
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function handleFavouritesClick(favourite: string) {
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<div>
|
|
59
|
+
<Button
|
|
60
|
+
icon="pi pi-cog"
|
|
61
|
+
className="transparent-background"
|
|
62
|
+
onClick={(e: any) => op?.current?.toggle(e)}
|
|
63
|
+
aria-haspopup
|
|
64
|
+
aria-controls="popup_menu"
|
|
65
|
+
/>
|
|
66
|
+
{/* <Button type="button" icon="pi pi-image" label="Image" onClick={(e: any) => op?.current?.toggle(e)} /> */}
|
|
67
|
+
<OverlayPanel ref={op} className="filterDropdown">
|
|
68
|
+
<div className="grid m-0">
|
|
69
|
+
{/* Column 1: Filters */}
|
|
70
|
+
<div className="col-12 md:col-4 lg:col-4">
|
|
71
|
+
<h3><span className=" pi pi-filter"></span> Filters</h3>
|
|
72
|
+
<ul className="custom-list">
|
|
73
|
+
{filters.map((item, index) => (
|
|
74
|
+
<a onClick={item.onClick}>
|
|
75
|
+
<li key={index}>{item.label}</li>
|
|
76
|
+
</a>
|
|
77
|
+
))}
|
|
78
|
+
</ul>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
{/* Column 2: Group By */}
|
|
82
|
+
<div className="col-12 md:col-4 lg:col-4">
|
|
83
|
+
<h3><span className=" pi pi-clone"></span> Group by</h3>
|
|
84
|
+
<ul className="custom-list">
|
|
85
|
+
{groupBy.map((item, index) => (
|
|
86
|
+
<a onClick={item.onClick}>
|
|
87
|
+
<li key={index}>{item.label}</li>
|
|
88
|
+
</a>
|
|
89
|
+
))}
|
|
90
|
+
</ul>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
{/* Column 3: Favourites */}
|
|
94
|
+
<div className="col-12 md:col-4 lg:col-4">
|
|
95
|
+
<h3> <span className=" pi pi-star"></span> Favourites</h3>
|
|
96
|
+
<ul className="custom-list">
|
|
97
|
+
{favourites.map((item, index) => (
|
|
98
|
+
<a onClick={item.onClick}>
|
|
99
|
+
<li key={index}>{item.label}</li>
|
|
100
|
+
</a>
|
|
101
|
+
))}
|
|
102
|
+
</ul>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</OverlayPanel>
|
|
106
|
+
<Dialog header="Add Custom Filter" visible={visible} style={{ width: '50vw' }} onHide={() => { if (!visible) return; setVisible(false); }}>
|
|
107
|
+
{/* <FilterComponent></FilterComponent> */}
|
|
108
|
+
</Dialog>
|
|
109
|
+
|
|
110
|
+
{/* <Dialog
|
|
111
|
+
visible={visible}
|
|
112
|
+
modal
|
|
113
|
+
onHide={() => { if (!visible) return; setVisible(false); }}
|
|
114
|
+
content={({ hide }) => (
|
|
115
|
+
<FilterComponent></FilterComponent>
|
|
116
|
+
)}
|
|
117
|
+
></Dialog> */}
|
|
118
|
+
</div>
|
|
119
|
+
);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export default FilterMenu;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { usePathname } from 'next/navigation';
|
|
3
|
+
import { IconField } from 'primereact/iconfield';
|
|
4
|
+
import { InputIcon } from 'primereact/inputicon';
|
|
5
|
+
import { InputText } from 'primereact/inputtext';
|
|
6
|
+
|
|
7
|
+
export const GlobalSearch = () => {
|
|
8
|
+
const path = usePathname();
|
|
9
|
+
// const placeholderMap: { [key: string]: string } = {
|
|
10
|
+
// '/menu': 'Search Menus',
|
|
11
|
+
// '/category': 'Search Categories',
|
|
12
|
+
// '/menu-item': 'Search Menu Items',
|
|
13
|
+
// '/cms-banner-image': 'Search CMS Banner Images',
|
|
14
|
+
// '/article': 'Search Articles',
|
|
15
|
+
// };
|
|
16
|
+
|
|
17
|
+
// Find the matching placeholder dynamically
|
|
18
|
+
// const placeholder = Object.keys(placeholderMap).find(key => pathname.includes(key)) || 'Search';
|
|
19
|
+
|
|
20
|
+
const getPlaceholder = () => {
|
|
21
|
+
const dynamicSegment = path.split('/').slice(-2, -1)[0]; // Extracts the second-to-last segment
|
|
22
|
+
return `Search ${dynamicSegment.replace(/-/g, ' ').replace(/\b\w/g, char => char.toUpperCase())}`;
|
|
23
|
+
};
|
|
24
|
+
return (
|
|
25
|
+
<div className='absolute left-50' style={{transform:'translateX(-50%)'}}>
|
|
26
|
+
<IconField iconPosition="left">
|
|
27
|
+
<InputIcon className="pi pi-search"></InputIcon>
|
|
28
|
+
<InputText
|
|
29
|
+
v-model="value1"
|
|
30
|
+
placeholder={getPlaceholder()}
|
|
31
|
+
// placeholder={placeholderMap[placeholder] || 'Search'}
|
|
32
|
+
className='border-cyan-200 border-1 max-h-2rem w-25rem'
|
|
33
|
+
/>
|
|
34
|
+
</IconField>
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
}
|