@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,87 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Button } from 'primereact/button';
|
|
3
|
+
import { OverlayPanel } from 'primereact/overlaypanel';
|
|
4
|
+
import { RadioButton } from 'primereact/radiobutton';
|
|
5
|
+
import { useRef } from 'react';
|
|
6
|
+
interface Props {
|
|
7
|
+
sizeOptions: { label: string; value: string, image: string }[];
|
|
8
|
+
setSize: (value: string) => void;
|
|
9
|
+
size: string;
|
|
10
|
+
viewModes: { label: string; value: string, image: string }[];
|
|
11
|
+
setView: (value: string) => void;
|
|
12
|
+
view: string;
|
|
13
|
+
}
|
|
14
|
+
export const SolidLayoutViews = ({ sizeOptions, setSize, size, viewModes, setView, view }: Props) => {
|
|
15
|
+
const op = useRef(null);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="position-relative">
|
|
19
|
+
<Button
|
|
20
|
+
type="button"
|
|
21
|
+
size='small'
|
|
22
|
+
severity='secondary'
|
|
23
|
+
icon={
|
|
24
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none">
|
|
25
|
+
<path d="M14.9016 13.1969L10.8031 9.09845L14.9016 5L19 9.09845L14.9016 13.1969ZM5 11.7461V5.94301H10.8031V11.7461H5ZM12.2539 19V13.1969H18.057V19H12.2539ZM5 19V13.1969H10.8031V19H5ZM6.45078 10.2953H9.35233V7.39378H6.45078V10.2953ZM14.9197 11.1658L16.9689 9.11658L14.9197 7.06736L12.8705 9.11658L14.9197 11.1658ZM13.7047 17.5492H16.6062V14.6477H13.7047V17.5492ZM6.45078 17.5492H9.35233V14.6477H6.45078V17.5492Z" fill="#4B4D52" />
|
|
26
|
+
</svg>
|
|
27
|
+
}
|
|
28
|
+
className='custom-icon-button'
|
|
29
|
+
outlined
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
onClick={(e) => op.current.toggle(e)}
|
|
32
|
+
/>
|
|
33
|
+
<OverlayPanel ref={op} className='solid-header-dropdown-panel'>
|
|
34
|
+
<div className='secondary-border-bottom p-1'>
|
|
35
|
+
<p className='px-3 pt-2'>Density</p>
|
|
36
|
+
<div className="flex flex-column gap-1">
|
|
37
|
+
{sizeOptions.map((option) => (
|
|
38
|
+
<div key={option.value} className={`flex align-items-center ${option.value === size ? 'solid-active-view' : 'solid-view'}`}>
|
|
39
|
+
<RadioButton
|
|
40
|
+
inputId={option.value}
|
|
41
|
+
name="sizes"
|
|
42
|
+
value={option.value}
|
|
43
|
+
onChange={(e) => setSize(e.value)}
|
|
44
|
+
checked={option.value === size}
|
|
45
|
+
/>
|
|
46
|
+
<label htmlFor={option.value} className="ml-2 flex align-items-center justify-content-between w-full">
|
|
47
|
+
{option.label}
|
|
48
|
+
<img
|
|
49
|
+
src={option.image}
|
|
50
|
+
alt={option.value}
|
|
51
|
+
className='img-fluid position-relative'
|
|
52
|
+
style={{ width: '2.75rem' }}
|
|
53
|
+
/>
|
|
54
|
+
</label>
|
|
55
|
+
</div>
|
|
56
|
+
))}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div className='p-1'>
|
|
60
|
+
<p className='px-3 pt-2'>View Mode</p>
|
|
61
|
+
<div className="flex flex-column gap-1">
|
|
62
|
+
{viewModes.map((option) => (
|
|
63
|
+
<div key={option.value} className={`flex align-items-center ${option.value === view ? 'solid-active-view' : 'solid-view'}`}>
|
|
64
|
+
<RadioButton
|
|
65
|
+
inputId={option.value}
|
|
66
|
+
name="views"
|
|
67
|
+
value={option.value}
|
|
68
|
+
onChange={(e) => setView(e.value)}
|
|
69
|
+
checked={option.value === view}
|
|
70
|
+
/>
|
|
71
|
+
<label htmlFor={option.value} className="ml-2 flex align-items-center justify-content-between w-full">
|
|
72
|
+
{option.label}
|
|
73
|
+
<img
|
|
74
|
+
src={option.image}
|
|
75
|
+
alt={option.value}
|
|
76
|
+
className='img-fluid position-relative'
|
|
77
|
+
style={{ width: '2.75rem' }}
|
|
78
|
+
/>
|
|
79
|
+
</label>
|
|
80
|
+
</div>
|
|
81
|
+
))}
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</OverlayPanel>
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Dialog } from "primereact/dialog";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export const SolidListViewOptions = ({ }: any) => {
|
|
7
|
+
|
|
8
|
+
const [visible, setVisible] = useState<boolean>(false);
|
|
9
|
+
|
|
10
|
+
const [componentsToRender, setComponentsToRender] = useState(["Header", "NonExistentComponent"]);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className="card flex justify-content-center">
|
|
14
|
+
<i className="pi pi-cog" onClick={() => setVisible(true)}></i>
|
|
15
|
+
|
|
16
|
+
<Dialog header="Header" visible={visible} style={{ width: '50vw' }} onHide={() => { if (!visible) return; setVisible(false); }}>
|
|
17
|
+
<p className="m-0">
|
|
18
|
+
ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
19
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
20
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
21
|
+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
22
|
+
</p>
|
|
23
|
+
<div>
|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
</Dialog>
|
|
28
|
+
</div>
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
interface PasswordHelperTextProps {
|
|
6
|
+
text?: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const SolidPasswordHelperText: React.FC<PasswordHelperTextProps> = ({ text }) => {
|
|
10
|
+
const envPasswordHelperText = process.env.NEXT_PUBLIC_PASSWORD_COMPLEXITY_DESC ?? "";
|
|
11
|
+
|
|
12
|
+
if (!text && !envPasswordHelperText) return null;
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className="mt-4 text-sm grid">
|
|
16
|
+
{text ?
|
|
17
|
+
<div dangerouslySetInnerHTML={{ __html: text }}></div>
|
|
18
|
+
:
|
|
19
|
+
<div className="col-12">
|
|
20
|
+
<div className="grid">
|
|
21
|
+
{envPasswordHelperText.split("\\n").map((line, idx) => (
|
|
22
|
+
<div key={idx} className="col-6 pt-0">
|
|
23
|
+
<div className="flex gap-2">
|
|
24
|
+
<span>•</span>
|
|
25
|
+
<span>{line}</span>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
))}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
}
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { Button } from "primereact/button";
|
|
3
|
+
import { Checkbox } from "primereact/checkbox";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
|
|
6
|
+
interface SolidSaveCustomFilterFormProps {
|
|
7
|
+
currentSavedFilterData: any,
|
|
8
|
+
handleSaveFilter: ({ }) => void;
|
|
9
|
+
closeDialog: any
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const SolidSaveCustomFilterForm: React.FC<SolidSaveCustomFilterFormProps> = ({ currentSavedFilterData, handleSaveFilter, closeDialog }) => {
|
|
13
|
+
const [formValues, setFormValues] = useState({ name: currentSavedFilterData ? currentSavedFilterData.name : "", isPrivate: currentSavedFilterData ? currentSavedFilterData.isPrivate : false });
|
|
14
|
+
|
|
15
|
+
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
16
|
+
const { name, value, type, checked } = e.target;
|
|
17
|
+
setFormValues((prev) => ({
|
|
18
|
+
...prev,
|
|
19
|
+
[name]: type === "checkbox" ? checked : value,
|
|
20
|
+
}));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
const formData = {
|
|
26
|
+
id: currentSavedFilterData ? currentSavedFilterData.id : null,
|
|
27
|
+
name: formValues.name,
|
|
28
|
+
isPrivate: formValues.isPrivate === true ? true : "",
|
|
29
|
+
}
|
|
30
|
+
handleSaveFilter(formData);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<form onSubmit={handleSubmit}>
|
|
35
|
+
<div className="flex flex-column gap-2">
|
|
36
|
+
<label htmlFor="name">Name:</label>
|
|
37
|
+
<input
|
|
38
|
+
type="text"
|
|
39
|
+
id="name"
|
|
40
|
+
name="name"
|
|
41
|
+
placeholder="Filter Title"
|
|
42
|
+
className="p-inputtext p-inputtext-sm p-component"
|
|
43
|
+
value={formValues.name}
|
|
44
|
+
onChange={handleChange}
|
|
45
|
+
readOnly={currentSavedFilterData}
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
<div className="mt-3 flex align-items-center ">
|
|
49
|
+
<Checkbox
|
|
50
|
+
inputId="isPrivate"
|
|
51
|
+
name="isPrivate"
|
|
52
|
+
checked={formValues.isPrivate}
|
|
53
|
+
onChange={(e: any) => handleChange(e)}
|
|
54
|
+
>
|
|
55
|
+
</Checkbox>
|
|
56
|
+
<label htmlFor="isPrivate" className="ml-2">Is Private</label>
|
|
57
|
+
</div>
|
|
58
|
+
<div className="mt-3 flex align-items-center gap-2">
|
|
59
|
+
<Button
|
|
60
|
+
type="submit"
|
|
61
|
+
label={currentSavedFilterData ? "Update" : "Save"}
|
|
62
|
+
size="small"
|
|
63
|
+
/>
|
|
64
|
+
<Button
|
|
65
|
+
type="button"
|
|
66
|
+
label="Cancel"
|
|
67
|
+
size="small"
|
|
68
|
+
outlined
|
|
69
|
+
onClick={() => closeDialog()}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</form>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { AutoComplete } from "primereact/autocomplete";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export const SolidSearchBox = ({ viewData }: any) => {
|
|
7
|
+
const [value, setValue] = useState<string>('');
|
|
8
|
+
const [items, setItems] = useState<string[]>([]);
|
|
9
|
+
const search = (event: any) => {
|
|
10
|
+
// setItems([...Array(10).keys()].map(item => event.query + '-' + item));
|
|
11
|
+
}
|
|
12
|
+
return (
|
|
13
|
+
<div className="card flex justify-content-center">
|
|
14
|
+
<AutoComplete value={value} suggestions={items} completeMethod={search} onChange={(e) => setValue(e.value)} />
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { ERROR_MESSAGES } from "../../../constants/error-messages";
|
|
2
|
+
import { LayoutAttribute, LayoutNode } from "../../../types/solid-core";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* SolidViewLayoutManager
|
|
6
|
+
*
|
|
7
|
+
* Central manager for mutating Solid View layout trees.
|
|
8
|
+
* Provides low-level tree operations and domain-specific helpers
|
|
9
|
+
* for view attributes, form buttons, and row buttons.
|
|
10
|
+
*/
|
|
11
|
+
export class SolidViewLayoutManager {
|
|
12
|
+
/** Internal mutable layout copy */
|
|
13
|
+
private layout: LayoutNode;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new layout manager instance.
|
|
17
|
+
* A deep copy of the provided layout is created to avoid side effects.
|
|
18
|
+
*
|
|
19
|
+
* @param layout - Original layout definition
|
|
20
|
+
*/
|
|
21
|
+
constructor(layout: LayoutNode) {
|
|
22
|
+
// Create a deep copy to prevent modifying the original object
|
|
23
|
+
this.layout = structuredClone ? structuredClone(layout) : JSON.parse(JSON.stringify(layout));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Recursively finds a layout node by its `attrs.name`.
|
|
28
|
+
* Searches children and formButtons.
|
|
29
|
+
*
|
|
30
|
+
* @param node - Node to start searching from
|
|
31
|
+
* @param name - Name of the node to find
|
|
32
|
+
* @returns The matching LayoutNode or null
|
|
33
|
+
*/
|
|
34
|
+
private findNode(node: LayoutNode, name: string): LayoutNode | null {
|
|
35
|
+
if (node.attrs.name === name) {
|
|
36
|
+
return node;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (node.children) {
|
|
40
|
+
for (let child of node.children) {
|
|
41
|
+
const found = this.findNode(child, name);
|
|
42
|
+
if (found) return found;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// search in formButtons
|
|
47
|
+
if (node.attrs?.formButtons) {
|
|
48
|
+
for (const btn of node.attrs.formButtons) {
|
|
49
|
+
const found = this.findNode(btn, name);
|
|
50
|
+
if (found) return found;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
private findNodes(node: LayoutNode, name: string): LayoutNode[] {
|
|
58
|
+
const nodes: LayoutNode[] = [];
|
|
59
|
+
if (node.attrs.name === name) {
|
|
60
|
+
nodes.push(node);
|
|
61
|
+
}
|
|
62
|
+
if (node.children) {
|
|
63
|
+
for (let child of node.children) {
|
|
64
|
+
nodes.push(...this.findNodes(child, name));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (node.attrs?.formButtons) {
|
|
68
|
+
for (const btn of node.attrs.formButtons) {
|
|
69
|
+
nodes.push(...this.findNodes(btn, name));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return nodes;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Recursively removes a node from the layout tree.
|
|
77
|
+
*
|
|
78
|
+
* @param parent - Parent node to search within
|
|
79
|
+
* @param name - Name of the node to remove
|
|
80
|
+
* @returns true if the node was removed
|
|
81
|
+
*/
|
|
82
|
+
private removeNodeRecursive(parent: LayoutNode, name: string): boolean {
|
|
83
|
+
if (!parent.children) return false;
|
|
84
|
+
|
|
85
|
+
const index = parent.children.findIndex((child) => child.attrs.name === name);
|
|
86
|
+
if (index !== -1) {
|
|
87
|
+
parent.children.splice(index, 1); // Remove the node
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return parent.children.some((child) => this.removeNodeRecursive(child, name));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Returns the managed layout instance.
|
|
97
|
+
*
|
|
98
|
+
* @returns Current layout tree
|
|
99
|
+
*/
|
|
100
|
+
getLayout(): LayoutNode {
|
|
101
|
+
// return structuredClone ? structuredClone(this.layout) : JSON.parse(JSON.stringify(this.layout));
|
|
102
|
+
return this.layout;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Updates attributes of a specific node.
|
|
107
|
+
* This method adds or overrides attributes.
|
|
108
|
+
*
|
|
109
|
+
* @param name - Node name
|
|
110
|
+
* @param newAttributes - Attributes to merge
|
|
111
|
+
* @returns true if node was found and updated
|
|
112
|
+
*/
|
|
113
|
+
updateNodeAttributes(name: string, newAttributes: Partial<LayoutAttribute>): boolean {
|
|
114
|
+
const node = this.findNode(this.layout, name);
|
|
115
|
+
if (node) {
|
|
116
|
+
node.attrs = { ...node.attrs, ...newAttributes };
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Adds a child node to a parent node.
|
|
124
|
+
*
|
|
125
|
+
* @param parentName - Name of the parent node
|
|
126
|
+
* @param newNode - Child layout node to add
|
|
127
|
+
* @param addChildrenToAll - If true, adds the child node to all nodes with the given parent name
|
|
128
|
+
* @returns true if parent exists and child was added
|
|
129
|
+
*/
|
|
130
|
+
addChildNode(parentName: string, newNode: LayoutNode, addChildrenToAll: boolean = false): boolean {
|
|
131
|
+
console.log(`timepass....`);
|
|
132
|
+
|
|
133
|
+
if (addChildrenToAll) {
|
|
134
|
+
const parentNodes = this.findNodes(this.layout, parentName);
|
|
135
|
+
parentNodes.forEach((node) => {
|
|
136
|
+
if (!node.children) {
|
|
137
|
+
node.children = [];
|
|
138
|
+
}
|
|
139
|
+
node.children.push(newNode);
|
|
140
|
+
});
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
const parentNode = this.findNode(this.layout, parentName);
|
|
145
|
+
if (parentNode) {
|
|
146
|
+
if (!parentNode.children) {
|
|
147
|
+
parentNode.children = [];
|
|
148
|
+
}
|
|
149
|
+
parentNode.children.push(newNode);
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Removes a node and its subtree.
|
|
159
|
+
* Root node removal is prevented.
|
|
160
|
+
*
|
|
161
|
+
* @param name - Name of the node to remove
|
|
162
|
+
* @returns true if node was removed
|
|
163
|
+
*/
|
|
164
|
+
removeNode(name: string): boolean {
|
|
165
|
+
if (this.layout.attrs.name === name) {
|
|
166
|
+
console.warn(ERROR_MESSAGES.REMOVE_ROOT_NODE);
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return this.removeNodeRecursive(this.layout, name);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Traverses the entire layout tree and executes a callback for each node.
|
|
175
|
+
*
|
|
176
|
+
* @param callback - Function executed for each node
|
|
177
|
+
* @param node - Starting node (defaults to root)
|
|
178
|
+
*/
|
|
179
|
+
traverse(callback: (node: LayoutNode) => void, node: LayoutNode = this.layout) {
|
|
180
|
+
callback(node);
|
|
181
|
+
if (node.children) {
|
|
182
|
+
node.children.forEach((child) => this.traverse(callback, child));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Adds or updates view-level attributes.
|
|
190
|
+
* Existing attributes are updated, missing attributes are added.
|
|
191
|
+
*
|
|
192
|
+
* @param attrs - Attributes to set on the view
|
|
193
|
+
* @returns true if at least one attribute was applied
|
|
194
|
+
*/
|
|
195
|
+
setViewAttributes(attrs: Partial<LayoutAttribute>): boolean {
|
|
196
|
+
const viewNode = this.findNode(this.layout, this.layout.attrs.name);
|
|
197
|
+
if (!viewNode) return false;
|
|
198
|
+
|
|
199
|
+
let changed = false;
|
|
200
|
+
|
|
201
|
+
for (const key of Object.keys(attrs) as (keyof LayoutAttribute)[]) {
|
|
202
|
+
const newValue = attrs[key];
|
|
203
|
+
|
|
204
|
+
if (viewNode.attrs[key] !== newValue) {
|
|
205
|
+
viewNode.attrs[key] = newValue;
|
|
206
|
+
changed = true;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return changed;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Adds view-level attributes only if they do not already exist.
|
|
217
|
+
*
|
|
218
|
+
* @param attrs - Attributes to add
|
|
219
|
+
* @returns true if at least one attribute was added
|
|
220
|
+
*/
|
|
221
|
+
addViewAttributes(attrs: Partial<LayoutAttribute>): boolean {
|
|
222
|
+
const viewNode = this.findNode(this.layout, this.layout.attrs.name);
|
|
223
|
+
if (!viewNode) return false;
|
|
224
|
+
|
|
225
|
+
let added = false;
|
|
226
|
+
|
|
227
|
+
for (const key in attrs) {
|
|
228
|
+
if (!(key in viewNode.attrs)) {
|
|
229
|
+
// @ts-ignore – layout attributes are dynamic
|
|
230
|
+
viewNode.attrs[key] = attrs[key];
|
|
231
|
+
added = true;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return added;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Updates existing view-level attributes.
|
|
240
|
+
* Attributes that do not exist are ignored.
|
|
241
|
+
*
|
|
242
|
+
* @param attrs - Attributes to update
|
|
243
|
+
* @returns true if at least one attribute was updated
|
|
244
|
+
*/
|
|
245
|
+
updateViewAttributes(attrs: Partial<LayoutAttribute>): boolean {
|
|
246
|
+
const viewNode = this.findNode(this.layout, this.layout.attrs.name);
|
|
247
|
+
if (!viewNode) return false;
|
|
248
|
+
|
|
249
|
+
let updated = false;
|
|
250
|
+
|
|
251
|
+
for (const key in attrs) {
|
|
252
|
+
if (key in viewNode.attrs) {
|
|
253
|
+
// @ts-ignore
|
|
254
|
+
viewNode.attrs[key] = attrs[key];
|
|
255
|
+
updated = true;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return updated;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Removes specific view-level attributes.
|
|
265
|
+
*
|
|
266
|
+
* @param keys - Attribute keys to remove
|
|
267
|
+
* @returns true if at least one attribute was removed
|
|
268
|
+
*/
|
|
269
|
+
removeViewAttributes(keys: (keyof LayoutAttribute)[]): boolean {
|
|
270
|
+
const viewNode = this.findNode(this.layout, this.layout.attrs.name);
|
|
271
|
+
if (!viewNode) return false;
|
|
272
|
+
|
|
273
|
+
let removed = false;
|
|
274
|
+
|
|
275
|
+
for (const key of keys) {
|
|
276
|
+
if (key in viewNode.attrs) {
|
|
277
|
+
// @ts-ignore
|
|
278
|
+
delete viewNode.attrs[key];
|
|
279
|
+
removed = true;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return removed;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Adds a new form-level button.
|
|
288
|
+
*
|
|
289
|
+
* @param button - Button layout node
|
|
290
|
+
*/
|
|
291
|
+
addFormButton(button: LayoutNode): void {
|
|
292
|
+
this.layout.attrs.formButtons ??= [];
|
|
293
|
+
this.layout.attrs.formButtons.push(button);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Updates a form button identified by its action.
|
|
298
|
+
*
|
|
299
|
+
* @param action - Button action identifier
|
|
300
|
+
* @param attrs - Attributes to update
|
|
301
|
+
* @returns true if button was found and updated
|
|
302
|
+
*/
|
|
303
|
+
updateFormButtonByAction(
|
|
304
|
+
action: string,
|
|
305
|
+
attrs: Partial<LayoutAttribute>
|
|
306
|
+
): boolean {
|
|
307
|
+
const button = this.layout.attrs.formButtons?.find(
|
|
308
|
+
(b: any) => b.attrs.action === action
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
if (!button) return false;
|
|
312
|
+
|
|
313
|
+
button.attrs = { ...button.attrs, ...attrs };
|
|
314
|
+
return true;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Removes a form button by its action.
|
|
319
|
+
*
|
|
320
|
+
* @param action - Button action identifier
|
|
321
|
+
* @returns true if button was removed
|
|
322
|
+
*/
|
|
323
|
+
removeFormButtonByAction(action: string): boolean {
|
|
324
|
+
if (!this.layout.attrs.formButtons) return false;
|
|
325
|
+
|
|
326
|
+
const initialLength = this.layout.attrs.formButtons.length;
|
|
327
|
+
|
|
328
|
+
this.layout.attrs.formButtons = this.layout.attrs.formButtons.filter(
|
|
329
|
+
(b: any) => b.attrs.action !== action
|
|
330
|
+
);
|
|
331
|
+
|
|
332
|
+
return this.layout.attrs.formButtons.length !== initialLength;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Disables a form-level button.
|
|
337
|
+
*
|
|
338
|
+
* @param action - Button action identifier
|
|
339
|
+
* @returns true if button was disabled
|
|
340
|
+
*/
|
|
341
|
+
disableFormButton(action: string): boolean {
|
|
342
|
+
return this.updateFormButtonByAction(action, { disabled: true });
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Hides a form-level button.
|
|
348
|
+
*
|
|
349
|
+
* @param action - Button action identifier
|
|
350
|
+
* @returns true if button was hidden
|
|
351
|
+
*/
|
|
352
|
+
hideFormButton(action: string): boolean {
|
|
353
|
+
return this.updateFormButtonByAction(action, { visible: false });
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Adds a row-level button to a field.
|
|
359
|
+
*
|
|
360
|
+
* @param fieldName - Target field name
|
|
361
|
+
* @param button - Button definition
|
|
362
|
+
* @returns true if field exists and button was added
|
|
363
|
+
*/
|
|
364
|
+
addRowButtonToField(fieldName: string, button: LayoutNode): boolean {
|
|
365
|
+
const fieldNode = this.findNode(this.layout, fieldName);
|
|
366
|
+
if (!fieldNode) return false;
|
|
367
|
+
|
|
368
|
+
fieldNode.attrs.rowButtons ??= [];
|
|
369
|
+
fieldNode.attrs.rowButtons.push(button);
|
|
370
|
+
return true;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Updates a row-level button for a field.
|
|
375
|
+
*
|
|
376
|
+
* @param fieldName - Field name
|
|
377
|
+
* @param action - Button action identifier
|
|
378
|
+
* @param attrs - Attributes to update
|
|
379
|
+
* @returns true if button was updated
|
|
380
|
+
*/
|
|
381
|
+
updateRowButtonByAction(
|
|
382
|
+
fieldName: string,
|
|
383
|
+
action: string,
|
|
384
|
+
attrs: Partial<LayoutAttribute>
|
|
385
|
+
): boolean {
|
|
386
|
+
const fieldNode = this.findNode(this.layout, fieldName);
|
|
387
|
+
if (!fieldNode?.attrs?.rowButtons) return false;
|
|
388
|
+
|
|
389
|
+
const button = fieldNode.attrs.rowButtons.find(
|
|
390
|
+
(b: any) => b.action === action
|
|
391
|
+
);
|
|
392
|
+
|
|
393
|
+
if (!button) return false;
|
|
394
|
+
|
|
395
|
+
Object.assign(button, attrs);
|
|
396
|
+
return true;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Removes a row-level button from a field.
|
|
402
|
+
*
|
|
403
|
+
* @param fieldName - Field name
|
|
404
|
+
* @param action - Button action identifier
|
|
405
|
+
* @returns true if button was removed
|
|
406
|
+
*/
|
|
407
|
+
removeRowButtonByAction(fieldName: string, action: string): boolean {
|
|
408
|
+
const fieldNode = this.findNode(this.layout, fieldName);
|
|
409
|
+
if (!fieldNode?.attrs?.rowButtons) return false;
|
|
410
|
+
|
|
411
|
+
const initialLength = fieldNode.attrs.rowButtons.length;
|
|
412
|
+
|
|
413
|
+
fieldNode.attrs.rowButtons = fieldNode.attrs.rowButtons.filter(
|
|
414
|
+
(b: any) => b.action !== action
|
|
415
|
+
);
|
|
416
|
+
|
|
417
|
+
return fieldNode.attrs.rowButtons.length !== initialLength;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
}
|