@solidstarters/solid-core-ui 1.1.74 → 1.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/FileReaderExt.js +1 -0
- package/dist/components/common/FileReaderExt.js.map +1 -1
- package/dist/components/common/GeneralSettings.js +1 -1
- package/dist/components/common/SolidAdmin.d.ts.map +1 -1
- package/dist/components/common/SolidAdmin.js +1 -0
- package/dist/components/common/SolidAdmin.js.map +1 -1
- package/dist/components/common/SolidThemeLink.d.ts.map +1 -1
- package/dist/components/common/SolidThemeLink.js +1 -0
- package/dist/components/common/SolidThemeLink.js.map +1 -1
- package/dist/components/core/chatter/SolidChatter.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatterDateDivider.js +1 -0
- package/dist/components/core/chatter/SolidChatterDateDivider.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterHeader.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatterHeader.js +4 -3
- package/dist/components/core/chatter/SolidChatterHeader.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterMessageBox.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatterMessageBox.js +7 -6
- package/dist/components/core/chatter/SolidChatterMessageBox.js.map +1 -1
- package/dist/components/core/common/SolidSaveCustomFilterForm.d.ts.map +1 -1
- package/dist/components/core/common/SolidSaveCustomFilterForm.js +1 -0
- package/dist/components/core/common/SolidSaveCustomFilterForm.js.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.js +1 -0
- package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
- package/dist/components/core/form/SolidFormView.d.ts +1 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.d.ts +1 -0
- package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +1 -1
- package/dist/components/core/form/fields/solidFields.module.css +7 -0
- package/dist/components/core/list/columns/SolidDateColumn.js +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.js +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidExternalIdColumn.js +1 -1
- package/dist/components/core/list/columns/SolidExternalIdColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIdColumn.js +1 -1
- package/dist/components/core/list/columns/SolidIdColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIntColumn.js +1 -1
- package/dist/components/core/list/columns/SolidIntColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.js +2 -1
- package/dist/components/core/list/columns/SolidRelationColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js +1 -1
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js +1 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidTimeColumn.js +1 -1
- package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidUuidColumn.js +1 -1
- package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
- package/dist/components/core/list/widgets/SolidRelationAvatarWidget.d.ts.map +1 -1
- package/dist/components/core/list/widgets/SolidRelationAvatarWidget.js +14 -13
- package/dist/components/core/list/widgets/SolidRelationAvatarWidget.js.map +1 -1
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.d.ts.map +1 -1
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.js +13 -12
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.js.map +1 -1
- package/dist/components/core/module/CreateModule.d.ts.map +1 -1
- package/dist/components/core/module/CreateModule.js +0 -2
- package/dist/components/core/module/CreateModule.js.map +1 -1
- package/dist/declarations.d.ts +4 -1
- package/dist/helpers/registry.js +2 -1
- package/dist/helpers/registry.js.map +1 -1
- package/dist/types/solid-core.d.ts +10 -7
- package/package.json +1 -1
- package/src/components/core/form/fields/solidFields.module.css +7 -0
- package/src/declarations.d.ts +4 -1
- package/src/types/solid-core.d.ts +10 -7
- package/tsconfig.json +2 -1
- package/dist/components/CustomFooter/CustomFooter.tsx +0 -264
- package/dist/components/CustomFooter/FooterForm.tsx +0 -19
- package/dist/components/CustomHeader/CallIcon.tsx +0 -20
- package/dist/components/CustomHeader/CustomDropdown.tsx +0 -175
- package/dist/components/CustomHeader/CustomHeader.tsx +0 -64
- package/dist/components/CustomHeader/EmailIcon.tsx +0 -12
- package/dist/components/CustomHeader/HeaderCart.tsx +0 -15
- package/dist/components/CustomHeader/productNavData.tsx +0 -180
- package/dist/components/FormView/DetailsViews.tsx +0 -46
- package/dist/components/FormView/OrderAddressDetails.tsx +0 -70
- package/dist/components/FormView/OrderPaymentDetails.tsx +0 -18
- package/dist/components/FormView/OrderTableDetails.tsx +0 -36
- package/dist/components/FormView/OrderedProductDetail.tsx +0 -22
- package/dist/components/Svg/ExcelSvg.tsx +0 -15
- package/dist/components/Svg/FileSvg.tsx +0 -19
- package/dist/components/Svg/PDFSvg.tsx +0 -15
- package/dist/components/Svg/RightArrowSvg.tsx +0 -9
- package/dist/components/Tag/CustomTag.tsx +0 -50
- package/dist/components/auth/AuthLayout.tsx +0 -140
- package/dist/components/auth/ForgotPasswordThankYou.tsx +0 -48
- package/dist/components/auth/GoogleAuthChecking.tsx +0 -60
- package/dist/components/auth/Login.tsx +0 -155
- package/dist/components/auth/Register.tsx +0 -239
- package/dist/components/auth/SolidChangeForcePassword.tsx +0 -145
- package/dist/components/auth/SolidForgotPassword.tsx +0 -125
- package/dist/components/auth/SolidInitialLoginOtp.tsx +0 -152
- package/dist/components/auth/SolidInitiateRegisterOtp.tsx +0 -141
- package/dist/components/auth/SolidLogin.tsx +0 -275
- package/dist/components/auth/SolidOTPVerify.tsx +0 -132
- package/dist/components/auth/SolidRegister.tsx +0 -348
- package/dist/components/auth/SolidResetPassword.tsx +0 -162
- package/dist/components/common/AuthBanner.tsx +0 -41
- package/dist/components/common/AutoCompleteField.tsx +0 -76
- package/dist/components/common/BackButton.tsx +0 -27
- package/dist/components/common/CancelButton.tsx +0 -48
- package/dist/components/common/CodeEditor.tsx +0 -26
- package/dist/components/common/CreateButton.tsx +0 -17
- package/dist/components/common/DropzonePlaceholder.tsx +0 -31
- package/dist/components/common/DropzoneUpload.tsx +0 -11
- package/dist/components/common/FileReaderExt.tsx +0 -20
- package/dist/components/common/GeneralSettings.tsx +0 -414
- package/dist/components/common/HeaderDynamicTitles.tsx +0 -13
- package/dist/components/common/MarkdownViewer.tsx +0 -16
- package/dist/components/common/MultipleSelectAutoCompleteField.tsx +0 -62
- package/dist/components/common/NotFound.tsx +0 -22
- package/dist/components/common/SingleSelectAutoCompleteField.tsx +0 -67
- package/dist/components/common/SocialMediaLogin.tsx +0 -53
- package/dist/components/common/SolidAdmin.tsx +0 -7
- package/dist/components/common/SolidBreadcrumb.tsx +0 -105
- package/dist/components/common/SolidFormHeader.tsx +0 -22
- package/dist/components/common/SolidFormStepper.tsx +0 -213
- package/dist/components/common/SolidModuleHome.tsx +0 -61
- package/dist/components/common/SolidThemeLink.tsx +0 -5
- package/dist/components/common/SolidThemeProvider.tsx +0 -44
- package/dist/components/common/error.tsx +0 -30
- package/dist/components/core/chatter/SolidChatter.tsx +0 -252
- package/dist/components/core/chatter/SolidChatterDateDivider.tsx +0 -16
- package/dist/components/core/chatter/SolidChatterHeader.tsx +0 -178
- package/dist/components/core/chatter/SolidChatterMessageBox.tsx +0 -165
- package/dist/components/core/chatter/SolidMessageComposer.tsx +0 -145
- package/dist/components/core/common/FilterComponent.tsx +0 -434
- package/dist/components/core/common/LoadDynamicJsxComponent.tsx +0 -70
- package/dist/components/core/common/SolidCreateButton.tsx +0 -17
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +0 -843
- package/dist/components/core/common/SolidLayoutViews.tsx +0 -87
- package/dist/components/core/common/SolidListViewOptions.tsx +0 -31
- package/dist/components/core/common/SolidSaveCustomFilterForm.tsx +0 -74
- package/dist/components/core/common/SolidSearchBox.tsx +0 -17
- package/dist/components/core/common/SolidViewLayoutManager.ts +0 -85
- package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeChangeHandler.ts +0 -18
- package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeLoad.ts +0 -18
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.tsx +0 -59
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.tsx +0 -38
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +0 -123
- package/dist/components/core/field/FieldListViewData.tsx +0 -312
- package/dist/components/core/filter/SolidFilterFields.tsx +0 -128
- package/dist/components/core/filter/SolidManyToOneFilterElement.tsx +0 -60
- package/dist/components/core/filter/SolidSelectionDynamicFilterElement.tsx +0 -50
- package/dist/components/core/filter/SolidSelectionStaticFilterElement.tsx +0 -32
- package/dist/components/core/filter/SolidVarInputsFilterElement.tsx +0 -180
- package/dist/components/core/filter/fields/SolidBigintField.tsx +0 -9
- package/dist/components/core/filter/fields/SolidBooleanField.tsx +0 -50
- package/dist/components/core/filter/fields/SolidComputedField.tsx +0 -23
- package/dist/components/core/filter/fields/SolidDateField.tsx +0 -58
- package/dist/components/core/filter/fields/SolidDatetimeField.tsx +0 -51
- package/dist/components/core/filter/fields/SolidDecimalField.tsx +0 -9
- package/dist/components/core/filter/fields/SolidExternalIdField.tsx +0 -46
- package/dist/components/core/filter/fields/SolidFloatField.tsx +0 -9
- package/dist/components/core/filter/fields/SolidIdField.tsx +0 -46
- package/dist/components/core/filter/fields/SolidIntField.tsx +0 -56
- package/dist/components/core/filter/fields/SolidLongTextField.tsx +0 -9
- package/dist/components/core/filter/fields/SolidMediaMultipleField.tsx +0 -54
- package/dist/components/core/filter/fields/SolidMediaSingleField.tsx +0 -56
- package/dist/components/core/filter/fields/SolidRelationField.tsx +0 -13
- package/dist/components/core/filter/fields/SolidRichTextField.tsx +0 -9
- package/dist/components/core/filter/fields/SolidSelectionDynamicField.tsx +0 -46
- package/dist/components/core/filter/fields/SolidSelectionStaticField.tsx +0 -48
- package/dist/components/core/filter/fields/SolidShortTextField.tsx +0 -54
- package/dist/components/core/filter/fields/SolidTimeField.tsx +0 -45
- package/dist/components/core/filter/fields/SolidUuidField.tsx +0 -45
- package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.tsx +0 -80
- package/dist/components/core/form/SolidFormActionHeader.tsx +0 -216
- package/dist/components/core/form/SolidFormLayouts.tsx +0 -104
- package/dist/components/core/form/SolidFormUserViewLayout.tsx +0 -85
- package/dist/components/core/form/SolidFormView.tsx +0 -1129
- package/dist/components/core/form/fields/ISolidField.tsx +0 -69
- package/dist/components/core/form/fields/SolidBooleanField.tsx +0 -269
- package/dist/components/core/form/fields/SolidDateField.tsx +0 -153
- package/dist/components/core/form/fields/SolidDateTimeField.tsx +0 -154
- package/dist/components/core/form/fields/SolidDecimalField.tsx +0 -155
- package/dist/components/core/form/fields/SolidEmailField.tsx +0 -168
- package/dist/components/core/form/fields/SolidIntegerField.tsx +0 -158
- package/dist/components/core/form/fields/SolidJsonField.tsx +0 -173
- package/dist/components/core/form/fields/SolidLongTextField.tsx +0 -161
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +0 -639
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +0 -522
- package/dist/components/core/form/fields/SolidPasswordField.tsx +0 -187
- package/dist/components/core/form/fields/SolidRelationField.tsx +0 -54
- package/dist/components/core/form/fields/SolidRichTextField.tsx +0 -177
- package/dist/components/core/form/fields/SolidSelectionDynamicField.tsx +0 -204
- package/dist/components/core/form/fields/SolidSelectionStaticField.tsx +0 -272
- package/dist/components/core/form/fields/SolidShortTextField.tsx +0 -208
- package/dist/components/core/form/fields/SolidTimeField.tsx +0 -147
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +0 -309
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +0 -291
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +0 -311
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.tsx +0 -33
- package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.ts +0 -64
- package/dist/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.tsx +0 -46
- package/dist/components/core/form/widgets/CustomHtml.tsx +0 -19
- package/dist/components/core/kanban/KanbanBoard.tsx +0 -131
- package/dist/components/core/kanban/KanbanCard.tsx +0 -255
- package/dist/components/core/kanban/KanbanColumn.tsx +0 -139
- package/dist/components/core/kanban/KanbanUserViewLayout.tsx +0 -85
- package/dist/components/core/kanban/SolidKanbanView.tsx +0 -803
- package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +0 -146
- package/dist/components/core/kanban/SolidKanbanViewFields.tsx +0 -164
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +0 -59
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +0 -50
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.tsx +0 -32
- package/dist/components/core/kanban/SolidVarInputsFilterElement.tsx +0 -184
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.tsx +0 -23
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.tsx +0 -12
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.tsx +0 -20
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +0 -136
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +0 -158
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +0 -121
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.tsx +0 -12
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +0 -16
- package/dist/components/core/list/ListViewRowActionPopup.tsx +0 -42
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.tsx +0 -41
- package/dist/components/core/list/SolidListColumnSelector.tsx +0 -167
- package/dist/components/core/list/SolidListView.tsx +0 -981
- package/dist/components/core/list/SolidListViewColumn.tsx +0 -165
- package/dist/components/core/list/SolidListViewConfigure.tsx +0 -198
- package/dist/components/core/list/SolidListViewShimmerLoading.tsx +0 -77
- package/dist/components/core/list/SolidListingHeader.tsx +0 -42
- package/dist/components/core/list/SolidManyToOneFilterElement.tsx +0 -59
- package/dist/components/core/list/SolidSelectionDynamicFilterElement.tsx +0 -50
- package/dist/components/core/list/SolidSelectionStaticFilterElement.tsx +0 -32
- package/dist/components/core/list/SolidTableRowCell.tsx +0 -12
- package/dist/components/core/list/SolidVarInputsFilterElement.tsx +0 -184
- package/dist/components/core/list/columns/SolidBigintColumn.tsx +0 -9
- package/dist/components/core/list/columns/SolidBooleanColumn.tsx +0 -89
- package/dist/components/core/list/columns/SolidComputedColumn.tsx +0 -23
- package/dist/components/core/list/columns/SolidDateColumn.tsx +0 -90
- package/dist/components/core/list/columns/SolidDatetimeColumn.tsx +0 -79
- package/dist/components/core/list/columns/SolidDecimalColumn.tsx +0 -9
- package/dist/components/core/list/columns/SolidExternalIdColumn.tsx +0 -80
- package/dist/components/core/list/columns/SolidFloatColumn.tsx +0 -9
- package/dist/components/core/list/columns/SolidIdColumn.tsx +0 -79
- package/dist/components/core/list/columns/SolidIntColumn.tsx +0 -87
- package/dist/components/core/list/columns/SolidLongTextColumn.tsx +0 -9
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +0 -100
- package/dist/components/core/list/columns/SolidMediaSingleColumn.tsx +0 -98
- package/dist/components/core/list/columns/SolidRelationColumn.tsx +0 -20
- package/dist/components/core/list/columns/SolidRichTextColumn.tsx +0 -9
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.tsx +0 -80
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.tsx +0 -81
- package/dist/components/core/list/columns/SolidShortTextColumn.tsx +0 -103
- package/dist/components/core/list/columns/SolidTimeColumn.tsx +0 -78
- package/dist/components/core/list/columns/SolidUuidColumn.tsx +0 -79
- package/dist/components/core/list/columns/relations/SolidRelationManyToManyColumn.tsx +0 -110
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +0 -95
- package/dist/components/core/list/columns/relations/SolidRelationOneToManyColumn.tsx +0 -111
- package/dist/components/core/list/widgets/SolidRelationAvatarWidget.tsx +0 -89
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.tsx +0 -58
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.tsx +0 -21
- package/dist/components/core/model/CreateModel.tsx +0 -476
- package/dist/components/core/model/FieldMetaData.tsx +0 -193
- package/dist/components/core/model/FieldMetaDataForm.tsx +0 -3048
- package/dist/components/core/model/FieldSelector.tsx +0 -62
- package/dist/components/core/model/ModelListViewData.tsx +0 -383
- package/dist/components/core/model/ModelMetaData.tsx +0 -840
- package/dist/components/core/module/CreateModule.tsx +0 -620
- package/dist/components/core/module/ModuleListViewData.tsx +0 -429
- package/dist/components/core/users/CreateUser.tsx +0 -436
- package/dist/components/core/users/CreateUserRole.tsx +0 -211
- package/dist/components/core/users/UserListView.tsx +0 -374
- package/dist/components/layout/AdminLayout.tsx +0 -62
- package/dist/components/layout/AdminSidebar.tsx +0 -65
- package/dist/components/layout/AppConfig.tsx +0 -104
- package/dist/components/layout/AppSidebar.tsx +0 -225
- package/dist/components/layout/ButtonLoader.tsx +0 -7
- package/dist/components/layout/CustomPagination.tsx +0 -55
- package/dist/components/layout/DashboardHeader.tsx +0 -89
- package/dist/components/layout/FilterMenu.tsx +0 -122
- package/dist/components/layout/Footer.tsx +0 -13
- package/dist/components/layout/GlobalSearch.tsx +0 -37
- package/dist/components/layout/Header.tsx +0 -8
- package/dist/components/layout/Layout.tsx +0 -136
- package/dist/components/layout/ListingHeader.tsx +0 -204
- package/dist/components/layout/Loader.tsx +0 -16
- package/dist/components/layout/UserSidebar.tsx +0 -53
- package/dist/components/layout/context/layoutcontext.tsx +0 -52
- package/dist/components/layout/navbar-one.tsx +0 -258
- package/dist/components/layout/navbar-two-menu.tsx +0 -73
- package/dist/components/layout/navbar-two.tsx +0 -37
- package/dist/components/layout/user-profile-menu.tsx +0 -120
- package/dist/components/layout/user-profile.tsx +0 -7
- package/dist/components/modelsComponents/filterIcon.tsx +0 -9
- package/dist/components/tables/DemoData.tsx +0 -318
- package/dist/components/tables/DynamicTable.tsx +0 -56
- package/dist/components/tables/ListViewTable.tsx +0 -156
- package/dist/helpers/AppTitle.tsx +0 -12
- package/dist/helpers/ToastContainer.tsx +0 -93
- package/dist/helpers/authHeader.ts +0 -20
- package/dist/helpers/countries.tsx +0 -260
- package/dist/helpers/downloadMediaFile.tsx +0 -19
- package/dist/helpers/getAcceptedFileTypes.tsx +0 -22
- package/dist/helpers/getRandomColors.tsx +0 -68
- package/dist/helpers/helpers.ts +0 -40
- package/dist/helpers/menu.tsx +0 -670
- package/dist/helpers/permissions.ts +0 -19
- package/dist/helpers/registry.ts +0 -173
- package/dist/helpers/revalidate.ts +0 -7
- package/dist/index.ts +0 -642
- package/dist/nextAuth/authProviders.tsx +0 -221
- package/dist/nextAuth/refreshAccessToken.tsx +0 -27
- package/dist/redux/api/articleApi.ts +0 -55
- package/dist/redux/api/authApi.ts +0 -131
- package/dist/redux/api/automationApi.ts +0 -55
- package/dist/redux/api/categoryApi.tsx +0 -46
- package/dist/redux/api/cityApi.tsx +0 -56
- package/dist/redux/api/cmsBannerImageApi.tsx +0 -55
- package/dist/redux/api/countryApi.tsx +0 -56
- package/dist/redux/api/fetchBaseQuery.tsx +0 -15
- package/dist/redux/api/fieldApi.ts +0 -78
- package/dist/redux/api/mediaApi.ts +0 -55
- package/dist/redux/api/mediaStorageProviderApi.ts +0 -55
- package/dist/redux/api/menuApi.tsx +0 -55
- package/dist/redux/api/menuItemsApi.tsx +0 -56
- package/dist/redux/api/modelApi.ts +0 -77
- package/dist/redux/api/moduleApi.ts +0 -72
- package/dist/redux/api/orderAttributeApi.tsx +0 -37
- package/dist/redux/api/permissionApi.ts +0 -32
- package/dist/redux/api/pincodeApi.tsx +0 -56
- package/dist/redux/api/productData.tsx +0 -87
- package/dist/redux/api/radixExtraModelAttributeApi.tsx +0 -37
- package/dist/redux/api/radixModelMetadataApi.tsx +0 -62
- package/dist/redux/api/radixModelsApi.tsx +0 -64
- package/dist/redux/api/ratingApi.ts +0 -55
- package/dist/redux/api/reviewApi.ts +0 -55
- package/dist/redux/api/roleApi.ts +0 -58
- package/dist/redux/api/solidActionApi.ts +0 -66
- package/dist/redux/api/solidChatterMessageApi.ts +0 -30
- package/dist/redux/api/solidEntityApi.tsx +0 -110
- package/dist/redux/api/solidMenuApi.ts +0 -71
- package/dist/redux/api/solidSettingsApi.tsx +0 -55
- package/dist/redux/api/solidViewApi.ts +0 -73
- package/dist/redux/api/stateApi.tsx +0 -56
- package/dist/redux/api/tagApi.ts +0 -55
- package/dist/redux/api/tagGroupApi.tsx +0 -55
- package/dist/redux/api/testApi.ts +0 -21
- package/dist/redux/api/userApi.ts +0 -120
- package/dist/redux/features/authSlice.ts +0 -19
- package/dist/redux/features/dataViewSlice.ts +0 -26
- package/dist/redux/features/navbarSlice.ts +0 -21
- package/dist/redux/features/popupSlice.ts +0 -27
- package/dist/redux/features/themeSlice.ts +0 -17
- package/dist/redux/features/userSlice.ts +0 -28
- package/src/components/CustomFooter/CustomFooter.tsx +0 -264
- package/src/components/CustomFooter/FooterForm.tsx +0 -19
- package/src/components/CustomHeader/CallIcon.tsx +0 -20
- package/src/components/CustomHeader/CustomDropdown.tsx +0 -175
- package/src/components/CustomHeader/CustomHeader.tsx +0 -64
- package/src/components/CustomHeader/EmailIcon.tsx +0 -12
- package/src/components/CustomHeader/HeaderCart.tsx +0 -15
- package/src/components/CustomHeader/productNavData.tsx +0 -180
- package/src/components/FormView/DetailsViews.tsx +0 -46
- package/src/components/FormView/OrderAddressDetails.tsx +0 -70
- package/src/components/FormView/OrderPaymentDetails.tsx +0 -18
- package/src/components/FormView/OrderTableDetails.tsx +0 -36
- package/src/components/FormView/OrderedProductDetail.tsx +0 -22
- package/src/components/Svg/ExcelSvg.tsx +0 -15
- package/src/components/Svg/FileSvg.tsx +0 -19
- package/src/components/Svg/PDFSvg.tsx +0 -15
- package/src/components/Svg/RightArrowSvg.tsx +0 -9
- package/src/components/Tag/CustomTag.tsx +0 -50
- package/src/components/auth/AuthLayout.tsx +0 -140
- package/src/components/auth/ForgotPasswordThankYou.tsx +0 -48
- package/src/components/auth/GoogleAuthChecking.tsx +0 -60
- package/src/components/auth/Login.tsx +0 -155
- package/src/components/auth/Register.tsx +0 -239
- package/src/components/auth/SolidChangeForcePassword.tsx +0 -145
- package/src/components/auth/SolidForgotPassword.tsx +0 -125
- package/src/components/auth/SolidInitialLoginOtp.tsx +0 -152
- package/src/components/auth/SolidInitiateRegisterOtp.tsx +0 -141
- package/src/components/auth/SolidLogin.tsx +0 -275
- package/src/components/auth/SolidOTPVerify.tsx +0 -132
- package/src/components/auth/SolidRegister.tsx +0 -348
- package/src/components/auth/SolidResetPassword.tsx +0 -162
- package/src/components/common/AuthBanner.tsx +0 -41
- package/src/components/common/AutoCompleteField.tsx +0 -76
- package/src/components/common/BackButton.tsx +0 -27
- package/src/components/common/CancelButton.tsx +0 -48
- package/src/components/common/CodeEditor.tsx +0 -26
- package/src/components/common/CreateButton.tsx +0 -17
- 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 -414
- package/src/components/common/HeaderDynamicTitles.tsx +0 -13
- package/src/components/common/MarkdownViewer.tsx +0 -16
- package/src/components/common/MultipleSelectAutoCompleteField.tsx +0 -62
- package/src/components/common/NotFound.tsx +0 -22
- package/src/components/common/SingleSelectAutoCompleteField.tsx +0 -67
- package/src/components/common/SocialMediaLogin.tsx +0 -53
- package/src/components/common/SolidAdmin.tsx +0 -7
- package/src/components/common/SolidBreadcrumb.tsx +0 -105
- package/src/components/common/SolidFormHeader.tsx +0 -22
- package/src/components/common/SolidFormStepper.tsx +0 -213
- package/src/components/common/SolidModuleHome.tsx +0 -61
- package/src/components/common/SolidThemeLink.tsx +0 -5
- package/src/components/common/SolidThemeProvider.tsx +0 -44
- package/src/components/common/error.tsx +0 -30
- package/src/components/core/chatter/SolidChatter.tsx +0 -252
- package/src/components/core/chatter/SolidChatterDateDivider.tsx +0 -16
- package/src/components/core/chatter/SolidChatterHeader.tsx +0 -178
- package/src/components/core/chatter/SolidChatterMessageBox.tsx +0 -165
- package/src/components/core/chatter/SolidMessageComposer.tsx +0 -145
- package/src/components/core/common/FilterComponent.tsx +0 -434
- package/src/components/core/common/LoadDynamicJsxComponent.tsx +0 -70
- package/src/components/core/common/SolidCreateButton.tsx +0 -17
- package/src/components/core/common/SolidGlobalSearchElement.tsx +0 -843
- package/src/components/core/common/SolidLayoutViews.tsx +0 -87
- package/src/components/core/common/SolidListViewOptions.tsx +0 -31
- package/src/components/core/common/SolidSaveCustomFilterForm.tsx +0 -74
- package/src/components/core/common/SolidSearchBox.tsx +0 -17
- package/src/components/core/common/SolidViewLayoutManager.ts +0 -85
- 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/GenerateModelCodeRowAction.tsx +0 -59
- package/src/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.tsx +0 -38
- package/src/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +0 -123
- package/src/components/core/field/FieldListViewData.tsx +0 -312
- package/src/components/core/filter/SolidFilterFields.tsx +0 -128
- package/src/components/core/filter/SolidManyToOneFilterElement.tsx +0 -60
- 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 -180
- package/src/components/core/filter/fields/SolidBigintField.tsx +0 -9
- package/src/components/core/filter/fields/SolidBooleanField.tsx +0 -50
- package/src/components/core/filter/fields/SolidComputedField.tsx +0 -23
- package/src/components/core/filter/fields/SolidDateField.tsx +0 -58
- package/src/components/core/filter/fields/SolidDatetimeField.tsx +0 -51
- package/src/components/core/filter/fields/SolidDecimalField.tsx +0 -9
- package/src/components/core/filter/fields/SolidExternalIdField.tsx +0 -46
- 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 -56
- package/src/components/core/filter/fields/SolidLongTextField.tsx +0 -9
- package/src/components/core/filter/fields/SolidMediaMultipleField.tsx +0 -54
- package/src/components/core/filter/fields/SolidMediaSingleField.tsx +0 -56
- package/src/components/core/filter/fields/SolidRelationField.tsx +0 -13
- package/src/components/core/filter/fields/SolidRichTextField.tsx +0 -9
- package/src/components/core/filter/fields/SolidSelectionDynamicField.tsx +0 -46
- package/src/components/core/filter/fields/SolidSelectionStaticField.tsx +0 -48
- package/src/components/core/filter/fields/SolidShortTextField.tsx +0 -54
- package/src/components/core/filter/fields/SolidTimeField.tsx +0 -45
- package/src/components/core/filter/fields/SolidUuidField.tsx +0 -45
- package/src/components/core/filter/fields/relations/SolidRelationManyToOneField.tsx +0 -80
- package/src/components/core/form/SolidFormActionHeader.tsx +0 -216
- package/src/components/core/form/SolidFormLayouts.tsx +0 -104
- package/src/components/core/form/SolidFormUserViewLayout.tsx +0 -85
- package/src/components/core/form/SolidFormView.tsx +0 -1129
- package/src/components/core/form/fields/ISolidField.tsx +0 -69
- package/src/components/core/form/fields/SolidBooleanField.tsx +0 -269
- package/src/components/core/form/fields/SolidDateField.tsx +0 -153
- package/src/components/core/form/fields/SolidDateTimeField.tsx +0 -154
- package/src/components/core/form/fields/SolidDecimalField.tsx +0 -155
- package/src/components/core/form/fields/SolidEmailField.tsx +0 -168
- package/src/components/core/form/fields/SolidIntegerField.tsx +0 -158
- package/src/components/core/form/fields/SolidJsonField.tsx +0 -173
- package/src/components/core/form/fields/SolidLongTextField.tsx +0 -161
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +0 -639
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +0 -522
- package/src/components/core/form/fields/SolidPasswordField.tsx +0 -187
- package/src/components/core/form/fields/SolidRelationField.tsx +0 -54
- package/src/components/core/form/fields/SolidRichTextField.tsx +0 -177
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +0 -204
- package/src/components/core/form/fields/SolidSelectionStaticField.tsx +0 -272
- package/src/components/core/form/fields/SolidShortTextField.tsx +0 -208
- package/src/components/core/form/fields/SolidTimeField.tsx +0 -147
- package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +0 -309
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +0 -291
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +0 -311
- package/src/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.tsx +0 -33
- package/src/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.ts +0 -64
- package/src/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.tsx +0 -46
- package/src/components/core/form/widgets/CustomHtml.tsx +0 -19
- package/src/components/core/kanban/KanbanBoard.tsx +0 -131
- package/src/components/core/kanban/KanbanCard.tsx +0 -255
- package/src/components/core/kanban/KanbanColumn.tsx +0 -139
- package/src/components/core/kanban/KanbanUserViewLayout.tsx +0 -85
- package/src/components/core/kanban/SolidKanbanView.tsx +0 -803
- package/src/components/core/kanban/SolidKanbanViewConfigure.tsx +0 -146
- 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 -13
- 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 -136
- package/src/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +0 -158
- 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 -13
- 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 -42
- package/src/components/core/list/SolidEmptyListViewPlaceholder.tsx +0 -41
- package/src/components/core/list/SolidListColumnSelector.tsx +0 -167
- package/src/components/core/list/SolidListView.tsx +0 -981
- package/src/components/core/list/SolidListViewColumn.tsx +0 -165
- package/src/components/core/list/SolidListViewConfigure.tsx +0 -198
- package/src/components/core/list/SolidListViewShimmerLoading.tsx +0 -77
- package/src/components/core/list/SolidListingHeader.tsx +0 -42
- package/src/components/core/list/SolidManyToOneFilterElement.tsx +0 -59
- 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 -12
- 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 -89
- package/src/components/core/list/columns/SolidComputedColumn.tsx +0 -23
- 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 -100
- package/src/components/core/list/columns/SolidMediaSingleColumn.tsx +0 -98
- package/src/components/core/list/columns/SolidRelationColumn.tsx +0 -20
- 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 -103
- 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 -110
- package/src/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +0 -95
- package/src/components/core/list/columns/relations/SolidRelationOneToManyColumn.tsx +0 -111
- package/src/components/core/list/widgets/SolidRelationAvatarWidget.tsx +0 -89
- package/src/components/core/list/widgets/SolidShortTextAvatarWidget.tsx +0 -58
- package/src/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.tsx +0 -21
- package/src/components/core/model/CreateModel.tsx +0 -476
- package/src/components/core/model/FieldMetaData.tsx +0 -193
- package/src/components/core/model/FieldMetaDataForm.tsx +0 -3048
- package/src/components/core/model/FieldSelector.tsx +0 -62
- package/src/components/core/model/ModelListViewData.tsx +0 -383
- package/src/components/core/model/ModelMetaData.tsx +0 -840
- package/src/components/core/module/CreateModule.tsx +0 -620
- package/src/components/core/module/ModuleListViewData.tsx +0 -429
- package/src/components/core/users/CreateUser.tsx +0 -436
- package/src/components/core/users/CreateUserRole.tsx +0 -211
- package/src/components/core/users/UserListView.tsx +0 -374
- package/src/components/layout/AdminLayout.tsx +0 -62
- package/src/components/layout/AdminSidebar.tsx +0 -65
- package/src/components/layout/AppConfig.tsx +0 -104
- package/src/components/layout/AppSidebar.tsx +0 -225
- 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 -37
- package/src/components/layout/Header.tsx +0 -8
- package/src/components/layout/Layout.tsx +0 -136
- package/src/components/layout/ListingHeader.tsx +0 -204
- package/src/components/layout/Loader.tsx +0 -16
- package/src/components/layout/UserSidebar.tsx +0 -53
- package/src/components/layout/context/layoutcontext.tsx +0 -52
- package/src/components/layout/navbar-one.tsx +0 -258
- package/src/components/layout/navbar-two-menu.tsx +0 -73
- package/src/components/layout/navbar-two.tsx +0 -37
- package/src/components/layout/user-profile-menu.tsx +0 -120
- package/src/components/layout/user-profile.tsx +0 -7
- package/src/components/modelsComponents/filterIcon.tsx +0 -9
- package/src/components/tables/DemoData.tsx +0 -318
- package/src/components/tables/DynamicTable.tsx +0 -56
- package/src/components/tables/ListViewTable.tsx +0 -156
- package/src/helpers/AppTitle.tsx +0 -12
- package/src/helpers/ToastContainer.tsx +0 -93
- package/src/helpers/authHeader.ts +0 -20
- package/src/helpers/countries.tsx +0 -260
- package/src/helpers/downloadMediaFile.tsx +0 -19
- package/src/helpers/getAcceptedFileTypes.tsx +0 -22
- package/src/helpers/getRandomColors.tsx +0 -68
- package/src/helpers/helpers.ts +0 -40
- package/src/helpers/menu.tsx +0 -670
- package/src/helpers/permissions.ts +0 -19
- package/src/helpers/registry.ts +0 -173
- package/src/helpers/revalidate.ts +0 -7
- package/src/index.ts +0 -642
- package/src/nextAuth/authProviders.tsx +0 -221
- package/src/nextAuth/refreshAccessToken.tsx +0 -27
- package/src/redux/api/articleApi.ts +0 -55
- package/src/redux/api/authApi.ts +0 -131
- package/src/redux/api/automationApi.ts +0 -55
- package/src/redux/api/categoryApi.tsx +0 -46
- package/src/redux/api/cityApi.tsx +0 -56
- package/src/redux/api/cmsBannerImageApi.tsx +0 -55
- package/src/redux/api/countryApi.tsx +0 -56
- package/src/redux/api/fetchBaseQuery.tsx +0 -15
- package/src/redux/api/fieldApi.ts +0 -78
- package/src/redux/api/mediaApi.ts +0 -55
- package/src/redux/api/mediaStorageProviderApi.ts +0 -55
- package/src/redux/api/menuApi.tsx +0 -55
- package/src/redux/api/menuItemsApi.tsx +0 -56
- package/src/redux/api/modelApi.ts +0 -77
- package/src/redux/api/moduleApi.ts +0 -72
- package/src/redux/api/orderAttributeApi.tsx +0 -37
- package/src/redux/api/permissionApi.ts +0 -32
- package/src/redux/api/pincodeApi.tsx +0 -56
- package/src/redux/api/productData.tsx +0 -87
- package/src/redux/api/radixExtraModelAttributeApi.tsx +0 -37
- package/src/redux/api/radixModelMetadataApi.tsx +0 -62
- package/src/redux/api/radixModelsApi.tsx +0 -64
- package/src/redux/api/ratingApi.ts +0 -55
- package/src/redux/api/reviewApi.ts +0 -55
- package/src/redux/api/roleApi.ts +0 -58
- package/src/redux/api/solidActionApi.ts +0 -66
- package/src/redux/api/solidChatterMessageApi.ts +0 -30
- package/src/redux/api/solidEntityApi.tsx +0 -110
- package/src/redux/api/solidMenuApi.ts +0 -71
- package/src/redux/api/solidSettingsApi.tsx +0 -55
- package/src/redux/api/solidViewApi.ts +0 -73
- package/src/redux/api/stateApi.tsx +0 -56
- package/src/redux/api/tagApi.ts +0 -55
- package/src/redux/api/tagGroupApi.tsx +0 -55
- package/src/redux/api/testApi.ts +0 -21
- package/src/redux/api/userApi.ts +0 -120
- 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 -27
- package/src/redux/features/themeSlice.ts +0 -17
- package/src/redux/features/userSlice.ts +0 -28
|
@@ -1,1129 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { SolidCancelButton } from "@/components/common/CancelButton";
|
|
4
|
-
import { createPermission, deletePermission, updatePermission } from "@/helpers/permissions";
|
|
5
|
-
import { createSolidEntityApi } from "@/redux/api/solidEntityApi";
|
|
6
|
-
import { useGetSolidViewLayoutQuery } from "@/redux/api/solidViewApi";
|
|
7
|
-
import { useLazyCheckIfPermissionExistsQuery } from "@/redux/api/userApi";
|
|
8
|
-
import { FetchBaseQueryError } from "@reduxjs/toolkit/dist/query";
|
|
9
|
-
import { useFormik } from "formik";
|
|
10
|
-
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
|
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 { ChangeEvent, useEffect, 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 { BackButton } from "@/components/common/BackButton";
|
|
36
|
-
import { OverlayPanel } from "primereact/overlaypanel";
|
|
37
|
-
import { SolidBreadcrumb } from "@/components/common/SolidBreadcrumb";
|
|
38
|
-
import { SolidUiEvent } from "@/types";
|
|
39
|
-
import { getExtensionComponent, getExtensionFunction } from "@/helpers/registry";
|
|
40
|
-
import { SolidFormWidgetProps, SolidLoadForm } from "@/types/solid-core";
|
|
41
|
-
import { SolidPasswordField } from "./fields/SolidPasswordField";
|
|
42
|
-
import { SolidEmailField } from "./fields/SolidEmailField";
|
|
43
|
-
import { Panel } from "primereact/panel";
|
|
44
|
-
import { SolidFormStepper } from "@/components/common/SolidFormStepper";
|
|
45
|
-
import { SolidFormHeader } from "@/components/common/SolidFormHeader";
|
|
46
|
-
import { SolidFormUserViewLayout } from "./SolidFormUserViewLayout";
|
|
47
|
-
import Lightbox from "yet-another-react-lightbox";
|
|
48
|
-
import Counter from "yet-another-react-lightbox/plugins/counter";
|
|
49
|
-
import Download from "yet-another-react-lightbox/plugins/download";
|
|
50
|
-
import "yet-another-react-lightbox/styles.css";
|
|
51
|
-
import "yet-another-react-lightbox/plugins/counter.css";
|
|
52
|
-
import { SolidChatter } from "../chatter/SolidChatter";
|
|
53
|
-
import { SolidFormActionHeader } from "./SolidFormActionHeader";
|
|
54
|
-
|
|
55
|
-
export type SolidFormViewProps = {
|
|
56
|
-
moduleName: string;
|
|
57
|
-
modelName: string;
|
|
58
|
-
id: string;
|
|
59
|
-
embeded: boolean;
|
|
60
|
-
handlePopupClose?: any,
|
|
61
|
-
customCreateHandler?: any
|
|
62
|
-
inlineCreateAutoSave?: boolean,
|
|
63
|
-
customLayout?: any,
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
interface ErrorResponseData {
|
|
68
|
-
message: string;
|
|
69
|
-
statusCode: number;
|
|
70
|
-
error: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const getLayoutFields = (node: any): any => {
|
|
74
|
-
let fields = [];
|
|
75
|
-
|
|
76
|
-
if (node.type === "field") {
|
|
77
|
-
fields.push(node);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (node.children && Array.isArray(node.children)) {
|
|
81
|
-
for (const child of node.children) {
|
|
82
|
-
fields = fields.concat(getLayoutFields(child));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return fields;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const getLayoutFieldsAsObject = (layout: any[]): any => {
|
|
90
|
-
const allFields = layout.flatMap(getLayoutFields);
|
|
91
|
-
return allFields.reduce((result, field) => {
|
|
92
|
-
if (field.attrs.name) {
|
|
93
|
-
result[field.attrs.name] = { ...field };
|
|
94
|
-
}
|
|
95
|
-
return result;
|
|
96
|
-
}, {});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const fieldFactory = (type: string, fieldContext: SolidFieldProps, setLightboxUrls?: any, setOpenLightbox?: any): ISolidField | null => {
|
|
100
|
-
if (type === 'shortText') {
|
|
101
|
-
return new SolidShortTextField(fieldContext);
|
|
102
|
-
}
|
|
103
|
-
if (type === 'longText') {
|
|
104
|
-
return new SolidLongTextField(fieldContext);
|
|
105
|
-
}
|
|
106
|
-
if (type === 'int' || type === 'bigint') {
|
|
107
|
-
return new SolidIntegerField(fieldContext);
|
|
108
|
-
}
|
|
109
|
-
if (type === 'decimal' || type === 'float') {
|
|
110
|
-
return new SolidDecimalField(fieldContext);
|
|
111
|
-
}
|
|
112
|
-
if (type === 'boolean') {
|
|
113
|
-
return new SolidBooleanField(fieldContext);
|
|
114
|
-
}
|
|
115
|
-
if (type === 'richText') {
|
|
116
|
-
return new SolidRichTextField(fieldContext);
|
|
117
|
-
}
|
|
118
|
-
if (type === 'date') {
|
|
119
|
-
return new SolidDateField(fieldContext);
|
|
120
|
-
}
|
|
121
|
-
if (type === 'datetime') {
|
|
122
|
-
return new SolidDateTimeField(fieldContext);
|
|
123
|
-
}
|
|
124
|
-
if (type === 'time') {
|
|
125
|
-
return new SolidTimeField(fieldContext);
|
|
126
|
-
}
|
|
127
|
-
if (type === 'json') {
|
|
128
|
-
return new SolidJsonField(fieldContext);
|
|
129
|
-
}
|
|
130
|
-
if (type === 'selectionStatic') {
|
|
131
|
-
return new SolidSelectionStaticField(fieldContext);
|
|
132
|
-
}
|
|
133
|
-
if (type === 'selectionDynamic') {
|
|
134
|
-
return new SolidSelectionDynamicField(fieldContext);
|
|
135
|
-
}
|
|
136
|
-
if (type === 'relation') {
|
|
137
|
-
return new SolidRelationField(fieldContext);
|
|
138
|
-
}
|
|
139
|
-
if (type === 'mediaSingle') {
|
|
140
|
-
return new SolidMediaSingleField(fieldContext, setLightboxUrls, setOpenLightbox);
|
|
141
|
-
}
|
|
142
|
-
if (type === 'mediaMultiple') {
|
|
143
|
-
return new SolidMediaMultipleField(fieldContext, setLightboxUrls, setOpenLightbox);
|
|
144
|
-
}
|
|
145
|
-
if (type === 'password') {
|
|
146
|
-
return new SolidPasswordField(fieldContext);
|
|
147
|
-
}
|
|
148
|
-
if (type === 'email') {
|
|
149
|
-
return new SolidEmailField(fieldContext);
|
|
150
|
-
}
|
|
151
|
-
return null;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// solidFieldsMetadata={solidFieldsMetadata} solidView={solidView}
|
|
155
|
-
const SolidField = ({ formik, field, fieldMetadata, initialEntityData, solidFormViewMetaData, modelName, readOnly, viewMode, onChange, onBlur, setLightboxUrls, setOpenLightbox }: any) => {
|
|
156
|
-
const fieldContext: SolidFieldProps = {
|
|
157
|
-
// field metadata - coming from the field-metadata table.
|
|
158
|
-
fieldMetadata: fieldMetadata,
|
|
159
|
-
// field layout - coming from view.layout
|
|
160
|
-
field: field,
|
|
161
|
-
// initial data
|
|
162
|
-
data: initialEntityData,
|
|
163
|
-
// complete form view metadata - this includes layout of the whole form & metadata about all fields in the corresponding model.
|
|
164
|
-
solidFormViewMetaData: solidFormViewMetaData,
|
|
165
|
-
modelName: modelName,
|
|
166
|
-
readOnly: readOnly,
|
|
167
|
-
viewMode: viewMode,
|
|
168
|
-
onChange: onChange,
|
|
169
|
-
onBlur: onBlur
|
|
170
|
-
}
|
|
171
|
-
const solidField = fieldFactory(fieldMetadata?.type, fieldContext, setLightboxUrls, setOpenLightbox);
|
|
172
|
-
|
|
173
|
-
return solidField?.render(formik);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
const SolidGroup = ({ children, attrs }: any) => {
|
|
177
|
-
|
|
178
|
-
const className = attrs.className;
|
|
179
|
-
|
|
180
|
-
return (
|
|
181
|
-
<div className={className}>
|
|
182
|
-
{attrs.label && <p>{attrs.label}</p>}
|
|
183
|
-
<div className="grid">{children}</div>
|
|
184
|
-
</div>
|
|
185
|
-
// <div className={className}>
|
|
186
|
-
// <div className="s_group">
|
|
187
|
-
// <fieldset>
|
|
188
|
-
// {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
|
|
189
|
-
// <div className="grid">{children}</div>
|
|
190
|
-
// </fieldset>
|
|
191
|
-
// </div>
|
|
192
|
-
|
|
193
|
-
// </div>
|
|
194
|
-
// <div className="formgrid grid">
|
|
195
|
-
// {children}
|
|
196
|
-
// </div>
|
|
197
|
-
);
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
const SolidRow = ({ children, attrs }: any) => {
|
|
201
|
-
|
|
202
|
-
const className = attrs.className;
|
|
203
|
-
|
|
204
|
-
return (
|
|
205
|
-
// <div className={`row ${className}`}>
|
|
206
|
-
|
|
207
|
-
// <div className="s_group">
|
|
208
|
-
// <fieldset>
|
|
209
|
-
// {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
|
|
210
|
-
// <div className="grid">{children}</div>
|
|
211
|
-
// </fieldset>
|
|
212
|
-
// </div>
|
|
213
|
-
|
|
214
|
-
// </div>
|
|
215
|
-
<div className={`row ${className}`}>
|
|
216
|
-
{attrs.label && <p >{attrs.label}</p>}
|
|
217
|
-
<div className="grid">{children}</div>
|
|
218
|
-
</div>
|
|
219
|
-
// <div>{children}</div>
|
|
220
|
-
);
|
|
221
|
-
};
|
|
222
|
-
const SolidColumn = ({ children, attrs }: any) => {
|
|
223
|
-
const className = attrs.className;
|
|
224
|
-
|
|
225
|
-
return (
|
|
226
|
-
// first fieldset ui
|
|
227
|
-
|
|
228
|
-
// <div className={`${className}`}>
|
|
229
|
-
// <div className="s_group">
|
|
230
|
-
// <fieldset>
|
|
231
|
-
// {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
|
|
232
|
-
// <div className="grid">{children}</div>
|
|
233
|
-
// </fieldset>
|
|
234
|
-
// </div>
|
|
235
|
-
// </div>
|
|
236
|
-
|
|
237
|
-
//second fieldset ui
|
|
238
|
-
// <div className={`${className}`}>
|
|
239
|
-
// {attrs.label && <p>{attrs.label}</p>}
|
|
240
|
-
// <div className="grid">{children}</div>
|
|
241
|
-
// </div>
|
|
242
|
-
|
|
243
|
-
//figma fieldset ui
|
|
244
|
-
attrs.label ?
|
|
245
|
-
<div className={`${className}`}>
|
|
246
|
-
<Panel header={attrs.label} className="solid-column-panel">
|
|
247
|
-
<div className="grid">{children}</div>
|
|
248
|
-
</Panel>
|
|
249
|
-
{/* <div className="p-fieldset">
|
|
250
|
-
<div className="solid-fieldset-header">
|
|
251
|
-
<div>{attrs.label}</div>
|
|
252
|
-
</div>
|
|
253
|
-
<div className="grid solid-fieldset-content">{children}</div>
|
|
254
|
-
</div> */}
|
|
255
|
-
</div>
|
|
256
|
-
:
|
|
257
|
-
<div className={`${className}`}>
|
|
258
|
-
<div className="grid">{children}</div>
|
|
259
|
-
</div>
|
|
260
|
-
);
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
const SolidSheet = ({ children }: any) => (
|
|
264
|
-
<div className="p-fluid p-grid">
|
|
265
|
-
{children}
|
|
266
|
-
</div>
|
|
267
|
-
);
|
|
268
|
-
|
|
269
|
-
const SolidNotebook = ({ children }: any) => {
|
|
270
|
-
|
|
271
|
-
return (
|
|
272
|
-
<div className="solid-tab-view w-full">
|
|
273
|
-
<TabView>
|
|
274
|
-
{children}
|
|
275
|
-
</TabView>
|
|
276
|
-
</div>
|
|
277
|
-
)
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
const SolidDynamicWidget = ({ widgetName, formik, field, solidFormViewMetaData }: any) => {
|
|
281
|
-
const solidView = solidFormViewMetaData.data.solidView;
|
|
282
|
-
const solidFieldsMetadata = solidFormViewMetaData.data.solidFieldsMetadata;
|
|
283
|
-
|
|
284
|
-
let DynamicWidget = getExtensionComponent(widgetName);
|
|
285
|
-
|
|
286
|
-
const widgetProps: SolidFormWidgetProps = {
|
|
287
|
-
formData: formik.values,
|
|
288
|
-
field: field,
|
|
289
|
-
fieldsMetadata: solidFieldsMetadata,
|
|
290
|
-
viewMetadata: solidView
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
return (
|
|
294
|
-
<div className="solid-tab-view w-full">
|
|
295
|
-
{DynamicWidget && <DynamicWidget {...widgetProps} />}
|
|
296
|
-
</div>
|
|
297
|
-
)
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
const SolidPage = ({ attrs, children, key }: any) => (
|
|
302
|
-
<TabPanel key={key} header={attrs.label} >
|
|
303
|
-
<div className="p-fluid">{children}</div>
|
|
304
|
-
</TabPanel>
|
|
305
|
-
);
|
|
306
|
-
|
|
307
|
-
// Original code...
|
|
308
|
-
// const addLevelToGroups = (layout: any, level = 1) => {
|
|
309
|
-
// return layout.map((element: any) => {
|
|
310
|
-
// if (element.type === "group") {
|
|
311
|
-
// // Add the level to the group's attrs
|
|
312
|
-
// element.attrs = {
|
|
313
|
-
// ...element.attrs,
|
|
314
|
-
// level: level, // Add level information to the attrs
|
|
315
|
-
// // className: level === 1 ? 'col-12' : 'col-6', // Assign className based on level
|
|
316
|
-
// };
|
|
317
|
-
// } else {
|
|
318
|
-
// element.children = addLevelToGroups(element.children, level);
|
|
319
|
-
// }
|
|
320
|
-
// // If the element has children, recursively apply this logic
|
|
321
|
-
// // if (element.children) {
|
|
322
|
-
// // element.children = addLevelToGroups(element.children, level + 1);
|
|
323
|
-
// // }
|
|
324
|
-
|
|
325
|
-
// return element;
|
|
326
|
-
// });
|
|
327
|
-
// };
|
|
328
|
-
|
|
329
|
-
// Fix for immutable objects.
|
|
330
|
-
// const addLevelToGroups = (layout: any, level = 1): any[] => {
|
|
331
|
-
// return layout.map((element: any) => {
|
|
332
|
-
// // Create a new object for immutability
|
|
333
|
-
// const updatedElement = { ...element };
|
|
334
|
-
|
|
335
|
-
// if (updatedElement.type === "group") {
|
|
336
|
-
// // Add level to attrs, creating a new object for immutability
|
|
337
|
-
// updatedElement.attrs = {
|
|
338
|
-
// ...updatedElement.attrs,
|
|
339
|
-
// level: level, // Add level information
|
|
340
|
-
// };
|
|
341
|
-
// }
|
|
342
|
-
|
|
343
|
-
// // If the element has children, recursively apply this logic
|
|
344
|
-
// if (updatedElement.children) {
|
|
345
|
-
// updatedElement.children = addLevelToGroups(updatedElement.children, level + 1);
|
|
346
|
-
// }
|
|
347
|
-
|
|
348
|
-
// return updatedElement;
|
|
349
|
-
// });
|
|
350
|
-
// };
|
|
351
|
-
|
|
352
|
-
const SolidFormView = (params: SolidFormViewProps) => {
|
|
353
|
-
const pathname = usePathname();
|
|
354
|
-
const router = useRouter();
|
|
355
|
-
const toast = useRef<Toast>(null);
|
|
356
|
-
const searchParams = useSearchParams();
|
|
357
|
-
|
|
358
|
-
const [redirectToList, setRedirectToList] = useState(false);
|
|
359
|
-
|
|
360
|
-
const [isDeleteDialogVisible, setDeleteDialogVisible] = useState(false);
|
|
361
|
-
const [isLayoutDialogVisible, setLayoutDialogVisible] = useState(false);
|
|
362
|
-
|
|
363
|
-
const [actionsAllowed, setActionsAllowed] = useState<string[]>([]);
|
|
364
|
-
const [viewMode, setViewMode] = useState<"view" | "edit">("view");
|
|
365
|
-
const [openLightbox, setOpenLightbox] = useState(false);
|
|
366
|
-
const [lightboxUrls, setLightboxUrls] = useState([]);
|
|
367
|
-
const [isShowChatter, setShowChatter] = useState(true);
|
|
368
|
-
|
|
369
|
-
const errorFields: string[] = [];
|
|
370
|
-
|
|
371
|
-
const [triggerCheckIfPermissionExists] = useLazyCheckIfPermissionExistsQuery();
|
|
372
|
-
const op = useRef(null);
|
|
373
|
-
|
|
374
|
-
useEffect(() => {
|
|
375
|
-
const mode = searchParams.get('viewMode');
|
|
376
|
-
|
|
377
|
-
if (params.id === 'new') {
|
|
378
|
-
setViewMode('edit');
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
// Set the viewMode based on the URL
|
|
383
|
-
if (mode === 'view' || mode === 'edit') {
|
|
384
|
-
setViewMode(mode);
|
|
385
|
-
} else {
|
|
386
|
-
setViewMode('view'); // Default to 'view' if no valid mode is provided
|
|
387
|
-
}
|
|
388
|
-
}, [searchParams, params.id]);
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
// function that updates view mode
|
|
392
|
-
const updateViewMode = (newMode: "view" | "edit") => {
|
|
393
|
-
setViewMode(newMode);
|
|
394
|
-
const params = new URLSearchParams(searchParams.toString());
|
|
395
|
-
params.set("viewMode", newMode);
|
|
396
|
-
router.push(`${pathname}?${params.toString()}`, { scroll: false });
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
useEffect(() => {
|
|
404
|
-
const fetchPermissions = async () => {
|
|
405
|
-
if (params.modelName) {
|
|
406
|
-
const permissionNames = [
|
|
407
|
-
createPermission(params.modelName),
|
|
408
|
-
deletePermission(params.modelName),
|
|
409
|
-
updatePermission(params.modelName)
|
|
410
|
-
]
|
|
411
|
-
const queryData = {
|
|
412
|
-
permissionNames: permissionNames
|
|
413
|
-
};
|
|
414
|
-
const queryString = qs.stringify(queryData, {
|
|
415
|
-
encodeValuesOnly: true
|
|
416
|
-
});
|
|
417
|
-
const response = await triggerCheckIfPermissionExists(queryString);
|
|
418
|
-
setActionsAllowed(response.data.data);
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
fetchPermissions();
|
|
422
|
-
}, [params.modelName]);
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
// Create the RTK slices for this entitor (const id of fieldValue) {
|
|
426
|
-
// if (!isInt(id)) {
|
|
427
|
-
// errors.push({ field: this.fieldMetadata.name, error: `Invalid ids in ${commandFieldName}` });
|
|
428
|
-
// }
|
|
429
|
-
// }y
|
|
430
|
-
const entityApi = createSolidEntityApi(params.modelName);
|
|
431
|
-
const {
|
|
432
|
-
useCreateSolidEntityMutation,
|
|
433
|
-
useDeleteSolidEntityMutation,
|
|
434
|
-
useGetSolidEntityByIdQuery,
|
|
435
|
-
useUpdateSolidEntityMutation
|
|
436
|
-
} = entityApi;
|
|
437
|
-
|
|
438
|
-
const [
|
|
439
|
-
createEntity,
|
|
440
|
-
{ isSuccess: isEntityCreateSuccess, isError: isEntityCreateError, error: entityCreateError },
|
|
441
|
-
] = useCreateSolidEntityMutation();
|
|
442
|
-
|
|
443
|
-
const [
|
|
444
|
-
updateEntity,
|
|
445
|
-
{ isSuccess: isEntityUpdateSuceess, isError: isEntityUpdateError, error: entityUpdateError },
|
|
446
|
-
] = useUpdateSolidEntityMutation();
|
|
447
|
-
|
|
448
|
-
const [
|
|
449
|
-
deleteEntity,
|
|
450
|
-
{ isSuccess: isEntityDeleteSuceess, isError: isEntityDeleteError, error: entityDeleteError },
|
|
451
|
-
] = useDeleteSolidEntityMutation();
|
|
452
|
-
|
|
453
|
-
// - - - - - - - - - - - -- - - - - - - - - - - - METADATA here
|
|
454
|
-
// Get the form view layout & metadata first.
|
|
455
|
-
const formViewMetaDataQs = qs.stringify({ ...params, viewType: 'form' }, {
|
|
456
|
-
encodeValuesOnly: true,
|
|
457
|
-
});
|
|
458
|
-
const [formViewMetaData, setFormViewMetaData] = useState({});
|
|
459
|
-
const [formViewLayout, setFormViewLayout] = useState<any>(null);
|
|
460
|
-
const {
|
|
461
|
-
data: solidFormViewMetaData,
|
|
462
|
-
isLoading: solidFormViewMetaDataIsLoading
|
|
463
|
-
} = useGetSolidViewLayoutQuery(formViewMetaDataQs);
|
|
464
|
-
const [refreshChatterMessage, setRefreshChatterMessage] = useState<boolean>(true);
|
|
465
|
-
useEffect(() => {
|
|
466
|
-
if (
|
|
467
|
-
isEntityCreateSuccess == true ||
|
|
468
|
-
isEntityUpdateSuceess == true ||
|
|
469
|
-
isEntityDeleteSuceess == true
|
|
470
|
-
) {
|
|
471
|
-
setRefreshChatterMessage(true);
|
|
472
|
-
// Close The pop in case the form is used in embeded form
|
|
473
|
-
if (params.embeded == true) {
|
|
474
|
-
params.handlePopupClose()
|
|
475
|
-
}
|
|
476
|
-
if (redirectToList === true) {
|
|
477
|
-
|
|
478
|
-
const segments = pathname.split('/').filter(Boolean); // Split and filter empty segments
|
|
479
|
-
const newPath = '/' + segments.slice(0, -2).join('/') + '/list'; // Remove last segment and add "/all"
|
|
480
|
-
router.push(newPath);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}, [isEntityCreateSuccess, isEntityUpdateSuceess, isEntityDeleteSuceess]);
|
|
484
|
-
|
|
485
|
-
function isFetchBaseQueryErrorWithErrorResponse(error: any): error is FetchBaseQueryError & { data: ErrorResponseData } {
|
|
486
|
-
return error && typeof error === 'object' && 'data' in error && 'message' in error.data;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
useEffect(() => {
|
|
490
|
-
const handleError = (errorToast: any) => {
|
|
491
|
-
let errorMessage: any = ['An error occurred'];
|
|
492
|
-
|
|
493
|
-
if (isFetchBaseQueryErrorWithErrorResponse(errorToast)) {
|
|
494
|
-
errorMessage = errorToast.data.message;
|
|
495
|
-
} else {
|
|
496
|
-
errorMessage = ['Something went wrong'];
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
toast.current?.show({
|
|
500
|
-
severity: 'error',
|
|
501
|
-
summary: 'Error',
|
|
502
|
-
detail: errorMessage,
|
|
503
|
-
life: 3000,
|
|
504
|
-
//@ts-ignore
|
|
505
|
-
content: () => (
|
|
506
|
-
<div className="flex flex-column align-items-left" style={{ flex: "1" }}>
|
|
507
|
-
{Array.isArray(errorMessage) ? (
|
|
508
|
-
errorMessage.map((message, index) => (
|
|
509
|
-
<div className="flex align-items-center gap-2" key={index}>
|
|
510
|
-
<span className="font-bold text-900">{message.trim()}</span>
|
|
511
|
-
</div>
|
|
512
|
-
))
|
|
513
|
-
) : (
|
|
514
|
-
<div className="flex align-items-center gap-2">
|
|
515
|
-
<span className="font-bold text-900">{errorMessage?.trim()}</span>
|
|
516
|
-
</div>
|
|
517
|
-
)}
|
|
518
|
-
</div>
|
|
519
|
-
),
|
|
520
|
-
});
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
// Check and handle errors from each API operation
|
|
524
|
-
if (isEntityCreateError) {
|
|
525
|
-
handleError(entityCreateError);
|
|
526
|
-
} else if (isEntityDeleteError) {
|
|
527
|
-
handleError(entityDeleteError);
|
|
528
|
-
} else if (isEntityUpdateError) {
|
|
529
|
-
handleError(entityUpdateError);
|
|
530
|
-
}
|
|
531
|
-
}, [
|
|
532
|
-
isEntityCreateError,
|
|
533
|
-
isEntityDeleteError,
|
|
534
|
-
isEntityUpdateError
|
|
535
|
-
]);
|
|
536
|
-
|
|
537
|
-
const showToast = (severity: "success" | "error", summary: string, detail: string) => {
|
|
538
|
-
toast.current?.show({
|
|
539
|
-
severity,
|
|
540
|
-
summary,
|
|
541
|
-
detail,
|
|
542
|
-
life: 3000,
|
|
543
|
-
});
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
const onFormikSubmit = async (values: any) => {
|
|
547
|
-
const solidView = solidFormViewMetaData.data.solidView;
|
|
548
|
-
const solidFieldsMetadata = solidFormViewMetaData.data.solidFieldsMetadata;
|
|
549
|
-
const layoutFieldsObj = getLayoutFieldsAsObject([formViewLayout]);
|
|
550
|
-
|
|
551
|
-
try {
|
|
552
|
-
let formData = new FormData();
|
|
553
|
-
|
|
554
|
-
// Iterate through the keys in the values object
|
|
555
|
-
Object.entries(values).forEach(([key, value]) => {
|
|
556
|
-
|
|
557
|
-
const fieldMetadata = solidFieldsMetadata[key];
|
|
558
|
-
const fieldContext: SolidFieldProps = {
|
|
559
|
-
fieldMetadata: fieldMetadata,
|
|
560
|
-
field: layoutFieldsObj[key],
|
|
561
|
-
data: initialEntityData,
|
|
562
|
-
solidFormViewMetaData: solidFormViewMetaData,
|
|
563
|
-
modelName: params.modelName
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
let solidField = fieldFactory(fieldMetadata?.type, fieldContext);
|
|
567
|
-
|
|
568
|
-
// Append each field to the FormData
|
|
569
|
-
if (value !== undefined && value !== null && solidField) {
|
|
570
|
-
solidField.updateFormData(value, formData);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
});
|
|
574
|
-
if (params.inlineCreateAutoSave === true) {
|
|
575
|
-
params.customCreateHandler(formData);
|
|
576
|
-
} else {
|
|
577
|
-
if (params.id === 'new') {
|
|
578
|
-
// createEntity(formData);
|
|
579
|
-
const result = await createEntity(formData).unwrap();
|
|
580
|
-
showToast("success", "Form saved", "Form saved successfully!");
|
|
581
|
-
if (!params.embeded) {
|
|
582
|
-
const updatedUrl = pathname.replace("new", result?.data?.id);
|
|
583
|
-
router.push(updatedUrl);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
else {
|
|
587
|
-
// updateEntity({ id: +params.id, data: formData });
|
|
588
|
-
await updateEntity({ id: +params.id, data: formData }).unwrap();
|
|
589
|
-
// const result = await updateEntity({ id: +params.id, data: formData }).unwrap();
|
|
590
|
-
if (!params.embeded) {
|
|
591
|
-
showToast("success", "Form Updated", "Form updated successfully!");
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
} catch (err) {
|
|
597
|
-
console.error("Failed to create Entity: ", err);
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
const showFieldError = () => {
|
|
602
|
-
if (errorFields?.length === 0) return;
|
|
603
|
-
errorFields.forEach((error) => {
|
|
604
|
-
toast?.current?.show({
|
|
605
|
-
severity: "error",
|
|
606
|
-
summary: "Metadata Error",
|
|
607
|
-
detail: error,
|
|
608
|
-
life: 3000,
|
|
609
|
-
});
|
|
610
|
-
|
|
611
|
-
});
|
|
612
|
-
|
|
613
|
-
// errorFields.length = 0;
|
|
614
|
-
};
|
|
615
|
-
// useEffect(() => {
|
|
616
|
-
// if (errorFields?.length > 0) {
|
|
617
|
-
// showFieldError();
|
|
618
|
-
// }
|
|
619
|
-
// }, [errorFields])
|
|
620
|
-
|
|
621
|
-
// - - - - - - - - - - - -- - - - - - - - - - - - DATA here
|
|
622
|
-
// Fetch the actual data here.
|
|
623
|
-
// This is the initial value of this form, will come from an API call in the case of edit.
|
|
624
|
-
let layoutFields = [];
|
|
625
|
-
let toPopulate = [];
|
|
626
|
-
let toPopulateMedia = [];
|
|
627
|
-
if (solidFormViewMetaData && formViewLayout) {
|
|
628
|
-
const solidView = solidFormViewMetaData.data.solidView;
|
|
629
|
-
const solidFieldsMetadata = solidFormViewMetaData.data.solidFieldsMetadata;
|
|
630
|
-
layoutFields = [formViewLayout].flatMap(getLayoutFields);
|
|
631
|
-
for (let i = 0; i < layoutFields?.length; i++) {
|
|
632
|
-
const formLayoutField = layoutFields[i];
|
|
633
|
-
const fieldMetadata = solidFieldsMetadata[formLayoutField.attrs.name];
|
|
634
|
-
if (fieldMetadata?.type === 'relation') {
|
|
635
|
-
toPopulate.push(fieldMetadata.name);
|
|
636
|
-
}
|
|
637
|
-
if (fieldMetadata?.type === 'mediaSingle' || fieldMetadata?.type === 'mediaMultiple') {
|
|
638
|
-
toPopulateMedia.push(fieldMetadata.name);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
// TODO: Possible optimisation here, we are firing 2 queries to load the form view data object.
|
|
643
|
-
// once without populate & populateMedia and then again once after that.
|
|
644
|
-
const formViewDataQs = qs.stringify({ populate: toPopulate, populateMedia: toPopulateMedia }, {
|
|
645
|
-
encodeValuesOnly: true,
|
|
646
|
-
});
|
|
647
|
-
const [initialEntityData, setInitialEntityData] = useState({});
|
|
648
|
-
const {
|
|
649
|
-
data: solidFormViewData,
|
|
650
|
-
isLoading: solidFormViewDataIsLoading,
|
|
651
|
-
refetch: refetchSolidFormViewData,
|
|
652
|
-
} = useGetSolidEntityByIdQuery({ id: params.id, qs: formViewDataQs }, {
|
|
653
|
-
skip: params.id === 'new'
|
|
654
|
-
});
|
|
655
|
-
useEffect(() => {
|
|
656
|
-
if (params.id !== 'new') {
|
|
657
|
-
refetchSolidFormViewData()
|
|
658
|
-
}
|
|
659
|
-
}, [formViewDataQs])
|
|
660
|
-
|
|
661
|
-
useEffect(() => {
|
|
662
|
-
const handleDynamicLayout = async () => {
|
|
663
|
-
if (solidFormViewMetaData) {
|
|
664
|
-
let formLayout = solidFormViewMetaData;
|
|
665
|
-
const dynamicHeader = solidFormViewMetaData?.data?.solidView?.layout?.onFormLayoutLoad;
|
|
666
|
-
let DynamicFunctionComponent = null;
|
|
667
|
-
const event: SolidLoadForm = {
|
|
668
|
-
fieldsMetadata: solidFormViewMetaData,
|
|
669
|
-
formData: solidFormViewData?.data,
|
|
670
|
-
type: 'onFormLayoutLoad',
|
|
671
|
-
viewMetadata: solidFormViewMetaData?.data?.solidView
|
|
672
|
-
}
|
|
673
|
-
if (dynamicHeader) {
|
|
674
|
-
DynamicFunctionComponent = getExtensionFunction(dynamicHeader);
|
|
675
|
-
if (DynamicFunctionComponent) {
|
|
676
|
-
try {
|
|
677
|
-
const updatedFormLayout = await DynamicFunctionComponent(event);
|
|
678
|
-
if (updatedFormLayout && updatedFormLayout?.layoutChanged && updatedFormLayout?.newLayout) {
|
|
679
|
-
const newFormLayout = {
|
|
680
|
-
...formLayout,
|
|
681
|
-
data: {
|
|
682
|
-
...formLayout.data,
|
|
683
|
-
solidView: {
|
|
684
|
-
...formLayout.data.solidView,
|
|
685
|
-
layout: updatedFormLayout.newLayout
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
};
|
|
689
|
-
formLayout = newFormLayout;
|
|
690
|
-
}
|
|
691
|
-
} catch (error) {
|
|
692
|
-
console.error('Error in DynamicFunctionComponent:', error);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
setFormViewMetaData(formLayout);
|
|
697
|
-
if (params.customLayout) {
|
|
698
|
-
setFormViewLayout(params.customLayout);
|
|
699
|
-
} else {
|
|
700
|
-
setFormViewLayout(formLayout.data.solidView.layout);
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
};
|
|
704
|
-
|
|
705
|
-
handleDynamicLayout();
|
|
706
|
-
}, [solidFormViewMetaData, solidFormViewData]);
|
|
707
|
-
|
|
708
|
-
useEffect(() => {
|
|
709
|
-
const handleDynamicFunction = async () => {
|
|
710
|
-
if (solidFormViewData) {
|
|
711
|
-
const dynamicHeader = solidFormViewMetaData?.data?.solidView?.layout?.onFormDataLoad;
|
|
712
|
-
|
|
713
|
-
let DynamicFunctionComponent = null;
|
|
714
|
-
let formViewData = solidFormViewData?.data;
|
|
715
|
-
|
|
716
|
-
const event: SolidLoadForm = {
|
|
717
|
-
fieldsMetadata: solidFormViewMetaData,
|
|
718
|
-
formData: solidFormViewData?.data,
|
|
719
|
-
type: dynamicHeader,
|
|
720
|
-
viewMetadata: solidFormViewMetaData?.data?.solidView
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
if (dynamicHeader) {
|
|
724
|
-
DynamicFunctionComponent = getExtensionFunction(dynamicHeader);
|
|
725
|
-
|
|
726
|
-
if (DynamicFunctionComponent) {
|
|
727
|
-
const updatedFormData = await DynamicFunctionComponent(event);
|
|
728
|
-
|
|
729
|
-
if (updatedFormData && updatedFormData?.dataChanged && updatedFormData?.newFormData) {
|
|
730
|
-
formViewData = updatedFormData.newFormData;
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
setInitialEntityData(formViewData);
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
|
-
|
|
738
|
-
handleDynamicFunction();
|
|
739
|
-
}, [solidFormViewData]);
|
|
740
|
-
|
|
741
|
-
let formik: FormikObject;
|
|
742
|
-
|
|
743
|
-
// If either the metadata or the data of this form is loading, then we simply render a loading screen...
|
|
744
|
-
if (solidFormViewMetaDataIsLoading || solidFormViewDataIsLoading || !formViewLayout) {
|
|
745
|
-
formik = useFormik({
|
|
746
|
-
initialValues: {},
|
|
747
|
-
validationSchema: Yup.object(),
|
|
748
|
-
enableReinitialize: true,
|
|
749
|
-
onSubmit: onFormikSubmit,
|
|
750
|
-
});
|
|
751
|
-
|
|
752
|
-
return <div>Rendering form...</div>;
|
|
753
|
-
}
|
|
754
|
-
// At this point everything required to render the form is loaded, so we go ahead and start rendering things dynamically...
|
|
755
|
-
else {
|
|
756
|
-
|
|
757
|
-
// Initialize formik...
|
|
758
|
-
const solidView = solidFormViewMetaData.data.solidView;
|
|
759
|
-
const solidFieldsMetadata = solidFormViewMetaData.data.solidFieldsMetadata;
|
|
760
|
-
|
|
761
|
-
const validationSchema = {};
|
|
762
|
-
const initialValues = {};
|
|
763
|
-
|
|
764
|
-
for (let i = 0; i < layoutFields?.length; i++) {
|
|
765
|
-
const formLayoutField = layoutFields[i];
|
|
766
|
-
const fieldMetadata = solidFieldsMetadata[formLayoutField.attrs.name];
|
|
767
|
-
const fieldContext: SolidFieldProps = {
|
|
768
|
-
fieldMetadata: fieldMetadata,
|
|
769
|
-
field: formLayoutField,
|
|
770
|
-
data: initialEntityData,
|
|
771
|
-
solidFormViewMetaData: solidFormViewMetaData,
|
|
772
|
-
modelName: params.modelName
|
|
773
|
-
}
|
|
774
|
-
let solidField = fieldFactory(fieldMetadata?.type, fieldContext);
|
|
775
|
-
if (!fieldMetadata?.type) {
|
|
776
|
-
const errorMessage = formLayoutField.attrs.label;
|
|
777
|
-
if (!errorFields.includes(errorMessage)) {
|
|
778
|
-
errorFields.push(errorMessage);
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
if (solidField) {
|
|
782
|
-
// @ts-ignore
|
|
783
|
-
validationSchema[formLayoutField.attrs.name] = solidField.validationSchema();
|
|
784
|
-
// @ts-ignore
|
|
785
|
-
initialValues[formLayoutField.attrs.name] = solidField.initialValue();
|
|
786
|
-
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
formik = useFormik({
|
|
791
|
-
initialValues: initialValues,
|
|
792
|
-
validationSchema: Yup.object(validationSchema),
|
|
793
|
-
enableReinitialize: true,
|
|
794
|
-
onSubmit: onFormikSubmit,
|
|
795
|
-
});
|
|
796
|
-
|
|
797
|
-
const formFieldOnXXX = async (event: ChangeEvent<HTMLInputElement>, eventType: string) => {
|
|
798
|
-
|
|
799
|
-
// Invoke the formik change
|
|
800
|
-
if (eventType === 'onFieldChange') {
|
|
801
|
-
formik.handleChange(event);
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
// get details from the form event
|
|
805
|
-
const { name: fieldName, value, type, checked } = event.target;
|
|
806
|
-
// console.log(`${eventType}: formFieldOnXXX ${fieldName} invoked for change with value:`, value);
|
|
807
|
-
|
|
808
|
-
// TODO: check if there is a change handler registered with this form view, load it and fire it.
|
|
809
|
-
const changeHandler = solidView.layout[eventType];
|
|
810
|
-
// console.log(`changeHandler for this form is ${changeHandler}`);
|
|
811
|
-
|
|
812
|
-
if (changeHandler) {
|
|
813
|
-
// Get hold of the dynamic module...
|
|
814
|
-
// const dynamicChangeHandler = await loadDynamicModule(changeHandler);
|
|
815
|
-
const dynamicChangeHandler = getExtensionFunction(changeHandler);
|
|
816
|
-
|
|
817
|
-
// Invoke the dynamic module...
|
|
818
|
-
if (dynamicChangeHandler) {
|
|
819
|
-
const event: SolidUiEvent = {
|
|
820
|
-
fieldsMetadata: solidFieldsMetadata,
|
|
821
|
-
formData: formik.values,
|
|
822
|
-
modifiedField: fieldName,
|
|
823
|
-
modifiedFieldValue: value,
|
|
824
|
-
// @ts-ignore
|
|
825
|
-
// TODO: HP & OR: This will be fixed once we figure out how to get types exported from solid-core-ui
|
|
826
|
-
type: eventType,
|
|
827
|
-
viewMetadata: solidView
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
// Invoke the dynamic change handler:
|
|
831
|
-
// TODO: encapsulate in try/catch, catch the exception render in the UI as an error & stop form rendering.
|
|
832
|
-
const updatedFormInfo = await dynamicChangeHandler(event);
|
|
833
|
-
// console.log(`${eventType}: formFieldOnXXX response received: `, updatedFormInfo);
|
|
834
|
-
|
|
835
|
-
// If dataChanged is true, update Formik values
|
|
836
|
-
if (updatedFormInfo?.dataChanged && updatedFormInfo.newFormData) {
|
|
837
|
-
// This does one field at a time.
|
|
838
|
-
// TODO: does the below fire change events again?
|
|
839
|
-
Object.entries(updatedFormInfo.newFormData).forEach(([key, newValue]) => {
|
|
840
|
-
formik.setFieldValue(key, newValue);
|
|
841
|
-
});
|
|
842
|
-
|
|
843
|
-
// This does all at once.
|
|
844
|
-
// formik.setValues({
|
|
845
|
-
// ...formik.values,
|
|
846
|
-
// ...updatedFormInfo.newFormData
|
|
847
|
-
// });
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
// if layout has changed then we need to re-render.
|
|
851
|
-
if (updatedFormInfo?.layoutChanged && updatedFormInfo.newLayout) {
|
|
852
|
-
// setFormViewMetaData({ ...formViewMetaData, layout: updatedFormInfo.newLayout });
|
|
853
|
-
// console.log(`Existing form view metadata is: `, formViewMetaData);
|
|
854
|
-
|
|
855
|
-
// TODO: this will trigger a useEffect dependent on formViewMetadata that invokes setFormViewLayout,
|
|
856
|
-
// TODO: which means that this will not work if custom layout has been injected as a prop.
|
|
857
|
-
setFormViewLayout(updatedFormInfo.newLayout);
|
|
858
|
-
setFormViewMetaData((prevMetaData: any) => {
|
|
859
|
-
const updatedFormViewMetadata = {
|
|
860
|
-
...prevMetaData,
|
|
861
|
-
data: {
|
|
862
|
-
...prevMetaData.data,
|
|
863
|
-
solidView: {
|
|
864
|
-
...prevMetaData.data.solidView,
|
|
865
|
-
layout: updatedFormInfo.newLayout,
|
|
866
|
-
},
|
|
867
|
-
},
|
|
868
|
-
};
|
|
869
|
-
// console.log(`Updated form view metadata is: `, updatedFormViewMetadata);
|
|
870
|
-
return updatedFormViewMetadata;
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
else {
|
|
875
|
-
// TODO: Show an error popup and stop form rendering ideallly...
|
|
876
|
-
console.log(`Unable to load dynamic module:`, changeHandler);
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
// Now render the form dynamically...
|
|
882
|
-
const renderFormElementDynamically: any = (element: any, solidFormViewMetaData: any) => {
|
|
883
|
-
let { type, attrs, body, children } = element;
|
|
884
|
-
|
|
885
|
-
// const key = attrs?.name ?? generateRandomKey();
|
|
886
|
-
const key = attrs?.name;
|
|
887
|
-
let visible = attrs?.visible;
|
|
888
|
-
if (visible === undefined || visible === null) {
|
|
889
|
-
visible = true;
|
|
890
|
-
}
|
|
891
|
-
// console.log(`Resolved visibility of form element ${key} to ${visible}`);
|
|
892
|
-
// console.log(`Form element ${key}: `, attrs);
|
|
893
|
-
|
|
894
|
-
switch (type) {
|
|
895
|
-
case "form":
|
|
896
|
-
if (!children)
|
|
897
|
-
children = [];
|
|
898
|
-
return <div key={key}>{children.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData))}</div>;
|
|
899
|
-
case "div":
|
|
900
|
-
if (!children)
|
|
901
|
-
children = [];
|
|
902
|
-
return <div key={key} {...attrs}>{children.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData))}</div>
|
|
903
|
-
case "span":
|
|
904
|
-
return <span key={key} {...attrs}>{body}</span>
|
|
905
|
-
case "p":
|
|
906
|
-
return <p key={key} {...attrs}>{body}</p>
|
|
907
|
-
case "h1":
|
|
908
|
-
return <h1 key={key} {...attrs}>{body}</h1>
|
|
909
|
-
case "h2":
|
|
910
|
-
return <h2 key={key} {...attrs}>{body}</h2>
|
|
911
|
-
case "ul":
|
|
912
|
-
if (!children)
|
|
913
|
-
children = [];
|
|
914
|
-
return <ul key={key} {...attrs}>{children.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData))}</ul>
|
|
915
|
-
case "li":
|
|
916
|
-
return <li key={key} {...attrs}>{body}</li>
|
|
917
|
-
case "sheet":
|
|
918
|
-
return <SolidSheet key={key}>{children.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData))}</SolidSheet>;
|
|
919
|
-
case "group":
|
|
920
|
-
if (visible === true) {
|
|
921
|
-
return <SolidGroup key={key} attrs={attrs}>{children.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData))}</SolidGroup>;
|
|
922
|
-
}
|
|
923
|
-
case "row":
|
|
924
|
-
if (visible === true) {
|
|
925
|
-
return <SolidRow key={key} attrs={attrs}>{children.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData))}</SolidRow>;
|
|
926
|
-
}
|
|
927
|
-
case "column":
|
|
928
|
-
if (visible === true) {
|
|
929
|
-
return <SolidColumn key={key} attrs={attrs}>{children.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData))}</SolidColumn>;
|
|
930
|
-
}
|
|
931
|
-
case "field": {
|
|
932
|
-
if (visible === true) {
|
|
933
|
-
|
|
934
|
-
// const fieldMetadata = solidFieldsMetadata[attrs.name];
|
|
935
|
-
const fieldMetadata = solidFormViewMetaData.data.solidFieldsMetadata[attrs.name];
|
|
936
|
-
// Read only permission if there is no update permission on model and router doesnt contains new
|
|
937
|
-
const readOnlyPermission = !actionsAllowed.includes(`${updatePermission(params.modelName)}`) && params.id !== "new";
|
|
938
|
-
return <SolidField
|
|
939
|
-
key={key}
|
|
940
|
-
field={element}
|
|
941
|
-
formik={formik}
|
|
942
|
-
fieldMetadata={fieldMetadata}
|
|
943
|
-
initialEntityData={solidFormViewData ? solidFormViewData.data : null}
|
|
944
|
-
solidFormViewMetaData={solidFormViewMetaData}
|
|
945
|
-
modelName={params.modelName}
|
|
946
|
-
readOnly={readOnlyPermission}
|
|
947
|
-
viewMode={viewMode}
|
|
948
|
-
onChange={formFieldOnXXX}
|
|
949
|
-
onBlur={formFieldOnXXX}
|
|
950
|
-
setLightboxUrls={setLightboxUrls}
|
|
951
|
-
setOpenLightbox={setOpenLightbox}
|
|
952
|
-
/>;
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
case "notebook":
|
|
956
|
-
if (visible === true) {
|
|
957
|
-
return <SolidNotebook key={key}>{children.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData))}</SolidNotebook>;
|
|
958
|
-
}
|
|
959
|
-
case "page":
|
|
960
|
-
// console.log(`Resolved visibility of form element ${key} to ${visible}`);
|
|
961
|
-
if (visible === true) {
|
|
962
|
-
const pageChildren = children.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData));
|
|
963
|
-
return SolidPage({ children: pageChildren, attrs: attrs, key: key });
|
|
964
|
-
}
|
|
965
|
-
case "custom":
|
|
966
|
-
if (visible === true) {
|
|
967
|
-
const widgetName = attrs?.widget;
|
|
968
|
-
const fieldMetadata = solidFormViewMetaData.data.solidFieldsMetadata[attrs.name];
|
|
969
|
-
|
|
970
|
-
if (widgetName) {
|
|
971
|
-
// widgetName, formik, field, fieldMetadata, solidFormViewMetaData
|
|
972
|
-
return <SolidDynamicWidget
|
|
973
|
-
key={key}
|
|
974
|
-
widgetName={widgetName}
|
|
975
|
-
field={element}
|
|
976
|
-
formik={formik}
|
|
977
|
-
fieldMetadata={fieldMetadata}
|
|
978
|
-
solidFormViewMetaData={solidFormViewMetaData}
|
|
979
|
-
/>
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
default:
|
|
984
|
-
return null;
|
|
985
|
-
}
|
|
986
|
-
};
|
|
987
|
-
|
|
988
|
-
const renderFormDynamically = (solidFormViewMetaData: any) => {
|
|
989
|
-
// console.log(`renderFormDynamically invoked....`);
|
|
990
|
-
if (!solidFormViewMetaData) {
|
|
991
|
-
return;
|
|
992
|
-
}
|
|
993
|
-
if (!solidFormViewMetaData.data) {
|
|
994
|
-
return;
|
|
995
|
-
}
|
|
996
|
-
const solidView = solidFormViewMetaData.data.solidView;
|
|
997
|
-
const solidFieldsMetadata = solidFormViewMetaData.data.solidFieldsMetadata;
|
|
998
|
-
if (!solidView || !solidFieldsMetadata) {
|
|
999
|
-
return;
|
|
1000
|
-
}
|
|
1001
|
-
if (!solidView || !solidFieldsMetadata) {
|
|
1002
|
-
return;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
const updatedLayout = [formViewLayout];
|
|
1006
|
-
|
|
1007
|
-
const dynamicForm = updatedLayout.map((element: any) => renderFormElementDynamically(element, solidFormViewMetaData));
|
|
1008
|
-
|
|
1009
|
-
return dynamicForm;
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
|
-
const handleDeleteEntity = async () => {
|
|
1013
|
-
deleteEntity(solidFormViewData.data.id);
|
|
1014
|
-
setDeleteDialogVisible(false);
|
|
1015
|
-
if (params.embeded == true) {
|
|
1016
|
-
setRedirectToList(false)
|
|
1017
|
-
|
|
1018
|
-
} else {
|
|
1019
|
-
setRedirectToList(true)
|
|
1020
|
-
|
|
1021
|
-
}
|
|
1022
|
-
// router.back();
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
const onDeleteClose = () => {
|
|
1026
|
-
setDeleteDialogVisible(false);
|
|
1027
|
-
}
|
|
1028
|
-
// TODO: This was simply to demonstrate how we can use dynamic components, we will remove this and use it in a more sensible way in the layout.
|
|
1029
|
-
// TODO: to demonstrated this you can simply add the below to the layout of the book form view.
|
|
1030
|
-
// TODO: "header": "BookFormViewDynamicComponent",
|
|
1031
|
-
const dynamicHeader = solidView.layout?.header;
|
|
1032
|
-
let DynamicHeaderComponent = null;
|
|
1033
|
-
if (dynamicHeader) {
|
|
1034
|
-
DynamicHeaderComponent = getExtensionComponent(dynamicHeader);
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
return (
|
|
1038
|
-
<div className="solid-form-wrapper">
|
|
1039
|
-
<Toast ref={toast} />
|
|
1040
|
-
<div className="solid-form-section" style={{ borderRight: params.embeded !== true ? '1px solid var(--primary-light-color' : '' }} >
|
|
1041
|
-
<form style={{ width: '100%' }} onSubmit={formik.handleSubmit}>
|
|
1042
|
-
<SolidFormActionHeader
|
|
1043
|
-
formik={formik}
|
|
1044
|
-
params={params}
|
|
1045
|
-
actionsAllowed={actionsAllowed}
|
|
1046
|
-
formViewLayout={formViewLayout}
|
|
1047
|
-
solidView={solidView}
|
|
1048
|
-
solidFormViewMetaData={solidFormViewMetaData}
|
|
1049
|
-
initialEntityData={initialEntityData}
|
|
1050
|
-
setDeleteDialogVisible={setDeleteDialogVisible}
|
|
1051
|
-
setLayoutDialogVisible={setLayoutDialogVisible}
|
|
1052
|
-
setRedirectToList={setRedirectToList}
|
|
1053
|
-
viewMode={viewMode}
|
|
1054
|
-
setViewMode={setViewMode}
|
|
1055
|
-
/>
|
|
1056
|
-
<div className="p-4 solid-form-content">
|
|
1057
|
-
{DynamicHeaderComponent && <DynamicHeaderComponent />}
|
|
1058
|
-
{renderFormDynamically(formViewMetaData)}
|
|
1059
|
-
</div>
|
|
1060
|
-
</form>
|
|
1061
|
-
{params.embeded !== true && isShowChatter === true &&
|
|
1062
|
-
<Button
|
|
1063
|
-
icon="pi pi-chevron-right"
|
|
1064
|
-
size="small"
|
|
1065
|
-
text
|
|
1066
|
-
className="chatter-collapse-btn"
|
|
1067
|
-
style={{ width: 30 }}
|
|
1068
|
-
onClick={() => setShowChatter(false)}
|
|
1069
|
-
/>
|
|
1070
|
-
}
|
|
1071
|
-
</div>
|
|
1072
|
-
{params.embeded !== true &&
|
|
1073
|
-
<div className={`chatter-section ${isShowChatter === false ? 'collapsed' : ''}`}>
|
|
1074
|
-
{isShowChatter === false ?
|
|
1075
|
-
<div className="flex flex-column gap-2 justify-content-center p-2">
|
|
1076
|
-
<div className="chatter-collapsed-content">
|
|
1077
|
-
Chatter/Audit Trail
|
|
1078
|
-
</div>
|
|
1079
|
-
<Button
|
|
1080
|
-
icon="pi pi-chevron-left"
|
|
1081
|
-
size="small"
|
|
1082
|
-
className="px-0"
|
|
1083
|
-
style={{ width: 30 }}
|
|
1084
|
-
onClick={() => { setShowChatter(true); setRefreshChatterMessage(true); }}
|
|
1085
|
-
/>
|
|
1086
|
-
</div>
|
|
1087
|
-
: <SolidChatter solidFormViewMetaData={solidFormViewMetaData} id={params.id} refreshChatterMessage={refreshChatterMessage} setRefreshChatterMessage={setRefreshChatterMessage} />
|
|
1088
|
-
}
|
|
1089
|
-
</div>
|
|
1090
|
-
}
|
|
1091
|
-
<Dialog
|
|
1092
|
-
visible={isDeleteDialogVisible}
|
|
1093
|
-
header="Confirm Delete"
|
|
1094
|
-
modal
|
|
1095
|
-
footer={() => (
|
|
1096
|
-
<div className="flex justify-content-center">
|
|
1097
|
-
<Button label="Yes" icon="pi pi-check" className='small-button' severity="danger" autoFocus onClick={() => handleDeleteEntity()} />
|
|
1098
|
-
<Button label="No" icon="pi pi-times" className='small-button' onClick={onDeleteClose} />
|
|
1099
|
-
</div>
|
|
1100
|
-
)}
|
|
1101
|
-
onHide={() => setDeleteDialogVisible(false)}
|
|
1102
|
-
>
|
|
1103
|
-
<p>Are you sure you want to delete?</p>
|
|
1104
|
-
</Dialog>
|
|
1105
|
-
<Dialog
|
|
1106
|
-
visible={isLayoutDialogVisible}
|
|
1107
|
-
header="Change Form Layout"
|
|
1108
|
-
modal
|
|
1109
|
-
onHide={() => setLayoutDialogVisible(false)}
|
|
1110
|
-
contentStyle={{
|
|
1111
|
-
width: 800
|
|
1112
|
-
}}
|
|
1113
|
-
>
|
|
1114
|
-
<SolidFormUserViewLayout solidFormViewMetaData={solidFormViewMetaData} setLayoutDialogVisible={setLayoutDialogVisible} />
|
|
1115
|
-
</Dialog>
|
|
1116
|
-
{openLightbox &&
|
|
1117
|
-
<Lightbox
|
|
1118
|
-
open={openLightbox}
|
|
1119
|
-
plugins={[Counter, Download]}
|
|
1120
|
-
close={() => setOpenLightbox(false)}
|
|
1121
|
-
slides={lightboxUrls}
|
|
1122
|
-
/>
|
|
1123
|
-
}
|
|
1124
|
-
</div>
|
|
1125
|
-
);
|
|
1126
|
-
}
|
|
1127
|
-
};
|
|
1128
|
-
|
|
1129
|
-
export default SolidFormView;
|