@solidstarters/solid-core-ui 1.1.19 → 1.1.20
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/auth/AuthLayout.d.ts.map +1 -1
- package/dist/components/auth/AuthLayout.js +4 -2
- package/dist/components/auth/AuthLayout.js.map +1 -1
- package/dist/components/auth/ForgotPasswordThankYou.d.ts.map +1 -1
- package/dist/components/auth/ForgotPasswordThankYou.js +3 -1
- package/dist/components/auth/ForgotPasswordThankYou.js.map +1 -1
- package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidForgotPassword.js +3 -1
- package/dist/components/auth/SolidForgotPassword.js.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.js +3 -1
- package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.js +3 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.js.map +1 -1
- package/dist/components/auth/SolidLogin.d.ts.map +1 -1
- package/dist/components/auth/SolidLogin.js +3 -1
- package/dist/components/auth/SolidLogin.js.map +1 -1
- package/dist/components/auth/SolidOTPVerify.d.ts.map +1 -1
- package/dist/components/auth/SolidOTPVerify.js +3 -1
- package/dist/components/auth/SolidOTPVerify.js.map +1 -1
- package/dist/components/auth/SolidRegister.d.ts.map +1 -1
- package/dist/components/auth/SolidRegister.js +3 -1
- package/dist/components/auth/SolidRegister.js.map +1 -1
- package/dist/components/auth/SolidResetPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidResetPassword.js +3 -1
- package/dist/components/auth/SolidResetPassword.js.map +1 -1
- package/dist/components/common/CancelButton.js +2 -2
- package/dist/components/common/CancelButton.js.map +1 -1
- package/dist/components/common/SolidBreadcrumb.d.ts +11 -0
- package/dist/components/common/SolidBreadcrumb.d.ts.map +1 -0
- package/dist/components/common/SolidBreadcrumb.js +22 -0
- package/dist/components/common/SolidBreadcrumb.js.map +1 -0
- package/dist/components/core/common/SolidConfigureLayoutElement.d.ts +1 -1
- package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidConfigureLayoutElement.js +13 -7
- package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
- package/dist/components/core/filter/SolidManyToOneFilterElement.js +1 -1
- package/dist/components/core/filter/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +31 -36
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/fields/ISolidField.d.ts +1 -0
- package/dist/components/core/form/fields/ISolidField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.js +3 -2
- package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js +3 -2
- package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.js +3 -2
- package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.js +10 -2
- package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.js +10 -2
- package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js +3 -2
- package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.js +3 -2
- package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +6 -5
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +4 -3
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.js +3 -2
- package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js +3 -2
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.js +3 -2
- package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.js +3 -2
- package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js +3 -2
- package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +9 -5
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +7 -8
- 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 +10 -8
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +54 -48
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidManyToOneFilterElement.js +1 -1
- package/dist/components/core/list/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +13 -5
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.js +1 -1
- package/dist/components/core/model/FieldMetaData.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js +65 -68
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/ModelMetaData.d.ts.map +1 -1
- package/dist/components/core/model/ModelMetaData.js +6 -1
- package/dist/components/core/model/ModelMetaData.js.map +1 -1
- package/dist/components/core/module/CreateModule.d.ts.map +1 -1
- package/dist/components/core/module/CreateModule.js +11 -4
- package/dist/components/core/module/CreateModule.js.map +1 -1
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +10 -3
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/layout/AppSidebar.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.js +34 -5
- package/dist/components/layout/AppSidebar.js.map +1 -1
- package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
- package/dist/components/layout/user-profile-menu.js +3 -1
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/helpers/permissions.d.ts +1 -0
- package/dist/helpers/permissions.d.ts.map +1 -1
- package/dist/helpers/permissions.js +3 -0
- package/dist/helpers/permissions.js.map +1 -1
- package/dist/redux/api/authApi.d.ts.map +1 -1
- package/dist/redux/api/authApi.js +1 -1
- package/dist/redux/api/authApi.js.map +1 -1
- package/dist/redux/api/solidViewApi.d.ts +1 -1
- package/dist/redux/api/solidViewApi.d.ts.map +1 -1
- package/dist/redux/api/solidViewApi.js +1 -1
- package/dist/redux/api/solidViewApi.js.map +1 -1
- package/dist/resources/globals.css +2551 -0
- package/dist/resources/images/AvatarDemo.png +0 -0
- package/dist/resources/images/Footerbg.png +0 -0
- package/dist/resources/images/LoginBanner.png +0 -0
- package/dist/resources/images/Navigation/Level.svg +5 -0
- package/dist/resources/images/Navigation/Presure.svg +7 -0
- package/dist/resources/images/Navigation/Temperature.svg +13 -0
- package/dist/resources/images/Navigation/settings.png +0 -0
- package/dist/resources/images/Profile/Avatar.png +0 -0
- package/dist/resources/images/SS-Logo.png +0 -0
- package/dist/resources/images/activity.svg +3 -0
- package/dist/resources/images/app-builder.png +0 -0
- package/dist/resources/images/auth/solid-left-layout-bg.png +0 -0
- package/dist/resources/images/auth/solid-login-light.png +0 -0
- package/dist/resources/images/auth/solid-right-layout-bg.png +0 -0
- package/dist/resources/images/clog-wheel.png +0 -0
- package/dist/resources/images/dark-mode.png +0 -0
- package/dist/resources/images/dashboard/Ellipse 1.svg +10 -0
- package/dist/resources/images/dashboard/Rectangle 17.svg +10 -0
- package/dist/resources/images/dashboard/Rectangle 25.svg +11 -0
- package/dist/resources/images/dashboard/image 5.svg +9 -0
- package/dist/resources/images/eye-icon.png +0 -0
- package/dist/resources/images/fb.svg +3 -0
- package/dist/resources/images/fileReader/image-jpg.png +0 -0
- package/dist/resources/images/filter-icon.png +0 -0
- package/dist/resources/images/form/user.png +0 -0
- package/dist/resources/images/iam.png +0 -0
- package/dist/resources/images/icons/icon-activity.svg +3 -0
- package/dist/resources/images/icons/icon-calender.svg +3 -0
- package/dist/resources/images/icons/icon-graph.svg +3 -0
- package/dist/resources/images/icons/icon-kanban.svg +3 -0
- package/dist/resources/images/icons/icon-list.svg +3 -0
- package/dist/resources/images/icons/icon-users.svg +3 -0
- package/dist/resources/images/icons/jump-to-icon.png +0 -0
- package/dist/resources/images/insta.svg +3 -0
- package/dist/resources/images/layout/images/comfortable.png +0 -0
- package/dist/resources/images/layout/images/compact.png +0 -0
- package/dist/resources/images/layout/images/cozy.png +0 -0
- package/dist/resources/images/layout/images/kanban.png +0 -0
- package/dist/resources/images/li.svg +3 -0
- package/dist/resources/images/loginhero.png +0 -0
- package/dist/resources/images/logo.png +0 -0
- package/dist/resources/images/mail-icon.png +0 -0
- package/dist/resources/images/menu/app-builder.svg +19 -0
- package/dist/resources/images/menu/iam.svg +14 -0
- package/dist/resources/images/menu/logicloop-black.svg +28 -0
- package/dist/resources/images/menu/logicloop-blue.svg +32 -0
- package/dist/resources/images/menu/logicloop-white.svg +32 -0
- package/dist/resources/images/menu/queues.svg +14 -0
- package/dist/resources/images/menu/radix.svg +9 -0
- package/dist/resources/images/menu/rl-lead-middleware.svg +19 -0
- package/dist/resources/images/menu/solid-address-master.svg +10 -0
- package/dist/resources/images/menu/srmd-tracker-black.svg +16 -0
- package/dist/resources/images/menu/srmd-tracker-original.svg +32 -0
- package/dist/resources/images/menu/srmd-tracker-white.svg +17 -0
- package/dist/resources/images/menu/srmd-tracker.svg +16 -0
- package/dist/resources/images/menu-icon.png +0 -0
- package/dist/resources/images/menu-toggle.png +0 -0
- package/dist/resources/images/password-icon.png +0 -0
- package/dist/resources/images/profile.png +0 -0
- package/dist/resources/images/radix-logo-white.png +0 -0
- package/dist/resources/images/radix-logo.png +0 -0
- package/dist/resources/images/search-icon.png +0 -0
- package/dist/resources/images/signupBanner.png +0 -0
- package/dist/resources/images/tw.svg +3 -0
- package/dist/resources/images/user-icon.png +0 -0
- package/dist/resources/stylesheets/_config.scss +54 -0
- package/dist/resources/stylesheets/_content.scss +91 -0
- package/dist/resources/stylesheets/_footer.scss +8 -0
- package/dist/resources/stylesheets/_main.scss +47 -0
- package/dist/resources/stylesheets/_menu.scss +185 -0
- package/dist/resources/stylesheets/_mixins.scss +13 -0
- package/dist/resources/stylesheets/_responsive.scss +99 -0
- package/dist/resources/stylesheets/_topbar.scss +149 -0
- package/dist/resources/stylesheets/_typography.scss +63 -0
- package/dist/resources/stylesheets/_utils.scss +27 -0
- package/dist/resources/stylesheets/_variables.scss +3 -0
- package/dist/resources/stylesheets/layout.scss +11 -0
- package/package.json +6 -3
- package/src/components/auth/AuthLayout.tsx +8 -5
- package/src/components/auth/ForgotPasswordThankYou.tsx +6 -3
- package/src/components/auth/SolidForgotPassword.tsx +6 -3
- package/src/components/auth/SolidInitialLoginOtp.tsx +6 -3
- package/src/components/auth/SolidInitiateRegisterOtp.tsx +6 -3
- package/src/components/auth/SolidLogin.tsx +6 -3
- package/src/components/auth/SolidOTPVerify.tsx +6 -3
- package/src/components/auth/SolidRegister.tsx +6 -4
- package/src/components/auth/SolidResetPassword.tsx +6 -3
- package/src/components/common/CancelButton.tsx +2 -2
- package/src/components/common/SolidBreadcrumb.tsx +27 -0
- package/src/components/core/common/SolidConfigureLayoutElement.tsx +31 -12
- package/src/components/core/filter/SolidManyToOneFilterElement.tsx +1 -1
- package/src/components/core/form/SolidFormView.tsx +63 -65
- package/src/components/core/form/fields/ISolidField.tsx +2 -1
- package/src/components/core/form/fields/SolidBooleanField.tsx +3 -2
- package/src/components/core/form/fields/SolidDateField.tsx +3 -2
- package/src/components/core/form/fields/SolidDateTimeField.tsx +3 -2
- package/src/components/core/form/fields/SolidDecimalField.tsx +10 -2
- package/src/components/core/form/fields/SolidIntegerField.tsx +10 -2
- package/src/components/core/form/fields/SolidJsonField.tsx +3 -2
- package/src/components/core/form/fields/SolidLongTextField.tsx +3 -2
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +5 -4
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +4 -3
- package/src/components/core/form/fields/SolidRichTextField.tsx +3 -2
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +3 -2
- package/src/components/core/form/fields/SolidSelectionStaticField.tsx +3 -2
- package/src/components/core/form/fields/SolidShortTextField.tsx +3 -2
- package/src/components/core/form/fields/SolidTimeField.tsx +3 -2
- package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +14 -7
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +7 -7
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +11 -7
- package/src/components/core/list/SolidListView.tsx +36 -55
- package/src/components/core/list/SolidManyToOneFilterElement.tsx +1 -1
- package/src/components/core/model/CreateModel.tsx +32 -23
- package/src/components/core/model/FieldMetaData.tsx +24 -24
- package/src/components/core/model/FieldMetaDataForm.tsx +45 -60
- package/src/components/core/model/ModelMetaData.tsx +7 -1
- package/src/components/core/module/CreateModule.tsx +20 -15
- package/src/components/core/users/CreateUser.tsx +13 -3
- package/src/components/layout/AppSidebar.tsx +58 -23
- package/src/components/layout/user-profile-menu.tsx +11 -8
- package/src/declarations.d.ts +19 -0
- package/src/helpers/permissions.ts +3 -0
- package/src/redux/api/authApi.ts +2 -1
- package/src/redux/api/solidViewApi.ts +1 -0
- package/src/resources/globals.css +2551 -0
- package/src/resources/images/AvatarDemo.png +0 -0
- package/src/resources/images/Footerbg.png +0 -0
- package/src/resources/images/LoginBanner.png +0 -0
- package/src/resources/images/Navigation/Level.svg +5 -0
- package/src/resources/images/Navigation/Presure.svg +7 -0
- package/src/resources/images/Navigation/Temperature.svg +13 -0
- package/src/resources/images/Navigation/settings.png +0 -0
- package/src/resources/images/Profile/Avatar.png +0 -0
- package/src/resources/images/SS-Logo.png +0 -0
- package/src/resources/images/activity.svg +3 -0
- 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 +10 -0
- package/src/resources/images/dashboard/Rectangle 17.svg +10 -0
- package/src/resources/images/dashboard/Rectangle 25.svg +11 -0
- package/src/resources/images/dashboard/image 5.svg +9 -0
- package/src/resources/images/eye-icon.png +0 -0
- package/src/resources/images/fb.svg +3 -0
- package/src/resources/images/fileReader/image-jpg.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 +3 -0
- package/src/resources/images/icons/icon-calender.svg +3 -0
- package/src/resources/images/icons/icon-graph.svg +3 -0
- package/src/resources/images/icons/icon-kanban.svg +3 -0
- package/src/resources/images/icons/icon-list.svg +3 -0
- package/src/resources/images/icons/icon-users.svg +3 -0
- package/src/resources/images/icons/jump-to-icon.png +0 -0
- package/src/resources/images/insta.svg +3 -0
- 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 +3 -0
- 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 +19 -0
- package/src/resources/images/menu/iam.svg +14 -0
- package/src/resources/images/menu/logicloop-black.svg +28 -0
- package/src/resources/images/menu/logicloop-blue.svg +32 -0
- package/src/resources/images/menu/logicloop-white.svg +32 -0
- package/src/resources/images/menu/queues.svg +14 -0
- package/src/resources/images/menu/radix.svg +9 -0
- package/src/resources/images/menu/rl-lead-middleware.svg +19 -0
- package/src/resources/images/menu/solid-address-master.svg +10 -0
- package/src/resources/images/menu/srmd-tracker-black.svg +16 -0
- package/src/resources/images/menu/srmd-tracker-original.svg +32 -0
- package/src/resources/images/menu/srmd-tracker-white.svg +17 -0
- package/src/resources/images/menu/srmd-tracker.svg +16 -0
- 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 +3 -0
- package/src/resources/images/user-icon.png +0 -0
- package/src/resources/stylesheets/_config.scss +54 -0
- package/src/resources/stylesheets/_content.scss +91 -0
- package/src/resources/stylesheets/_footer.scss +8 -0
- package/src/resources/stylesheets/_main.scss +47 -0
- package/src/resources/stylesheets/_menu.scss +185 -0
- package/src/resources/stylesheets/_mixins.scss +13 -0
- package/src/resources/stylesheets/_responsive.scss +99 -0
- package/src/resources/stylesheets/_topbar.scss +149 -0
- package/src/resources/stylesheets/_typography.scss +63 -0
- package/src/resources/stylesheets/_utils.scss +27 -0
- package/src/resources/stylesheets/_variables.scss +3 -0
- package/src/resources/stylesheets/layout.scss +11 -0
|
@@ -70,6 +70,7 @@ export class SolidBooleanField implements ISolidField {
|
|
|
70
70
|
const booleanOptions = ["false", "true"];
|
|
71
71
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
72
72
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
73
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
73
74
|
|
|
74
75
|
useEffect(() => { formik.setFieldValue(fieldLayoutInfo.attrs.name, "false") }, [])
|
|
75
76
|
|
|
@@ -86,7 +87,7 @@ export class SolidBooleanField implements ISolidField {
|
|
|
86
87
|
<div className="flex flex-column gap-2 mt-4">
|
|
87
88
|
{showFieldLabel != false &&
|
|
88
89
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
89
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
90
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
90
91
|
</label>
|
|
91
92
|
}
|
|
92
93
|
{/* <InputText
|
|
@@ -97,7 +98,7 @@ export class SolidBooleanField implements ISolidField {
|
|
|
97
98
|
value={formik.values[fieldLayoutInfo.attrs.name] || ''}
|
|
98
99
|
/> */}
|
|
99
100
|
<SelectButton
|
|
100
|
-
readOnly={formReadonly || fieldReadonly}
|
|
101
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
101
102
|
disabled={formDisabled || fieldDisabled}
|
|
102
103
|
id={fieldLayoutInfo.attrs.name}
|
|
103
104
|
aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
|
|
@@ -53,6 +53,7 @@ export class SolidDateField implements ISolidField {
|
|
|
53
53
|
const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
|
|
54
54
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
55
55
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
56
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
56
57
|
|
|
57
58
|
const fieldDisabled = fieldLayoutInfo.attrs?.disabled;
|
|
58
59
|
// const fieldReadonly = fieldLayoutInfo.attrs?.readonly;
|
|
@@ -65,11 +66,11 @@ export class SolidDateField implements ISolidField {
|
|
|
65
66
|
<div className="flex flex-column gap-2 mt-4">
|
|
66
67
|
{showFieldLabel != false &&
|
|
67
68
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
68
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
69
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
69
70
|
</label>
|
|
70
71
|
}
|
|
71
72
|
<Calendar
|
|
72
|
-
disabled={formDisabled || fieldDisabled}
|
|
73
|
+
disabled={formDisabled || fieldDisabled || readOnlyPermission}
|
|
73
74
|
ref={calendarRef} // Attach ref to Calendar
|
|
74
75
|
id={fieldLayoutInfo.attrs.name}
|
|
75
76
|
aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
|
|
@@ -52,6 +52,7 @@ export class SolidDateTimeField implements ISolidField {
|
|
|
52
52
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
53
53
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
54
54
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
55
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
55
56
|
|
|
56
57
|
const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
|
|
57
58
|
|
|
@@ -63,11 +64,11 @@ export class SolidDateTimeField implements ISolidField {
|
|
|
63
64
|
<div className="flex flex-column gap-2 mt-4">
|
|
64
65
|
{showFieldLabel != false &&
|
|
65
66
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
66
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
67
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
67
68
|
</label>
|
|
68
69
|
}
|
|
69
70
|
<Calendar
|
|
70
|
-
disabled={formDisabled || fieldDisabled}
|
|
71
|
+
disabled={formDisabled || fieldDisabled || readOnlyPermission}
|
|
71
72
|
ref={calendarRef} // Attach ref to Calendar
|
|
72
73
|
id={fieldLayoutInfo.attrs.name}
|
|
73
74
|
aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
|
|
@@ -41,6 +41,13 @@ export class SolidDecimalField implements ISolidField {
|
|
|
41
41
|
schema = schema.required(`${fieldLabel} is required.`);
|
|
42
42
|
} else {
|
|
43
43
|
schema = schema.nullable(); // Allow null when not required
|
|
44
|
+
}
|
|
45
|
+
// 2. length (min/max)
|
|
46
|
+
if (fieldMetadata.min && fieldMetadata.min > 0) {
|
|
47
|
+
schema = schema.min(fieldMetadata.min, `${fieldLabel} should be at-least ${fieldMetadata.min} characters long.`);
|
|
48
|
+
}
|
|
49
|
+
if (fieldMetadata.max && fieldMetadata.max > 0) {
|
|
50
|
+
schema = schema.max(fieldMetadata.max, `${fieldLabel} should not be more than ${fieldMetadata.max} characters long.`);
|
|
44
51
|
}
|
|
45
52
|
return schema;
|
|
46
53
|
}
|
|
@@ -53,6 +60,7 @@ export class SolidDecimalField implements ISolidField {
|
|
|
53
60
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
54
61
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
55
62
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
63
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
56
64
|
|
|
57
65
|
const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
|
|
58
66
|
|
|
@@ -67,11 +75,11 @@ export class SolidDecimalField implements ISolidField {
|
|
|
67
75
|
<div className="flex flex-column gap-2 mt-4">
|
|
68
76
|
{showFieldLabel != false &&
|
|
69
77
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
70
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
78
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
71
79
|
</label>
|
|
72
80
|
}
|
|
73
81
|
<InputNumber
|
|
74
|
-
readOnly={formReadonly || fieldReadonly}
|
|
82
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
75
83
|
disabled={formDisabled || fieldDisabled}
|
|
76
84
|
id={fieldLayoutInfo.attrs.name}
|
|
77
85
|
minFractionDigits={2}
|
|
@@ -43,6 +43,13 @@ export class SolidIntegerField implements ISolidField {
|
|
|
43
43
|
} else {
|
|
44
44
|
schema = schema.nullable(); // Allow null when not required
|
|
45
45
|
}
|
|
46
|
+
// 2. length (min/max)
|
|
47
|
+
if (fieldMetadata.min && fieldMetadata.min > 0) {
|
|
48
|
+
schema = schema.min(fieldMetadata.min, `${fieldLabel} should be at-least ${fieldMetadata.min} characters long.`);
|
|
49
|
+
}
|
|
50
|
+
if (fieldMetadata.max && fieldMetadata.max > 0) {
|
|
51
|
+
schema = schema.max(fieldMetadata.max, `${fieldLabel} should not be more than ${fieldMetadata.max} characters long.`);
|
|
52
|
+
}
|
|
46
53
|
return schema;
|
|
47
54
|
}
|
|
48
55
|
|
|
@@ -54,6 +61,7 @@ export class SolidIntegerField implements ISolidField {
|
|
|
54
61
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
55
62
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
56
63
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
64
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
57
65
|
|
|
58
66
|
const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
|
|
59
67
|
|
|
@@ -68,11 +76,11 @@ export class SolidIntegerField implements ISolidField {
|
|
|
68
76
|
<div className="flex flex-column gap-2 mt-4">
|
|
69
77
|
{showFieldLabel != false &&
|
|
70
78
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
71
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
79
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
72
80
|
</label>
|
|
73
81
|
}
|
|
74
82
|
<InputNumber
|
|
75
|
-
readOnly={formReadonly || fieldReadonly}
|
|
83
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
76
84
|
disabled={formDisabled || fieldDisabled}
|
|
77
85
|
id={fieldLayoutInfo.attrs.name}
|
|
78
86
|
aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
|
|
@@ -48,6 +48,7 @@ export class SolidJsonField implements ISolidField {
|
|
|
48
48
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
49
49
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
50
50
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
51
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
51
52
|
|
|
52
53
|
const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
|
|
53
54
|
|
|
@@ -60,7 +61,7 @@ export class SolidJsonField implements ISolidField {
|
|
|
60
61
|
{showFieldLabel != false &&
|
|
61
62
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
62
63
|
|
|
63
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
64
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
64
65
|
</label>
|
|
65
66
|
}
|
|
66
67
|
<CodeEditor
|
|
@@ -68,7 +69,7 @@ export class SolidJsonField implements ISolidField {
|
|
|
68
69
|
field={fieldLayoutInfo.attrs.name}
|
|
69
70
|
height={fieldLayoutInfo.attrs?.height}
|
|
70
71
|
fontSize={fieldLayoutInfo.attrs?.fontSize}
|
|
71
|
-
readOnly={formReadonly || fieldReadonly}
|
|
72
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
72
73
|
>
|
|
73
74
|
</CodeEditor>
|
|
74
75
|
</div>
|
|
@@ -66,6 +66,7 @@ export class SolidLongTextField implements ISolidField {
|
|
|
66
66
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
67
67
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
68
68
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
69
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
69
70
|
|
|
70
71
|
const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
|
|
71
72
|
|
|
@@ -80,11 +81,11 @@ export class SolidLongTextField implements ISolidField {
|
|
|
80
81
|
<div className="flex flex-column gap-2 mt-4">
|
|
81
82
|
{showFieldLabel != false &&
|
|
82
83
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
83
|
-
{fieldDescription && <span>({fieldDescription}) </span>}
|
|
84
|
+
{/* {fieldDescription && <span>({fieldDescription}) </span>} */}
|
|
84
85
|
</label>
|
|
85
86
|
}
|
|
86
87
|
<InputTextarea
|
|
87
|
-
readOnly={formReadonly || fieldReadonly}
|
|
88
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
88
89
|
disabled={formDisabled || fieldDisabled}
|
|
89
90
|
id={fieldLayoutInfo.attrs.name}
|
|
90
91
|
aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
|
|
@@ -97,6 +97,7 @@ export class SolidMediaMultipleField implements ISolidField {
|
|
|
97
97
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
98
98
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
99
99
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
100
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
100
101
|
|
|
101
102
|
const [isDeleteImageDialogVisible, setDeleteImageDialogVisible] = useState(false);
|
|
102
103
|
const [imageToBeDeletedData, setImageToBeDeletedData] = useState<any>();
|
|
@@ -277,12 +278,12 @@ export class SolidMediaMultipleField implements ISolidField {
|
|
|
277
278
|
|
|
278
279
|
const [isShowAllFiles, setShowAllFiles] = useState(false);
|
|
279
280
|
return (
|
|
280
|
-
<div className={className}>
|
|
281
|
+
<div className={className} style={readOnlyPermission === true ? { filter: 'opacity(50%)', pointerEvents: 'none' } : {}}>
|
|
281
282
|
<div className="flex flex-column gap-2 mt-4">
|
|
282
283
|
{showFieldLabel != false &&
|
|
283
284
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
284
285
|
|
|
285
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
286
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
286
287
|
</label>
|
|
287
288
|
}
|
|
288
289
|
<div
|
|
@@ -302,7 +303,7 @@ export class SolidMediaMultipleField implements ISolidField {
|
|
|
302
303
|
<FileReaderExt fileDetails={fileDetails[0]} />
|
|
303
304
|
<div className="w-full flex flex-column gap-1">
|
|
304
305
|
<div className="flex align-items-center justify-content-between">
|
|
305
|
-
<Link className="font-
|
|
306
|
+
<Link className="font-normal w-11" href={process.env.NEXT_PUBLIC_BACKEND_API_URL + `/${fileDetails[0]?.fileUrl}`} target="_blank">{fileDetails[0].name}</Link>
|
|
306
307
|
<div className="flex align-items-center gap-2">
|
|
307
308
|
<div>
|
|
308
309
|
<Button
|
|
@@ -376,7 +377,7 @@ export class SolidMediaMultipleField implements ISolidField {
|
|
|
376
377
|
<FileReaderExt fileDetails={file} />
|
|
377
378
|
<div className="w-full flex flex-column gap-1">
|
|
378
379
|
<div className="flex align-items-center justify-content-between">
|
|
379
|
-
<Link className="font-
|
|
380
|
+
<Link className="font-normal w-11" href={process.env.NEXT_PUBLIC_BACKEND_API_URL + `/${file?.fileUrl}`} target="_blank">{file.name}</Link>
|
|
380
381
|
<div className="flex align-items-center gap-2">
|
|
381
382
|
<div>
|
|
382
383
|
<Button
|
|
@@ -83,6 +83,7 @@ export class SolidMediaSingleField implements ISolidField {
|
|
|
83
83
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
84
84
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
85
85
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
86
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
86
87
|
|
|
87
88
|
const [isDeleteImageDialogVisible, setDeleteImageDialogVisible] = useState(false);
|
|
88
89
|
const [imageToBeDeletedData, setImageToBeDeletedData] = useState<any>();
|
|
@@ -197,11 +198,11 @@ export class SolidMediaSingleField implements ISolidField {
|
|
|
197
198
|
const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
|
|
198
199
|
|
|
199
200
|
return (
|
|
200
|
-
<div className={className}>
|
|
201
|
+
<div className={className} style={readOnlyPermission === true ? { filter: 'opacity(50%)', pointerEvents: 'none' } : {}}>
|
|
201
202
|
<div className="flex flex-column gap-2 mt-4">
|
|
202
203
|
{showFieldLabel != false &&
|
|
203
204
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
204
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
205
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
205
206
|
</label>
|
|
206
207
|
}
|
|
207
208
|
<div
|
|
@@ -223,7 +224,7 @@ export class SolidMediaSingleField implements ISolidField {
|
|
|
223
224
|
<FileReaderExt fileDetails={fileDetails} />
|
|
224
225
|
<div className="w-full flex flex-column gap-1">
|
|
225
226
|
<div className="flex align-items-start justify-content-between">
|
|
226
|
-
<Link className="font-
|
|
227
|
+
<Link className="font-normal w-9" href={process.env.NEXT_PUBLIC_BACKEND_API_URL + `/${fileDetails?.fileUrl}`} target="_blank">{fileDetails.name}</Link>
|
|
227
228
|
<div className="flex align-items-center gap-2">
|
|
228
229
|
<div>
|
|
229
230
|
<Button
|
|
@@ -62,6 +62,7 @@ export class SolidRichTextField implements ISolidField {
|
|
|
62
62
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
63
63
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
64
64
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
65
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
65
66
|
|
|
66
67
|
const [text, setText] = useState();
|
|
67
68
|
|
|
@@ -78,11 +79,11 @@ export class SolidRichTextField implements ISolidField {
|
|
|
78
79
|
<div className="flex flex-column gap-2 mt-4">
|
|
79
80
|
{showFieldLabel != false &&
|
|
80
81
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
81
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
82
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
82
83
|
</label>
|
|
83
84
|
}
|
|
84
85
|
<Editor
|
|
85
|
-
readOnly={formReadonly || fieldReadonly}
|
|
86
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
86
87
|
disabled={formDisabled || fieldDisabled}
|
|
87
88
|
key={fieldLayoutInfo.attrs.name} // React will re-render the component whenever this value changes
|
|
88
89
|
id={fieldLayoutInfo.attrs.name}
|
|
@@ -56,6 +56,7 @@ export class SolidSelectionDynamicField implements ISolidField {
|
|
|
56
56
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
57
57
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
58
58
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
59
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
59
60
|
|
|
60
61
|
const fieldDisabled = fieldLayoutInfo.attrs?.disabled;
|
|
61
62
|
const fieldReadonly = fieldLayoutInfo.attrs?.readonly;
|
|
@@ -97,11 +98,11 @@ export class SolidSelectionDynamicField implements ISolidField {
|
|
|
97
98
|
<div className="flex flex-column gap-2 mt-4">
|
|
98
99
|
{showFieldLabel != false &&
|
|
99
100
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
100
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
101
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
101
102
|
</label>
|
|
102
103
|
}
|
|
103
104
|
<AutoComplete
|
|
104
|
-
readOnly={formReadonly || fieldReadonly}
|
|
105
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
105
106
|
disabled={formDisabled || fieldDisabled}
|
|
106
107
|
{...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
|
|
107
108
|
id={fieldLayoutInfo.attrs.name}
|
|
@@ -77,6 +77,7 @@ export class SolidSelectionStaticField implements ISolidField {
|
|
|
77
77
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
78
78
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
79
79
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
80
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
80
81
|
|
|
81
82
|
const fieldDisabled = fieldLayoutInfo.attrs?.disabled;
|
|
82
83
|
const fieldReadonly = fieldLayoutInfo.attrs?.readonly;
|
|
@@ -102,11 +103,11 @@ export class SolidSelectionStaticField implements ISolidField {
|
|
|
102
103
|
<div className="flex flex-column gap-2 mt-4">
|
|
103
104
|
{showFieldLabel != false &&
|
|
104
105
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
105
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
106
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
106
107
|
</label>
|
|
107
108
|
}
|
|
108
109
|
<AutoComplete
|
|
109
|
-
readOnly={formReadonly || fieldReadonly}
|
|
110
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
110
111
|
disabled={formDisabled || fieldDisabled}
|
|
111
112
|
{...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
|
|
112
113
|
id={fieldLayoutInfo.attrs.name}
|
|
@@ -69,6 +69,7 @@ export class SolidShortTextField implements ISolidField {
|
|
|
69
69
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
70
70
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
71
71
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
72
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
72
73
|
|
|
73
74
|
const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
|
|
74
75
|
|
|
@@ -83,13 +84,13 @@ export class SolidShortTextField implements ISolidField {
|
|
|
83
84
|
<div className="flex flex-column gap-2 mt-4">
|
|
84
85
|
{showFieldLabel != false &&
|
|
85
86
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
86
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
87
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
87
88
|
|
|
88
89
|
{/* {fieldDescription && <span className="form_field_help_text">`(${fieldDescription})` </span>} */}
|
|
89
90
|
</label>
|
|
90
91
|
}
|
|
91
92
|
<InputText
|
|
92
|
-
readOnly={formReadonly || fieldReadonly}
|
|
93
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
93
94
|
disabled={formDisabled || fieldDisabled}
|
|
94
95
|
id={fieldLayoutInfo.attrs.name}
|
|
95
96
|
aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
|
|
@@ -52,6 +52,7 @@ export class SolidTimeField implements ISolidField {
|
|
|
52
52
|
const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
|
|
53
53
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
54
54
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
55
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
55
56
|
|
|
56
57
|
const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
|
|
57
58
|
|
|
@@ -64,11 +65,11 @@ export class SolidTimeField implements ISolidField {
|
|
|
64
65
|
{showFieldLabel != false &&
|
|
65
66
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
66
67
|
|
|
67
|
-
{fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
|
|
68
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
68
69
|
</label>
|
|
69
70
|
}
|
|
70
71
|
<Calendar
|
|
71
|
-
disabled={formDisabled || fieldDisabled}
|
|
72
|
+
disabled={formDisabled || fieldDisabled || readOnlyPermission}
|
|
72
73
|
ref={calendarRef} // Attach ref to Calendar
|
|
73
74
|
id={fieldLayoutInfo.attrs.name}
|
|
74
75
|
aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
|
|
@@ -13,6 +13,7 @@ import * as Yup from 'yup';
|
|
|
13
13
|
import { Schema } from "yup";
|
|
14
14
|
import SolidFormView from "../../SolidFormView";
|
|
15
15
|
import { FormikObject, ISolidField, SolidFieldProps } from "../ISolidField";
|
|
16
|
+
import { useRouter } from "next/router";
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
@@ -137,9 +138,13 @@ export class SolidRelationManyToManyField implements ISolidField {
|
|
|
137
138
|
const className = fieldLayoutInfo.attrs?.className || 'field col-12';
|
|
138
139
|
const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
|
|
139
140
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
141
|
+
const router = useRouter();
|
|
142
|
+
|
|
143
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
144
|
+
|
|
140
145
|
|
|
141
146
|
// auto complete specific code.
|
|
142
|
-
const entityApi = createSolidEntityApi(fieldMetadata.
|
|
147
|
+
const entityApi = createSolidEntityApi(fieldMetadata.relationCoModelSingularName);
|
|
143
148
|
const { useLazyGetSolidEntitiesQuery } = entityApi;
|
|
144
149
|
const [triggerGetSolidEntities] = useLazyGetSolidEntitiesQuery();
|
|
145
150
|
|
|
@@ -273,6 +278,7 @@ export class SolidRelationManyToManyField implements ISolidField {
|
|
|
273
278
|
return (
|
|
274
279
|
<div key={a.label} className={`field col-6 flex gap-2 ${i >= 2 ? 'mt-3' : ''}`}>
|
|
275
280
|
<Checkbox
|
|
281
|
+
readOnly={readOnlyPermission}
|
|
276
282
|
inputId={a.label}
|
|
277
283
|
checked={formik.values[fieldLayoutInfo.attrs.name].some((item: any) => item.label === a.label)}
|
|
278
284
|
onChange={() => handleCheckboxChange(a)}
|
|
@@ -295,9 +301,10 @@ export class SolidRelationManyToManyField implements ISolidField {
|
|
|
295
301
|
const className = fieldLayoutInfo.attrs?.className || 'field col-12';
|
|
296
302
|
const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
|
|
297
303
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
304
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
298
305
|
|
|
299
306
|
// auto complete specific code.
|
|
300
|
-
const entityApi = createSolidEntityApi(fieldMetadata.
|
|
307
|
+
const entityApi = createSolidEntityApi(fieldMetadata.relationCoModelSingularName);
|
|
301
308
|
const { useLazyGetSolidEntitiesQuery } = entityApi;
|
|
302
309
|
const [triggerGetSolidEntities] = useLazyGetSolidEntitiesQuery();
|
|
303
310
|
|
|
@@ -369,20 +376,20 @@ export class SolidRelationManyToManyField implements ISolidField {
|
|
|
369
376
|
}
|
|
370
377
|
<div className="flex align-items-center gap-3">
|
|
371
378
|
<AutoComplete
|
|
372
|
-
readOnly={readOnly}
|
|
373
|
-
disabled={disabled}
|
|
379
|
+
readOnly={readOnly || readOnlyPermission}
|
|
380
|
+
disabled={disabled || readOnlyPermission}
|
|
374
381
|
multiple
|
|
375
382
|
{...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
|
|
376
383
|
id={fieldLayoutInfo.attrs.name}
|
|
377
384
|
field="label"
|
|
378
385
|
value={formik.values[fieldLayoutInfo.attrs.name] || ''}
|
|
379
|
-
dropdown
|
|
386
|
+
dropdown={!readOnlyPermission}
|
|
380
387
|
suggestions={autoCompleteItems}
|
|
381
388
|
completeMethod={autoCompleteSearch}
|
|
382
389
|
onChange={formik.handleChange}
|
|
383
390
|
className="solid-standard-autocomplete w-full"
|
|
384
391
|
/>
|
|
385
|
-
{fieldLayoutInfo.attrs.inlineCreate === "true" &&
|
|
392
|
+
{fieldLayoutInfo.attrs.inlineCreate === "true" && readOnlyPermission === false &&
|
|
386
393
|
this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
|
|
387
394
|
}
|
|
388
395
|
</div>
|
|
@@ -410,7 +417,7 @@ export class SolidRelationManyToManyField implements ISolidField {
|
|
|
410
417
|
handlePopupClose: (() => {
|
|
411
418
|
setvisibleCreateRelationEntity(false);
|
|
412
419
|
}),
|
|
413
|
-
modelName: camelCase(this.fieldContext.fieldMetadata.
|
|
420
|
+
modelName: camelCase(this.fieldContext.fieldMetadata.relationCoModelSingularName)
|
|
414
421
|
}
|
|
415
422
|
|
|
416
423
|
return (
|
|
@@ -64,10 +64,11 @@ export class SolidRelationManyToOneField implements ISolidField {
|
|
|
64
64
|
const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
|
|
65
65
|
const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
|
|
66
66
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
67
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
67
68
|
const [visibleCreateRelationEntity, setvisibleCreateRelationEntity] = useState(false);
|
|
68
69
|
|
|
69
70
|
// auto complete specific code.
|
|
70
|
-
const entityApi = createSolidEntityApi(fieldMetadata.
|
|
71
|
+
const entityApi = createSolidEntityApi(fieldMetadata.relationCoModelSingularName);
|
|
71
72
|
const { useLazyGetSolidEntitiesQuery } = entityApi;
|
|
72
73
|
const [triggerGetSolidEntities] = useLazyGetSolidEntitiesQuery();
|
|
73
74
|
|
|
@@ -117,8 +118,6 @@ export class SolidRelationManyToOneField implements ISolidField {
|
|
|
117
118
|
|
|
118
119
|
|
|
119
120
|
|
|
120
|
-
const disabled = fieldLayoutInfo.attrs?.disabled;
|
|
121
|
-
const readOnly = fieldLayoutInfo.attrs?.readOnly;
|
|
122
121
|
|
|
123
122
|
|
|
124
123
|
const customCreateHandler = (values: any) => {
|
|
@@ -145,19 +144,20 @@ export class SolidRelationManyToOneField implements ISolidField {
|
|
|
145
144
|
</label>
|
|
146
145
|
}
|
|
147
146
|
<AutoComplete
|
|
148
|
-
readOnly={formReadonly || fieldReadonly}
|
|
149
|
-
disabled={formDisabled || fieldDisabled}
|
|
147
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
148
|
+
disabled={formDisabled || fieldDisabled || readOnlyPermission}
|
|
150
149
|
{...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
|
|
151
150
|
id={fieldLayoutInfo.attrs.name}
|
|
152
151
|
field="label"
|
|
153
152
|
value={formik.values[fieldLayoutInfo.attrs.name] || ''}
|
|
154
|
-
dropdown
|
|
153
|
+
dropdown={!readOnlyPermission}
|
|
155
154
|
suggestions={autoCompleteItems}
|
|
156
155
|
completeMethod={autoCompleteSearch}
|
|
157
156
|
onChange={formik.handleChange}
|
|
157
|
+
onFocus={(e) => e.target.select()}
|
|
158
158
|
className="w-full solid-standard-autocomplete"
|
|
159
159
|
/>
|
|
160
|
-
{fieldLayoutInfo.attrs.inlineCreate === "true" &&
|
|
160
|
+
{fieldLayoutInfo.attrs.inlineCreate === "true" && readOnlyPermission === false &&
|
|
161
161
|
this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
|
|
162
162
|
}
|
|
163
163
|
</div>
|
|
@@ -63,6 +63,7 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
63
63
|
const [formViewParams, setformViewParams] = useState<any>()
|
|
64
64
|
const [refreshList, setRefreshList] = useState(false); // Added state for rerender
|
|
65
65
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
66
|
+
const readOnlyPermission = this.fieldContext.readOnly;
|
|
66
67
|
|
|
67
68
|
|
|
68
69
|
const handlePopupOpen = (id: any) => {
|
|
@@ -72,7 +73,7 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
72
73
|
embeded: true,
|
|
73
74
|
isCustomCreate: false,
|
|
74
75
|
customLayout: fieldLayoutInfo?.attrs?.inlineCreateLayout,
|
|
75
|
-
modelName: camelCase(this.fieldContext.fieldMetadata.
|
|
76
|
+
modelName: camelCase(this.fieldContext.fieldMetadata.relationCoModelSingularName)
|
|
76
77
|
}
|
|
77
78
|
setformViewParams(formviewparams);
|
|
78
79
|
setvisibleCreateRelationEntity(true);
|
|
@@ -85,7 +86,7 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
85
86
|
const lisviewparams = {
|
|
86
87
|
moduleName: this.fieldContext.fieldMetadata.relationModelModuleName,
|
|
87
88
|
modelName: camelCase(this.fieldContext.fieldMetadata.relationModelSingularName),
|
|
88
|
-
inlineCreate: true,
|
|
89
|
+
inlineCreate: readOnlyPermission === false ? true : false,
|
|
89
90
|
customLayout: fieldLayoutInfo?.attrs?.inlineListLayout,
|
|
90
91
|
embeded: true
|
|
91
92
|
}
|
|
@@ -94,11 +95,11 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
94
95
|
//Intial Params
|
|
95
96
|
useEffect(() => {
|
|
96
97
|
|
|
97
|
-
const customFilter = this.fieldContext.fieldMetadata.
|
|
98
|
+
const customFilter = this.fieldContext.fieldMetadata.relationCoModelFieldName ? this.fieldContext.fieldMetadata.relationCoModelFieldName : `${this.fieldContext.modelName}`
|
|
98
99
|
const listviewparams = {
|
|
99
100
|
moduleName: this.fieldContext.fieldMetadata.relationModelModuleName,
|
|
100
101
|
modelName: camelCase(this.fieldContext.fieldMetadata.relationModelSingularName),
|
|
101
|
-
inlineCreate: true,
|
|
102
|
+
inlineCreate: readOnlyPermission === false ? true : false,
|
|
102
103
|
customLayout: fieldLayoutInfo?.attrs?.inlineListLayout,
|
|
103
104
|
embeded: true,
|
|
104
105
|
customFilter: {
|
|
@@ -116,7 +117,7 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
116
117
|
embeded: true,
|
|
117
118
|
isCustomCreate: false,
|
|
118
119
|
customLayout: fieldLayoutInfo?.attrs?.inlineCreateLayout,
|
|
119
|
-
modelName: camelCase(this.fieldContext.fieldMetadata.
|
|
120
|
+
modelName: camelCase(this.fieldContext.fieldMetadata.relationCoModelSingularName)
|
|
120
121
|
}
|
|
121
122
|
setformViewParams(formviewparams)
|
|
122
123
|
|
|
@@ -135,7 +136,9 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
135
136
|
<div className={className}>
|
|
136
137
|
{/* <div className="justify-content-center align-items-center"> */}
|
|
137
138
|
{showFieldLabel != false &&
|
|
138
|
-
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
139
|
+
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
140
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
141
|
+
</label>
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
{/* </div>
|
|
@@ -143,7 +146,8 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
143
146
|
{listViewParams &&
|
|
144
147
|
<SolidListView key={refreshList.toString()} {...listViewParams} handlePopUpOpen={handlePopupOpen} />
|
|
145
148
|
}
|
|
146
|
-
{
|
|
149
|
+
{readOnlyPermission !== true &&
|
|
150
|
+
this.renderSolidFormEmbededView(visibleCreateRelationEntity, setvisibleCreateRelationEntity, formViewParams, handlePopupClose)}
|
|
147
151
|
|
|
148
152
|
</div>
|
|
149
153
|
);
|