@solidxai/core-ui 0.1.1 → 0.1.2
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/adapters/auth/getSession.js.map +1 -1
- package/dist/adapters/auth/handleLogout.js.map +1 -1
- package/dist/adapters/auth/index.js.map +1 -1
- package/dist/adapters/auth/refreshAccessToken.js.map +1 -1
- package/dist/adapters/auth/sessionProvider.js.map +1 -1
- package/dist/adapters/auth/signIn.js.map +1 -1
- package/dist/adapters/auth/signInWithOAuthAccessCode.js.map +1 -1
- package/dist/adapters/auth/signInWithOtp.js.map +1 -1
- package/dist/adapters/auth/signOut.js.map +1 -1
- package/dist/adapters/auth/storage.js.map +1 -1
- package/dist/adapters/auth/types.js.map +1 -1
- package/dist/adapters/env.js.map +1 -1
- package/dist/components/Svg/DevDocs.js.map +1 -1
- package/dist/components/Svg/DocsSvg.js.map +1 -1
- package/dist/components/Svg/ExcelSvg.js.map +1 -1
- package/dist/components/Svg/FieldSvg.js.map +1 -1
- package/dist/components/Svg/FileSvg.js.map +1 -1
- package/dist/components/Svg/HomePageModuleSvg.js.map +1 -1
- package/dist/components/Svg/ModelSvg.js.map +1 -1
- package/dist/components/Svg/ModuleSvg.js.map +1 -1
- package/dist/components/Svg/PDFSvg.js.map +1 -1
- package/dist/components/Svg/RightArrowSvg.js.map +1 -1
- package/dist/components/Svg/SettingsSvg.js.map +1 -1
- package/dist/components/auth/AuthLayout.js.map +1 -1
- package/dist/components/auth/ForgotPasswordThankYou.js.map +1 -1
- package/dist/components/auth/GoogleAuthChecking.js.map +1 -1
- package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
- package/dist/components/auth/SolidForgotPassword.js.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.js.map +1 -1
- package/dist/components/auth/SolidLogin.js.map +1 -1
- package/dist/components/auth/SolidRegister.js.map +1 -1
- package/dist/components/auth/SolidResetPassword.js.map +1 -1
- package/dist/components/common/AutoCompleteField.js.map +1 -1
- package/dist/components/common/BackButton.js.map +1 -1
- package/dist/components/common/CancelButton.js.map +1 -1
- package/dist/components/common/CodeEditor.js.map +1 -1
- package/dist/components/common/CreateButton.js.map +1 -1
- package/dist/components/common/DownloadProgressToast.js.map +1 -1
- package/dist/components/common/DropzonePlaceholder.js.map +1 -1
- package/dist/components/common/DropzoneUpload.js.map +1 -1
- package/dist/components/common/FileReaderExt.js.map +1 -1
- package/dist/components/common/GeneralSettings.js.map +1 -1
- package/dist/components/common/HeaderDynamicTitles.js.map +1 -1
- package/dist/components/common/Image.js.map +1 -1
- package/dist/components/common/Link.js.map +1 -1
- package/dist/components/common/MarkdownViewer.js.map +1 -1
- package/dist/components/common/MultipleSelectAutoCompleteField.js.map +1 -1
- package/dist/components/common/NotFound.js.map +1 -1
- package/dist/components/common/SingleSelectAutoCompleteField.js.map +1 -1
- package/dist/components/common/SocialMediaLogin.js.map +1 -1
- package/dist/components/common/SolidAdmin.d.ts.map +1 -1
- package/dist/components/common/SolidAdmin.js +3 -3
- package/dist/components/common/SolidAdmin.js.map +1 -1
- package/dist/components/common/SolidAdmin.tsx +186 -10
- package/dist/components/common/SolidBreadcrumb.js.map +1 -1
- package/dist/components/common/SolidErrorPage.d.ts.map +1 -1
- package/dist/components/common/SolidErrorPage.js +3 -2
- package/dist/components/common/SolidErrorPage.js.map +1 -1
- package/dist/components/common/SolidErrorPage.tsx +31 -14
- package/dist/components/common/SolidExport.js.map +1 -1
- package/dist/components/common/SolidExportStepper.js.map +1 -1
- package/dist/components/common/SolidFieldTooltip.js.map +1 -1
- package/dist/components/common/SolidFormHeader.js.map +1 -1
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/common/SolidModuleHome.js.map +1 -1
- package/dist/components/common/SolidNotFoundPage.d.ts.map +1 -1
- package/dist/components/common/SolidNotFoundPage.js +2 -2
- package/dist/components/common/SolidNotFoundPage.js.map +1 -1
- package/dist/components/common/SolidNotFoundPage.tsx +23 -14
- package/dist/components/common/SolidPopupContainer.js.map +1 -1
- package/dist/components/common/SolidSettings/LlmSettings/AnthropicProviderComponent.js.map +1 -1
- package/dist/components/common/SolidSettings/LlmSettings/OpenAiProviderComponent.js.map +1 -1
- package/dist/components/common/SolidSettings/SettingDropzoneActivePlaceholder.js.map +1 -1
- package/dist/components/common/SolidSettings/SettingsImageRemoveButton.js.map +1 -1
- package/dist/components/common/SolidSettings/SolidUploadedImage.js.map +1 -1
- package/dist/components/common/SolidThemeLink.js.map +1 -1
- package/dist/components/common/SolidThemeProvider.js.map +1 -1
- package/dist/components/common/StepperArrows/ActiveArrowStep.js.map +1 -1
- package/dist/components/common/StepperArrows/ActiveBeforeStepArrow.js.map +1 -1
- package/dist/components/common/StepperArrows/InactiveStepArrow.js.map +1 -1
- package/dist/components/common/error.js.map +1 -1
- package/dist/components/common/useHandleFormCustomButtonClick.js.map +1 -1
- package/dist/components/common/useHandleListCustomButtonClick.js.map +1 -1
- package/dist/components/core/chatter/SolidChatter.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterAuditMessage.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterCustomMessage.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterDateDivider.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterHeader.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterMessageBox.js.map +1 -1
- package/dist/components/core/chatter/SolidMessageComposer.js.map +1 -1
- package/dist/components/core/common/AvatarWidget.js.map +1 -1
- package/dist/components/core/common/DateFieldViewComponent.js.map +1 -1
- package/dist/components/core/common/FilterComponent.js.map +1 -1
- package/dist/components/core/common/PDFViewer.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.js.map +1 -1
- package/dist/components/core/common/SolidCreateButton.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/DocumentSvg.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidGenericImport.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportInstructions.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportStepper.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportTransactionStatus.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +81 -44
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +43 -19
- package/dist/components/core/common/SolidLayoutViews.js.map +1 -1
- package/dist/components/core/common/SolidListViewOptions.js.map +1 -1
- package/dist/components/core/common/SolidLoaders/SolidCircularLoader.js.map +1 -1
- package/dist/components/core/common/SolidPasswordHelperText.js.map +1 -1
- package/dist/components/core/common/SolidSaveCustomFilterForm.js.map +1 -1
- package/dist/components/core/common/SolidSearchBox.js.map +1 -1
- package/dist/components/core/common/SolidViewLayoutManager.js.map +1 -1
- package/dist/components/core/common/SolidXAiIframe.js.map +1 -1
- package/dist/components/core/dashboard/SolidDashboard.js.map +1 -1
- package/dist/components/core/dashboard/SolidDashboardBody.js.map +1 -1
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.js.map +1 -1
- package/dist/components/core/dashboard/SolidDashboardHeader.js.map +1 -1
- package/dist/components/core/dashboard/SolidDashboardLoading.js.map +1 -1
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.js.map +1 -1
- package/dist/components/core/dashboard/SolidDashboardRenderError.js.map +1 -1
- package/dist/components/core/dashboard/SolidDashboardVariable.js.map +1 -1
- package/dist/components/core/dashboard/SolidQuestionRenderer.js.map +1 -1
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.js.map +1 -1
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.js.map +1 -1
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.js.map +1 -1
- package/dist/components/core/dashboard/dashboard-utils.js.map +1 -1
- package/dist/components/core/extension/solid-core/CustomIcon/StatusIcon.js.map +1 -1
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.js.map +1 -1
- package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeChangeHandler.js.map +1 -1
- package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeLoad.js.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js.map +1 -1
- package/dist/components/core/field/FieldListViewData.js.map +1 -1
- package/dist/components/core/filter/SolidBooleanFilterElement.js.map +1 -1
- package/dist/components/core/filter/SolidFilterFields.js.map +1 -1
- package/dist/components/core/filter/SolidManyToManyFilterElement.js.map +1 -1
- package/dist/components/core/filter/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/filter/SolidSelectionDynamicFilterElement.js.map +1 -1
- package/dist/components/core/filter/SolidSelectionStaticFilterElement.js.map +1 -1
- package/dist/components/core/filter/SolidVarInputsFilterElement.js.map +1 -1
- package/dist/components/core/filter/fields/SolidBigintField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidComputedField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidDatetimeField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidDecimalField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidExternalIdField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidFloatField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidIdField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidIntField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidLongTextField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidRelationField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidRichTextField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidSelectionStaticField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidShortTextField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/filter/fields/SolidUuidField.js.map +1 -1
- package/dist/components/core/filter/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
- package/dist/components/core/form/SolidFormFieldRender.js.map +1 -1
- package/dist/components/core/form/SolidFormFieldRenderExtension.js.map +1 -1
- package/dist/components/core/form/SolidFormFooter.js.map +1 -1
- package/dist/components/core/form/SolidFormLayouts.js.map +1 -1
- package/dist/components/core/form/SolidFormUserViewLayout.js.map +1 -1
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormViewContextMenuHeaderButton.js.map +1 -1
- package/dist/components/core/form/SolidFormViewNormalHeaderButton.js.map +1 -1
- package/dist/components/core/form/SolidFormViewShimmerLoading.js.map +1 -1
- package/dist/components/core/form/fields/ISolidField.js.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
- package/dist/components/core/form/fields/SolidEmailField.js.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidPasswordField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRelationField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +150 -72
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +157 -46
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.js.map +1 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidAiInteractionMessageFieldFormWidget.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidAiInteractionMetadataFieldFormWidget.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidIconEditWidget.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidIconViewWidget.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidShortTextFieldAvatarWidget.js.map +1 -1
- package/dist/components/core/form/widgets/CustomHtml.js.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/KanbanColumn.js.map +1 -1
- package/dist/components/core/kanban/KanbanUserViewLayout.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +79 -82
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +11 -18
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewFields.js.map +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.js.map +1 -1
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.js.map +1 -1
- package/dist/components/core/kanban/SolidVarInputsFilterElement.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +1 -1
- package/dist/components/core/list/ListViewRowActionPopup.js.map +1 -1
- package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.js.map +1 -1
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.js.map +1 -1
- package/dist/components/core/list/SolidListView.d.ts +62 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +133 -117
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +203 -120
- package/dist/components/core/list/SolidListViewColumn.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListViewHeaderButton.js.map +1 -1
- package/dist/components/core/list/SolidListViewHeaderContextMenuButton.js.map +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js.map +1 -1
- package/dist/components/core/list/SolidListViewShimmerLoading.js.map +1 -1
- package/dist/components/core/list/SolidListingHeader.js.map +1 -1
- package/dist/components/core/list/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/list/SolidSelectionDynamicFilterElement.js.map +1 -1
- package/dist/components/core/list/SolidSelectionStaticFilterElement.js.map +1 -1
- package/dist/components/core/list/SolidTableRowCell.js.map +1 -1
- package/dist/components/core/list/SolidVarInputsFilterElement.js.map +1 -1
- package/dist/components/core/list/columns/SolidBigintColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidComputedColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDecimalColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidExternalIdColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidFloatColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIdColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIntColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidLongTextColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidRichTextColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToManyColumn.js.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationOneToManyColumn.js.map +1 -1
- package/dist/components/core/list/listViewRegistry.d.ts +7 -0
- package/dist/components/core/list/listViewRegistry.d.ts.map +1 -0
- package/dist/components/core/list/listViewRegistry.js +17 -0
- package/dist/components/core/list/listViewRegistry.js.map +1 -0
- package/dist/components/core/list/listViewRegistry.ts +24 -0
- package/dist/components/core/list/widgets/SolidManyToManyRelationAvatarListWidget.js.map +1 -1
- package/dist/components/core/list/widgets/SolidManyToOneRelationAvatarListWidget.js.map +1 -1
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.js.map +1 -1
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.js.map +1 -1
- package/dist/components/core/locales/SolidChatterLocaleTabView.js.map +1 -1
- package/dist/components/core/locales/SolidLocale.js.map +1 -1
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/FieldSelector.js.map +1 -1
- package/dist/components/core/model/ModelListViewData.js.map +1 -1
- package/dist/components/core/model/ModelMetaData.js.map +1 -1
- package/dist/components/core/module/CreateModule.js.map +1 -1
- package/dist/components/core/module/ModuleListViewData.js.map +1 -1
- package/dist/components/core/solid-ai/SolidAiMainWrapper.js.map +1 -1
- package/dist/components/core/solid-ai/SolidXAIIcon.js.map +1 -1
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/core/users/CreateUserRole.js.map +1 -1
- package/dist/components/core/users/UserListView.js.map +1 -1
- package/dist/components/layout/AdminLayout.js.map +1 -1
- package/dist/components/layout/AdminSidebar.js.map +1 -1
- package/dist/components/layout/AppConfig.js.map +1 -1
- package/dist/components/layout/AppSidebar.js.map +1 -1
- package/dist/components/layout/ButtonLoader.js.map +1 -1
- package/dist/components/layout/CustomPagination.js.map +1 -1
- package/dist/components/layout/DashboardHeader.js.map +1 -1
- package/dist/components/layout/FilterMenu.js.map +1 -1
- package/dist/components/layout/Footer.js.map +1 -1
- package/dist/components/layout/GlobalSearch.js.map +1 -1
- package/dist/components/layout/Header.js.map +1 -1
- package/dist/components/layout/Layout.js.map +1 -1
- package/dist/components/layout/ListingHeader.js.map +1 -1
- package/dist/components/layout/Loader.js.map +1 -1
- package/dist/components/layout/UserSidebar.js.map +1 -1
- package/dist/components/layout/context/layoutcontext.js.map +1 -1
- package/dist/components/layout/navbar-one.d.ts.map +1 -1
- package/dist/components/layout/navbar-one.js.map +1 -1
- package/dist/components/layout/navbar-one.tsx +0 -11
- package/dist/components/layout/navbar-two-menu.js.map +1 -1
- package/dist/components/layout/navbar-two.js.map +1 -1
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/components/layout/user-profile.js.map +1 -1
- package/dist/components/modelsComponents/filterIcon.js.map +1 -1
- package/dist/constants/error-messages.js.map +1 -1
- package/dist/helpers/AppTitle.js.map +1 -1
- package/dist/helpers/ToastContainer.js.map +1 -1
- package/dist/helpers/autoCompleteVirtualScroll.js.map +1 -1
- package/dist/helpers/countries.js.map +1 -1
- package/dist/helpers/downloadFileWithProgress.js.map +1 -1
- package/dist/helpers/downloadMediaFile.js.map +1 -1
- package/dist/helpers/eventBus.js.map +1 -1
- package/dist/helpers/getAcceptedFileTypes.js.map +1 -1
- package/dist/helpers/getRandomColors.js.map +1 -1
- package/dist/helpers/helpers.js.map +1 -1
- package/dist/helpers/hydrateRelationRules.js +1 -1
- package/dist/helpers/hydrateRelationRules.js.map +1 -1
- package/dist/helpers/hydrateRelationRules.ts +1 -1
- package/dist/helpers/logger.js.map +1 -1
- package/dist/helpers/permissions.js.map +1 -1
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/resendOtpHelper.js.map +1 -1
- package/dist/helpers/revalidate.js.map +1 -1
- package/dist/helpers/rolesHelper.js.map +1 -1
- package/dist/helpers/routePaths.js.map +1 -1
- package/dist/helpers/showToast.js.map +1 -1
- package/dist/helpers/solidIcons.js.map +1 -1
- package/dist/helpers/updatePasswordField.js.map +1 -1
- package/dist/hooks/usePathname.js.map +1 -1
- package/dist/hooks/useRouter.js.map +1 -1
- package/dist/hooks/useSearchParams.js.map +1 -1
- package/dist/hooks/useSession.js.map +1 -1
- package/dist/http/solidHttp.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/index.ts +1 -2
- package/dist/layouts/AdminLayoutWrapper.js.map +1 -1
- package/dist/layouts/AuthLayoutWrapper.js.map +1 -1
- package/dist/redux/api/aiInteractionApi.js.map +1 -1
- package/dist/redux/api/authApi.js.map +1 -1
- package/dist/redux/api/dashboardApi.js.map +1 -1
- package/dist/redux/api/dashboardQuestionApi.js.map +1 -1
- package/dist/redux/api/exportTemplateApi.js.map +1 -1
- package/dist/redux/api/fetchBaseQuery.js.map +1 -1
- package/dist/redux/api/fieldApi.js.map +1 -1
- package/dist/redux/api/importTransactionApi.js.map +1 -1
- package/dist/redux/api/mediaApi.js.map +1 -1
- package/dist/redux/api/mediaStorageProviderApi.js.map +1 -1
- package/dist/redux/api/modelApi.js.map +1 -1
- package/dist/redux/api/moduleApi.js.map +1 -1
- package/dist/redux/api/permissionApi.js.map +1 -1
- package/dist/redux/api/pincodeApi.js.map +1 -1
- package/dist/redux/api/roleApi.js.map +1 -1
- package/dist/redux/api/solidActionApi.js.map +1 -1
- package/dist/redux/api/solidChatterMessageApi.js.map +1 -1
- package/dist/redux/api/solidEntityApi.js.map +1 -1
- package/dist/redux/api/solidMenuApi.js.map +1 -1
- package/dist/redux/api/solidServiceApi.js.map +1 -1
- package/dist/redux/api/solidSettingsApi.js.map +1 -1
- package/dist/redux/api/solidViewApi.js.map +1 -1
- package/dist/redux/api/stateApi.js.map +1 -1
- package/dist/redux/api/testApi.js.map +1 -1
- package/dist/redux/api/userApi.js.map +1 -1
- package/dist/redux/features/authSlice.js.map +1 -1
- package/dist/redux/features/dataViewSlice.js.map +1 -1
- package/dist/redux/features/navbarSlice.js.map +1 -1
- package/dist/redux/features/popupSlice.js.map +1 -1
- package/dist/redux/features/themeSlice.js.map +1 -1
- package/dist/redux/features/userSlice.js.map +1 -1
- package/dist/redux/hooks/useSolidPopup.js.map +1 -1
- package/dist/redux/store/StoreProvider.js.map +1 -1
- package/dist/redux/store/createSolidStore.js.map +1 -1
- package/dist/redux/store/defaultStoreConfig.js.map +1 -1
- package/dist/resources/globals.css +0 -21
- package/dist/resources/images/errors/error.svg +74 -0
- package/dist/routes/AppEventListener.js.map +1 -1
- package/dist/routes/guards/AuthGuard.js.map +1 -1
- package/dist/routes/pages/ErrorPage.js.map +1 -1
- package/dist/routes/pages/NotFoundPage.js.map +1 -1
- package/dist/routes/pages/admin/AdminPage.js.map +1 -1
- package/dist/routes/pages/admin/core/FormPage.js.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.js +11 -1
- package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.tsx +14 -1
- package/dist/routes/pages/admin/core/ModuleHomePage.js.map +1 -1
- package/dist/routes/pages/admin/core/SettingsPage.js.map +1 -1
- package/dist/routes/pages/auth/ConfirmForgotPasswordPage.js.map +1 -1
- package/dist/routes/pages/auth/ForgotPasswordPage.js.map +1 -1
- package/dist/routes/pages/auth/InitiateForgotPasswordPage.js.map +1 -1
- package/dist/routes/pages/auth/InitiateForgotPasswordThankYouPage.js.map +1 -1
- package/dist/routes/pages/auth/InitiateGoogleOauthPage.js.map +1 -1
- package/dist/routes/pages/auth/InitiateLoginPage.js.map +1 -1
- package/dist/routes/pages/auth/InitiateRegisterPage.js.map +1 -1
- package/dist/routes/pages/auth/LoginPage.js.map +1 -1
- package/dist/routes/pages/auth/RegisterPage.js.map +1 -1
- package/dist/routes/pages/auth/ResetPasswordPage.js.map +1 -1
- package/dist/routes/pages/auth/SsoPage.js.map +1 -1
- package/dist/routes/solidRoutes.js.map +1 -1
- package/dist/routes/types.js.map +1 -1
- package/dist/styles.js.map +1 -1
- package/package.json +7 -5
- package/src/adapters/auth/getSession.ts +0 -49
- package/src/adapters/auth/handleLogout.ts +0 -39
- package/src/adapters/auth/index.ts +0 -10
- package/src/adapters/auth/refreshAccessToken.ts +0 -34
- package/src/adapters/auth/sessionProvider.tsx +0 -5
- package/src/adapters/auth/signIn.ts +0 -70
- package/src/adapters/auth/signInWithOAuthAccessCode.ts +0 -80
- package/src/adapters/auth/signInWithOtp.ts +0 -77
- package/src/adapters/auth/signOut.ts +0 -15
- package/src/adapters/auth/storage.ts +0 -28
- package/src/adapters/auth/types.ts +0 -9
- package/src/adapters/env.ts +0 -29
- package/src/components/Svg/DevDocs.tsx +0 -9
- package/src/components/Svg/DocsSvg.tsx +0 -9
- package/src/components/Svg/ExcelSvg.tsx +0 -15
- package/src/components/Svg/FieldSvg.tsx +0 -9
- package/src/components/Svg/FileSvg.tsx +0 -18
- package/src/components/Svg/HomePageModuleSvg.tsx +0 -179
- package/src/components/Svg/ModelSvg.tsx +0 -9
- package/src/components/Svg/ModuleSvg.tsx +0 -9
- package/src/components/Svg/PDFSvg.tsx +0 -15
- package/src/components/Svg/RightArrowSvg.tsx +0 -9
- package/src/components/Svg/SettingsSvg.tsx +0 -9
- package/src/components/auth/AuthLayout.tsx +0 -226
- package/src/components/auth/ForgotPasswordThankYou.tsx +0 -31
- package/src/components/auth/GoogleAuthChecking.tsx +0 -60
- package/src/components/auth/SolidChangeForcePassword.tsx +0 -213
- package/src/components/auth/SolidForgotPassword.tsx +0 -116
- package/src/components/auth/SolidInitialLoginOtp.tsx +0 -231
- package/src/components/auth/SolidInitiateRegisterOtp.tsx +0 -208
- package/src/components/auth/SolidLogin.tsx +0 -418
- package/src/components/auth/SolidRegister.tsx +0 -442
- package/src/components/auth/SolidResetPassword.tsx +0 -186
- package/src/components/common/AuthBanner.tsx +0 -41
- package/src/components/common/AutoCompleteField.tsx +0 -79
- package/src/components/common/BackButton.tsx +0 -73
- package/src/components/common/CancelButton.tsx +0 -62
- package/src/components/common/CodeEditor.tsx +0 -38
- package/src/components/common/CreateButton.tsx +0 -18
- package/src/components/common/DownloadProgressToast.tsx +0 -55
- package/src/components/common/DropzonePlaceholder.tsx +0 -31
- package/src/components/common/DropzoneUpload.tsx +0 -11
- package/src/components/common/FileReaderExt.tsx +0 -20
- package/src/components/common/GeneralSettings.tsx +0 -1215
- package/src/components/common/HeaderDynamicTitles.tsx +0 -13
- package/src/components/common/Image.tsx +0 -13
- package/src/components/common/Link.tsx +0 -13
- package/src/components/common/MarkdownViewer.tsx +0 -84
- package/src/components/common/MultipleSelectAutoCompleteField.tsx +0 -64
- package/src/components/common/NotFound.tsx +0 -22
- package/src/components/common/SingleSelectAutoCompleteField.tsx +0 -73
- package/src/components/common/SocialMediaLogin.tsx +0 -55
- package/src/components/common/SolidAdmin.tsx +0 -29
- package/src/components/common/SolidBreadcrumb.tsx +0 -130
- package/src/components/common/SolidErrorPage.tsx +0 -37
- package/src/components/common/SolidExport.tsx +0 -563
- package/src/components/common/SolidExportStepper.tsx +0 -135
- package/src/components/common/SolidFieldTooltip.tsx +0 -23
- package/src/components/common/SolidFormHeader.tsx +0 -25
- package/src/components/common/SolidFormStepper.tsx +0 -336
- package/src/components/common/SolidModuleHome.tsx +0 -128
- package/src/components/common/SolidNotFoundPage.tsx +0 -37
- package/src/components/common/SolidPopupContainer.tsx +0 -37
- package/src/components/common/SolidSettings/LlmSettings/AnthropicProviderComponent.tsx +0 -45
- package/src/components/common/SolidSettings/LlmSettings/OpenAiProviderComponent.tsx +0 -45
- package/src/components/common/SolidSettings/SettingDropzoneActivePlaceholder.tsx +0 -20
- package/src/components/common/SolidSettings/SettingsImageRemoveButton.tsx +0 -15
- package/src/components/common/SolidSettings/SolidUploadedImage.tsx +0 -16
- package/src/components/common/SolidThemeLink.tsx +0 -6
- package/src/components/common/SolidThemeProvider.tsx +0 -44
- package/src/components/common/StepperArrows/ActiveArrowStep.tsx +0 -18
- package/src/components/common/StepperArrows/ActiveBeforeStepArrow.tsx +0 -18
- package/src/components/common/StepperArrows/InactiveStepArrow.tsx +0 -19
- package/src/components/common/error.tsx +0 -30
- package/src/components/common/solid-export.css +0 -85
- package/src/components/common/solidModuleHome.module.css +0 -135
- package/src/components/common/useHandleFormCustomButtonClick.ts +0 -40
- package/src/components/common/useHandleListCustomButtonClick.ts +0 -40
- package/src/components/core/chatter/SolidChatter.tsx +0 -248
- package/src/components/core/chatter/SolidChatterAuditMessage.tsx +0 -35
- package/src/components/core/chatter/SolidChatterCustomMessage.tsx +0 -46
- package/src/components/core/chatter/SolidChatterDateDivider.tsx +0 -16
- package/src/components/core/chatter/SolidChatterHeader.tsx +0 -218
- package/src/components/core/chatter/SolidChatterMessageBox.tsx +0 -163
- package/src/components/core/chatter/SolidMessageComposer.tsx +0 -146
- package/src/components/core/chatter/chatter.module.css +0 -74
- package/src/components/core/common/AvatarWidget.tsx +0 -55
- package/src/components/core/common/DateFieldViewComponent.tsx +0 -36
- package/src/components/core/common/FilterComponent.tsx +0 -457
- package/src/components/core/common/PDFViewer.tsx +0 -117
- package/src/components/core/common/SolidAccountSettings/SolidAccountSettings.module.css +0 -59
- package/src/components/core/common/SolidAccountSettings/SolidAccountSettings.tsx +0 -89
- package/src/components/core/common/SolidAccountSettings/SolidChangePassword.tsx +0 -179
- package/src/components/core/common/SolidAccountSettings/SolidNotifications.tsx +0 -129
- package/src/components/core/common/SolidAccountSettings/SolidPersonalInfo.tsx +0 -304
- package/src/components/core/common/SolidCreateButton.tsx +0 -59
- package/src/components/core/common/SolidGenericImport/DocumentSvg.tsx +0 -15
- package/src/components/core/common/SolidGenericImport/SolidGenericImport.tsx +0 -64
- package/src/components/core/common/SolidGenericImport/SolidImport.module.css +0 -40
- package/src/components/core/common/SolidGenericImport/SolidImportDropzone.tsx +0 -116
- package/src/components/core/common/SolidGenericImport/SolidImportInstructions.tsx +0 -123
- package/src/components/core/common/SolidGenericImport/SolidImportStepper.tsx +0 -217
- package/src/components/core/common/SolidGenericImport/SolidImportTransaction.tsx +0 -196
- package/src/components/core/common/SolidGenericImport/SolidImportTransactionStatus.tsx +0 -157
- package/src/components/core/common/SolidGenericImport/SolidImportWrapper.tsx +0 -29
- package/src/components/core/common/SolidGlobalSearchElement.tsx +0 -1488
- package/src/components/core/common/SolidLayoutViews.tsx +0 -87
- package/src/components/core/common/SolidListViewOptions.tsx +0 -31
- package/src/components/core/common/SolidLoaders/SolidCircularLoader.tsx +0 -7
- package/src/components/core/common/SolidLoaders/SolidLoaders.module.css +0 -20
- package/src/components/core/common/SolidPasswordHelperText.tsx +0 -33
- package/src/components/core/common/SolidSaveCustomFilterForm.tsx +0 -75
- package/src/components/core/common/SolidSearchBox.tsx +0 -17
- package/src/components/core/common/SolidViewLayoutManager.ts +0 -421
- package/src/components/core/common/SolidXAiIframe.tsx +0 -77
- package/src/components/core/dashboard/SolidDashboard.module.css +0 -79
- package/src/components/core/dashboard/SolidDashboard.tsx +0 -332
- package/src/components/core/dashboard/SolidDashboardBody.tsx +0 -117
- package/src/components/core/dashboard/SolidDashboardFilterRequired.tsx +0 -28
- package/src/components/core/dashboard/SolidDashboardHeader.tsx +0 -10
- package/src/components/core/dashboard/SolidDashboardLoading.tsx +0 -55
- package/src/components/core/dashboard/SolidDashboardNotAvailable.tsx +0 -32
- package/src/components/core/dashboard/SolidDashboardRenderError.tsx +0 -29
- package/src/components/core/dashboard/SolidDashboardVariable.tsx +0 -256
- package/src/components/core/dashboard/SolidQuestionRenderer.tsx +0 -78
- package/src/components/core/dashboard/chart-renderers/ChartJsRenderer.tsx +0 -18
- package/src/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.tsx +0 -54
- package/src/components/core/dashboard/chart-renderers/init-chartjs.ts +0 -25
- package/src/components/core/dashboard/dashboard-utils.ts +0 -39
- package/src/components/core/extension/solid-core/CustomIcon/StatusIcon.tsx +0 -17
- package/src/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.tsx +0 -36
- package/src/components/core/extension/solid-core/emailTemplate/emailFormTypeChangeHandler.ts +0 -18
- package/src/components/core/extension/solid-core/emailTemplate/emailFormTypeLoad.ts +0 -18
- package/src/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.tsx +0 -105
- package/src/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.tsx +0 -205
- package/src/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.tsx +0 -131
- package/src/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.tsx +0 -201
- package/src/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +0 -131
- package/src/components/core/field/FieldListViewData.tsx +0 -313
- package/src/components/core/filter/SolidBooleanFilterElement.tsx +0 -30
- package/src/components/core/filter/SolidFilterFields.tsx +0 -131
- package/src/components/core/filter/SolidManyToManyFilterElement.tsx +0 -64
- package/src/components/core/filter/SolidManyToOneFilterElement.tsx +0 -61
- package/src/components/core/filter/SolidSelectionDynamicFilterElement.tsx +0 -50
- package/src/components/core/filter/SolidSelectionStaticFilterElement.tsx +0 -32
- package/src/components/core/filter/SolidVarInputsFilterElement.tsx +0 -209
- package/src/components/core/filter/fields/SolidBigintField.tsx +0 -9
- package/src/components/core/filter/fields/SolidBooleanField.tsx +0 -68
- package/src/components/core/filter/fields/SolidComputedField.tsx +0 -23
- package/src/components/core/filter/fields/SolidDateField.tsx +0 -63
- package/src/components/core/filter/fields/SolidDatetimeField.tsx +0 -54
- package/src/components/core/filter/fields/SolidDecimalField.tsx +0 -9
- package/src/components/core/filter/fields/SolidExternalIdField.tsx +0 -52
- package/src/components/core/filter/fields/SolidFloatField.tsx +0 -9
- package/src/components/core/filter/fields/SolidIdField.tsx +0 -46
- package/src/components/core/filter/fields/SolidIntField.tsx +0 -61
- package/src/components/core/filter/fields/SolidLongTextField.tsx +0 -9
- package/src/components/core/filter/fields/SolidMediaMultipleField.tsx +0 -60
- package/src/components/core/filter/fields/SolidMediaSingleField.tsx +0 -62
- package/src/components/core/filter/fields/SolidRelationField.tsx +0 -17
- package/src/components/core/filter/fields/SolidRichTextField.tsx +0 -9
- package/src/components/core/filter/fields/SolidSelectionDynamicField.tsx +0 -52
- package/src/components/core/filter/fields/SolidSelectionStaticField.tsx +0 -54
- package/src/components/core/filter/fields/SolidShortTextField.tsx +0 -60
- package/src/components/core/filter/fields/SolidTimeField.tsx +0 -48
- package/src/components/core/filter/fields/SolidUuidField.tsx +0 -51
- package/src/components/core/filter/fields/relations/SolidRelationManyToManyField.tsx +0 -62
- package/src/components/core/filter/fields/relations/SolidRelationManyToOneField.tsx +0 -84
- package/src/components/core/form/SolidFormActionHeader.tsx +0 -516
- package/src/components/core/form/SolidFormFieldRender.tsx +0 -53
- package/src/components/core/form/SolidFormFieldRenderExtension.tsx +0 -26
- package/src/components/core/form/SolidFormFooter.tsx +0 -164
- package/src/components/core/form/SolidFormLayouts.tsx +0 -104
- package/src/components/core/form/SolidFormUserViewLayout.tsx +0 -75
- package/src/components/core/form/SolidFormView.tsx +0 -1869
- package/src/components/core/form/SolidFormViewContextMenuHeaderButton.tsx +0 -53
- package/src/components/core/form/SolidFormViewNormalHeaderButton.tsx +0 -53
- package/src/components/core/form/SolidFormViewShimmerLoading.tsx +0 -109
- package/src/components/core/form/fields/ISolidField.tsx +0 -72
- package/src/components/core/form/fields/SolidBooleanField.tsx +0 -445
- package/src/components/core/form/fields/SolidDateField.tsx +0 -247
- package/src/components/core/form/fields/SolidDateTimeField.tsx +0 -229
- package/src/components/core/form/fields/SolidDecimalField.tsx +0 -171
- package/src/components/core/form/fields/SolidEmailField.tsx +0 -176
- package/src/components/core/form/fields/SolidIntegerField.tsx +0 -282
- package/src/components/core/form/fields/SolidJsonField.tsx +0 -185
- package/src/components/core/form/fields/SolidLongTextField.tsx +0 -618
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +0 -662
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +0 -546
- package/src/components/core/form/fields/SolidPasswordField.tsx +0 -391
- package/src/components/core/form/fields/SolidRelationField.tsx +0 -56
- package/src/components/core/form/fields/SolidRichTextField.tsx +0 -188
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +0 -340
- package/src/components/core/form/fields/SolidSelectionStaticField.tsx +0 -462
- package/src/components/core/form/fields/SolidShortTextField.tsx +0 -399
- package/src/components/core/form/fields/SolidTimeField.tsx +0 -245
- package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +0 -453
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +0 -1009
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +0 -636
- package/src/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.tsx +0 -38
- package/src/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.ts +0 -64
- package/src/components/core/form/fields/solidFields.module.css +0 -7
- package/src/components/core/form/fields/widgets/SolidAiInteractionMessageFieldFormWidget.tsx +0 -135
- package/src/components/core/form/fields/widgets/SolidAiInteractionMetadataFieldFormWidget.tsx +0 -144
- package/src/components/core/form/fields/widgets/SolidIconEditWidget.tsx +0 -265
- package/src/components/core/form/fields/widgets/SolidIconViewWidget.tsx +0 -32
- package/src/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.tsx +0 -50
- package/src/components/core/form/fields/widgets/SolidS3FileViewerWidget.tsx +0 -222
- package/src/components/core/form/fields/widgets/SolidShortTextFieldAvatarWidget.tsx +0 -70
- package/src/components/core/form/solidFormViewShimmerLoading.module.css +0 -4
- package/src/components/core/form/widgets/CustomHtml.tsx +0 -20
- package/src/components/core/kanban/KanbanBoard.tsx +0 -116
- package/src/components/core/kanban/KanbanCard.tsx +0 -280
- package/src/components/core/kanban/KanbanColumn.tsx +0 -138
- package/src/components/core/kanban/KanbanUserViewLayout.tsx +0 -73
- package/src/components/core/kanban/SolidKanbanView.tsx +0 -866
- package/src/components/core/kanban/SolidKanbanViewConfigure.tsx +0 -152
- package/src/components/core/kanban/SolidKanbanViewFields.tsx +0 -164
- package/src/components/core/kanban/SolidManyToOneFilterElement.tsx +0 -59
- package/src/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +0 -50
- package/src/components/core/kanban/SolidSelectionStaticFilterElement.tsx +0 -32
- package/src/components/core/kanban/SolidVarInputsFilterElement.tsx +0 -184
- package/src/components/core/kanban/kanban-fields/SolidBigintKanbanField.tsx +0 -9
- package/src/components/core/kanban/kanban-fields/SolidBooleanKanbanField.tsx +0 -16
- package/src/components/core/kanban/kanban-fields/SolidComputedKanbanField.tsx +0 -23
- package/src/components/core/kanban/kanban-fields/SolidDateKanbanField.tsx +0 -14
- package/src/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.tsx +0 -13
- package/src/components/core/kanban/kanban-fields/SolidDecimalKanbanField.tsx +0 -9
- package/src/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.tsx +0 -12
- package/src/components/core/kanban/kanban-fields/SolidFloatKanbanField.tsx +0 -9
- package/src/components/core/kanban/kanban-fields/SolidIdKanbanField.tsx +0 -14
- package/src/components/core/kanban/kanban-fields/SolidIntKanbanField.tsx +0 -20
- package/src/components/core/kanban/kanban-fields/SolidLongTextKanbanField.tsx +0 -9
- package/src/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +0 -140
- package/src/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +0 -164
- package/src/components/core/kanban/kanban-fields/SolidRelationKanbanField.tsx +0 -13
- package/src/components/core/kanban/kanban-fields/SolidRichTextKanbanField.tsx +0 -9
- package/src/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.tsx +0 -14
- package/src/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.tsx +0 -14
- package/src/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +0 -121
- package/src/components/core/kanban/kanban-fields/SolidTimeKanbanField.tsx +0 -12
- package/src/components/core/kanban/kanban-fields/SolidUuidKanbanField.tsx +0 -13
- package/src/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +0 -16
- package/src/components/core/list/ListViewRowActionPopup.tsx +0 -40
- package/src/components/core/list/SolidColumnSelector/SolidListColumnSelector.module.css +0 -12
- package/src/components/core/list/SolidColumnSelector/SolidListColumnSelector.tsx +0 -233
- package/src/components/core/list/SolidEmptyListViewPlaceholder.tsx +0 -115
- package/src/components/core/list/SolidListView.tsx +0 -2009
- package/src/components/core/list/SolidListViewColumn.tsx +0 -165
- package/src/components/core/list/SolidListViewConfigure.tsx +0 -342
- package/src/components/core/list/SolidListViewHeaderButton.tsx +0 -32
- package/src/components/core/list/SolidListViewHeaderContextMenuButton.tsx +0 -32
- package/src/components/core/list/SolidListViewRowButtonContextMenu.tsx +0 -40
- package/src/components/core/list/SolidListViewShimmerLoading.tsx +0 -78
- package/src/components/core/list/SolidListViewWrapper.module.css +0 -49
- package/src/components/core/list/SolidListingHeader.tsx +0 -41
- package/src/components/core/list/SolidManyToOneFilterElement.tsx +0 -60
- package/src/components/core/list/SolidSelectionDynamicFilterElement.tsx +0 -50
- package/src/components/core/list/SolidSelectionStaticFilterElement.tsx +0 -32
- package/src/components/core/list/SolidTableRowCell.tsx +0 -35
- package/src/components/core/list/SolidVarInputsFilterElement.tsx +0 -184
- package/src/components/core/list/columns/SolidBigintColumn.tsx +0 -9
- package/src/components/core/list/columns/SolidBooleanColumn.tsx +0 -94
- package/src/components/core/list/columns/SolidComputedColumn.tsx +0 -27
- package/src/components/core/list/columns/SolidDateColumn.tsx +0 -90
- package/src/components/core/list/columns/SolidDatetimeColumn.tsx +0 -79
- package/src/components/core/list/columns/SolidDecimalColumn.tsx +0 -9
- package/src/components/core/list/columns/SolidExternalIdColumn.tsx +0 -80
- package/src/components/core/list/columns/SolidFloatColumn.tsx +0 -9
- package/src/components/core/list/columns/SolidIdColumn.tsx +0 -79
- package/src/components/core/list/columns/SolidIntColumn.tsx +0 -87
- package/src/components/core/list/columns/SolidLongTextColumn.tsx +0 -9
- package/src/components/core/list/columns/SolidMediaMultipleColumn.tsx +0 -301
- package/src/components/core/list/columns/SolidMediaSingleColumn.tsx +0 -170
- package/src/components/core/list/columns/SolidRelationColumn.tsx +0 -21
- package/src/components/core/list/columns/SolidRichTextColumn.tsx +0 -9
- package/src/components/core/list/columns/SolidSelectionDynamicColumn.tsx +0 -80
- package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +0 -81
- package/src/components/core/list/columns/SolidShortTextColumn.tsx +0 -160
- package/src/components/core/list/columns/SolidTimeColumn.tsx +0 -78
- package/src/components/core/list/columns/SolidUuidColumn.tsx +0 -79
- package/src/components/core/list/columns/relations/SolidRelationManyToManyColumn.tsx +0 -106
- package/src/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +0 -117
- package/src/components/core/list/columns/relations/SolidRelationOneToManyColumn.tsx +0 -110
- package/src/components/core/list/widgets/SolidManyToManyRelationAvatarListWidget.tsx +0 -30
- package/src/components/core/list/widgets/SolidManyToOneRelationAvatarListWidget.tsx +0 -30
- package/src/components/core/list/widgets/SolidShortTextAvatarWidget.tsx +0 -70
- package/src/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.tsx +0 -21
- package/src/components/core/locales/SolidChatterLocaleTabView.tsx +0 -91
- package/src/components/core/locales/SolidLocale.tsx +0 -127
- package/src/components/core/locales/solid-locale.css +0 -36
- package/src/components/core/model/CreateModel.tsx +0 -536
- package/src/components/core/model/FieldMetaData.tsx +0 -262
- package/src/components/core/model/FieldMetaDataForm.tsx +0 -3553
- package/src/components/core/model/FieldSelector.tsx +0 -62
- package/src/components/core/model/ModelListViewData.tsx +0 -384
- package/src/components/core/model/ModelMetaData.tsx +0 -949
- package/src/components/core/module/CreateModule.tsx +0 -613
- package/src/components/core/module/ModuleListViewData.tsx +0 -431
- package/src/components/core/solid-ai/SolidAiMainWrapper.tsx +0 -8
- package/src/components/core/solid-ai/SolidXAIIcon.tsx +0 -37
- package/src/components/core/users/CreateUser.tsx +0 -468
- package/src/components/core/users/CreateUserRole.tsx +0 -213
- package/src/components/core/users/UserListView.tsx +0 -376
- package/src/components/layout/AdminLayout.tsx +0 -55
- package/src/components/layout/AdminSidebar.tsx +0 -64
- package/src/components/layout/AppConfig.tsx +0 -104
- package/src/components/layout/AppSidebar.tsx +0 -216
- package/src/components/layout/ButtonLoader.tsx +0 -7
- package/src/components/layout/CustomPagination.tsx +0 -55
- package/src/components/layout/DashboardHeader.tsx +0 -89
- package/src/components/layout/FilterMenu.tsx +0 -122
- package/src/components/layout/Footer.tsx +0 -13
- package/src/components/layout/GlobalSearch.tsx +0 -36
- package/src/components/layout/Header.tsx +0 -8
- package/src/components/layout/Layout.tsx +0 -205
- package/src/components/layout/ListingHeader.tsx +0 -205
- package/src/components/layout/Loader.tsx +0 -16
- package/src/components/layout/UserSidebar.tsx +0 -52
- package/src/components/layout/context/layoutcontext.tsx +0 -52
- package/src/components/layout/navbar-one.tsx +0 -239
- package/src/components/layout/navbar-two-menu.tsx +0 -71
- package/src/components/layout/navbar-two.tsx +0 -37
- package/src/components/layout/user-profile-menu.tsx +0 -212
- package/src/components/layout/user-profile.tsx +0 -7
- package/src/components/modelsComponents/filterIcon.tsx +0 -9
- package/src/constants/error-messages.ts +0 -238
- package/src/declarations.d.ts +0 -22
- package/src/helpers/AppTitle.tsx +0 -12
- package/src/helpers/ToastContainer.tsx +0 -94
- package/src/helpers/autoCompleteVirtualScroll.ts +0 -41
- package/src/helpers/countries.tsx +0 -260
- package/src/helpers/downloadFileWithProgress.ts +0 -86
- package/src/helpers/downloadMediaFile.tsx +0 -22
- package/src/helpers/eventBus.ts +0 -40
- package/src/helpers/getAcceptedFileTypes.tsx +0 -22
- package/src/helpers/getRandomColors.tsx +0 -68
- package/src/helpers/helpers.ts +0 -61
- package/src/helpers/hydrateRelationRules.ts +0 -122
- package/src/helpers/logger.ts +0 -33
- package/src/helpers/permissions.ts +0 -7
- package/src/helpers/registry.ts +0 -337
- package/src/helpers/resendOtpHelper.tsx +0 -5
- package/src/helpers/revalidate.ts +0 -8
- package/src/helpers/rolesHelper.ts +0 -4
- package/src/helpers/routePaths.ts +0 -25
- package/src/helpers/showToast.ts +0 -13
- package/src/helpers/solidIcons.tsx +0 -1831
- package/src/helpers/updatePasswordField.ts +0 -42
- package/src/hooks/usePathname.ts +0 -6
- package/src/hooks/useRouter.ts +0 -35
- package/src/hooks/useSearchParams.ts +0 -10
- package/src/hooks/useSession.ts +0 -52
- package/src/http/solidHttp.ts +0 -63
- package/src/index.ts +0 -460
- package/src/layouts/AdminLayoutWrapper.tsx +0 -10
- package/src/layouts/AuthLayoutWrapper.tsx +0 -10
- package/src/redux/api/aiInteractionApi.ts +0 -59
- package/src/redux/api/authApi.ts +0 -131
- package/src/redux/api/dashboardApi.ts +0 -56
- package/src/redux/api/dashboardQuestionApi.ts +0 -17
- package/src/redux/api/exportTemplateApi.tsx +0 -59
- package/src/redux/api/fetchBaseQuery.tsx +0 -65
- package/src/redux/api/fieldApi.ts +0 -86
- package/src/redux/api/importTransactionApi.tsx +0 -69
- package/src/redux/api/mediaApi.ts +0 -55
- package/src/redux/api/mediaStorageProviderApi.ts +0 -55
- package/src/redux/api/modelApi.ts +0 -80
- package/src/redux/api/moduleApi.ts +0 -72
- package/src/redux/api/permissionApi.ts +0 -32
- package/src/redux/api/pincodeApi.tsx +0 -56
- package/src/redux/api/roleApi.ts +0 -58
- package/src/redux/api/solidActionApi.ts +0 -66
- package/src/redux/api/solidChatterMessageApi.ts +0 -25
- package/src/redux/api/solidEntityApi.tsx +0 -164
- package/src/redux/api/solidMenuApi.ts +0 -71
- package/src/redux/api/solidServiceApi.ts +0 -31
- package/src/redux/api/solidSettingsApi.tsx +0 -83
- package/src/redux/api/solidViewApi.ts +0 -73
- package/src/redux/api/stateApi.tsx +0 -56
- package/src/redux/api/testApi.ts +0 -21
- package/src/redux/api/userApi.ts +0 -135
- package/src/redux/features/authSlice.ts +0 -19
- package/src/redux/features/dataViewSlice.ts +0 -26
- package/src/redux/features/navbarSlice.ts +0 -21
- package/src/redux/features/popupSlice.ts +0 -37
- package/src/redux/features/themeSlice.ts +0 -17
- package/src/redux/features/userSlice.ts +0 -28
- package/src/redux/hooks/useSolidPopup.ts +0 -20
- package/src/redux/store/StoreProvider.tsx +0 -52
- package/src/redux/store/createSolidStore.ts +0 -55
- package/src/redux/store/defaultStoreConfig.ts +0 -62
- package/src/resources/fonts/SF-Pro-Display-Black.otf +0 -0
- package/src/resources/fonts/SF-Pro-Display-Bold.otf +0 -0
- package/src/resources/fonts/SF-Pro-Display-Heavy.otf +0 -0
- package/src/resources/fonts/SF-Pro-Display-Light.otf +0 -0
- package/src/resources/fonts/SF-Pro-Display-Medium.otf +0 -0
- package/src/resources/fonts/SF-Pro-Display-Regular.otf +0 -0
- package/src/resources/fonts/SF-Pro-Display-Semibold.otf +0 -0
- package/src/resources/fonts/SF-Pro-Display-Thin.otf +0 -0
- package/src/resources/fonts/SF-Pro-Display-Ultralight.otf +0 -0
- package/src/resources/globals.css +0 -3597
- package/src/resources/images/AvatarDemo.png +0 -0
- package/src/resources/images/Background.svg +0 -3
- package/src/resources/images/Footerbg.png +0 -0
- package/src/resources/images/LoginBanner.png +0 -0
- package/src/resources/images/Navigation/Level.svg +0 -5
- package/src/resources/images/Navigation/Presure.svg +0 -7
- package/src/resources/images/Navigation/SolidSettinsIcon.svg +0 -1
- package/src/resources/images/Navigation/Temperature.svg +0 -13
- package/src/resources/images/Profile/Avatar.png +0 -0
- package/src/resources/images/SolidXLogo.svg +0 -21
- package/src/resources/images/activity.svg +0 -3
- package/src/resources/images/app-builder.png +0 -0
- package/src/resources/images/auth/solid-left-layout-bg.png +0 -0
- package/src/resources/images/auth/solid-login-light.png +0 -0
- package/src/resources/images/auth/solid-right-layout-bg.png +0 -0
- package/src/resources/images/clog-wheel.png +0 -0
- package/src/resources/images/dark-mode.png +0 -0
- package/src/resources/images/dashboard/Ellipse 1.svg +0 -10
- package/src/resources/images/dashboard/Rectangle 17.svg +0 -10
- package/src/resources/images/dashboard/Rectangle 25.svg +0 -11
- package/src/resources/images/dashboard/image 5.svg +0 -9
- package/src/resources/images/eye-icon.png +0 -0
- package/src/resources/images/fb.svg +0 -3
- package/src/resources/images/fileReader/image-jpg.png +0 -0
- package/src/resources/images/fileTypes/File.png +0 -0
- package/src/resources/images/fileTypes/Mp3.png +0 -0
- package/src/resources/images/fileTypes/Mp4.png +0 -0
- package/src/resources/images/filter-icon.png +0 -0
- package/src/resources/images/form/user.png +0 -0
- package/src/resources/images/iam.png +0 -0
- package/src/resources/images/icons/icon-activity.svg +0 -3
- package/src/resources/images/icons/icon-calender.svg +0 -3
- package/src/resources/images/icons/icon-graph.svg +0 -3
- package/src/resources/images/icons/icon-kanban.svg +0 -3
- package/src/resources/images/icons/icon-list.svg +0 -3
- package/src/resources/images/icons/icon-users.svg +0 -3
- package/src/resources/images/icons/jump-to-icon.png +0 -0
- package/src/resources/images/insta.svg +0 -3
- package/src/resources/images/layout/images/comfortable.png +0 -0
- package/src/resources/images/layout/images/compact.png +0 -0
- package/src/resources/images/layout/images/cozy.png +0 -0
- package/src/resources/images/layout/images/kanban.png +0 -0
- package/src/resources/images/li.svg +0 -3
- package/src/resources/images/loginhero.png +0 -0
- package/src/resources/images/logo.png +0 -0
- package/src/resources/images/mail-icon.png +0 -0
- package/src/resources/images/menu/app-builder.svg +0 -19
- package/src/resources/images/menu/iam.svg +0 -14
- package/src/resources/images/menu/logicloop-black.svg +0 -28
- package/src/resources/images/menu/logicloop-blue.svg +0 -32
- package/src/resources/images/menu/logicloop-white.svg +0 -32
- package/src/resources/images/menu/queues.svg +0 -14
- package/src/resources/images/menu/radix.svg +0 -9
- package/src/resources/images/menu/rl-lead-middleware.svg +0 -19
- package/src/resources/images/menu/solid-address-master.svg +0 -10
- package/src/resources/images/menu/srmd-tracker-black.svg +0 -16
- package/src/resources/images/menu/srmd-tracker-original.svg +0 -32
- package/src/resources/images/menu/srmd-tracker-white.svg +0 -17
- package/src/resources/images/menu/srmd-tracker.svg +0 -16
- package/src/resources/images/menu-icon.png +0 -0
- package/src/resources/images/menu-toggle.png +0 -0
- package/src/resources/images/password-icon.png +0 -0
- package/src/resources/images/profile.png +0 -0
- package/src/resources/images/radix-logo-white.png +0 -0
- package/src/resources/images/radix-logo.png +0 -0
- package/src/resources/images/search-icon.png +0 -0
- package/src/resources/images/signupBanner.png +0 -0
- package/src/resources/images/tw.svg +0 -3
- package/src/resources/images/user-icon.png +0 -0
- package/src/resources/solid-primereact.css +0 -2986
- package/src/resources/solid-responsive.css +0 -791
- package/src/resources/stylesheets/_config.scss +0 -54
- package/src/resources/stylesheets/_content.scss +0 -95
- package/src/resources/stylesheets/_footer.scss +0 -10
- package/src/resources/stylesheets/_main.scss +0 -49
- package/src/resources/stylesheets/_menu.scss +0 -183
- package/src/resources/stylesheets/_mixins.scss +0 -13
- package/src/resources/stylesheets/_responsive.scss +0 -101
- package/src/resources/stylesheets/_topbar.scss +0 -152
- package/src/resources/stylesheets/_typography.scss +0 -65
- package/src/resources/stylesheets/_utils.scss +0 -29
- package/src/resources/stylesheets/_variables.scss +0 -3
- package/src/resources/stylesheets/layout.scss +0 -11
- package/src/resources/themes/solid-dark-purple/theme.css +0 -6208
- package/src/resources/themes/solid-light-purple/solid-login-light.png +0 -0
- package/src/resources/themes/solid-light-purple/theme.css +0 -6263
- package/src/routes/AppEventListener.tsx +0 -28
- package/src/routes/guards/AuthGuard.tsx +0 -17
- package/src/routes/pages/ErrorPage.tsx +0 -6
- package/src/routes/pages/NotFoundPage.tsx +0 -5
- package/src/routes/pages/admin/AdminPage.tsx +0 -5
- package/src/routes/pages/admin/core/FormPage.tsx +0 -7
- package/src/routes/pages/admin/core/KanbanPage.tsx +0 -10
- package/src/routes/pages/admin/core/ListPage.tsx +0 -10
- package/src/routes/pages/admin/core/ModuleHomePage.tsx +0 -7
- package/src/routes/pages/admin/core/SettingsPage.tsx +0 -5
- package/src/routes/pages/auth/ConfirmForgotPasswordPage.tsx +0 -5
- package/src/routes/pages/auth/ForgotPasswordPage.tsx +0 -5
- package/src/routes/pages/auth/InitiateForgotPasswordPage.tsx +0 -5
- package/src/routes/pages/auth/InitiateForgotPasswordThankYouPage.tsx +0 -5
- package/src/routes/pages/auth/InitiateGoogleOauthPage.tsx +0 -5
- package/src/routes/pages/auth/InitiateLoginPage.tsx +0 -5
- package/src/routes/pages/auth/InitiateRegisterPage.tsx +0 -5
- package/src/routes/pages/auth/LoginPage.tsx +0 -10
- package/src/routes/pages/auth/RegisterPage.tsx +0 -5
- package/src/routes/pages/auth/ResetPasswordPage.tsx +0 -5
- package/src/routes/pages/auth/SsoPage.tsx +0 -79
- package/src/routes/solidRoutes.tsx +0 -89
- package/src/routes/types.ts +0 -34
- package/src/styles.ts +0 -4
- package/src/types/css-modules.d.ts +0 -4
- package/src/types/handlebars.d.ts +0 -4
- package/src/types/index.d.ts +0 -76
- package/src/types/layout.d.ts +0 -94
- package/src/types/next-auth.d.ts +0 -0
- package/src/types/next.d.ts +0 -46
- package/src/types/solid-core.d.ts +0 -319
|
@@ -1,1869 +0,0 @@
|
|
|
1
|
-
import { useSession } from '../../../hooks/useSession'
|
|
2
|
-
import { permissionExpression } from "../../../helpers/permissions";
|
|
3
|
-
import { createSolidEntityApi } from "../../../redux/api/solidEntityApi";
|
|
4
|
-
import { useGetSolidViewLayoutQuery } from "../../../redux/api/solidViewApi";
|
|
5
|
-
import { useLazyCheckIfPermissionExistsQuery } from "../../../redux/api/userApi";
|
|
6
|
-
import { FetchBaseQueryError } from "@reduxjs/toolkit/dist/query";
|
|
7
|
-
import { useFormik } from "formik";
|
|
8
|
-
import { usePathname } from "../../../hooks/usePathname";
|
|
9
|
-
import { useRouter } from "../../../hooks/useRouter";
|
|
10
|
-
import { useSearchParams } from "../../../hooks/useSearchParams";
|
|
11
|
-
import "primeflex/primeflex.css";
|
|
12
|
-
import { Button } from "primereact/button";
|
|
13
|
-
import { Dialog } from "primereact/dialog";
|
|
14
|
-
import { TabPanel, TabView } from "primereact/tabview";
|
|
15
|
-
import { Toast } from "primereact/toast";
|
|
16
|
-
import qs from "qs";
|
|
17
|
-
import React, { ChangeEvent, useEffect, useMemo, useRef, useState } from "react";
|
|
18
|
-
import * as Yup from "yup";
|
|
19
|
-
import { FormikObject, ISolidField, SolidFieldProps } from "./fields/ISolidField";
|
|
20
|
-
import { SolidBooleanField } from "./fields/SolidBooleanField";
|
|
21
|
-
import { SolidDateField } from "./fields/SolidDateField";
|
|
22
|
-
import { SolidDateTimeField } from "./fields/SolidDateTimeField";
|
|
23
|
-
import { SolidDecimalField } from "./fields/SolidDecimalField";
|
|
24
|
-
import { SolidIntegerField } from "./fields/SolidIntegerField";
|
|
25
|
-
import { SolidJsonField } from "./fields/SolidJsonField";
|
|
26
|
-
import { SolidLongTextField } from "./fields/SolidLongTextField";
|
|
27
|
-
import { SolidMediaMultipleField } from "./fields/SolidMediaMultipleField";
|
|
28
|
-
import { SolidMediaSingleField } from "./fields/SolidMediaSingleField";
|
|
29
|
-
import { SolidRelationField } from "./fields/SolidRelationField";
|
|
30
|
-
import { SolidRichTextField } from "./fields/SolidRichTextField";
|
|
31
|
-
import { SolidSelectionDynamicField } from "./fields/SolidSelectionDynamicField";
|
|
32
|
-
import { SolidSelectionStaticField } from "./fields/SolidSelectionStaticField";
|
|
33
|
-
import { SolidShortTextField } from "./fields/SolidShortTextField";
|
|
34
|
-
import { SolidTimeField } from "./fields/SolidTimeField";
|
|
35
|
-
import { SolidUiEvent } from "../../../types";
|
|
36
|
-
import { getExtensionComponent, getExtensionFunction } from "../../../helpers/registry";
|
|
37
|
-
import { SolidFormWidgetProps, SolidUiEventResponse } from "../../../types/solid-core";
|
|
38
|
-
import { SolidPasswordField } from "./fields/SolidPasswordField";
|
|
39
|
-
import { SolidEmailField } from "./fields/SolidEmailField";
|
|
40
|
-
import { Panel } from "primereact/panel";
|
|
41
|
-
import { SolidFormUserViewLayout } from "./SolidFormUserViewLayout";
|
|
42
|
-
import Lightbox from "yet-another-react-lightbox";
|
|
43
|
-
import Counter from "yet-another-react-lightbox/plugins/counter";
|
|
44
|
-
import Download from "yet-another-react-lightbox/plugins/download";
|
|
45
|
-
import Video from "yet-another-react-lightbox/plugins/video";
|
|
46
|
-
import "yet-another-react-lightbox/styles.css";
|
|
47
|
-
import "yet-another-react-lightbox/plugins/counter.css";
|
|
48
|
-
import { SolidFormActionHeader } from "./SolidFormActionHeader";
|
|
49
|
-
import { SolidFormViewShimmerLoading } from "./SolidFormViewShimmerLoading";
|
|
50
|
-
import { hasAnyRole } from "../../../helpers/rolesHelper";
|
|
51
|
-
import SolidChatterLocaleTabView from "../locales/SolidChatterLocaleTabView";
|
|
52
|
-
import { ConfirmDialog } from "primereact/confirmdialog";
|
|
53
|
-
import { SolidXAIIcon } from "../solid-ai/SolidXAIIcon";
|
|
54
|
-
import { ERROR_MESSAGES } from "../../../constants/error-messages";
|
|
55
|
-
import { useLazyGetMcpUrlQuery, useLazyGetSolidSettingsQuery } from "../../../redux/api/solidSettingsApi";
|
|
56
|
-
import { SolidFormFooter } from "./SolidFormFooter";
|
|
57
|
-
import { normalizeSolidFormActionPath } from "../../../helpers/routePaths";
|
|
58
|
-
import showToast from "../../../helpers/showToast";
|
|
59
|
-
|
|
60
|
-
export type SolidFormViewProps = {
|
|
61
|
-
moduleName: string;
|
|
62
|
-
modelName: string;
|
|
63
|
-
id: string;
|
|
64
|
-
embeded: boolean;
|
|
65
|
-
handlePopupClose?: any,
|
|
66
|
-
customCreateHandler?: any
|
|
67
|
-
inlineCreateAutoSave?: boolean,
|
|
68
|
-
customLayout?: any,
|
|
69
|
-
parentFieldName?: string,
|
|
70
|
-
parentData?: any,
|
|
71
|
-
redirectToPath?: string,
|
|
72
|
-
onEmbeddedFormSave?: () => void,
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
interface ErrorResponseData {
|
|
77
|
-
message: string;
|
|
78
|
-
statusCode: number;
|
|
79
|
-
error: string;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const getLayoutFields = (node: any): any => {
|
|
83
|
-
let fields = [];
|
|
84
|
-
|
|
85
|
-
if (node.type === "field") {
|
|
86
|
-
fields.push(node);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (node.children && Array.isArray(node.children)) {
|
|
90
|
-
for (const child of node.children) {
|
|
91
|
-
fields = fields.concat(getLayoutFields(child));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return fields;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export const getLayoutFieldsAsObject = (layout: any[]): any => {
|
|
99
|
-
const allFields = layout.flatMap(getLayoutFields);
|
|
100
|
-
return allFields.reduce((result, field) => {
|
|
101
|
-
if (field.attrs.name) {
|
|
102
|
-
result[field.attrs.name] = { ...field };
|
|
103
|
-
}
|
|
104
|
-
return result;
|
|
105
|
-
}, {});
|
|
106
|
-
}
|
|
107
|
-
export const getActualFieldMetadata = (key: string, solidFieldsMetadata: Record<string, any>) => {
|
|
108
|
-
if (solidFieldsMetadata[key]) {
|
|
109
|
-
return solidFieldsMetadata[key];
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (key.endsWith("Confirm")) {
|
|
113
|
-
const baseKey = key.slice(0, -"Confirm".length); // Remove "Confirm"
|
|
114
|
-
if (solidFieldsMetadata[baseKey]) {
|
|
115
|
-
return solidFieldsMetadata[baseKey];
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return null; // or handle fallback
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const fieldFactory = (type: string, fieldContext: SolidFieldProps, setLightboxUrls?: any, setOpenLightbox?: any): ISolidField | null => {
|
|
124
|
-
if (type === 'shortText') {
|
|
125
|
-
return new SolidShortTextField(fieldContext);
|
|
126
|
-
}
|
|
127
|
-
if (type === 'longText') {
|
|
128
|
-
return new SolidLongTextField(fieldContext);
|
|
129
|
-
}
|
|
130
|
-
if (type === 'int' || type === 'bigint') {
|
|
131
|
-
return new SolidIntegerField(fieldContext);
|
|
132
|
-
}
|
|
133
|
-
if (type === 'decimal' || type === 'float') {
|
|
134
|
-
return new SolidDecimalField(fieldContext);
|
|
135
|
-
}
|
|
136
|
-
if (type === 'boolean') {
|
|
137
|
-
return new SolidBooleanField(fieldContext);
|
|
138
|
-
}
|
|
139
|
-
if (type === 'richText') {
|
|
140
|
-
return new SolidRichTextField(fieldContext);
|
|
141
|
-
}
|
|
142
|
-
if (type === 'date') {
|
|
143
|
-
return new SolidDateField(fieldContext);
|
|
144
|
-
}
|
|
145
|
-
if (type === 'datetime') {
|
|
146
|
-
return new SolidDateTimeField(fieldContext);
|
|
147
|
-
}
|
|
148
|
-
if (type === 'time') {
|
|
149
|
-
return new SolidTimeField(fieldContext);
|
|
150
|
-
}
|
|
151
|
-
if (type === 'json') {
|
|
152
|
-
return new SolidJsonField(fieldContext);
|
|
153
|
-
}
|
|
154
|
-
if (type === 'selectionStatic') {
|
|
155
|
-
return new SolidSelectionStaticField(fieldContext);
|
|
156
|
-
}
|
|
157
|
-
if (type === 'selectionDynamic') {
|
|
158
|
-
return new SolidSelectionDynamicField(fieldContext);
|
|
159
|
-
}
|
|
160
|
-
if (type === 'relation') {
|
|
161
|
-
return new SolidRelationField(fieldContext);
|
|
162
|
-
}
|
|
163
|
-
if (type === 'mediaSingle') {
|
|
164
|
-
return new SolidMediaSingleField(fieldContext, setLightboxUrls, setOpenLightbox);
|
|
165
|
-
}
|
|
166
|
-
if (type === 'mediaMultiple') {
|
|
167
|
-
return new SolidMediaMultipleField(fieldContext, setLightboxUrls, setOpenLightbox);
|
|
168
|
-
}
|
|
169
|
-
if (type === 'password') {
|
|
170
|
-
return new SolidPasswordField(fieldContext);
|
|
171
|
-
}
|
|
172
|
-
if (type === 'email') {
|
|
173
|
-
return new SolidEmailField(fieldContext);
|
|
174
|
-
}
|
|
175
|
-
return null;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// solidFieldsMetadata={solidFieldsMetadata} solidView={solidView}
|
|
179
|
-
const SolidField = ({ formik, field, fieldMetadata, initialEntityData, solidFormViewMetaData, modelName, readOnly, viewMode, onChange, onBlur, parentFieldName, parentData, setLightboxUrls, setOpenLightbox, onEmbeddedFormSave }: any) => {
|
|
180
|
-
const fieldContext: SolidFieldProps = {
|
|
181
|
-
// field metadata - coming from the field-metadata table.
|
|
182
|
-
fieldMetadata: fieldMetadata,
|
|
183
|
-
// field layout - coming from view.layout
|
|
184
|
-
field: field,
|
|
185
|
-
// initial data
|
|
186
|
-
data: initialEntityData,
|
|
187
|
-
// complete form view metadata - this includes layout of the whole form & metadata about all fields in the corresponding model.
|
|
188
|
-
solidFormViewMetaData: solidFormViewMetaData,
|
|
189
|
-
modelName: modelName,
|
|
190
|
-
readOnly: readOnly,
|
|
191
|
-
viewMode: viewMode,
|
|
192
|
-
onChange: onChange,
|
|
193
|
-
onBlur: onBlur
|
|
194
|
-
}
|
|
195
|
-
if (parentData) {
|
|
196
|
-
fieldContext.parentData = parentData;
|
|
197
|
-
}
|
|
198
|
-
if (parentFieldName) {
|
|
199
|
-
fieldContext.parentFieldName = parentFieldName;
|
|
200
|
-
}
|
|
201
|
-
if (onEmbeddedFormSave) {
|
|
202
|
-
fieldContext.onEmbeddedFormSave = onEmbeddedFormSave;
|
|
203
|
-
}
|
|
204
|
-
const solidField = fieldFactory(fieldMetadata?.type, fieldContext, setLightboxUrls, setOpenLightbox);
|
|
205
|
-
|
|
206
|
-
return solidField?.render(formik);
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
const SolidGroup = ({ children, attrs }: any) => {
|
|
210
|
-
|
|
211
|
-
const className = attrs.className;
|
|
212
|
-
|
|
213
|
-
return (
|
|
214
|
-
<div className={className}>
|
|
215
|
-
{attrs.label && <p>{attrs.label}</p>}
|
|
216
|
-
<div className="grid">{children}</div>
|
|
217
|
-
</div>
|
|
218
|
-
// <div className={className}>
|
|
219
|
-
// <div className="s_group">
|
|
220
|
-
// <fieldset>
|
|
221
|
-
// {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
|
|
222
|
-
// <div className="grid">{children}</div>
|
|
223
|
-
// </fieldset>
|
|
224
|
-
// </div>
|
|
225
|
-
|
|
226
|
-
// </div>
|
|
227
|
-
// <div className="formgrid grid">
|
|
228
|
-
// {children}
|
|
229
|
-
// </div>
|
|
230
|
-
);
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
const SolidRow = ({ children, attrs }: any) => {
|
|
234
|
-
|
|
235
|
-
const className = attrs.className;
|
|
236
|
-
|
|
237
|
-
return (
|
|
238
|
-
// <div className={`row ${className}`}>
|
|
239
|
-
|
|
240
|
-
// <div className="s_group">
|
|
241
|
-
// <fieldset>
|
|
242
|
-
// {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
|
|
243
|
-
// <div className="grid">{children}</div>
|
|
244
|
-
// </fieldset>
|
|
245
|
-
// </div>
|
|
246
|
-
|
|
247
|
-
// </div>
|
|
248
|
-
<div className={`row ${className}`}>
|
|
249
|
-
{attrs.label && <p >{attrs.label}</p>}
|
|
250
|
-
<div className="grid">{children}</div>
|
|
251
|
-
</div>
|
|
252
|
-
// <div>{children}</div>
|
|
253
|
-
);
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
const SolidColumn = ({ children, attrs }: any) => {
|
|
257
|
-
const className = attrs.className;
|
|
258
|
-
|
|
259
|
-
return (
|
|
260
|
-
// first fieldset ui
|
|
261
|
-
|
|
262
|
-
// <div className={`${className}`}>
|
|
263
|
-
// <div className="s_group">
|
|
264
|
-
// <fieldset>
|
|
265
|
-
// {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
|
|
266
|
-
// <div className="grid">{children}</div>
|
|
267
|
-
// </fieldset>
|
|
268
|
-
// </div>
|
|
269
|
-
// </div>
|
|
270
|
-
|
|
271
|
-
//second fieldset ui
|
|
272
|
-
// <div className={`${className}`}>
|
|
273
|
-
// {attrs.label && <p>{attrs.label}</p>}
|
|
274
|
-
// <div className="grid">{children}</div>
|
|
275
|
-
// </div>
|
|
276
|
-
|
|
277
|
-
//figma fieldset ui
|
|
278
|
-
attrs.label ?
|
|
279
|
-
<div className={`${className}`}>
|
|
280
|
-
<Panel header={attrs.label} className="solid-column-panel">
|
|
281
|
-
<div className="grid">{children}</div>
|
|
282
|
-
</Panel>
|
|
283
|
-
{/* <div className="p-fieldset">
|
|
284
|
-
<div className="solid-fieldset-header">
|
|
285
|
-
<div>{attrs.label}</div>
|
|
286
|
-
</div>
|
|
287
|
-
<div className="grid solid-fieldset-content">{children}</div>
|
|
288
|
-
</div> */}
|
|
289
|
-
</div>
|
|
290
|
-
:
|
|
291
|
-
<div className={`${className}`}>
|
|
292
|
-
<div className="grid">{children}</div>
|
|
293
|
-
</div>
|
|
294
|
-
);
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
const SolidSheet = ({ children }: any) => (
|
|
298
|
-
<div className="p-fluid p-grid">
|
|
299
|
-
{children}
|
|
300
|
-
</div>
|
|
301
|
-
);
|
|
302
|
-
|
|
303
|
-
const SolidNotebook = ({ children, activeTab, embeded }: any) => {
|
|
304
|
-
// const childrenArray = children;
|
|
305
|
-
// const childrenArray = React.Children.toArray(children).filter(Boolean);
|
|
306
|
-
const childrenArray = React.Children.toArray(children).filter(child => !!child);
|
|
307
|
-
|
|
308
|
-
const router = useRouter();
|
|
309
|
-
const pathname = usePathname();
|
|
310
|
-
const searchParams = useSearchParams();
|
|
311
|
-
|
|
312
|
-
// Local state to manage active tab in embedded context
|
|
313
|
-
const [localActiveTab, setLocalActiveTab] = useState(activeTab);
|
|
314
|
-
|
|
315
|
-
const activeIndex = useMemo(() => {
|
|
316
|
-
return childrenArray.findIndex((child: any) => {
|
|
317
|
-
return child.key === (embeded ? localActiveTab : activeTab);
|
|
318
|
-
});
|
|
319
|
-
}, [childrenArray, activeTab, localActiveTab, embeded]);
|
|
320
|
-
|
|
321
|
-
const handleTabChange = (e: any) => {
|
|
322
|
-
const selectedChild = childrenArray[e.index] as any;
|
|
323
|
-
const newTabLabel = selectedChild?.key;
|
|
324
|
-
|
|
325
|
-
if (newTabLabel) {
|
|
326
|
-
if (!embeded) {
|
|
327
|
-
const queryParams = new URLSearchParams(searchParams.toString());
|
|
328
|
-
queryParams.set('activeTab', newTabLabel);
|
|
329
|
-
router.push(`${pathname}?${queryParams.toString()}`);
|
|
330
|
-
} else {
|
|
331
|
-
// Update the active tab state locally for embedded view
|
|
332
|
-
setLocalActiveTab(newTabLabel);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
return (
|
|
339
|
-
<div className="solid-tab-view w-full">
|
|
340
|
-
<TabView activeIndex={activeIndex >= 0 ? activeIndex : 0} onTabChange={handleTabChange}>
|
|
341
|
-
{/* {children} */}
|
|
342
|
-
{childrenArray}
|
|
343
|
-
</TabView>
|
|
344
|
-
</div>
|
|
345
|
-
)
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
const SolidDynamicWidget = ({ widgetName, formik, field, solidFormViewMetaData, solidFormViewData }: any) => {
|
|
349
|
-
const solidView = solidFormViewMetaData.data.solidView;
|
|
350
|
-
const solidFieldsMetadata = solidFormViewMetaData.data.solidFieldsMetadata;
|
|
351
|
-
|
|
352
|
-
let DynamicWidget = getExtensionComponent(widgetName);
|
|
353
|
-
|
|
354
|
-
const widgetProps: SolidFormWidgetProps = {
|
|
355
|
-
formData: formik.values,
|
|
356
|
-
field: field,
|
|
357
|
-
fieldsMetadata: solidFieldsMetadata,
|
|
358
|
-
viewMetadata: solidView,
|
|
359
|
-
formViewData: solidFormViewData
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
return (
|
|
363
|
-
<div className="solid-tab-view w-full">
|
|
364
|
-
{DynamicWidget && <DynamicWidget {...widgetProps} />}
|
|
365
|
-
</div>
|
|
366
|
-
)
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
const SolidPage = ({ attrs, children, key, formik, fields }: any) => {
|
|
371
|
-
const fieldsName = fields.map((f: any) => f.attrs.name);
|
|
372
|
-
const errorCount = formik.submitCount > 0 ? fieldsName.filter((name: any) => !!formik.errors[name]).length : 0;
|
|
373
|
-
const label = (
|
|
374
|
-
<span style={{ color: errorCount > 0 ? 'red' : 'inherit' }}>
|
|
375
|
-
{attrs.label}{errorCount > 0 && ` (${errorCount})`}
|
|
376
|
-
</span>
|
|
377
|
-
);
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
return (
|
|
381
|
-
|
|
382
|
-
<TabPanel key={key} header={label} >
|
|
383
|
-
<div className="p-fluid">{children}</div>
|
|
384
|
-
</TabPanel>
|
|
385
|
-
)
|
|
386
|
-
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
// Original code...
|
|
390
|
-
// const addLevelToGroups = (layout: any, level = 1) => {
|
|
391
|
-
// return layout.map((element: any) => {
|
|
392
|
-
// if (element.type === "group") {
|
|
393
|
-
// // Add the level to the group's attrs
|
|
394
|
-
// element.attrs = {
|
|
395
|
-
// ...element.attrs,
|
|
396
|
-
// level: level, // Add level information to the attrs
|
|
397
|
-
// // className: level === 1 ? 'col-12' : 'col-6', // Assign className based on level
|
|
398
|
-
// };
|
|
399
|
-
// } else {
|
|
400
|
-
// element.children = addLevelToGroups(element.children, level);
|
|
401
|
-
// }
|
|
402
|
-
// // If the element has children, recursively apply this logic
|
|
403
|
-
// // if (element.children) {
|
|
404
|
-
// // element.children = addLevelToGroups(element.children, level + 1);
|
|
405
|
-
// // }
|
|
406
|
-
|
|
407
|
-
// return element;
|
|
408
|
-
// });
|
|
409
|
-
// };
|
|
410
|
-
|
|
411
|
-
// Fix for immutable objects.
|
|
412
|
-
// const addLevelToGroups = (layout: any, level = 1): any[] => {
|
|
413
|
-
// return layout.map((element: any) => {
|
|
414
|
-
// // Create a new object for immutability
|
|
415
|
-
// const updatedElement = { ...element };
|
|
416
|
-
|
|
417
|
-
// if (updatedElement.type === "group") {
|
|
418
|
-
// // Add level to attrs, creating a new object for immutability
|
|
419
|
-
// updatedElement.attrs = {
|
|
420
|
-
// ...updatedElement.attrs,
|
|
421
|
-
// level: level, // Add level information
|
|
422
|
-
// };
|
|
423
|
-
// }
|
|
424
|
-
|
|
425
|
-
// // If the element has children, recursively apply this logic
|
|
426
|
-
// if (updatedElement.children) {
|
|
427
|
-
// updatedElement.children = addLevelToGroups(updatedElement.children, level + 1);
|
|
428
|
-
// }
|
|
429
|
-
|
|
430
|
-
// return updatedElement;
|
|
431
|
-
// });
|
|
432
|
-
// };
|
|
433
|
-
|
|
434
|
-
const SolidFormView = (params: SolidFormViewProps) => {
|
|
435
|
-
|
|
436
|
-
const { data: session, status } = useSession();
|
|
437
|
-
const user = session?.user;
|
|
438
|
-
|
|
439
|
-
const pathname = usePathname();
|
|
440
|
-
const router = useRouter();
|
|
441
|
-
const toast = useRef<Toast>(null);
|
|
442
|
-
const searchParams = useSearchParams();
|
|
443
|
-
const [confirmVisible, setConfirmVisible] = useState(false);
|
|
444
|
-
const confirmResolveRef = useRef<(value: boolean) => void>();
|
|
445
|
-
const [redirectToList, setRedirectToList] = useState(false);
|
|
446
|
-
const [selectedLocale, setSelectedLocale] = useState<string | null>('en');
|
|
447
|
-
const [defaultEntityLocaleId, setDefaultEntityLocaleId] = useState<string | null>(null);
|
|
448
|
-
const [isDeleteDialogVisible, setDeleteDialogVisible] = useState(false);
|
|
449
|
-
const [isLayoutDialogVisible, setLayoutDialogVisible] = useState(false);
|
|
450
|
-
const [published, setPublished] = useState<string | null>(null);
|
|
451
|
-
const [actionsAllowed, setActionsAllowed] = useState<string[]>([]);
|
|
452
|
-
const [viewMode, setViewMode] = useState<"view" | "edit">(params.embeded === true ? "edit" : "view");
|
|
453
|
-
const [createMode, setCreateMode] = useState<boolean>(false);
|
|
454
|
-
const [openLightbox, setOpenLightbox] = useState(false);
|
|
455
|
-
const [lightboxUrls, setLightboxUrls] = useState([]);
|
|
456
|
-
const [isShowChatter, setShowChatter] = useState(false);
|
|
457
|
-
const [chatterLocaleWidth, setChatterLocaleWidth] = useState(380); // default width
|
|
458
|
-
const [isResizingChatterLocale, setIsResizingChatterLocale] = useState(false);
|
|
459
|
-
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
460
|
-
|
|
461
|
-
const [solidWorkflowFieldValue, setSolidWorkflowFieldValue] = useState<string>("");
|
|
462
|
-
const [defaultTabViewOptionIndex, setDefaultTabViewOptionIndex] = useState<number>(1);
|
|
463
|
-
const errorFields: string[] = [];
|
|
464
|
-
|
|
465
|
-
const [triggerCheckIfPermissionExists] = useLazyCheckIfPermissionExistsQuery();
|
|
466
|
-
|
|
467
|
-
const [mcpUrl, setMcpUrl] = useState<string | null>(null);
|
|
468
|
-
const [getMcpUrl] = useLazyGetMcpUrlQuery();
|
|
469
|
-
|
|
470
|
-
// when rendering the form view we will optionally get action params...
|
|
471
|
-
// these we can bubble up in the event that is being raised onFormLayoutLoad, onFormDataLoad & onFormLoad
|
|
472
|
-
const actionName = searchParams.get('actionName');
|
|
473
|
-
const actionType = searchParams.get('actionType');
|
|
474
|
-
const actionContext = searchParams.get('actionContext');
|
|
475
|
-
|
|
476
|
-
const [trigger, { data: solidSettingsData }] = useLazyGetSolidSettingsQuery();
|
|
477
|
-
useEffect(() => {
|
|
478
|
-
trigger("") // Fetch settings on mount
|
|
479
|
-
}, [])
|
|
480
|
-
|
|
481
|
-
useEffect(() => {
|
|
482
|
-
if (solidSettingsData?.data?.mcpEnabled && solidSettingsData?.data?.mcpServerUrl) {
|
|
483
|
-
enableSolidXAiPanel();
|
|
484
|
-
}
|
|
485
|
-
}, [solidSettingsData]);
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
const enableSolidXAiPanel = async () => {
|
|
489
|
-
try {
|
|
490
|
-
const queryData = {
|
|
491
|
-
showHeader: "false",
|
|
492
|
-
inListView: "false"
|
|
493
|
-
};
|
|
494
|
-
const queryString = qs.stringify({ ...queryData }, { encodeValuesOnly: true });
|
|
495
|
-
const response = await getMcpUrl(queryString).unwrap();
|
|
496
|
-
console.log("response", response);
|
|
497
|
-
if (response && response?.data?.mcpUrl) {
|
|
498
|
-
setMcpUrl(response?.data?.mcpUrl);
|
|
499
|
-
}
|
|
500
|
-
} catch (error) {
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
const op = useRef(null);
|
|
506
|
-
useEffect(() => {
|
|
507
|
-
const stored = localStorage.getItem('chatter_locale_width');
|
|
508
|
-
if (stored) {
|
|
509
|
-
setChatterLocaleWidth(parseInt(stored, 10));
|
|
510
|
-
}
|
|
511
|
-
}, []);
|
|
512
|
-
useEffect(() => {
|
|
513
|
-
const handleMouseMove = (e: MouseEvent) => {
|
|
514
|
-
if (!isResizingChatterLocale) return;
|
|
515
|
-
const newWidth = window.innerWidth - e.clientX;
|
|
516
|
-
const clampedWidth = Math.max(280, Math.min(newWidth, 700));
|
|
517
|
-
setChatterLocaleWidth(clampedWidth);
|
|
518
|
-
localStorage.setItem('chatter_locale_width', clampedWidth.toString());
|
|
519
|
-
};
|
|
520
|
-
|
|
521
|
-
const handleMouseUp = () => {
|
|
522
|
-
setIsResizingChatterLocale(false);
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
if (isResizingChatterLocale) {
|
|
526
|
-
window.addEventListener('mousemove', handleMouseMove);
|
|
527
|
-
window.addEventListener('mouseup', handleMouseUp);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
return () => {
|
|
531
|
-
window.removeEventListener('mousemove', handleMouseMove);
|
|
532
|
-
window.removeEventListener('mouseup', handleMouseUp);
|
|
533
|
-
};
|
|
534
|
-
}, [isResizingChatterLocale]);
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
useEffect(() => {
|
|
538
|
-
const mode = searchParams.get('viewMode');
|
|
539
|
-
const locale = searchParams.get('locale');
|
|
540
|
-
const defaultEntityLocaleIdn = searchParams.get('defaultEntityLocaleId');
|
|
541
|
-
if (params.id === 'new' && !locale) {
|
|
542
|
-
setViewMode('edit');
|
|
543
|
-
setCreateMode(true);
|
|
544
|
-
return;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
if (locale) {
|
|
548
|
-
setSelectedLocale(locale);
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
if (defaultEntityLocaleIdn) {
|
|
552
|
-
setDefaultEntityLocaleId(defaultEntityLocaleIdn);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
// Set the viewMode based on the URL
|
|
556
|
-
if (mode === 'view' || mode === 'edit') {
|
|
557
|
-
setViewMode(mode);
|
|
558
|
-
} else {
|
|
559
|
-
setViewMode('view'); // Default to 'view' if no valid mode is provided
|
|
560
|
-
}
|
|
561
|
-
}, [searchParams, params.id]);
|
|
562
|
-
|
|
563
|
-
// function that updates view mode
|
|
564
|
-
const updateViewMode = (newMode: "view" | "edit") => {
|
|
565
|
-
setViewMode(newMode);
|
|
566
|
-
const params = new URLSearchParams(searchParams.toString());
|
|
567
|
-
params.set("viewMode", newMode);
|
|
568
|
-
router.push(`${pathname}?${params.toString()}`);
|
|
569
|
-
};
|
|
570
|
-
|
|
571
|
-
useEffect(() => {
|
|
572
|
-
const fetchPermissions = async () => {
|
|
573
|
-
if (params.modelName) {
|
|
574
|
-
const permissionNames = [
|
|
575
|
-
permissionExpression(params.modelName, 'create'),
|
|
576
|
-
permissionExpression(params.modelName, 'delete'),
|
|
577
|
-
permissionExpression(params.modelName, 'update'),
|
|
578
|
-
permissionExpression(params.modelName, 'findOne'),
|
|
579
|
-
permissionExpression(params.modelName, 'publish'),
|
|
580
|
-
permissionExpression(params.modelName, 'unpublish'),
|
|
581
|
-
permissionExpression('chatterMessage', 'findMany')
|
|
582
|
-
]
|
|
583
|
-
const queryData = {
|
|
584
|
-
permissionNames: permissionNames
|
|
585
|
-
};
|
|
586
|
-
const queryString = qs.stringify(queryData, {
|
|
587
|
-
encodeValuesOnly: true
|
|
588
|
-
});
|
|
589
|
-
const response = await triggerCheckIfPermissionExists(queryString);
|
|
590
|
-
setActionsAllowed(response.data.data);
|
|
591
|
-
}
|
|
592
|
-
};
|
|
593
|
-
fetchPermissions();
|
|
594
|
-
}, [params.modelName]);
|
|
595
|
-
|
|
596
|
-
// Create the RTK slices for this entitor (const id of fieldValue) {
|
|
597
|
-
// if (!isInt(id)) {
|
|
598
|
-
// errors.push({ field: this.fieldMetadata.name, error: `Invalid ids in ${ commandFieldName } ` });
|
|
599
|
-
// }
|
|
600
|
-
// }y
|
|
601
|
-
const entityApi = createSolidEntityApi(params.modelName);
|
|
602
|
-
const {
|
|
603
|
-
useCreateSolidEntityMutation,
|
|
604
|
-
useDeleteSolidEntityMutation,
|
|
605
|
-
useGetSolidEntityByIdQuery,
|
|
606
|
-
useUpdateSolidEntityMutation,
|
|
607
|
-
usePatchUpdateSolidEntityMutation,
|
|
608
|
-
usePublishSolidEntityMutation,
|
|
609
|
-
useUnpublishSolidEntityMutation
|
|
610
|
-
} = entityApi;
|
|
611
|
-
|
|
612
|
-
const [
|
|
613
|
-
createEntity,
|
|
614
|
-
{ isSuccess: isEntityCreateSuccess, isError: isEntityCreateError, error: entityCreateError },
|
|
615
|
-
] = useCreateSolidEntityMutation();
|
|
616
|
-
|
|
617
|
-
const [
|
|
618
|
-
updateEntity,
|
|
619
|
-
{ isSuccess: isEntityUpdateSuceess, isError: isEntityUpdateError, error: entityUpdateError },
|
|
620
|
-
] = useUpdateSolidEntityMutation();
|
|
621
|
-
|
|
622
|
-
const [
|
|
623
|
-
deleteEntity,
|
|
624
|
-
{ isSuccess: isEntityDeleteSuceess, isError: isEntityDeleteError, error: entityDeleteError },
|
|
625
|
-
] = useDeleteSolidEntityMutation();
|
|
626
|
-
|
|
627
|
-
const [
|
|
628
|
-
patchEntity,
|
|
629
|
-
{ isSuccess: isEntityPatchSuceess, isError: isEntityPatchError, error: entityPatchError },
|
|
630
|
-
] = usePatchUpdateSolidEntityMutation();
|
|
631
|
-
|
|
632
|
-
const [
|
|
633
|
-
publishSolidEntity,
|
|
634
|
-
{ isSuccess: isEntityPublishedSuccess, isError: isEntityPublishedError, error: entityPublishedError },
|
|
635
|
-
] = usePublishSolidEntityMutation();
|
|
636
|
-
|
|
637
|
-
const [
|
|
638
|
-
unpublishSolidEntity,
|
|
639
|
-
{ isSuccess: isEntityUnpublishedSuccess, isError: isEntityUnpublishedError, error: entityUnpublishedError },
|
|
640
|
-
] = useUnpublishSolidEntityMutation();
|
|
641
|
-
|
|
642
|
-
// - - - - - - - - - - - -- - - - - - - - - - - - METADATA here
|
|
643
|
-
// Get the form view layout & metadata first.
|
|
644
|
-
const formViewMetaDataQs = qs.stringify({ ...params, viewType: 'form', defaultEntityLocaleId: defaultEntityLocaleId }, {
|
|
645
|
-
encodeValuesOnly: true,
|
|
646
|
-
});
|
|
647
|
-
const [formViewMetaData, setFormViewMetaData] = useState({});
|
|
648
|
-
const [formViewLayout, setFormViewLayout] = useState<any>(null);
|
|
649
|
-
const {
|
|
650
|
-
data: solidFormViewMetaData,
|
|
651
|
-
isLoading: solidFormViewMetaDataIsLoading
|
|
652
|
-
} = useGetSolidViewLayoutQuery(formViewMetaDataQs);
|
|
653
|
-
const [refreshChatterMessage, setRefreshChatterMessage] = useState<boolean>(true);
|
|
654
|
-
useEffect(() => {
|
|
655
|
-
if (
|
|
656
|
-
isEntityCreateSuccess == true ||
|
|
657
|
-
isEntityUpdateSuceess == true ||
|
|
658
|
-
isEntityDeleteSuceess == true ||
|
|
659
|
-
isEntityPatchSuceess == true ||
|
|
660
|
-
isEntityPublishedSuccess == true ||
|
|
661
|
-
isEntityUnpublishedSuccess == true
|
|
662
|
-
) {
|
|
663
|
-
setRefreshChatterMessage(true);
|
|
664
|
-
if (params.embeded == true && params.onEmbeddedFormSave) {
|
|
665
|
-
params.onEmbeddedFormSave();
|
|
666
|
-
}
|
|
667
|
-
// Close The pop in case the form is used in embeded form
|
|
668
|
-
if (params.embeded == true) {
|
|
669
|
-
params.handlePopupClose()
|
|
670
|
-
}
|
|
671
|
-
if (redirectToList === true) {
|
|
672
|
-
if (params.redirectToPath) {
|
|
673
|
-
router.push(params.redirectToPath);
|
|
674
|
-
window.location.reload();
|
|
675
|
-
} else {
|
|
676
|
-
const segments = pathname.split('/').filter(Boolean); // Split and filter empty segments
|
|
677
|
-
const newPath = '/' + segments.slice(0, -2).join('/') + '/list'; // Remove last segment and add "/all"
|
|
678
|
-
router.push(newPath);
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}, [isEntityCreateSuccess, isEntityUpdateSuceess, isEntityDeleteSuceess, isEntityPatchSuceess, isEntityPublishedSuccess, isEntityUnpublishedSuccess]);
|
|
683
|
-
|
|
684
|
-
useEffect(() => {
|
|
685
|
-
|
|
686
|
-
if (solidFormViewMetaData?.data?.solidView?.model?.internationalisation) {
|
|
687
|
-
setDefaultTabViewOptionIndex(0)
|
|
688
|
-
const matchedLocale = solidFormViewMetaData?.data?.applicableLocales?.find((x: any) => x.isDefault === 'yes');
|
|
689
|
-
//this is to attach default locale when adding data in popup view where relations exists
|
|
690
|
-
if (!selectedLocale && matchedLocale && !searchParams.get('locale')) {
|
|
691
|
-
setSelectedLocale(matchedLocale.locale);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
}, [params.modelName, solidFormViewMetaData])
|
|
696
|
-
|
|
697
|
-
function isFetchBaseQueryErrorWithErrorResponse(error: any): error is FetchBaseQueryError & { data: ErrorResponseData } {
|
|
698
|
-
return error && typeof error === 'object' && 'data' in error && 'message' in error.data;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
useEffect(() => {
|
|
702
|
-
const handleError = (errorToast: any) => {
|
|
703
|
-
let errorMessage: any = [ERROR_MESSAGES.ERROR_OCCURED];
|
|
704
|
-
|
|
705
|
-
if (isFetchBaseQueryErrorWithErrorResponse(errorToast)) {
|
|
706
|
-
errorMessage = errorToast.data.message;
|
|
707
|
-
} else {
|
|
708
|
-
errorMessage = [ERROR_MESSAGES.SOMETHING_WRONG];
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
toast.current?.show({
|
|
712
|
-
severity: 'error',
|
|
713
|
-
summary: 'Error',
|
|
714
|
-
detail: errorMessage,
|
|
715
|
-
sticky: true,
|
|
716
|
-
//@ts-ignore
|
|
717
|
-
content: () => (
|
|
718
|
-
<div className="flex flex-column align-items-left" style={{ flex: "1" }}>
|
|
719
|
-
{Array.isArray(errorMessage) ? (
|
|
720
|
-
errorMessage.map((message, index) => (
|
|
721
|
-
<div className="flex align-items-center gap-2" key={index}>
|
|
722
|
-
<span className="font-bold text-900">{message.trim()}</span>
|
|
723
|
-
</div>
|
|
724
|
-
))
|
|
725
|
-
) : (
|
|
726
|
-
<div className="flex align-items-center gap-2">
|
|
727
|
-
<span className="font-bold text-900">{errorMessage?.trim()}</span>
|
|
728
|
-
</div>
|
|
729
|
-
)}
|
|
730
|
-
</div>
|
|
731
|
-
),
|
|
732
|
-
});
|
|
733
|
-
};
|
|
734
|
-
|
|
735
|
-
// Check and handle errors from each API operation
|
|
736
|
-
if (isEntityCreateError) {
|
|
737
|
-
handleError(entityCreateError);
|
|
738
|
-
} else if (isEntityDeleteError) {
|
|
739
|
-
handleError(entityDeleteError);
|
|
740
|
-
} else if (isEntityUpdateError) {
|
|
741
|
-
handleError(entityUpdateError);
|
|
742
|
-
} else if (isEntityPatchError) {
|
|
743
|
-
handleError(entityPatchError);
|
|
744
|
-
} else if (isEntityPublishedError) {
|
|
745
|
-
handleError(entityPublishedError);
|
|
746
|
-
} else if (isEntityUnpublishedError) {
|
|
747
|
-
handleError(entityUnpublishedError);
|
|
748
|
-
}
|
|
749
|
-
}, [
|
|
750
|
-
isEntityCreateError,
|
|
751
|
-
isEntityDeleteError,
|
|
752
|
-
isEntityUpdateError,
|
|
753
|
-
isEntityPatchError,
|
|
754
|
-
isEntityPublishedError,
|
|
755
|
-
isEntityUnpublishedError
|
|
756
|
-
]);
|
|
757
|
-
|
|
758
|
-
const confirmDialogWithPromise = () => {
|
|
759
|
-
return new Promise<boolean>((resolve) => {
|
|
760
|
-
confirmResolveRef.current = resolve;
|
|
761
|
-
setConfirmVisible(true);
|
|
762
|
-
});
|
|
763
|
-
};
|
|
764
|
-
|
|
765
|
-
const onFormikSubmit = async (values: any) => {
|
|
766
|
-
const solidView = solidFormViewMetaData.data.solidView;
|
|
767
|
-
const solidFieldsMetadata = solidFormViewMetaData.data.solidFieldsMetadata;
|
|
768
|
-
const layoutFieldsObj = getLayoutFieldsAsObject([formViewLayout]);
|
|
769
|
-
setIsSubmitting(true);
|
|
770
|
-
try {
|
|
771
|
-
let formData = new FormData();
|
|
772
|
-
|
|
773
|
-
// Iterate through the keys in the values object
|
|
774
|
-
Object.entries(values).forEach(([key, value]) => {
|
|
775
|
-
|
|
776
|
-
const fieldMetadata = solidFieldsMetadata[key];
|
|
777
|
-
// const fieldMetadata = getActualFieldMetadata(key, solidFieldsMetadata);
|
|
778
|
-
const fieldContext: SolidFieldProps = {
|
|
779
|
-
fieldMetadata: fieldMetadata,
|
|
780
|
-
field: layoutFieldsObj[key],
|
|
781
|
-
data: initialEntityData,
|
|
782
|
-
solidFormViewMetaData: solidFormViewMetaData,
|
|
783
|
-
modelName: params.modelName
|
|
784
|
-
}
|
|
785
|
-
let solidField = fieldFactory(fieldMetadata?.type, fieldContext);
|
|
786
|
-
// Append each field to the FormData
|
|
787
|
-
if (value !== undefined && value !== null && solidField) {
|
|
788
|
-
solidField.updateFormData(value, formData);
|
|
789
|
-
}
|
|
790
|
-
if (value !== undefined && value !== null && key.endsWith("Confirm")) {
|
|
791
|
-
formData.append(key, String(value))
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
});
|
|
795
|
-
|
|
796
|
-
let solidWorkflowField = solidFormViewMetaData?.data?.solidView?.layout?.attrs?.workflowField;
|
|
797
|
-
if (params.id !== "new") {
|
|
798
|
-
if (solidFormViewMetaData?.data?.solidFormViewWorkflowData) {
|
|
799
|
-
if (solidFormViewMetaData?.data?.solidFieldsMetadata?.[solidWorkflowField]?.type === "selectionStatic") {
|
|
800
|
-
formData.append(solidWorkflowField, solidWorkflowFieldValue);
|
|
801
|
-
}
|
|
802
|
-
if (solidFormViewMetaData?.data?.solidFieldsMetadata?.[solidWorkflowField]?.type === "many-to-one") {
|
|
803
|
-
formData.append(`${solidWorkflowField}Id`, solidWorkflowFieldValue);
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
if (solidFormViewMetaData?.data?.solidView?.model?.internationalisation) {
|
|
808
|
-
if (selectedLocale && !formData.has('localeName')) {
|
|
809
|
-
formData.append('localeName', selectedLocale);
|
|
810
|
-
}
|
|
811
|
-
if (defaultEntityLocaleId) {
|
|
812
|
-
formData.append('defaultEntityLocaleId', defaultEntityLocaleId.toString());
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
if (solidFormViewMetaData?.data?.solidView?.model?.draftPublishWorkflow) {
|
|
816
|
-
if (published) {
|
|
817
|
-
formData.append('publishedAt', published);
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
if (params.inlineCreateAutoSave === true) {
|
|
821
|
-
params.customCreateHandler(formData);
|
|
822
|
-
} else {
|
|
823
|
-
if (params.id === 'new') {
|
|
824
|
-
// default locale
|
|
825
|
-
const result = await createEntity(formData).unwrap();
|
|
826
|
-
showToast(toast, "success", ERROR_MESSAGES.FORM_SAVED, ERROR_MESSAGES.FORM_SAVED_SUCCESSFULLY);
|
|
827
|
-
// if (!params.embeded && result?.data?.id) {
|
|
828
|
-
// const newPathname = pathname.replace(/new$/, result.data.id);
|
|
829
|
-
|
|
830
|
-
// const params = new URLSearchParams(searchParams.toString());
|
|
831
|
-
// params.set("viewMode", "view");
|
|
832
|
-
|
|
833
|
-
// const updatedUrl = `${newPathname}?${params.toString()}`;
|
|
834
|
-
// await router.push(updatedUrl, { scroll: false });
|
|
835
|
-
|
|
836
|
-
// setViewMode("view")
|
|
837
|
-
// }
|
|
838
|
-
if (!params.embeded) {
|
|
839
|
-
const baseFormPath = normalizeSolidFormActionPath(pathname, "form");
|
|
840
|
-
const queryParams = new URLSearchParams(searchParams.toString());
|
|
841
|
-
queryParams.set("viewMode", "view");
|
|
842
|
-
router.push(`${baseFormPath}/${result?.data?.id}?${queryParams.toString()}`);
|
|
843
|
-
setViewMode("view")
|
|
844
|
-
}
|
|
845
|
-
return result;
|
|
846
|
-
}
|
|
847
|
-
else {
|
|
848
|
-
// updateEntity({ id: +params.id, data: formData });
|
|
849
|
-
const result = await updateEntity({ id: +params.id, data: formData }).unwrap();
|
|
850
|
-
// const result = await updateEntity({ id: +params.id, data: formData }).unwrap();
|
|
851
|
-
if (!params.embeded) {
|
|
852
|
-
showToast(toast, "success", ERROR_MESSAGES.FORM_UPDATE, ERROR_MESSAGES.FORM_UPDATE_SUCCESSFULLY);
|
|
853
|
-
if (result?.statusCode === 200) {
|
|
854
|
-
updateViewMode("view")
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
return result;
|
|
858
|
-
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
} catch (err) {
|
|
863
|
-
console.error(ERROR_MESSAGES.ENTITY_FAILED, err);
|
|
864
|
-
} finally {
|
|
865
|
-
setIsSubmitting(false);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
const showFieldError = () => {
|
|
870
|
-
if (errorFields?.length === 0) return;
|
|
871
|
-
errorFields.forEach((error) => {
|
|
872
|
-
toast?.current?.show({
|
|
873
|
-
severity: "error",
|
|
874
|
-
summary: "Metadata Error",
|
|
875
|
-
detail: error,
|
|
876
|
-
life: 3000,
|
|
877
|
-
});
|
|
878
|
-
|
|
879
|
-
});
|
|
880
|
-
|
|
881
|
-
// errorFields.length = 0;
|
|
882
|
-
};
|
|
883
|
-
useEffect(() => {
|
|
884
|
-
if (errorFields?.length > 0) {
|
|
885
|
-
showFieldError();
|
|
886
|
-
}
|
|
887
|
-
}, [errorFields])
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
// - - - - - - - - - - - -- - - - - - - - - - - - DATA here
|
|
891
|
-
// Fetch the actual data here.
|
|
892
|
-
// This is the initial value of this form, will come from an API call in the case of edit.
|
|
893
|
-
let layoutFields = [];
|
|
894
|
-
let toPopulate: string[] = [];
|
|
895
|
-
let toPopulateMedia: string[] = [];
|
|
896
|
-
if (solidFormViewMetaData && formViewLayout) {
|
|
897
|
-
const solidView = solidFormViewMetaData.data.solidView;
|
|
898
|
-
const solidFieldsMetadata = solidFormViewMetaData.data.solidFieldsMetadata;
|
|
899
|
-
layoutFields = [formViewLayout].flatMap(getLayoutFields);
|
|
900
|
-
for (let i = 0; i < layoutFields?.length; i++) {
|
|
901
|
-
const formLayoutField = layoutFields[i];
|
|
902
|
-
const fieldMetadata = solidFieldsMetadata[formLayoutField.attrs.name];
|
|
903
|
-
if (fieldMetadata?.type === 'relation' && fieldMetadata?.relationType === 'many-to-one') {
|
|
904
|
-
if (!toPopulate.includes(fieldMetadata.name)) {
|
|
905
|
-
toPopulate.push(fieldMetadata.name);
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
if (fieldMetadata?.type === 'mediaSingle' || fieldMetadata?.type === 'mediaMultiple') {
|
|
909
|
-
toPopulateMedia.push(fieldMetadata.name);
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
if (formViewLayout.attrs?.workflowField && solidFieldsMetadata[formViewLayout.attrs.workflowField]?.type === 'relation' && solidFieldsMetadata[formViewLayout.attrs.workflowField]?.relationType === 'many-to-one') {
|
|
913
|
-
toPopulate.push(solidFieldsMetadata[formViewLayout.attrs.workflowField].name);
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
// TODO: Possible optimisation here, we are firing 2 queries to load the form view data object.
|
|
917
|
-
// once without populate & populateMedia and then again once after that.
|
|
918
|
-
const formViewDataQs = qs.stringify({ populate: toPopulate, populateMedia: toPopulateMedia }, {
|
|
919
|
-
encodeValuesOnly: true,
|
|
920
|
-
});
|
|
921
|
-
const [initialEntityData, setInitialEntityData] = useState({});
|
|
922
|
-
const {
|
|
923
|
-
data: solidFormViewData,
|
|
924
|
-
isLoading: solidFormViewDataIsLoading,
|
|
925
|
-
refetch: refetchSolidFormViewData,
|
|
926
|
-
} = useGetSolidEntityByIdQuery({ id: params.id, qs: formViewDataQs }, {
|
|
927
|
-
skip: params.id === 'new'
|
|
928
|
-
});
|
|
929
|
-
useEffect(() => {
|
|
930
|
-
if (params.id !== 'new') {
|
|
931
|
-
refetchSolidFormViewData()
|
|
932
|
-
}
|
|
933
|
-
}, [formViewDataQs])
|
|
934
|
-
|
|
935
|
-
useEffect(() => {
|
|
936
|
-
if (solidFormViewMetaData) {
|
|
937
|
-
if (params.customLayout) {
|
|
938
|
-
setFormViewLayout(params.customLayout);
|
|
939
|
-
} else {
|
|
940
|
-
setFormViewLayout(solidFormViewMetaData?.data?.solidView?.layout);
|
|
941
|
-
}
|
|
942
|
-
setPublished(solidFormViewData?.data?.publishedAt);
|
|
943
|
-
setFormViewMetaData(solidFormViewMetaData);
|
|
944
|
-
}
|
|
945
|
-
}, [solidFormViewMetaData]);
|
|
946
|
-
|
|
947
|
-
// useEffect(() => {
|
|
948
|
-
// const handleOnFormLayoutLoadEvent = async () => {
|
|
949
|
-
// if (solidFormViewMetaData) {
|
|
950
|
-
// // let formLayout = solidFormViewMetaData;
|
|
951
|
-
// // let customLayout = params?.customLayout;
|
|
952
|
-
// const onFormLayoutLoadHandlerExtensionFunction = solidFormViewMetaData?.data?.solidView?.layout?.onFormLayoutLoad;
|
|
953
|
-
// // let dynamicExtensionFunction = null;
|
|
954
|
-
// let formLayout = solidFormViewMetaData?.data?.solidView?.layout;
|
|
955
|
-
// if (params.customLayout) {
|
|
956
|
-
// formLayout = params.customLayout;
|
|
957
|
-
// }
|
|
958
|
-
// const event: SolidLoadForm = {
|
|
959
|
-
// parentData: params?.parentData,
|
|
960
|
-
// fieldsMetadata: solidFormViewMetaData,
|
|
961
|
-
// formData: solidFormViewData?.data,
|
|
962
|
-
// type: 'onFormLayoutLoad',
|
|
963
|
-
// viewMetadata: solidFormViewMetaData?.data?.solidView,
|
|
964
|
-
// formViewLayout: formLayout,
|
|
965
|
-
// queryParams: {
|
|
966
|
-
// actionName,
|
|
967
|
-
// actionType,
|
|
968
|
-
// actionContext
|
|
969
|
-
// }
|
|
970
|
-
// }
|
|
971
|
-
// if (onFormLayoutLoadHandlerExtensionFunction) {
|
|
972
|
-
// const dynamicExtensionFunction = getExtensionFunction(onFormLayoutLoadHandlerExtensionFunction);
|
|
973
|
-
// if (dynamicExtensionFunction) {
|
|
974
|
-
// try {
|
|
975
|
-
// const updatedFormLayout: SolidUiEventResponse = await dynamicExtensionFunction(event);
|
|
976
|
-
// if (updatedFormLayout && updatedFormLayout?.layoutChanged && updatedFormLayout?.newLayout) {
|
|
977
|
-
// setFormViewLayout(updatedFormLayout.newLayout);
|
|
978
|
-
// // const newFormLayout = {
|
|
979
|
-
// // ...formLayout,
|
|
980
|
-
// // data: {
|
|
981
|
-
// // ...formLayout.data,
|
|
982
|
-
// // solidView: {
|
|
983
|
-
// // ...formLayout.data.solidView,
|
|
984
|
-
// // layout: updatedFormLayout.newLayout
|
|
985
|
-
// // }
|
|
986
|
-
// // }
|
|
987
|
-
// // };
|
|
988
|
-
// // formLayout = newFormLayout;
|
|
989
|
-
// // customLayout = updatedFormLayout.newLayout;
|
|
990
|
-
// }
|
|
991
|
-
// } catch (error) {
|
|
992
|
-
// console.error(ERROR_MESSAGES.DYNAMIC_FUNCTION_ERROR, error);
|
|
993
|
-
// }
|
|
994
|
-
// }
|
|
995
|
-
// }
|
|
996
|
-
// // setFormViewMetaData(formLayout);
|
|
997
|
-
// // if (params.customLayout) {
|
|
998
|
-
// // setFormViewLayout(customLayout);
|
|
999
|
-
// // } else {
|
|
1000
|
-
// // setFormViewLayout(formLayout.data.solidView.layout);
|
|
1001
|
-
// // }
|
|
1002
|
-
// }
|
|
1003
|
-
// };
|
|
1004
|
-
// const handleOnFormDataLoadEvent = async () => {
|
|
1005
|
-
// const onFormDataLoadHandlerExtensionFunction = solidFormViewMetaData?.data?.solidView?.layout?.onFormDataLoad;
|
|
1006
|
-
// // let dynamicExtensionFunction = null;
|
|
1007
|
-
// let formViewData = solidFormViewData?.data;
|
|
1008
|
-
|
|
1009
|
-
// let formLayout = solidFormViewMetaData?.data?.solidView?.layout;
|
|
1010
|
-
// if (params.customLayout) {
|
|
1011
|
-
// formLayout = params.customLayout;
|
|
1012
|
-
// }
|
|
1013
|
-
|
|
1014
|
-
// const event: SolidLoadForm = {
|
|
1015
|
-
// fieldsMetadata: solidFormViewMetaData,
|
|
1016
|
-
// formData: solidFormViewData?.data,
|
|
1017
|
-
// type: "onFormDataLoad",
|
|
1018
|
-
// viewMetadata: solidFormViewMetaData?.data?.solidView,
|
|
1019
|
-
// formViewLayout: formLayout,
|
|
1020
|
-
// queryParams: {
|
|
1021
|
-
// actionName,
|
|
1022
|
-
// actionType,
|
|
1023
|
-
// actionContext
|
|
1024
|
-
// }
|
|
1025
|
-
// };
|
|
1026
|
-
// if (onFormDataLoadHandlerExtensionFunction) {
|
|
1027
|
-
// const dynamicExtensionFunction = getExtensionFunction(onFormDataLoadHandlerExtensionFunction);
|
|
1028
|
-
// if (dynamicExtensionFunction) {
|
|
1029
|
-
// const updatedFormData: SolidUiEventResponse = await dynamicExtensionFunction(event);
|
|
1030
|
-
|
|
1031
|
-
// if (updatedFormData && updatedFormData?.dataChanged && updatedFormData?.newFormData) {
|
|
1032
|
-
// formViewData = updatedFormData.newFormData;
|
|
1033
|
-
// }
|
|
1034
|
-
// }
|
|
1035
|
-
// if (formViewData) {
|
|
1036
|
-
// setInitialEntityData(formViewData);
|
|
1037
|
-
// }
|
|
1038
|
-
// }
|
|
1039
|
-
// };
|
|
1040
|
-
// const handleOnFormLoadEvent = async () => {
|
|
1041
|
-
// const onFormLoadHandlerExtensionFunction = solidFormViewMetaData?.data?.solidView?.layout?.onFormLoad;
|
|
1042
|
-
// // let dynamicExtensionFunction = null;
|
|
1043
|
-
// let localFormViewMetadata = solidFormViewMetaData;
|
|
1044
|
-
// // let customLayout = params?.customLayout;
|
|
1045
|
-
// let formViewData = solidFormViewData?.data;
|
|
1046
|
-
|
|
1047
|
-
// let formLayout = solidFormViewMetaData?.data?.solidView?.layout;
|
|
1048
|
-
// if (params.customLayout) {
|
|
1049
|
-
// formLayout = params.customLayout;
|
|
1050
|
-
// }
|
|
1051
|
-
|
|
1052
|
-
// const event: SolidLoadForm = {
|
|
1053
|
-
// parentData: params?.parentData,
|
|
1054
|
-
// fieldsMetadata: solidFormViewMetaData,
|
|
1055
|
-
// formData: solidFormViewData?.data,
|
|
1056
|
-
// type: 'onFormLoad',
|
|
1057
|
-
// viewMetadata: solidFormViewMetaData?.data?.solidView,
|
|
1058
|
-
// formViewLayout: formViewLayout,
|
|
1059
|
-
// queryParams: {
|
|
1060
|
-
// actionName,
|
|
1061
|
-
// actionType,
|
|
1062
|
-
// actionContext
|
|
1063
|
-
// }
|
|
1064
|
-
// };
|
|
1065
|
-
|
|
1066
|
-
// if (onFormLoadHandlerExtensionFunction) {
|
|
1067
|
-
// const dynamicExtensionFunction = getExtensionFunction(onFormLoadHandlerExtensionFunction);
|
|
1068
|
-
// if (dynamicExtensionFunction) {
|
|
1069
|
-
// try {
|
|
1070
|
-
// const result: SolidUiEventResponse = await dynamicExtensionFunction(event);
|
|
1071
|
-
// if (result && result?.layoutChanged && result?.newLayout) {
|
|
1072
|
-
// // const newLocalFormViewMetadata = {
|
|
1073
|
-
// // ...localFormViewMetadata,
|
|
1074
|
-
// // data: {
|
|
1075
|
-
// // ...localFormViewMetadata.data,
|
|
1076
|
-
// // solidView: {
|
|
1077
|
-
// // ...localFormViewMetadata.data.solidView,
|
|
1078
|
-
// // layout: result.newLayout
|
|
1079
|
-
// // }
|
|
1080
|
-
// // }
|
|
1081
|
-
// // };
|
|
1082
|
-
// // localFormViewMetadata = newLocalFormViewMetadata;
|
|
1083
|
-
// // customLayout = result.newLayout;
|
|
1084
|
-
// // setFormViewMetaData(localFormViewMetadata);
|
|
1085
|
-
|
|
1086
|
-
// setFormViewLayout(result.newLayout);
|
|
1087
|
-
// // if (params.customLayout) {
|
|
1088
|
-
// // setFormViewLayout(customLayout);
|
|
1089
|
-
// // } else {
|
|
1090
|
-
// // setFormViewLayout(localFormViewMetadata.data.solidView.layout);
|
|
1091
|
-
// // }
|
|
1092
|
-
// }
|
|
1093
|
-
// if (result && result?.dataChanged && result?.newFormData) {
|
|
1094
|
-
// formViewData = result.newFormData;
|
|
1095
|
-
// setInitialEntityData(formViewData);
|
|
1096
|
-
// }
|
|
1097
|
-
// } catch (error) {
|
|
1098
|
-
// console.error(ERROR_MESSAGES.ON_FORM_LOAD, error);
|
|
1099
|
-
// }
|
|
1100
|
-
// }
|
|
1101
|
-
// }
|
|
1102
|
-
// };
|
|
1103
|
-
|
|
1104
|
-
// handleOnFormLayoutLoadEvent();
|
|
1105
|
-
// handleOnFormDataLoadEvent();
|
|
1106
|
-
// handleOnFormLoadEvent();
|
|
1107
|
-
// }, [solidFormViewMetaData, solidFormViewData]);
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
useEffect(() => {
|
|
1111
|
-
const runFormEvents = async () => {
|
|
1112
|
-
if (!solidFormViewMetaData) return;
|
|
1113
|
-
|
|
1114
|
-
/** ----------------------------
|
|
1115
|
-
* 1. Initialize working state
|
|
1116
|
-
* ----------------------------- */
|
|
1117
|
-
let workingLayout = params.customLayout ?? solidFormViewMetaData?.data?.solidView?.layout;
|
|
1118
|
-
let workingFormData = solidFormViewData?.data;
|
|
1119
|
-
const baseEvent = {
|
|
1120
|
-
parentData: params?.parentData,
|
|
1121
|
-
fieldsMetadata: solidFormViewMetaData,
|
|
1122
|
-
viewMetadata: solidFormViewMetaData?.data?.solidView,
|
|
1123
|
-
queryParams: {
|
|
1124
|
-
actionName,
|
|
1125
|
-
actionType,
|
|
1126
|
-
actionContext,
|
|
1127
|
-
},
|
|
1128
|
-
};
|
|
1129
|
-
|
|
1130
|
-
/** ----------------------------
|
|
1131
|
-
* 2. onFormLayoutLoad
|
|
1132
|
-
* ----------------------------- */
|
|
1133
|
-
const onFormLayoutLoadFn =
|
|
1134
|
-
solidFormViewMetaData?.data?.solidView?.layout?.onFormLayoutLoad;
|
|
1135
|
-
|
|
1136
|
-
if (onFormLayoutLoadFn) {
|
|
1137
|
-
const fn = getExtensionFunction(onFormLayoutLoadFn);
|
|
1138
|
-
if (fn) {
|
|
1139
|
-
try {
|
|
1140
|
-
const result: SolidUiEventResponse = await fn({
|
|
1141
|
-
...baseEvent,
|
|
1142
|
-
type: "onFormLayoutLoad",
|
|
1143
|
-
formData: workingFormData,
|
|
1144
|
-
formViewLayout: workingLayout,
|
|
1145
|
-
});
|
|
1146
|
-
|
|
1147
|
-
if (result?.layoutChanged && result?.newLayout) {
|
|
1148
|
-
workingLayout = result.newLayout;
|
|
1149
|
-
}
|
|
1150
|
-
} catch (e) {
|
|
1151
|
-
console.error(ERROR_MESSAGES.DYNAMIC_FUNCTION_ERROR, e);
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
/** ----------------------------
|
|
1157
|
-
* 3. onFormDataLoad
|
|
1158
|
-
* ----------------------------- */
|
|
1159
|
-
const onFormDataLoadFn =
|
|
1160
|
-
solidFormViewMetaData?.data?.solidView?.layout?.onFormDataLoad;
|
|
1161
|
-
|
|
1162
|
-
if (onFormDataLoadFn) {
|
|
1163
|
-
const fn = getExtensionFunction(onFormDataLoadFn);
|
|
1164
|
-
if (fn) {
|
|
1165
|
-
try {
|
|
1166
|
-
const result: SolidUiEventResponse = await fn({
|
|
1167
|
-
...baseEvent,
|
|
1168
|
-
type: "onFormDataLoad",
|
|
1169
|
-
formData: workingFormData,
|
|
1170
|
-
formViewLayout: workingLayout, // ✅ UPDATED layout
|
|
1171
|
-
});
|
|
1172
|
-
|
|
1173
|
-
if (result?.dataChanged && result?.newFormData) {
|
|
1174
|
-
workingFormData = result.newFormData;
|
|
1175
|
-
}
|
|
1176
|
-
} catch (e) {
|
|
1177
|
-
console.error(ERROR_MESSAGES.DYNAMIC_FUNCTION_ERROR, e);
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
/** ----------------------------
|
|
1183
|
-
* 4. onFormLoad
|
|
1184
|
-
* ----------------------------- */
|
|
1185
|
-
const onFormLoadFn =
|
|
1186
|
-
solidFormViewMetaData?.data?.solidView?.layout?.onFormLoad;
|
|
1187
|
-
|
|
1188
|
-
if (onFormLoadFn) {
|
|
1189
|
-
const fn = getExtensionFunction(onFormLoadFn);
|
|
1190
|
-
if (fn) {
|
|
1191
|
-
try {
|
|
1192
|
-
const result: SolidUiEventResponse = await fn({
|
|
1193
|
-
...baseEvent,
|
|
1194
|
-
type: "onFormLoad",
|
|
1195
|
-
formData: workingFormData,
|
|
1196
|
-
formViewLayout: workingLayout, // ✅ FINAL layout
|
|
1197
|
-
});
|
|
1198
|
-
|
|
1199
|
-
if (result?.layoutChanged && result?.newLayout) {
|
|
1200
|
-
workingLayout = result.newLayout;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
if (result?.dataChanged && result?.newFormData) {
|
|
1204
|
-
workingFormData = result.newFormData;
|
|
1205
|
-
}
|
|
1206
|
-
} catch (e) {
|
|
1207
|
-
console.error(ERROR_MESSAGES.ON_FORM_LOAD, e);
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
/** ----------------------------
|
|
1213
|
-
* 5. Commit once to React state
|
|
1214
|
-
* ----------------------------- */
|
|
1215
|
-
if (workingLayout) {
|
|
1216
|
-
setFormViewLayout(workingLayout);
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
if (workingFormData) {
|
|
1220
|
-
setInitialEntityData(workingFormData);
|
|
1221
|
-
}
|
|
1222
|
-
};
|
|
1223
|
-
|
|
1224
|
-
runFormEvents();
|
|
1225
|
-
}, [solidFormViewMetaData, solidFormViewData]);
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
useEffect(() => {
|
|
1229
|
-
if (solidFormViewData) {
|
|
1230
|
-
setInitialEntityData(solidFormViewData.data);
|
|
1231
|
-
}
|
|
1232
|
-
}, [solidFormViewData]);
|
|
1233
|
-
|
|
1234
|
-
let formik: FormikObject;
|
|
1235
|
-
|
|
1236
|
-
// If either the metadata or the data of this form is loading, then we simply render a loading screen...
|
|
1237
|
-
if (solidFormViewMetaDataIsLoading || solidFormViewDataIsLoading || !formViewLayout) {
|
|
1238
|
-
formik = useFormik({
|
|
1239
|
-
initialValues: {},
|
|
1240
|
-
validationSchema: Yup.object(),
|
|
1241
|
-
enableReinitialize: true,
|
|
1242
|
-
onSubmit: onFormikSubmit,
|
|
1243
|
-
});
|
|
1244
|
-
|
|
1245
|
-
return <SolidFormViewShimmerLoading />;
|
|
1246
|
-
}
|
|
1247
|
-
// At this point everything required to render the form is loaded, so we go ahead and start rendering things dynamically...
|
|
1248
|
-
else {
|
|
1249
|
-
|
|
1250
|
-
// Initialize formik...
|
|
1251
|
-
const solidView = solidFormViewMetaData.data.solidView;
|
|
1252
|
-
const solidFieldsMetadata = solidFormViewMetaData.data.solidFieldsMetadata;
|
|
1253
|
-
|
|
1254
|
-
const validationSchema = {};
|
|
1255
|
-
const initialValues = {};
|
|
1256
|
-
|
|
1257
|
-
for (let i = 0; i < layoutFields?.length; i++) {
|
|
1258
|
-
const formLayoutField = layoutFields[i];
|
|
1259
|
-
const fieldMetadata = solidFieldsMetadata[formLayoutField.attrs.name];
|
|
1260
|
-
const fieldContext: SolidFieldProps = {
|
|
1261
|
-
fieldMetadata: fieldMetadata,
|
|
1262
|
-
field: formLayoutField,
|
|
1263
|
-
data: initialEntityData,
|
|
1264
|
-
solidFormViewMetaData: solidFormViewMetaData,
|
|
1265
|
-
modelName: params.modelName
|
|
1266
|
-
}
|
|
1267
|
-
if (params.parentData) {
|
|
1268
|
-
fieldContext.parentData = params.parentData;
|
|
1269
|
-
}
|
|
1270
|
-
let solidField = fieldFactory(fieldMetadata?.type, fieldContext);
|
|
1271
|
-
if (!fieldMetadata?.type) {
|
|
1272
|
-
const errorMessage = formLayoutField?.attrs?.label ? formLayoutField?.attrs?.label : formLayoutField.attrs.name;
|
|
1273
|
-
if (!errorFields.includes(errorMessage)) {
|
|
1274
|
-
// errorFields.push(errorMessage);
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
if (solidField) {
|
|
1278
|
-
// @ts-ignore
|
|
1279
|
-
validationSchema[formLayoutField.attrs.name] = solidField.validationSchema();
|
|
1280
|
-
// @ts-ignore
|
|
1281
|
-
initialValues[formLayoutField.attrs.name] = solidField.initialValue();
|
|
1282
|
-
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
formik = useFormik({
|
|
1287
|
-
initialValues: initialValues,
|
|
1288
|
-
validationSchema: Yup.object(validationSchema),
|
|
1289
|
-
enableReinitialize: true,
|
|
1290
|
-
onSubmit: onFormikSubmit,
|
|
1291
|
-
});
|
|
1292
|
-
|
|
1293
|
-
const formFieldOnXXX = async (event: ChangeEvent<HTMLInputElement>, eventType: string) => {
|
|
1294
|
-
|
|
1295
|
-
// Invoke the formik change
|
|
1296
|
-
if (eventType === 'onFieldChange') {
|
|
1297
|
-
formik.handleChange(event);
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
// get details from the form event
|
|
1301
|
-
const { name: fieldName, value, type, checked } = event.target;
|
|
1302
|
-
|
|
1303
|
-
// TODO: check if there is a change handler registered with this form view, load it and fire it.
|
|
1304
|
-
let changeHandler = solidView.layout.attrs[eventType];
|
|
1305
|
-
if (!changeHandler) {
|
|
1306
|
-
changeHandler = solidView.layout[eventType];
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
if (changeHandler) {
|
|
1310
|
-
// Get hold of the dynamic module...
|
|
1311
|
-
// const dynamicChangeHandler = await loadDynamicModule(changeHandler);
|
|
1312
|
-
const dynamicChangeHandler = getExtensionFunction(changeHandler);
|
|
1313
|
-
|
|
1314
|
-
// Invoke the dynamic module...
|
|
1315
|
-
if (dynamicChangeHandler) {
|
|
1316
|
-
const event: SolidUiEvent = {
|
|
1317
|
-
fieldsMetadata: solidFieldsMetadata,
|
|
1318
|
-
formData: formik.values,
|
|
1319
|
-
modifiedField: fieldName,
|
|
1320
|
-
modifiedFieldValue: value,
|
|
1321
|
-
// @ts-ignore
|
|
1322
|
-
// TODO: HP & OR: This will be fixed once we figure out how to get types exported from core-ui
|
|
1323
|
-
type: eventType,
|
|
1324
|
-
viewMetadata: solidView,
|
|
1325
|
-
formViewLayout: formViewLayout,
|
|
1326
|
-
queryParams: {
|
|
1327
|
-
actionName,
|
|
1328
|
-
actionContext,
|
|
1329
|
-
actionType
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
// Invoke the dynamic change handler:
|
|
1334
|
-
// TODO: encapsulate in try/catch, catch the exception render in the UI as an error & stop form rendering.
|
|
1335
|
-
const updatedFormInfo: SolidUiEventResponse = await dynamicChangeHandler(event);
|
|
1336
|
-
|
|
1337
|
-
// If dataChanged is true, update Formik values
|
|
1338
|
-
if (updatedFormInfo?.dataChanged && updatedFormInfo.newFormData) {
|
|
1339
|
-
// This does one field at a time.
|
|
1340
|
-
// TODO: does the below fire change events again?
|
|
1341
|
-
Object.entries(updatedFormInfo.newFormData).forEach(([key, newValue]) => {
|
|
1342
|
-
formik.setFieldValue(key, newValue);
|
|
1343
|
-
});
|
|
1344
|
-
|
|
1345
|
-
// This does all at once.
|
|
1346
|
-
// formik.setValues({
|
|
1347
|
-
// ...formik.values,
|
|
1348
|
-
// ...updatedFormInfo.newFormData
|
|
1349
|
-
// });
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
// if layout has changed then we need to re-render.
|
|
1353
|
-
if (updatedFormInfo?.layoutChanged && updatedFormInfo.newLayout) {
|
|
1354
|
-
// setFormViewMetaData({ ...formViewMetaData, layout: updatedFormInfo.newLayout });
|
|
1355
|
-
|
|
1356
|
-
// TODO: this will trigger a useEffect dependent on formViewMetadata that invokes setFormViewLayout,
|
|
1357
|
-
// TODO: which means that this will not work if custom layout has been injected as a prop.
|
|
1358
|
-
setFormViewLayout(updatedFormInfo.newLayout);
|
|
1359
|
-
// setFormViewMetaData((prevMetaData: any) => {
|
|
1360
|
-
// const updatedFormViewMetadata = {
|
|
1361
|
-
// ...prevMetaData,
|
|
1362
|
-
// data: {
|
|
1363
|
-
// ...prevMetaData.data,
|
|
1364
|
-
// solidView: {
|
|
1365
|
-
// ...prevMetaData.data.solidView,
|
|
1366
|
-
// layout: updatedFormInfo.newLayout,
|
|
1367
|
-
// },
|
|
1368
|
-
// },
|
|
1369
|
-
// };
|
|
1370
|
-
// return updatedFormViewMetadata;
|
|
1371
|
-
// });
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
else {
|
|
1375
|
-
// TODO: Show an error popup and stop form rendering ideallly...
|
|
1376
|
-
console.log(ERROR_MESSAGES.UNABLE_LOAD_DYNAMIC_MODULE, changeHandler);
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
|
-
// Now render the form dynamically...
|
|
1382
|
-
const renderFormElementDynamically: any = (element: any, recursiveFVMD: any) => {
|
|
1383
|
-
let { type, attrs, body, children } = element;
|
|
1384
|
-
|
|
1385
|
-
// const key = attrs?.name ?? generateRandomKey();
|
|
1386
|
-
const key = attrs?.label;
|
|
1387
|
-
let visible = attrs?.visible;
|
|
1388
|
-
if (visible === undefined || visible === null) {
|
|
1389
|
-
visible = true;
|
|
1390
|
-
}
|
|
1391
|
-
// console.log(`Resolved visibility of form element ${ key } to ${ visible } `);
|
|
1392
|
-
// console.log(`Form element ${ key }: `, attrs);
|
|
1393
|
-
const visibleToRole = attrs?.roles || [];
|
|
1394
|
-
|
|
1395
|
-
if (visibleToRole.length > 0) {
|
|
1396
|
-
if (!hasAnyRole(user?.roles, visibleToRole)) {
|
|
1397
|
-
return <></>
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
switch (type) {
|
|
1402
|
-
case "form":
|
|
1403
|
-
if (!children)
|
|
1404
|
-
children = [];
|
|
1405
|
-
return <div key={key}>{children.map((element: any) => renderFormElementDynamically(element, recursiveFVMD, formik))}</div>;
|
|
1406
|
-
case "div":
|
|
1407
|
-
if (!children)
|
|
1408
|
-
children = [];
|
|
1409
|
-
return <div key={key} {...attrs}>{children.map((element: any) => renderFormElementDynamically(element, recursiveFVMD, formik))}</div>
|
|
1410
|
-
case "span":
|
|
1411
|
-
return <span key={key} {...attrs}>{body}</span>
|
|
1412
|
-
case "p":
|
|
1413
|
-
return <p key={key} className={attrs?.className} {...attrs}>{body}</p>
|
|
1414
|
-
case "h1":
|
|
1415
|
-
return <h1 key={key} {...attrs}>{body}</h1>
|
|
1416
|
-
case "h2":
|
|
1417
|
-
return <h2 key={key} {...attrs}>{body}</h2>
|
|
1418
|
-
case "ul":
|
|
1419
|
-
if (!children)
|
|
1420
|
-
children = [];
|
|
1421
|
-
return <ul key={key} {...attrs}>{children.map((element: any) => renderFormElementDynamically(element, recursiveFVMD, formik))}</ul>
|
|
1422
|
-
case "li":
|
|
1423
|
-
return <li key={key} {...attrs}>{body}</li>
|
|
1424
|
-
case "sheet":
|
|
1425
|
-
return <SolidSheet key={key}>{children.map((element: any) => renderFormElementDynamically(element, recursiveFVMD, formik))}</SolidSheet>;
|
|
1426
|
-
case "group":
|
|
1427
|
-
if (visible === true) {
|
|
1428
|
-
return <SolidGroup key={key} attrs={attrs}>{children.map((element: any) => renderFormElementDynamically(element, recursiveFVMD, formik))}</SolidGroup>;
|
|
1429
|
-
}
|
|
1430
|
-
break;
|
|
1431
|
-
case "row":
|
|
1432
|
-
if (visible === true) {
|
|
1433
|
-
return <SolidRow key={key} attrs={attrs}>{children.map((element: any) => renderFormElementDynamically(element, recursiveFVMD, formik))}</SolidRow>;
|
|
1434
|
-
}
|
|
1435
|
-
break;
|
|
1436
|
-
case "column":
|
|
1437
|
-
if (visible === true) {
|
|
1438
|
-
return <SolidColumn key={key} attrs={attrs}>{children.map((element: any) => renderFormElementDynamically(element, recursiveFVMD, formik))}</SolidColumn>;
|
|
1439
|
-
}
|
|
1440
|
-
break;
|
|
1441
|
-
case "field":
|
|
1442
|
-
if (visible === true) {
|
|
1443
|
-
|
|
1444
|
-
// const fieldMetadata = solidFieldsMetadata[attrs.name];
|
|
1445
|
-
const fieldMetadata = recursiveFVMD.data.solidFieldsMetadata[attrs.name];
|
|
1446
|
-
// Read only permission if there is no update permission on model and router doesnt contains new
|
|
1447
|
-
const readOnlyPermission = !actionsAllowed.includes(`${permissionExpression(params.modelName, 'update')}`) && params.id !== "new";
|
|
1448
|
-
return <SolidField
|
|
1449
|
-
key={attrs.name}
|
|
1450
|
-
field={element}
|
|
1451
|
-
formik={formik}
|
|
1452
|
-
fieldMetadata={fieldMetadata}
|
|
1453
|
-
initialEntityData={solidFormViewData ? solidFormViewData.data : {}}
|
|
1454
|
-
solidFormViewMetaData={recursiveFVMD}
|
|
1455
|
-
modelName={params.modelName}
|
|
1456
|
-
readOnly={readOnlyPermission}
|
|
1457
|
-
viewMode={viewMode}
|
|
1458
|
-
onChange={formFieldOnXXX}
|
|
1459
|
-
onBlur={formFieldOnXXX}
|
|
1460
|
-
setLightboxUrls={setLightboxUrls}
|
|
1461
|
-
setOpenLightbox={setOpenLightbox}
|
|
1462
|
-
parentFieldName={params.parentFieldName}
|
|
1463
|
-
parentData={params.parentData}
|
|
1464
|
-
onEmbeddedFormSave={() => setRefreshChatterMessage(true)}
|
|
1465
|
-
/>;
|
|
1466
|
-
}
|
|
1467
|
-
break;
|
|
1468
|
-
|
|
1469
|
-
case "notebook":
|
|
1470
|
-
if (visible === true) {
|
|
1471
|
-
return <SolidNotebook key={key} activeTab={searchParams.get("activeTab") || ""} embeded={params.embeded}>{children.map((element: any) => renderFormElementDynamically(element, recursiveFVMD, formik))}</SolidNotebook>;
|
|
1472
|
-
}
|
|
1473
|
-
break;
|
|
1474
|
-
case "page":
|
|
1475
|
-
if (visible === true) {
|
|
1476
|
-
const fields = children.flatMap((child: any) => getLayoutFields(child));
|
|
1477
|
-
const pageChildren = children.map((element: any) => renderFormElementDynamically(element, recursiveFVMD));
|
|
1478
|
-
return SolidPage({ children: pageChildren, attrs: attrs, key: key, formik: formik, fields });
|
|
1479
|
-
}
|
|
1480
|
-
break;
|
|
1481
|
-
case "custom":
|
|
1482
|
-
if (visible === true) {
|
|
1483
|
-
const widgetName = attrs?.widget;
|
|
1484
|
-
const fieldMetadata = recursiveFVMD.data.solidFieldsMetadata[attrs.name];
|
|
1485
|
-
|
|
1486
|
-
if (widgetName) {
|
|
1487
|
-
// widgetName, formik, field, fieldMetadata, solidFormViewMetaData
|
|
1488
|
-
return <SolidDynamicWidget
|
|
1489
|
-
key={key}
|
|
1490
|
-
widgetName={widgetName}
|
|
1491
|
-
field={element}
|
|
1492
|
-
formik={formik}
|
|
1493
|
-
fieldMetadata={fieldMetadata}
|
|
1494
|
-
solidFormViewMetaData={recursiveFVMD}
|
|
1495
|
-
solidFormViewData={solidFormViewData}
|
|
1496
|
-
/>
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
break;
|
|
1500
|
-
|
|
1501
|
-
default:
|
|
1502
|
-
return null;
|
|
1503
|
-
}
|
|
1504
|
-
};
|
|
1505
|
-
|
|
1506
|
-
const renderFormDynamically = (recursiveFVMD: any, formViewLayout: any) => {
|
|
1507
|
-
if (!recursiveFVMD) {
|
|
1508
|
-
return;
|
|
1509
|
-
}
|
|
1510
|
-
if (!recursiveFVMD.data) {
|
|
1511
|
-
return;
|
|
1512
|
-
}
|
|
1513
|
-
const solidView = recursiveFVMD.data.solidView;
|
|
1514
|
-
const solidFieldsMetadata = recursiveFVMD.data.solidFieldsMetadata;
|
|
1515
|
-
if (!solidView || !solidFieldsMetadata) {
|
|
1516
|
-
return;
|
|
1517
|
-
}
|
|
1518
|
-
const updatedLayout = [formViewLayout];
|
|
1519
|
-
const dynamicForm = updatedLayout.map((element: any) => renderFormElementDynamically(element, recursiveFVMD));
|
|
1520
|
-
|
|
1521
|
-
return dynamicForm;
|
|
1522
|
-
};
|
|
1523
|
-
|
|
1524
|
-
const handleDeleteEntity = async () => {
|
|
1525
|
-
deleteEntity(solidFormViewData.data.id);
|
|
1526
|
-
setDeleteDialogVisible(false);
|
|
1527
|
-
if (params.embeded == true) {
|
|
1528
|
-
setRedirectToList(false)
|
|
1529
|
-
|
|
1530
|
-
} else {
|
|
1531
|
-
setRedirectToList(true)
|
|
1532
|
-
|
|
1533
|
-
}
|
|
1534
|
-
// router.back();
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
const onDeleteClose = () => {
|
|
1538
|
-
setDeleteDialogVisible(false);
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
const dynamicHeader = solidView.layout?.header;
|
|
1542
|
-
let DynamicHeaderComponent = null;
|
|
1543
|
-
if (dynamicHeader) {
|
|
1544
|
-
DynamicHeaderComponent = getExtensionComponent(dynamicHeader);
|
|
1545
|
-
}
|
|
1546
|
-
const customFormComponentEdit = solidView.layout.attrs.customFormComponentEdit;
|
|
1547
|
-
const customFormComponentNew = solidView.layout.attrs.customFormComponentNew;
|
|
1548
|
-
let DynamicFormComponentEdit = null;
|
|
1549
|
-
let DynamicFormComponentNew = null;
|
|
1550
|
-
if (customFormComponentEdit) {
|
|
1551
|
-
DynamicFormComponentEdit = getExtensionComponent(customFormComponentEdit);
|
|
1552
|
-
}
|
|
1553
|
-
if (customFormComponentNew) {
|
|
1554
|
-
DynamicFormComponentNew = getExtensionComponent(customFormComponentNew);
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
const handleChatterExpandClick = (option?: string) => {
|
|
1558
|
-
setShowChatter(true);
|
|
1559
|
-
if (option === 'info') {
|
|
1560
|
-
setDefaultTabViewOptionIndex(0);
|
|
1561
|
-
} else if (option === 'chatter') {
|
|
1562
|
-
setDefaultTabViewOptionIndex(1);
|
|
1563
|
-
setRefreshChatterMessage(true);
|
|
1564
|
-
} else {
|
|
1565
|
-
setDefaultTabViewOptionIndex(2);
|
|
1566
|
-
}
|
|
1567
|
-
};
|
|
1568
|
-
|
|
1569
|
-
//en 4 null
|
|
1570
|
-
const handleLocaleChangeRedirect = (
|
|
1571
|
-
locale: string,
|
|
1572
|
-
defaultEntityLocaleId: string,
|
|
1573
|
-
viewMode: string,
|
|
1574
|
-
) => {
|
|
1575
|
-
let newViewMode = viewMode;
|
|
1576
|
-
const defaultApplicableLocales = solidFormViewMetaData?.data?.applicableLocales || [];
|
|
1577
|
-
//fr 4
|
|
1578
|
-
const matchingLocale = defaultApplicableLocales.find(
|
|
1579
|
-
(loc: any) =>
|
|
1580
|
-
loc.defaultEntityLocaleId &&
|
|
1581
|
-
loc.entityId &&
|
|
1582
|
-
loc.locale === locale
|
|
1583
|
-
);
|
|
1584
|
-
// Extract the base path from the current pathname, removing query params if any
|
|
1585
|
-
const basePath = pathname.split('?')[0];
|
|
1586
|
-
|
|
1587
|
-
// Determine entity part of the path (new or existing entityId)
|
|
1588
|
-
const entityPart = matchingLocale?.entityId ?? 'new';
|
|
1589
|
-
if (entityPart === 'new' && viewMode === 'view') {
|
|
1590
|
-
newViewMode = 'edit'
|
|
1591
|
-
} else if (entityPart !== 'new' && viewMode === 'view') {
|
|
1592
|
-
newViewMode = 'view'
|
|
1593
|
-
} else {
|
|
1594
|
-
newViewMode = 'edit'
|
|
1595
|
-
}
|
|
1596
|
-
// Construct new pathname using existing basePath and replacing entity segment
|
|
1597
|
-
const updatedPath = basePath.replace(/\/form\/[^/]+/, `/form/${entityPart}`);
|
|
1598
|
-
|
|
1599
|
-
const queryParams = new URLSearchParams({
|
|
1600
|
-
viewMode: newViewMode,
|
|
1601
|
-
locale,
|
|
1602
|
-
defaultEntityLocaleId,
|
|
1603
|
-
});
|
|
1604
|
-
|
|
1605
|
-
router.push(`${updatedPath}?${queryParams.toString()}`);
|
|
1606
|
-
};
|
|
1607
|
-
|
|
1608
|
-
const handleConfirmAccept = () => {
|
|
1609
|
-
confirmResolveRef.current?.(true);
|
|
1610
|
-
setConfirmVisible(false);
|
|
1611
|
-
};
|
|
1612
|
-
|
|
1613
|
-
const handleConfirmReject = () => {
|
|
1614
|
-
confirmResolveRef.current?.(false);
|
|
1615
|
-
setConfirmVisible(false);
|
|
1616
|
-
};
|
|
1617
|
-
const handleDraftPublishWorkFlow = async (type: "publish" | "unpublish") => {
|
|
1618
|
-
const userChoice = await confirmDialogWithPromise();
|
|
1619
|
-
if (!userChoice) return;
|
|
1620
|
-
|
|
1621
|
-
// const finalPublishedValue =
|
|
1622
|
-
// type === "publish" ? new Date().toISOString() : "";
|
|
1623
|
-
|
|
1624
|
-
// setPublished(finalPublishedValue);
|
|
1625
|
-
|
|
1626
|
-
// const formdata = new FormData();
|
|
1627
|
-
// formdata.append("publishedAt", finalPublishedValue);
|
|
1628
|
-
|
|
1629
|
-
let result;
|
|
1630
|
-
|
|
1631
|
-
if (type === "publish") {
|
|
1632
|
-
result = await publishSolidEntity(params.id).unwrap();
|
|
1633
|
-
showToast(toast, "success", ERROR_MESSAGES.SAVED, ERROR_MESSAGES.MARK_PUBLISH);
|
|
1634
|
-
} else {
|
|
1635
|
-
result = await unpublishSolidEntity(params.id).unwrap();
|
|
1636
|
-
showToast(toast, "success", ERROR_MESSAGES.SAVED, ERROR_MESSAGES.MARK_UNPUBLISH);
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
console.log("publish/unpublish result", result);
|
|
1640
|
-
|
|
1641
|
-
// Set updated publish value from API response
|
|
1642
|
-
setPublished(result?.data?.publishedAt);
|
|
1643
|
-
};
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
const isVideoOrAudio = (url: string) => {
|
|
1647
|
-
// Remove query params if present
|
|
1648
|
-
const cleanUrl = url.split("?")[0];
|
|
1649
|
-
const ext = cleanUrl.split(".").pop()?.toLowerCase();
|
|
1650
|
-
|
|
1651
|
-
// Combined list of supported media extensions
|
|
1652
|
-
const mediaExt = ["mp4", "webm", "ogg", "mov", "mp3", "wav", "m4a", "aac"];
|
|
1653
|
-
|
|
1654
|
-
return ext ? mediaExt.includes(ext) : false;
|
|
1655
|
-
};
|
|
1656
|
-
|
|
1657
|
-
const controlsList = ["nodownload", "nofullscreen", "noremoteplayback"];
|
|
1658
|
-
const slides = lightboxUrls.map((item: any) => {
|
|
1659
|
-
const url = item.src || item.downloadUrl || "";
|
|
1660
|
-
if (isVideoOrAudio(url)) {
|
|
1661
|
-
return {
|
|
1662
|
-
type: "video" as const,
|
|
1663
|
-
sources: [{ src: url, type: "video/mp4", }],
|
|
1664
|
-
};
|
|
1665
|
-
}
|
|
1666
|
-
return { src: url };
|
|
1667
|
-
});
|
|
1668
|
-
|
|
1669
|
-
const hasMedia = slides.some((s) => s.type === "video");
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
return (
|
|
1674
|
-
<div className="solid-form-wrapper">
|
|
1675
|
-
<Toast ref={toast} />
|
|
1676
|
-
<div className="solid-form-section" style={{ borderRight: params.embeded !== true ? '1px solid var(--primary-light-color)' : '' }} >
|
|
1677
|
-
<form style={{ width: '100%' }} onSubmit={formik.handleSubmit}>
|
|
1678
|
-
<SolidFormActionHeader
|
|
1679
|
-
formik={formik}
|
|
1680
|
-
formData={solidFormViewData?.data}
|
|
1681
|
-
params={params}
|
|
1682
|
-
actionsAllowed={actionsAllowed}
|
|
1683
|
-
formViewLayout={formViewLayout}
|
|
1684
|
-
solidView={solidView}
|
|
1685
|
-
solidFormViewMetaData={solidFormViewMetaData}
|
|
1686
|
-
initialEntityData={solidFormViewData ? solidFormViewData.data : {}}
|
|
1687
|
-
setDeleteDialogVisible={setDeleteDialogVisible}
|
|
1688
|
-
setLayoutDialogVisible={setLayoutDialogVisible}
|
|
1689
|
-
setRedirectToList={setRedirectToList}
|
|
1690
|
-
viewMode={viewMode}
|
|
1691
|
-
setViewMode={setViewMode}
|
|
1692
|
-
solidWorkflowFieldValue={solidWorkflowFieldValue}
|
|
1693
|
-
setSolidWorkflowFieldValue={setSolidWorkflowFieldValue}
|
|
1694
|
-
draftEnabled={solidFormViewMetaData?.data?.solidView?.model?.draftPublishWorkflow}
|
|
1695
|
-
publish={published}
|
|
1696
|
-
internationalisationEnabled={solidFormViewMetaData?.data?.solidView?.model?.internationalisation}
|
|
1697
|
-
handleDraftPublishWorkFlow={handleDraftPublishWorkFlow}
|
|
1698
|
-
onStepperUpdate={() => setRefreshChatterMessage(true)}
|
|
1699
|
-
isSubmitting={isSubmitting}
|
|
1700
|
-
/>
|
|
1701
|
-
<div className={`px-4 py-3 md:p-4 solid-form-content ${params.embeded === true ? 'h-auto' : ''}`} style={{ maxHeight: params.embeded === true ? '80vh' : '', overflowY: 'auto' }}>
|
|
1702
|
-
{DynamicHeaderComponent && <DynamicHeaderComponent />}
|
|
1703
|
-
{params.id === 'new' && DynamicFormComponentNew ? (
|
|
1704
|
-
<DynamicFormComponentNew params={params} />
|
|
1705
|
-
) : params.id !== 'new' && DynamicFormComponentEdit ? (
|
|
1706
|
-
<DynamicFormComponentEdit params={params} />
|
|
1707
|
-
) : (
|
|
1708
|
-
renderFormDynamically(formViewMetaData, formViewLayout)
|
|
1709
|
-
)}
|
|
1710
|
-
</div>
|
|
1711
|
-
|
|
1712
|
-
</form>
|
|
1713
|
-
<SolidFormFooter params={params}></SolidFormFooter>
|
|
1714
|
-
</div>
|
|
1715
|
-
{params.embeded !== true &&
|
|
1716
|
-
<div className={`chatter-section ${isShowChatter === false ? 'collapsed' : 'open'}`} style={{ width: chatterLocaleWidth }}>
|
|
1717
|
-
{isShowChatter && (
|
|
1718
|
-
<div
|
|
1719
|
-
style={{
|
|
1720
|
-
width: 5,
|
|
1721
|
-
cursor: 'col-resize',
|
|
1722
|
-
position: 'absolute',
|
|
1723
|
-
left: 0,
|
|
1724
|
-
top: 0,
|
|
1725
|
-
bottom: 0,
|
|
1726
|
-
zIndex: 9,
|
|
1727
|
-
}}
|
|
1728
|
-
onMouseDown={() => setIsResizingChatterLocale(true)}
|
|
1729
|
-
/>
|
|
1730
|
-
)}
|
|
1731
|
-
{isShowChatter === true &&
|
|
1732
|
-
<Button
|
|
1733
|
-
icon="pi pi-angle-double-right"
|
|
1734
|
-
size="small"
|
|
1735
|
-
text
|
|
1736
|
-
className="chatter-collapse-btn"
|
|
1737
|
-
style={{ width: 30, height: 30, aspectRatio: '1/1' }}
|
|
1738
|
-
onClick={() => setShowChatter(false)}
|
|
1739
|
-
/>
|
|
1740
|
-
}
|
|
1741
|
-
{isShowChatter === false ?
|
|
1742
|
-
<div className="flex flex-column gap-2 justify-content-center p-2">
|
|
1743
|
-
{/*if solidview Internationalisation is enabled then show the locale tab */}
|
|
1744
|
-
{solidFormViewMetaData?.data?.solidView?.model?.draftPublishWorkflow &&
|
|
1745
|
-
<div className="chatter-collapsed-content" onClick={() => handleChatterExpandClick('info')}>
|
|
1746
|
-
Info
|
|
1747
|
-
</div>}
|
|
1748
|
-
<div className="chatter-collapsed-content" onClick={() => handleChatterExpandClick('chatter')}>
|
|
1749
|
-
Audit Trail
|
|
1750
|
-
</div>
|
|
1751
|
-
{
|
|
1752
|
-
mcpUrl &&
|
|
1753
|
-
(
|
|
1754
|
-
<div className="chatter-collapsed-content" onClick={() => handleChatterExpandClick('solidx-ai')}>
|
|
1755
|
-
<div className="flex gap-2"> <SolidXAIIcon /> SolidX AI </div>
|
|
1756
|
-
</div>
|
|
1757
|
-
)
|
|
1758
|
-
}
|
|
1759
|
-
<Button
|
|
1760
|
-
icon="pi pi-chevron-left"
|
|
1761
|
-
size="small"
|
|
1762
|
-
className="px-0"
|
|
1763
|
-
style={{ width: 30 }}
|
|
1764
|
-
onClick={() => handleChatterExpandClick('default')}
|
|
1765
|
-
/>
|
|
1766
|
-
</div>
|
|
1767
|
-
:
|
|
1768
|
-
<SolidChatterLocaleTabView
|
|
1769
|
-
createMode={createMode}
|
|
1770
|
-
setSelectedLocale={setSelectedLocale}
|
|
1771
|
-
selectedLocale={selectedLocale}
|
|
1772
|
-
solidFormViewMetaData={solidFormViewMetaData}
|
|
1773
|
-
id={params.id}
|
|
1774
|
-
refreshChatterMessage={refreshChatterMessage}
|
|
1775
|
-
setRefreshChatterMessage={setRefreshChatterMessage}
|
|
1776
|
-
activeTab={defaultTabViewOptionIndex}
|
|
1777
|
-
viewMode={viewMode}
|
|
1778
|
-
defaultEntityLocaleId={defaultEntityLocaleId}
|
|
1779
|
-
handleLocaleChangeRedirect={handleLocaleChangeRedirect}
|
|
1780
|
-
solidFormViewData={solidFormViewData}
|
|
1781
|
-
published={published}
|
|
1782
|
-
actionsAllowed={actionsAllowed}
|
|
1783
|
-
mcpUrl={mcpUrl}
|
|
1784
|
-
/>
|
|
1785
|
-
}
|
|
1786
|
-
</div>
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
<Dialog
|
|
1790
|
-
visible={isDeleteDialogVisible}
|
|
1791
|
-
header="Confirm Delete"
|
|
1792
|
-
className="solid-confirm-dialog"
|
|
1793
|
-
modal
|
|
1794
|
-
footer={() => (
|
|
1795
|
-
<div className="flex justify-content-center">
|
|
1796
|
-
<Button label="Yes" icon="pi pi-check" className='small-button' severity="danger" autoFocus onClick={() => handleDeleteEntity()} />
|
|
1797
|
-
<Button label="No" icon="pi pi-times" className='small-button' onClick={onDeleteClose} />
|
|
1798
|
-
</div>
|
|
1799
|
-
)}
|
|
1800
|
-
onHide={() => setDeleteDialogVisible(false)}
|
|
1801
|
-
>
|
|
1802
|
-
<p>Are you sure you want to delete?</p>
|
|
1803
|
-
</Dialog>
|
|
1804
|
-
<Dialog
|
|
1805
|
-
visible={isLayoutDialogVisible}
|
|
1806
|
-
header="Change Form Layout"
|
|
1807
|
-
modal
|
|
1808
|
-
onHide={() => setLayoutDialogVisible(false)}
|
|
1809
|
-
style={{ width: '50vw' }}
|
|
1810
|
-
breakpoints={{
|
|
1811
|
-
'960px': '80vw',
|
|
1812
|
-
'641px': '95vw'
|
|
1813
|
-
}}
|
|
1814
|
-
contentClassName="p-3 pt-0 lg:p-4"
|
|
1815
|
-
>
|
|
1816
|
-
<SolidFormUserViewLayout solidFormViewMetaData={solidFormViewMetaData} setLayoutDialogVisible={setLayoutDialogVisible} />
|
|
1817
|
-
</Dialog>
|
|
1818
|
-
{openLightbox &&
|
|
1819
|
-
<Lightbox
|
|
1820
|
-
open={openLightbox}
|
|
1821
|
-
plugins={
|
|
1822
|
-
hasMedia
|
|
1823
|
-
? [Counter, Download, Video] // add Video plugin if needed
|
|
1824
|
-
: [Counter, Download]
|
|
1825
|
-
}
|
|
1826
|
-
close={() => setOpenLightbox(false)}
|
|
1827
|
-
slides={[...slides]}
|
|
1828
|
-
{...(hasMedia && {
|
|
1829
|
-
video: {
|
|
1830
|
-
controls: true,
|
|
1831
|
-
playsInline: true,
|
|
1832
|
-
autoPlay: false,
|
|
1833
|
-
loop: false,
|
|
1834
|
-
muted: false,
|
|
1835
|
-
disablePictureInPicture: false,
|
|
1836
|
-
disableRemotePlayback: false,
|
|
1837
|
-
controlsList: controlsList.join(" "),
|
|
1838
|
-
crossOrigin: "anonymous",
|
|
1839
|
-
preload: "auto",
|
|
1840
|
-
},
|
|
1841
|
-
})}
|
|
1842
|
-
/>
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
<ConfirmDialog
|
|
1846
|
-
visible={confirmVisible}
|
|
1847
|
-
onHide={() => setConfirmVisible(false)}
|
|
1848
|
-
header="Confirmation"
|
|
1849
|
-
acceptLabel="Yes, confrim"
|
|
1850
|
-
rejectLabel="No, cancel"
|
|
1851
|
-
acceptClassName="p-button-danger"
|
|
1852
|
-
rejectClassName="p-button-text"
|
|
1853
|
-
position="center"
|
|
1854
|
-
accept={handleConfirmAccept}
|
|
1855
|
-
reject={handleConfirmReject}
|
|
1856
|
-
message={
|
|
1857
|
-
<div className="flex flex-col items-center justify-center text-center space-y-3">
|
|
1858
|
-
<p className="text-gray-800 text-base">
|
|
1859
|
-
Are you sure you want to {published !== null ? 'unpublish' : 'publish'}?
|
|
1860
|
-
</p>
|
|
1861
|
-
</div>
|
|
1862
|
-
}
|
|
1863
|
-
/>
|
|
1864
|
-
</div>
|
|
1865
|
-
);
|
|
1866
|
-
}
|
|
1867
|
-
};
|
|
1868
|
-
|
|
1869
|
-
export default SolidFormView;
|