@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,135 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "primereact/button";
|
|
3
|
+
import { OverlayPanel } from "primereact/overlaypanel";
|
|
4
|
+
import React, { useRef, useState } from "react";
|
|
5
|
+
|
|
6
|
+
interface Step {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
solidFormViewWorkflowData: Step[];
|
|
13
|
+
activeValue: string;
|
|
14
|
+
setActiveValue: (value: string) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const SolidExportStepper = ({ solidFormViewWorkflowData, activeValue ,setActiveValue}: Props) => {
|
|
18
|
+
const formStepperOverlay = useRef<OverlayPanel>(null);
|
|
19
|
+
const activeIndex = solidFormViewWorkflowData.findIndex(step => step.value === activeValue);
|
|
20
|
+
const visibleSteps = solidFormViewWorkflowData.length > 5
|
|
21
|
+
? solidFormViewWorkflowData.slice(0, 5)
|
|
22
|
+
: solidFormViewWorkflowData;
|
|
23
|
+
const handleStepClick = (value: string) => {
|
|
24
|
+
setActiveValue(value);
|
|
25
|
+
};
|
|
26
|
+
return (
|
|
27
|
+
<div className="flex solid-dynamic-stepper export-stepper">
|
|
28
|
+
{visibleSteps.map((step: any, index: number) => {
|
|
29
|
+
const isActive = index === activeIndex;
|
|
30
|
+
const isBeforeActive = index < activeIndex;
|
|
31
|
+
const isAfterActive = index > activeIndex;
|
|
32
|
+
const isFirstVisible = index === 0;
|
|
33
|
+
const isLastVisible = index === visibleSteps.length - 1;
|
|
34
|
+
const isNextAfterActive = index === activeIndex + 1;
|
|
35
|
+
const isTwoStepsOnly = visibleSteps.length === 2;
|
|
36
|
+
return (
|
|
37
|
+
<Button
|
|
38
|
+
key={index}
|
|
39
|
+
type="button"
|
|
40
|
+
className={`solid-step-button export relative ${isTwoStepsOnly ? 'two-step-button' : ''} ${isActive ? 'p-button-primary' : ''} ${isBeforeActive ? 'p-button-secondary' : ''}`}
|
|
41
|
+
text={!isActive && !isBeforeActive}
|
|
42
|
+
onClick={() => handleStepClick(step.value)}
|
|
43
|
+
>
|
|
44
|
+
{step.label}
|
|
45
|
+
<>
|
|
46
|
+
{isNextAfterActive && solidFormViewWorkflowData.map((step: any) => step.value).includes(activeValue) &&
|
|
47
|
+
(
|
|
48
|
+
<div className="absolute active-step-arrow">
|
|
49
|
+
<svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg" fill="#000000" transform="rotate(30)"
|
|
50
|
+
height="60px"
|
|
51
|
+
width="60px"
|
|
52
|
+
>
|
|
53
|
+
<g id="SVGRepo_iconCarrier">
|
|
54
|
+
<g id="color">
|
|
55
|
+
<polygon fill={"var(--primary-color)"} points="36,62 65,12 7,12" />
|
|
56
|
+
</g>
|
|
57
|
+
<g id="line">
|
|
58
|
+
<polyline fill="none" stroke="" strokeMiterlimit="10" strokeWidth="1.5" points="36,62 65,12 7,12" />
|
|
59
|
+
</g>
|
|
60
|
+
</g>
|
|
61
|
+
</svg>
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
{(isActive || isBeforeActive) && !isFirstVisible && (!isTwoStepsOnly || index === 1) && (
|
|
66
|
+
<div className="absolute active-before-step-arrow">
|
|
67
|
+
<svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg" fill="#000000" transform="rotate(30)"
|
|
68
|
+
height="55px"
|
|
69
|
+
width="55px"
|
|
70
|
+
>
|
|
71
|
+
<g id="SVGRepo_iconCarrier">
|
|
72
|
+
<g id="color">
|
|
73
|
+
<polygon fill="#EAEDF1" points="36,62 65,12 7,12" />
|
|
74
|
+
</g>
|
|
75
|
+
<g id="line">
|
|
76
|
+
<polyline fill="none" stroke="var(--solid-stepper-border)" strokeMiterlimit="10" strokeWidth="1.5" points="36,62 65,12 7,12" />
|
|
77
|
+
</g>
|
|
78
|
+
</g>
|
|
79
|
+
</svg>
|
|
80
|
+
</div>
|
|
81
|
+
)}
|
|
82
|
+
|
|
83
|
+
{isAfterActive && !isLastVisible && (
|
|
84
|
+
<div className="absolute inactive-step-arrow">
|
|
85
|
+
<svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg" fill="#000000" transform="rotate(30)"
|
|
86
|
+
height="55px"
|
|
87
|
+
width="55px"
|
|
88
|
+
>
|
|
89
|
+
<g id="SVGRepo_iconCarrier">
|
|
90
|
+
<g id="color">
|
|
91
|
+
<polygon fill="#EAEDF1" points="36,62 65,12 7,12" />
|
|
92
|
+
</g>
|
|
93
|
+
<g id="line">
|
|
94
|
+
<polyline fill="none" stroke="var(--solid-stepper-border)" strokeMiterlimit="10" strokeWidth="1.5" points="36,62 65,12 7,12" />
|
|
95
|
+
</g>
|
|
96
|
+
</g>
|
|
97
|
+
</svg>
|
|
98
|
+
</div>
|
|
99
|
+
)}
|
|
100
|
+
</>
|
|
101
|
+
{solidFormViewWorkflowData.length > 5 && index === 4 && (
|
|
102
|
+
<div className='absolute' style={{ right: 5 }}>
|
|
103
|
+
<Button
|
|
104
|
+
type='button'
|
|
105
|
+
icon="pi pi-angle-down"
|
|
106
|
+
text
|
|
107
|
+
size='small'
|
|
108
|
+
style={{ height: 24, width: '1.5rem', padding: 0 }}
|
|
109
|
+
onClick={(e) =>
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
formStepperOverlay.current.toggle(e)
|
|
112
|
+
}
|
|
113
|
+
/>
|
|
114
|
+
<OverlayPanel ref={formStepperOverlay} className="solid-custom-overlay solid-form-stepper-overlay">
|
|
115
|
+
<div className='flex flex-column gap-1 p-1'>
|
|
116
|
+
{solidFormViewWorkflowData.slice(5).map((step: any, index: number) => (
|
|
117
|
+
<Button
|
|
118
|
+
key={index}
|
|
119
|
+
type='button'
|
|
120
|
+
label={step.label}
|
|
121
|
+
size='small'
|
|
122
|
+
text
|
|
123
|
+
onClick={() => handleStepClick(step.value)}
|
|
124
|
+
/>
|
|
125
|
+
))}
|
|
126
|
+
</div>
|
|
127
|
+
</OverlayPanel>
|
|
128
|
+
</div>
|
|
129
|
+
)}
|
|
130
|
+
</Button>
|
|
131
|
+
)
|
|
132
|
+
})}
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
135
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { Tooltip } from 'primereact/tooltip';
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
export const SolidFieldTooltip = ({ fieldContext }: any) => {
|
|
6
|
+
const solidFormViewMetaData = fieldContext.solidFormViewMetaData;
|
|
7
|
+
const fieldLayoutInfo = fieldContext.field;
|
|
8
|
+
const fieldMetadata = fieldContext.fieldMetadata;
|
|
9
|
+
const showTooltip = solidFormViewMetaData.data.solidView?.layout?.attrs?.showTooltip ?? true;
|
|
10
|
+
const tooltipPosition = solidFormViewMetaData.data.solidView?.layout?.attrs?.tooltipPosition;
|
|
11
|
+
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
showTooltip && fieldDescription &&
|
|
15
|
+
<>
|
|
16
|
+
<Tooltip className='solid-field-tooltip' target=".solid-field-tooltip-icon" />
|
|
17
|
+
<i className="pi pi-info-circle solid-field-tooltip-icon"
|
|
18
|
+
data-pr-tooltip={fieldDescription}
|
|
19
|
+
data-pr-position={tooltipPosition}
|
|
20
|
+
/>
|
|
21
|
+
</>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { SolidBreadcrumb } from './SolidBreadcrumb';
|
|
3
|
+
import { SolidFormStepper } from './SolidFormStepper';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
solidFormViewMetaData?: any;
|
|
7
|
+
initialEntityData?: any;
|
|
8
|
+
modelName?: any;
|
|
9
|
+
id?: any,
|
|
10
|
+
solidWorkflowFieldValue?: any
|
|
11
|
+
setSolidWorkflowFieldValue?: any
|
|
12
|
+
onStepperUpdate?: () => void
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const SolidFormHeader = (props: Props) => {
|
|
16
|
+
const { solidFormViewMetaData, id } = props;
|
|
17
|
+
return (
|
|
18
|
+
<div className='flex flex-column gap-2 align-items-start xl:flex-row xl:align-items-center justify-content-between solid-dynamic-breadcrumb-stepper'>
|
|
19
|
+
<SolidBreadcrumb {...props} />
|
|
20
|
+
{solidFormViewMetaData?.data?.solidFormViewWorkflowData.length > 0 &&
|
|
21
|
+
<SolidFormStepper {...props} />
|
|
22
|
+
}
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { Button } from 'primereact/button'
|
|
3
|
+
import { OverlayPanel } from 'primereact/overlaypanel';
|
|
4
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
5
|
+
import { createSolidEntityApi } from '../../redux/api/solidEntityApi';
|
|
6
|
+
import { useFormik } from 'formik';
|
|
7
|
+
import { Toast } from 'primereact/toast';
|
|
8
|
+
import { useSearchParams } from 'next/navigation';
|
|
9
|
+
import { ERROR_MESSAGES } from '../../constants/error-messages';
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
solidFormViewMetaData?: any;
|
|
13
|
+
modelName?: any,
|
|
14
|
+
initialEntityData?: any;
|
|
15
|
+
id?: any,
|
|
16
|
+
solidWorkflowFieldValue?: any
|
|
17
|
+
setSolidWorkflowFieldValue?: any
|
|
18
|
+
onStepperUpdate?: () => void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const SolidFormStepper = (props: Props) => {
|
|
22
|
+
const { solidFormViewMetaData, modelName, initialEntityData, id, solidWorkflowFieldValue, setSolidWorkflowFieldValue, onStepperUpdate } = props;
|
|
23
|
+
const toast = useRef<Toast>(null);
|
|
24
|
+
const formStepperOverlay = useRef(null);
|
|
25
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
26
|
+
const leftFormStepperOverlay = useRef(null);
|
|
27
|
+
|
|
28
|
+
const searchParams = useSearchParams();
|
|
29
|
+
const viewMode = searchParams.get('viewMode');
|
|
30
|
+
|
|
31
|
+
const solidFormViewWorkflowData = solidFormViewMetaData?.data?.solidFormViewWorkflowData;
|
|
32
|
+
const solidWorkflowField = solidFormViewMetaData?.data?.solidView?.layout?.attrs?.workflowField;
|
|
33
|
+
const solidWorkflowFieldEnabled = solidFormViewMetaData?.data?.solidView?.layout?.attrs?.workflowFieldUpdateEnabled;
|
|
34
|
+
const defaultWorkflowFieldValue = solidFormViewMetaData?.data?.solidFieldsMetadata?.[solidWorkflowField]?.defaultValue
|
|
35
|
+
const defaultWorkflowFieldDisplayName = solidFormViewMetaData?.data?.solidFieldsMetadata?.[solidWorkflowField]?.displayName
|
|
36
|
+
const activeStep = solidFormViewMetaData?.data?.solidFormViewWorkflowData[0].value
|
|
37
|
+
const [solidWorkflowFieldKey, setSolidWorkflowFieldKey] = useState<string>("");
|
|
38
|
+
const [visibleStepsCount, setVisibleStepsCount] = useState<number>(1);
|
|
39
|
+
|
|
40
|
+
// Dynamic responsive logic
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const calculateVisibleSteps = () => {
|
|
43
|
+
if (!containerRef.current || !solidFormViewWorkflowData || solidFormViewWorkflowData.length === 0) return;
|
|
44
|
+
|
|
45
|
+
const containerWidth = containerRef.current.offsetWidth;
|
|
46
|
+
const overflowButtonWidth = 50;
|
|
47
|
+
const arrowWidth = 30; // Width for arrow between buttons
|
|
48
|
+
const spacing = 0; // No gap needed as arrows connect buttons
|
|
49
|
+
|
|
50
|
+
const tempContainer = document.createElement('div');
|
|
51
|
+
tempContainer.style.visibility = 'hidden';
|
|
52
|
+
tempContainer.style.position = 'absolute';
|
|
53
|
+
document.body.appendChild(tempContainer);
|
|
54
|
+
|
|
55
|
+
const buttonWidths: number[] = [];
|
|
56
|
+
|
|
57
|
+
solidFormViewWorkflowData.forEach((step: any) => {
|
|
58
|
+
const tempButton = document.createElement('button');
|
|
59
|
+
tempButton.className = 'arrow-step-button';
|
|
60
|
+
tempButton.textContent = step.label;
|
|
61
|
+
tempButton.style.padding = '0.5rem 1.5rem';
|
|
62
|
+
tempButton.style.minWidth = '100px';
|
|
63
|
+
tempContainer.appendChild(tempButton);
|
|
64
|
+
buttonWidths.push(Math.max(100, tempButton.offsetWidth));
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
document.body.removeChild(tempContainer);
|
|
68
|
+
|
|
69
|
+
let count = 0;
|
|
70
|
+
let totalWidth = 0;
|
|
71
|
+
|
|
72
|
+
for (let i = 0; i < buttonWidths.length; i++) {
|
|
73
|
+
const buttonWidth = buttonWidths[i];
|
|
74
|
+
const arrowSpace = i > 0 ? arrowWidth : 0;
|
|
75
|
+
const needsOverflow = i < buttonWidths.length - 1;
|
|
76
|
+
const requiredWidth = totalWidth + buttonWidth + arrowSpace + (needsOverflow ? overflowButtonWidth : 0);
|
|
77
|
+
|
|
78
|
+
if (requiredWidth <= containerWidth) {
|
|
79
|
+
totalWidth += buttonWidth + arrowSpace;
|
|
80
|
+
count++;
|
|
81
|
+
} else {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
count = Math.max(1, count);
|
|
87
|
+
setVisibleStepsCount(count);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
calculateVisibleSteps();
|
|
91
|
+
|
|
92
|
+
const resizeObserver = new ResizeObserver(calculateVisibleSteps);
|
|
93
|
+
if (containerRef.current) {
|
|
94
|
+
resizeObserver.observe(containerRef.current);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const timeoutId = setTimeout(calculateVisibleSteps, 100);
|
|
98
|
+
|
|
99
|
+
return () => {
|
|
100
|
+
resizeObserver.disconnect();
|
|
101
|
+
clearTimeout(timeoutId);
|
|
102
|
+
};
|
|
103
|
+
}, [solidFormViewWorkflowData]);
|
|
104
|
+
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (!solidWorkflowField) return;
|
|
107
|
+
|
|
108
|
+
setSolidWorkflowFieldKey(solidWorkflowField);
|
|
109
|
+
|
|
110
|
+
setSolidWorkflowFieldValue(() => {
|
|
111
|
+
if (initialEntityData?.[solidWorkflowField] !== undefined) {
|
|
112
|
+
if (solidFormViewMetaData?.data?.solidFieldsMetadata?.[solidWorkflowField]?.type === "relation") {
|
|
113
|
+
return initialEntityData[solidWorkflowField]?.id || initialEntityData[solidWorkflowField];
|
|
114
|
+
} else {
|
|
115
|
+
return initialEntityData[solidWorkflowField];
|
|
116
|
+
}
|
|
117
|
+
} else if (defaultWorkflowFieldValue !== undefined) {
|
|
118
|
+
return defaultWorkflowFieldValue;
|
|
119
|
+
} else {
|
|
120
|
+
return activeStep;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}, [solidWorkflowField, initialEntityData, defaultWorkflowFieldValue, activeStep]);
|
|
124
|
+
|
|
125
|
+
const formik = useFormik({
|
|
126
|
+
enableReinitialize: true,
|
|
127
|
+
initialValues: {
|
|
128
|
+
id: +id,
|
|
129
|
+
[solidWorkflowFieldKey]: solidWorkflowFieldValue || "",
|
|
130
|
+
},
|
|
131
|
+
onSubmit: (values) => {
|
|
132
|
+
handleStepChange(values);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
const entityApi = createSolidEntityApi(modelName);
|
|
137
|
+
const { usePatchUpdateSolidEntityMutation } = entityApi;
|
|
138
|
+
|
|
139
|
+
const [
|
|
140
|
+
updateStepper,
|
|
141
|
+
{ isSuccess: isStepperUpdateSuccessfull, isError: isStepperUpdateError, error: stepperUpdateError },
|
|
142
|
+
] = usePatchUpdateSolidEntityMutation();
|
|
143
|
+
|
|
144
|
+
const showToast = (severity: "success" | "error", summary: string, detail: string) => {
|
|
145
|
+
toast.current?.show({
|
|
146
|
+
severity,
|
|
147
|
+
summary,
|
|
148
|
+
detail,
|
|
149
|
+
...(severity === "error"
|
|
150
|
+
? { sticky: true } // stays until user closes
|
|
151
|
+
: { life: 3000 }),
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const handleStepChange = async (values: any) => {
|
|
156
|
+
try {
|
|
157
|
+
const result = await updateStepper({ id: values.id, data: { [solidWorkflowFieldKey]: values[solidWorkflowFieldKey] } }).unwrap();
|
|
158
|
+
if (result?.statusCode === 200) {
|
|
159
|
+
showToast("success", ERROR_MESSAGES.FIELD_UPDATE(defaultWorkflowFieldDisplayName), ERROR_MESSAGES.FIELD_UPDATE_SUCCESSFULLY(defaultWorkflowFieldDisplayName));
|
|
160
|
+
if (result?.data?.[solidWorkflowFieldKey]) {
|
|
161
|
+
setSolidWorkflowFieldValue(result.data[solidWorkflowFieldKey]);
|
|
162
|
+
}
|
|
163
|
+
if (onStepperUpdate) {
|
|
164
|
+
onStepperUpdate();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
} catch (error) {
|
|
168
|
+
console.error(ERROR_MESSAGES.UPDATING_STEPPER, error);
|
|
169
|
+
showToast("error", ERROR_MESSAGES.UPDATE_FAILED, ERROR_MESSAGES.FAILED_UPDATE_FROM);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const handleButtonClick = (stepValue: any) => {
|
|
174
|
+
if (solidWorkflowFieldEnabled === false || id === "new" || viewMode === "view") {
|
|
175
|
+
return
|
|
176
|
+
} else {
|
|
177
|
+
formik.setFieldValue(solidWorkflowFieldKey, stepValue);
|
|
178
|
+
formik.handleSubmit();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const activeIndex = solidFormViewWorkflowData?.findIndex((step: any) => step.value === solidWorkflowFieldValue) ?? -1;
|
|
183
|
+
|
|
184
|
+
let visibleSteps: any[] = [];
|
|
185
|
+
let previousSteps: any[] = [];
|
|
186
|
+
let nextSteps: any[] = [];
|
|
187
|
+
const isSingleVisibleStep = visibleStepsCount === 1;
|
|
188
|
+
|
|
189
|
+
if (solidFormViewWorkflowData && solidFormViewWorkflowData.length > 0) {
|
|
190
|
+
if (activeIndex === -1) {
|
|
191
|
+
visibleSteps = solidFormViewWorkflowData.slice(0, visibleStepsCount);
|
|
192
|
+
nextSteps = solidFormViewWorkflowData.slice(visibleStepsCount);
|
|
193
|
+
} else if (visibleStepsCount === 1) {
|
|
194
|
+
visibleSteps = [solidFormViewWorkflowData[activeIndex]];
|
|
195
|
+
previousSteps = solidFormViewWorkflowData.slice(0, activeIndex);
|
|
196
|
+
nextSteps = solidFormViewWorkflowData.slice(activeIndex + 1);
|
|
197
|
+
} else {
|
|
198
|
+
const totalSteps = solidFormViewWorkflowData.length;
|
|
199
|
+
|
|
200
|
+
if (activeIndex < visibleStepsCount) {
|
|
201
|
+
visibleSteps = solidFormViewWorkflowData.slice(0, visibleStepsCount);
|
|
202
|
+
nextSteps = solidFormViewWorkflowData.slice(visibleStepsCount);
|
|
203
|
+
} else {
|
|
204
|
+
const slotsAvailable = visibleStepsCount - 1;
|
|
205
|
+
const afterActive = Math.min(Math.floor(slotsAvailable / 2), totalSteps - activeIndex - 1);
|
|
206
|
+
const beforeActive = slotsAvailable - afterActive;
|
|
207
|
+
|
|
208
|
+
const startIndex = Math.max(0, activeIndex - beforeActive);
|
|
209
|
+
const endIndex = Math.min(totalSteps, activeIndex + afterActive + 1);
|
|
210
|
+
|
|
211
|
+
previousSteps = solidFormViewWorkflowData.slice(0, startIndex);
|
|
212
|
+
visibleSteps = solidFormViewWorkflowData.slice(startIndex, endIndex);
|
|
213
|
+
nextSteps = solidFormViewWorkflowData.slice(endIndex);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const hasPreviousSteps =
|
|
219
|
+
previousSteps.length > 0 && !isSingleVisibleStep;
|
|
220
|
+
|
|
221
|
+
const hasNextSteps =
|
|
222
|
+
nextSteps.length > 0 || (isSingleVisibleStep && previousSteps.length > 0);
|
|
223
|
+
|
|
224
|
+
return (
|
|
225
|
+
<>
|
|
226
|
+
<Toast ref={toast} />
|
|
227
|
+
<div ref={containerRef} className='arrow-stepper-container'>
|
|
228
|
+
{hasPreviousSteps && (
|
|
229
|
+
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
230
|
+
<button
|
|
231
|
+
type='button'
|
|
232
|
+
className="overflow-button overlow-left-button"
|
|
233
|
+
onClick={(e) => {
|
|
234
|
+
// @ts-ignore
|
|
235
|
+
leftFormStepperOverlay.current.toggle(e)
|
|
236
|
+
}}
|
|
237
|
+
>
|
|
238
|
+
<i className="pi pi-ellipsis-h" />
|
|
239
|
+
</button>
|
|
240
|
+
<OverlayPanel
|
|
241
|
+
ref={leftFormStepperOverlay}
|
|
242
|
+
className="solid-custom-overlay solid-form-stepper-overlay"
|
|
243
|
+
>
|
|
244
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.25rem', padding: '0.5rem' }}>
|
|
245
|
+
{previousSteps.map((step: any, index: number) => {
|
|
246
|
+
const stepIndex = index;
|
|
247
|
+
const isStepActive = stepIndex === activeIndex;
|
|
248
|
+
const isStepBeforeActive = stepIndex < activeIndex;
|
|
249
|
+
|
|
250
|
+
return (
|
|
251
|
+
<button
|
|
252
|
+
key={stepIndex}
|
|
253
|
+
type='button'
|
|
254
|
+
className={`overlay-step-button ${isStepActive ? 'active' : ''} ${isStepBeforeActive ? 'completed' : ''}`}
|
|
255
|
+
onClick={() => {
|
|
256
|
+
handleButtonClick(step.value);
|
|
257
|
+
// @ts-ignore
|
|
258
|
+
leftFormStepperOverlay.current.hide();
|
|
259
|
+
}}
|
|
260
|
+
>
|
|
261
|
+
{step.label}
|
|
262
|
+
</button>
|
|
263
|
+
)
|
|
264
|
+
})}
|
|
265
|
+
</div>
|
|
266
|
+
</OverlayPanel>
|
|
267
|
+
</div>
|
|
268
|
+
)}
|
|
269
|
+
|
|
270
|
+
{visibleSteps.map((step: any) => {
|
|
271
|
+
const stepIndex = solidFormViewWorkflowData.findIndex(
|
|
272
|
+
(s: any) => s.value === step.value
|
|
273
|
+
);
|
|
274
|
+
|
|
275
|
+
const isActive = stepIndex === activeIndex;
|
|
276
|
+
const isBeforeActive = stepIndex < activeIndex;
|
|
277
|
+
const isSingleButton = visibleSteps.length === 1;
|
|
278
|
+
|
|
279
|
+
return (
|
|
280
|
+
<button
|
|
281
|
+
key={step.value}
|
|
282
|
+
type="button"
|
|
283
|
+
className={`arrow-step-button ${
|
|
284
|
+
isSingleButton ? 'single-button' : ''
|
|
285
|
+
} ${
|
|
286
|
+
isActive
|
|
287
|
+
? 'arrow-step-active'
|
|
288
|
+
: isBeforeActive
|
|
289
|
+
? 'arrow-step-completed'
|
|
290
|
+
: 'arrow-step-future'
|
|
291
|
+
}`}
|
|
292
|
+
onClick={() => handleButtonClick(step.value)}
|
|
293
|
+
title={step.label}
|
|
294
|
+
>
|
|
295
|
+
<span className="step-text">{step.label}</span>
|
|
296
|
+
</button>
|
|
297
|
+
);
|
|
298
|
+
})}
|
|
299
|
+
|
|
300
|
+
{hasNextSteps && (
|
|
301
|
+
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
302
|
+
<button
|
|
303
|
+
type='button'
|
|
304
|
+
className="overflow-button overflow-right-button"
|
|
305
|
+
onClick={(e) => {
|
|
306
|
+
// @ts-ignore
|
|
307
|
+
formStepperOverlay.current.toggle(e)
|
|
308
|
+
}}
|
|
309
|
+
>
|
|
310
|
+
<i className="pi pi-ellipsis-h" />
|
|
311
|
+
</button>
|
|
312
|
+
<OverlayPanel
|
|
313
|
+
ref={formStepperOverlay}
|
|
314
|
+
className="solid-custom-overlay solid-form-stepper-overlay"
|
|
315
|
+
>
|
|
316
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.25rem', padding: '0.5rem' }}>
|
|
317
|
+
{(isSingleVisibleStep
|
|
318
|
+
? [...previousSteps, ...nextSteps]
|
|
319
|
+
: nextSteps).map((step: any) => {
|
|
320
|
+
|
|
321
|
+
const stepIndex = solidFormViewWorkflowData.findIndex(
|
|
322
|
+
(s: any) => s.value === step.value
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
const isStepActive = stepIndex === activeIndex;
|
|
326
|
+
const isStepBeforeActive = stepIndex < activeIndex;
|
|
327
|
+
|
|
328
|
+
return (
|
|
329
|
+
<button
|
|
330
|
+
key={stepIndex}
|
|
331
|
+
type='button'
|
|
332
|
+
className={`overlay-step-button ${isStepActive ? 'active' : ''} ${isStepBeforeActive ? 'completed' : ''}`}
|
|
333
|
+
onClick={() => {
|
|
334
|
+
handleButtonClick(step.value);
|
|
335
|
+
// @ts-ignore
|
|
336
|
+
formStepperOverlay.current.hide();
|
|
337
|
+
}}
|
|
338
|
+
>
|
|
339
|
+
{step.label}
|
|
340
|
+
</button>
|
|
341
|
+
)
|
|
342
|
+
})}
|
|
343
|
+
</div>
|
|
344
|
+
</OverlayPanel>
|
|
345
|
+
</div>
|
|
346
|
+
)}
|
|
347
|
+
</div>
|
|
348
|
+
</>
|
|
349
|
+
)
|
|
350
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useSession } from 'next-auth/react'
|
|
4
|
+
import styles from './solidModuleHome.module.css'
|
|
5
|
+
import { Button } from 'primereact/button';
|
|
6
|
+
import { DocsSvg } from '../Svg/DocsSvg';
|
|
7
|
+
import { SettingsSvg } from '../Svg/SettingsSvg';
|
|
8
|
+
import { DevDocs } from '../Svg/DevDocs';
|
|
9
|
+
import { HomePageModuleSvg } from '../Svg/HomePageModuleSvg';
|
|
10
|
+
import Link from 'next/link';
|
|
11
|
+
import { useState } from 'react';
|
|
12
|
+
import { SolidAccountSettings } from '../core/common/SolidAccountSettings/SolidAccountSettings';
|
|
13
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
14
|
+
import { showNavbar, toggleNavbar } from "../../redux/features/navbarSlice";
|
|
15
|
+
|
|
16
|
+
type SolidModuleHomeProps = {
|
|
17
|
+
moduleName?: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const SolidModuleHome = ({ moduleName = "Dashboard" }: SolidModuleHomeProps) => {
|
|
21
|
+
const { data: session, status } = useSession();
|
|
22
|
+
const dispatch = useDispatch();
|
|
23
|
+
const visibleNavbar = useSelector((state: any) => state.navbarState?.visibleNavbar);
|
|
24
|
+
//@ts-ignore
|
|
25
|
+
const user = session?.user?.user?.username;
|
|
26
|
+
const [showAccountSettings, setShowAccountSettings] = useState(false);
|
|
27
|
+
|
|
28
|
+
const toggleBothSidebars = () => {
|
|
29
|
+
if (visibleNavbar) {
|
|
30
|
+
dispatch(toggleNavbar()); // close both
|
|
31
|
+
} else {
|
|
32
|
+
dispatch(showNavbar()); // open both
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<div className="h-screen surface-0 overflow-y-auto">
|
|
38
|
+
<div className="page-header" style={{ borderBottom: '1px solid var(--primary-light-color)' }}>
|
|
39
|
+
<div className='flex align-items-center gap-2'>
|
|
40
|
+
<div className="apps-icon block md:hidden cursor-pointer" onClick={toggleBothSidebars}>
|
|
41
|
+
<i className="pi pi-th-large"></i>
|
|
42
|
+
</div>
|
|
43
|
+
<p className="m-0 view-title solid-text-wrapper">
|
|
44
|
+
{moduleName}
|
|
45
|
+
</p>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div className="p-4 md:p-5 flex flex-column gap-4">
|
|
49
|
+
<div className={styles.solidModuleWelcomeSection}>
|
|
50
|
+
<div className='flex flex-column gap-2 pr-3 lg:pr-0'>
|
|
51
|
+
<h3 className={styles.solidModuleHomeTitle1}>
|
|
52
|
+
Welcome, {status === "loading" ? "..." : user}
|
|
53
|
+
</h3>
|
|
54
|
+
<p className='m-0 w-35rem text-sl'>
|
|
55
|
+
This is the home page for the {moduleName} module. You can find documentation and settings below.
|
|
56
|
+
</p>
|
|
57
|
+
</div>
|
|
58
|
+
<div className={styles.homeSvg}>
|
|
59
|
+
<HomePageModuleSvg />
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
{/* Cards */}
|
|
64
|
+
<div className='grid'>
|
|
65
|
+
{[{
|
|
66
|
+
icon: <DocsSvg />,
|
|
67
|
+
title: 'Admin Docs',
|
|
68
|
+
description: 'Explore the administrator documentation to manage and configure your system.',
|
|
69
|
+
class: styles.dashboardCardOne,
|
|
70
|
+
url: 'https://docs.solidxai.com/docs/admin-docs/'
|
|
71
|
+
}, {
|
|
72
|
+
icon: <DevDocs />,
|
|
73
|
+
title: 'Dev Docs',
|
|
74
|
+
description: 'Dive into the developer documentation to build, extend, and integrate with the platform.',
|
|
75
|
+
class: styles.dashboardCardTwo,
|
|
76
|
+
url: 'https://docs.solidxai.com/docs/developer-docs/'
|
|
77
|
+
}, {
|
|
78
|
+
icon: <SettingsSvg />,
|
|
79
|
+
title: 'Settings',
|
|
80
|
+
description: 'Access and update your account settings, preferences, and profile information.',
|
|
81
|
+
class: styles.dashboardCardThree,
|
|
82
|
+
type: 'popup'
|
|
83
|
+
}].map((card, i) => (
|
|
84
|
+
<div className='col-12 md:col-6 xl:col-4' key={i}>
|
|
85
|
+
<div className={`${styles.solidModuleHomeColorCards} ${card.class}`}>
|
|
86
|
+
<div>
|
|
87
|
+
<div className={styles.solidModuleHomeCardSvgWrapper}>{card.icon}</div>
|
|
88
|
+
<h3 className={`${styles.solidModuleHomeTitle1} mt-4`}>{card.title}</h3>
|
|
89
|
+
<p className='mb-0 mt-2 mr-2 text-xs'>
|
|
90
|
+
{card.description}
|
|
91
|
+
</p>
|
|
92
|
+
</div>
|
|
93
|
+
<div>
|
|
94
|
+
{card.url ? (
|
|
95
|
+
<Link href={card.url} target="_blank" rel="noopener noreferrer">
|
|
96
|
+
<Button outlined label='Explore' size='small' icon="pi pi-arrow-right" iconPos='right' className="font-bold" style={{ background: 'var(--solid-module-home-add-button-bg)' }} />
|
|
97
|
+
</Link>
|
|
98
|
+
) : (
|
|
99
|
+
<Button
|
|
100
|
+
outlined
|
|
101
|
+
label='Open'
|
|
102
|
+
size='small'
|
|
103
|
+
icon="pi pi-cog"
|
|
104
|
+
iconPos='right'
|
|
105
|
+
className="font-bold"
|
|
106
|
+
style={{ background: 'var(--solid-module-home-add-button-bg)' }}
|
|
107
|
+
onClick={() => {
|
|
108
|
+
if (card.type === 'popup') {
|
|
109
|
+
setShowAccountSettings(true);
|
|
110
|
+
}
|
|
111
|
+
}}
|
|
112
|
+
/>
|
|
113
|
+
)}
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
))}
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
{showAccountSettings &&
|
|
121
|
+
<SolidAccountSettings
|
|
122
|
+
showProfileSettingsDialog={showAccountSettings}
|
|
123
|
+
setShowProfileSettingsDialog={setShowAccountSettings}
|
|
124
|
+
/>
|
|
125
|
+
}
|
|
126
|
+
</div>
|
|
127
|
+
)
|
|
128
|
+
}
|