@solidstarters/solid-core-ui 1.1.204 → 1.1.206
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/GoogleAuthChecking.d.ts.map +1 -1
- package/dist/components/auth/GoogleAuthChecking.js +5 -4
- package/dist/components/auth/GoogleAuthChecking.js.map +1 -1
- package/dist/components/auth/SolidChangeForcePassword.d.ts.map +1 -1
- package/dist/components/auth/SolidChangeForcePassword.js +17 -16
- package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
- package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidForgotPassword.js +5 -4
- 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 +11 -10
- 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 +10 -9
- 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 +21 -19
- package/dist/components/auth/SolidLogin.js.map +1 -1
- package/dist/components/auth/SolidOTPVerify.js +5 -4
- 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 +32 -31
- package/dist/components/auth/SolidRegister.js.map +1 -1
- package/dist/components/auth/SolidResetPassword.js +8 -7
- package/dist/components/auth/SolidResetPassword.js.map +1 -1
- package/dist/components/common/GeneralSettings.d.ts.map +1 -1
- package/dist/components/common/GeneralSettings.js +46 -34
- package/dist/components/common/GeneralSettings.js.map +1 -1
- package/dist/components/common/SolidExport.js +6 -5
- package/dist/components/common/SolidExport.js.map +1 -1
- package/dist/components/common/SolidFormStepper.js +4 -3
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/common/solidModuleHome.module.css +1 -1
- package/dist/components/common/useHandleFormCustomButtonClick.js +2 -1
- package/dist/components/common/useHandleFormCustomButtonClick.js.map +1 -1
- package/dist/components/common/useHandleListCustomButtonClick.js +2 -1
- package/dist/components/common/useHandleListCustomButtonClick.js.map +1 -1
- package/dist/components/core/chatter/SolidChatter.d.ts +2 -1
- package/dist/components/core/chatter/SolidChatter.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatter.js +13 -11
- package/dist/components/core/chatter/SolidChatter.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterHeader.js +2 -1
- package/dist/components/core/chatter/SolidChatterHeader.js.map +1 -1
- package/dist/components/core/chatter/SolidMessageComposer.js +2 -1
- package/dist/components/core/chatter/SolidMessageComposer.js.map +1 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.js +2 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.js.map +1 -1
- package/dist/components/core/common/PDFViewer.d.ts +4 -0
- package/dist/components/core/common/PDFViewer.d.ts.map +1 -0
- package/dist/components/core/common/PDFViewer.js +99 -0
- package/dist/components/core/common/PDFViewer.js.map +1 -0
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.js +10 -7
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.d.ts +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.js +53 -36
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.js +4 -3
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.js +8 -7
- package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.d.ts.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.js +6 -5
- package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportInstructions.js +4 -3
- package/dist/components/core/common/SolidGenericImport/SolidImportInstructions.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.js +5 -4
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportTransactionStatus.js +4 -3
- package/dist/components/core/common/SolidGenericImport/SolidImportTransactionStatus.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +189 -53
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidPasswordHelperText.d.ts +1 -1
- package/dist/components/core/common/SolidPasswordHelperText.d.ts.map +1 -1
- package/dist/components/core/common/SolidPasswordHelperText.js +7 -2
- package/dist/components/core/common/SolidPasswordHelperText.js.map +1 -1
- package/dist/components/core/common/SolidViewLayoutManager.d.ts +152 -0
- package/dist/components/core/common/SolidViewLayoutManager.d.ts.map +1 -1
- package/dist/components/core/common/SolidViewLayoutManager.js +256 -8
- package/dist/components/core/common/SolidViewLayoutManager.js.map +1 -1
- package/dist/components/core/common/SolidXAiIframe.d.ts +7 -0
- package/dist/components/core/common/SolidXAiIframe.d.ts.map +1 -0
- package/dist/components/core/common/SolidXAiIframe.js +94 -0
- package/dist/components/core/common/SolidXAiIframe.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboard.d.ts.map +1 -1
- package/dist/components/core/dashboard/SolidDashboard.js +29 -4
- package/dist/components/core/dashboard/SolidDashboard.js.map +1 -1
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.d.ts +2 -0
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.js +6 -0
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.d.ts +2 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.js +7 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.d.ts +2 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.js +6 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardVariable.d.ts +2 -0
- package/dist/components/core/dashboard/SolidDashboardVariable.d.ts.map +1 -1
- package/dist/components/core/dashboard/SolidDashboardVariable.js +25 -8
- package/dist/components/core/dashboard/SolidDashboardVariable.js.map +1 -1
- package/dist/components/core/extension/solid-core/CustomIcon/StatusIcon.d.ts +8 -0
- package/dist/components/core/extension/solid-core/CustomIcon/StatusIcon.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/CustomIcon/StatusIcon.js +7 -0
- package/dist/components/core/extension/solid-core/CustomIcon/StatusIcon.js.map +1 -0
- package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.js +47 -16
- package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.js +6 -5
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.js +8 -7
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.js.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.js +28 -22
- package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
- package/dist/components/core/form/SolidFormUserViewLayout.js +3 -2
- package/dist/components/core/form/SolidFormUserViewLayout.js.map +1 -1
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +47 -41
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.js +5 -3
- package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.d.ts +2 -1
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js +12 -3
- 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 +5 -3
- 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 +4 -3
- package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
- package/dist/components/core/form/fields/SolidEmailField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidEmailField.js +6 -5
- package/dist/components/core/form/fields/SolidEmailField.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 -3
- 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 +2 -1
- 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 +4 -3
- 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 +10 -8
- 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 +6 -5
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidPasswordField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidPasswordField.js +13 -11
- package/dist/components/core/form/fields/SolidPasswordField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRelationField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidRelationField.js +2 -1
- package/dist/components/core/form/fields/SolidRelationField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.js +4 -3
- 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 +7 -5
- 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 +9 -7
- 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 +93 -29
- 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 +5 -3
- 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 +10 -9
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts +10 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +388 -30
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts +16 -2
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +133 -35
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidAiInteractionMessageFieldFormWidget.d.ts.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidAiInteractionMessageFieldFormWidget.js +2 -1
- package/dist/components/core/form/fields/widgets/SolidAiInteractionMessageFieldFormWidget.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.d.ts +6 -0
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.js +164 -0
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.js.map +1 -0
- package/dist/components/core/form/widgets/CustomHtml.js +1 -1
- package/dist/components/core/form/widgets/CustomHtml.js.map +1 -1
- package/dist/components/core/kanban/KanbanUserViewLayout.js +3 -2
- package/dist/components/core/kanban/KanbanUserViewLayout.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +12 -11
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.d.ts.map +1 -1
- package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.js +3 -2
- package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.js.map +1 -1
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.js +2 -2
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.js.map +1 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +261 -144
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js +51 -41
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +95 -24
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
- package/dist/components/core/locales/SolidChatterLocaleTabView.d.ts +1 -0
- package/dist/components/core/locales/SolidChatterLocaleTabView.d.ts.map +1 -1
- package/dist/components/core/locales/SolidChatterLocaleTabView.js +5 -5
- package/dist/components/core/locales/SolidChatterLocaleTabView.js.map +1 -1
- package/dist/components/core/locales/SolidLocale.d.ts.map +1 -1
- package/dist/components/core/locales/SolidLocale.js +9 -8
- package/dist/components/core/locales/SolidLocale.js.map +1 -1
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +3 -2
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaData.js +4 -3
- 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 +83 -81
- 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 +28 -20
- 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 +7 -6
- package/dist/components/core/module/CreateModule.js.map +1 -1
- package/dist/components/core/solid-ai/SolidAiMainWrapper.d.ts +2 -0
- package/dist/components/core/solid-ai/SolidAiMainWrapper.d.ts.map +1 -0
- package/dist/components/core/solid-ai/SolidAiMainWrapper.js +20 -0
- package/dist/components/core/solid-ai/SolidAiMainWrapper.js.map +1 -0
- package/dist/components/core/solid-ai/SolidXAIInputBox.d.ts +3 -1
- package/dist/components/core/solid-ai/SolidXAIInputBox.d.ts.map +1 -1
- package/dist/components/core/solid-ai/SolidXAIInputBox.js +33 -15
- package/dist/components/core/solid-ai/SolidXAIInputBox.js.map +1 -1
- package/dist/components/core/solid-ai/SolidXAIModule.d.ts +1 -1
- package/dist/components/core/solid-ai/SolidXAIModule.d.ts.map +1 -1
- package/dist/components/core/solid-ai/SolidXAIModule.js +26 -34
- package/dist/components/core/solid-ai/SolidXAIModule.js.map +1 -1
- package/dist/components/core/solid-ai/SolidXAIResponse.d.ts.map +1 -1
- package/dist/components/core/solid-ai/SolidXAIResponse.js +5 -4
- package/dist/components/core/solid-ai/SolidXAIResponse.js.map +1 -1
- package/dist/components/core/solid-ai/SolidXAIThreadWrapper.d.ts +1 -0
- package/dist/components/core/solid-ai/SolidXAIThreadWrapper.d.ts.map +1 -1
- package/dist/components/core/solid-ai/SolidXAIThreadWrapper.js +140 -40
- package/dist/components/core/solid-ai/SolidXAIThreadWrapper.js.map +1 -1
- package/dist/components/core/solid-ai/SolidXAiJsonDisplay.d.ts.map +1 -1
- package/dist/components/core/solid-ai/SolidXAiJsonDisplay.js +34 -17
- package/dist/components/core/solid-ai/SolidXAiJsonDisplay.js.map +1 -1
- package/dist/components/core/solid-ai/SolidXAiPlainTextDisplay.js +9 -10
- package/dist/components/core/solid-ai/SolidXAiPlainTextDisplay.js.map +1 -1
- package/dist/components/core/solid-ai/SolidXAiStatusErrorDisplay.d.ts +7 -0
- package/dist/components/core/solid-ai/SolidXAiStatusErrorDisplay.d.ts.map +1 -0
- package/dist/components/core/solid-ai/SolidXAiStatusErrorDisplay.js +7 -0
- package/dist/components/core/solid-ai/SolidXAiStatusErrorDisplay.js.map +1 -0
- package/dist/components/core/solid-ai/SolidXUserPrompt.js +1 -1
- package/dist/components/core/solid-ai/SolidXUserPrompt.js.map +1 -1
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +21 -14
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/core/users/CreateUserRole.d.ts.map +1 -1
- package/dist/components/core/users/CreateUserRole.js +7 -6
- package/dist/components/core/users/CreateUserRole.js.map +1 -1
- package/dist/components/core/users/UserListView.d.ts.map +1 -1
- package/dist/components/core/users/UserListView.js +4 -3
- package/dist/components/core/users/UserListView.js.map +1 -1
- package/dist/components/layout/AdminLayout.d.ts.map +1 -1
- package/dist/components/layout/AdminLayout.js +11 -57
- package/dist/components/layout/AdminLayout.js.map +1 -1
- package/dist/components/layout/Layout.d.ts.map +1 -1
- package/dist/components/layout/Layout.js +84 -0
- package/dist/components/layout/Layout.js.map +1 -1
- package/dist/constants/error-messages.d.ts +152 -2
- package/dist/constants/error-messages.d.ts.map +1 -1
- package/dist/constants/error-messages.js +221 -4
- package/dist/constants/error-messages.js.map +1 -1
- package/dist/helpers/ToastContainer.d.ts.map +1 -1
- package/dist/helpers/ToastContainer.js +4 -3
- package/dist/helpers/ToastContainer.js.map +1 -1
- package/dist/helpers/downloadFileWithProgress.d.ts.map +1 -1
- package/dist/helpers/downloadFileWithProgress.js +4 -3
- package/dist/helpers/downloadFileWithProgress.js.map +1 -1
- package/dist/helpers/downloadMediaFile.d.ts.map +1 -1
- package/dist/helpers/downloadMediaFile.js +2 -1
- package/dist/helpers/downloadMediaFile.js.map +1 -1
- package/dist/helpers/permissions.d.ts +1 -5
- package/dist/helpers/permissions.d.ts.map +1 -1
- package/dist/helpers/permissions.js +3 -14
- package/dist/helpers/permissions.js.map +1 -1
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +8 -3
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/updatePasswordField.d.ts.map +1 -1
- package/dist/helpers/updatePasswordField.js +2 -1
- package/dist/helpers/updatePasswordField.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/nextAuth/handleLogout.d.ts.map +1 -1
- package/dist/nextAuth/handleLogout.js +8 -9
- package/dist/nextAuth/handleLogout.js.map +1 -1
- package/dist/nextAuth/refreshAccessToken.d.ts.map +1 -1
- package/dist/nextAuth/refreshAccessToken.js +2 -1
- package/dist/nextAuth/refreshAccessToken.js.map +1 -1
- package/dist/redux/api/fieldApi.d.ts +2 -1
- package/dist/redux/api/fieldApi.d.ts.map +1 -1
- package/dist/redux/api/fieldApi.js +8 -1
- package/dist/redux/api/fieldApi.js.map +1 -1
- package/dist/redux/api/solidEntityApi.d.ts +2 -0
- package/dist/redux/api/solidEntityApi.d.ts.map +1 -1
- package/dist/redux/api/solidEntityApi.js +20 -0
- package/dist/redux/api/solidEntityApi.js.map +1 -1
- package/dist/redux/store/defaultStoreConfig.d.ts +1 -0
- package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
- package/dist/resources/globals.css +22 -2
- package/dist/types/handlebars.d.ts +4 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/solid-core.d.ts +87 -9
- package/package.json +4 -4
- package/src/components/common/solidModuleHome.module.css +1 -1
- package/src/resources/globals.css +22 -2
- package/src/types/handlebars.d.ts +4 -0
- package/src/types/index.d.ts +6 -0
- package/src/types/solid-core.d.ts +87 -9
|
@@ -71,7 +71,7 @@ import { SolidListViewColumn } from "./SolidListViewColumn";
|
|
|
71
71
|
import { SolidCreateButton } from "../common/SolidCreateButton";
|
|
72
72
|
import { SolidGlobalSearchElement } from "../common/SolidGlobalSearchElement";
|
|
73
73
|
import { useLazyCheckIfPermissionExistsQuery } from "../../../redux/api/userApi";
|
|
74
|
-
import {
|
|
74
|
+
import { permissionExpression } from "../../../helpers/permissions";
|
|
75
75
|
import { useRouter, useSearchParams } from "next/navigation";
|
|
76
76
|
import { ListViewRowActionPopup } from "./ListViewRowActionPopup";
|
|
77
77
|
import { FilterIcon } from "../../modelsComponents/filterIcon";
|
|
@@ -97,8 +97,11 @@ import { SolidListViewHeaderButton } from "./SolidListViewHeaderButton";
|
|
|
97
97
|
import { SolidListViewRowButtonContextMenu } from "./SolidListViewRowButtonContextMenu";
|
|
98
98
|
import { useSelector } from "react-redux";
|
|
99
99
|
import styles from "./SolidListViewWrapper.module.css";
|
|
100
|
-
import { SolidXAIModule } from "../solid-ai/SolidXAIModule";
|
|
101
100
|
import { SolidXAIIcon } from "../solid-ai/SolidXAIIcon";
|
|
101
|
+
import { getExtensionFunction } from "../../../helpers/registry";
|
|
102
|
+
import { useSession } from "next-auth/react";
|
|
103
|
+
import { ERROR_MESSAGES } from "../../../constants/error-messages";
|
|
104
|
+
import { SolidAiMainWrapper } from "../solid-ai/SolidAiMainWrapper";
|
|
102
105
|
// import { ERROR_MESSAGES } from "../../../constants/error-messages";
|
|
103
106
|
var getRandomInt = function (min, max) {
|
|
104
107
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
@@ -113,7 +116,7 @@ export var queryStringToQueryObject = function () {
|
|
|
113
116
|
return parsedParams;
|
|
114
117
|
}
|
|
115
118
|
catch (error) {
|
|
116
|
-
console.error(
|
|
119
|
+
console.error(ERROR_MESSAGES.ERROR_DECODING, error);
|
|
117
120
|
}
|
|
118
121
|
}
|
|
119
122
|
};
|
|
@@ -135,7 +138,7 @@ export var SolidListView = function (params) {
|
|
|
135
138
|
var searchParams = useSearchParams(); // Converts the query params to a string
|
|
136
139
|
var localeName = searchParams.get("locale");
|
|
137
140
|
// TODO: The initial filter state will be created based on the fields which are present on this list view.
|
|
138
|
-
var _18 = useState(params.customFilter ||
|
|
141
|
+
var _18 = useState(params.customFilter || { $and: [] }), filters = _18[0], setFilters = _18[1];
|
|
139
142
|
// const [customFilter, setCustomFilter] = useState<FilterRule[]>(initialState);
|
|
140
143
|
// const [showGlobalSearchElement, setShowGlobalSearchElement] = useState<boolean>(false);
|
|
141
144
|
var _19 = useState([]), toPopulate = _19[0], setToPopulate = _19[1];
|
|
@@ -179,7 +182,6 @@ export var SolidListView = function (params) {
|
|
|
179
182
|
}
|
|
180
183
|
}, [isResizing]);
|
|
181
184
|
useEffect(function () {
|
|
182
|
-
console.log("useEffect: [params.modelName]");
|
|
183
185
|
var fetchPermissions = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
184
186
|
var permissionNames, queryData, queryString, response;
|
|
185
187
|
return __generator(this, function (_a) {
|
|
@@ -187,11 +189,17 @@ export var SolidListView = function (params) {
|
|
|
187
189
|
case 0:
|
|
188
190
|
if (!params.modelName) return [3 /*break*/, 2];
|
|
189
191
|
permissionNames = [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
permissionExpression(params.modelName, 'create'),
|
|
193
|
+
permissionExpression(params.modelName, 'delete'),
|
|
194
|
+
permissionExpression(params.modelName, 'update'),
|
|
195
|
+
permissionExpression(params.modelName, 'deleteMany'),
|
|
196
|
+
permissionExpression(params.modelName, 'findOne'),
|
|
197
|
+
permissionExpression(params.modelName, 'findMany'),
|
|
198
|
+
permissionExpression(params.modelName, 'insertMany'),
|
|
199
|
+
permissionExpression('importTransaction', 'create'),
|
|
200
|
+
permissionExpression('exportTransaction', 'create'),
|
|
201
|
+
permissionExpression('userViewMetadata', 'create'),
|
|
202
|
+
permissionExpression('savedFilters', 'create')
|
|
195
203
|
];
|
|
196
204
|
queryData = {
|
|
197
205
|
permissionNames: permissionNames,
|
|
@@ -214,17 +222,26 @@ export var SolidListView = function (params) {
|
|
|
214
222
|
// Create the RTK slices for this entity
|
|
215
223
|
var entityApi = createSolidEntityApi(params.modelName);
|
|
216
224
|
var useCreateSolidEntityMutation = entityApi.useCreateSolidEntityMutation, useDeleteMultipleSolidEntitiesMutation = entityApi.useDeleteMultipleSolidEntitiesMutation, useDeleteSolidEntityMutation = entityApi.useDeleteSolidEntityMutation, useGetSolidEntitiesQuery = entityApi.useGetSolidEntitiesQuery, useGetSolidEntityByIdQuery = entityApi.useGetSolidEntityByIdQuery, useLazyGetSolidEntitiesQuery = entityApi.useLazyGetSolidEntitiesQuery, useLazyGetSolidEntityByIdQuery = entityApi.useLazyGetSolidEntityByIdQuery, usePrefetch = entityApi.usePrefetch, useUpdateSolidEntityMutation = entityApi.useUpdateSolidEntityMutation, useRecoverSolidEntityByIdQuery = entityApi.useRecoverSolidEntityByIdQuery, useLazyRecoverSolidEntityByIdQuery = entityApi.useLazyRecoverSolidEntityByIdQuery, useRecoverSolidEntityMutation = entityApi.useRecoverSolidEntityMutation;
|
|
225
|
+
var menuItemId = searchParams.get("menuItemId");
|
|
226
|
+
var menuItemName = searchParams.get("menuItemName");
|
|
227
|
+
var actionId = searchParams.get("actionId");
|
|
228
|
+
var actionName = searchParams.get("actionName");
|
|
217
229
|
// Get the list view layout & metadata first.
|
|
218
230
|
var listViewMetaDataQs = qs.stringify({
|
|
219
231
|
modelName: params.modelName,
|
|
220
232
|
moduleName: params.moduleName,
|
|
221
233
|
viewType: "list",
|
|
234
|
+
menuItemId: menuItemId,
|
|
235
|
+
menuItemName: menuItemName,
|
|
236
|
+
actionId: actionId,
|
|
237
|
+
actionName: actionName,
|
|
222
238
|
}, {
|
|
223
239
|
encodeValuesOnly: true,
|
|
224
240
|
});
|
|
225
|
-
var _25 = useState(
|
|
226
|
-
var _26 = useState(
|
|
227
|
-
var _27 =
|
|
241
|
+
var _25 = useState(null), solidListViewMetaData = _25[0], setSolidListViewMetaData = _25[1];
|
|
242
|
+
var _26 = useState(null), solidListViewLayout = _26[0], setSolidListViewLayout = _26[1];
|
|
243
|
+
var _27 = useState(false), isDraftPublishWorkflowEnabled = _27[0], setIsDraftPublishWorkflowEnabled = _27[1];
|
|
244
|
+
var _28 = useGetSolidViewLayoutQuery(listViewMetaDataQs), solidListViewInitialMetaData = _28.data, solidListViewMetaDataError = _28.error, solidListViewMetaDataIsLoading = _28.isLoading, solidListViewMetaDataIsError = _28.isError, refetch = _28.refetch;
|
|
228
245
|
var initialFilterMethod = function () {
|
|
229
246
|
var _a, _b, _c, _d;
|
|
230
247
|
var solidView = (_a = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView;
|
|
@@ -239,7 +256,7 @@ export var SolidListView = function (params) {
|
|
|
239
256
|
var column = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.children[i];
|
|
240
257
|
var fieldMetadata = solidFieldsMetadata === null || solidFieldsMetadata === void 0 ? void 0 : solidFieldsMetadata[column.attrs.name];
|
|
241
258
|
if (!(fieldMetadata === null || fieldMetadata === void 0 ? void 0 : fieldMetadata.type)) {
|
|
242
|
-
showFieldError(
|
|
259
|
+
showFieldError(ERROR_MESSAGES.FIELD_NOT_IN_METADATA(column.attrs.label));
|
|
243
260
|
// return;
|
|
244
261
|
}
|
|
245
262
|
if (fieldMetadata) {
|
|
@@ -304,23 +321,23 @@ export var SolidListView = function (params) {
|
|
|
304
321
|
};
|
|
305
322
|
// Set the initial filter state based on the metadata.
|
|
306
323
|
useEffect(function () {
|
|
307
|
-
|
|
324
|
+
var _a, _b, _c;
|
|
308
325
|
// refetch();
|
|
309
|
-
if (
|
|
326
|
+
if (solidListViewInitialMetaData) {
|
|
310
327
|
if (params.customLayout) {
|
|
311
328
|
setSolidListViewLayout(params.customLayout);
|
|
312
329
|
}
|
|
313
330
|
else {
|
|
314
|
-
setSolidListViewLayout(
|
|
331
|
+
setSolidListViewLayout(solidListViewInitialMetaData === null || solidListViewInitialMetaData === void 0 ? void 0 : solidListViewInitialMetaData.data.solidView.layout);
|
|
315
332
|
}
|
|
316
|
-
|
|
333
|
+
setSolidListViewMetaData(solidListViewInitialMetaData);
|
|
334
|
+
setIsDraftPublishWorkflowEnabled(((_c = (_b = (_a = solidListViewInitialMetaData === null || solidListViewInitialMetaData === void 0 ? void 0 : solidListViewInitialMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView) === null || _b === void 0 ? void 0 : _b.model) === null || _c === void 0 ? void 0 : _c.draftPublishWorkflow) === true);
|
|
317
335
|
// initialFilterMethod()
|
|
318
336
|
}
|
|
319
|
-
}, [
|
|
337
|
+
}, [solidListViewInitialMetaData]);
|
|
320
338
|
// set layout and actions for create and edit buttons and view modes
|
|
321
339
|
useEffect(function () {
|
|
322
340
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
|
323
|
-
console.log("useEffect: [solidListViewMetaData] line no 245");
|
|
324
341
|
if (solidListViewMetaData) {
|
|
325
342
|
var createActionUrl = ((_d = (_c = (_b = (_a = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.attrs) === null || _d === void 0 ? void 0 : _d.createAction) &&
|
|
326
343
|
((_j = (_h = (_g = (_f = (_e = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _e === void 0 ? void 0 : _e.solidView) === null || _f === void 0 ? void 0 : _f.layout) === null || _g === void 0 ? void 0 : _g.attrs) === null || _h === void 0 ? void 0 : _h.createAction) === null || _j === void 0 ? void 0 : _j.type) === "custom"
|
|
@@ -345,25 +362,25 @@ export var SolidListView = function (params) {
|
|
|
345
362
|
}
|
|
346
363
|
}, [solidListViewMetaData]);
|
|
347
364
|
// All list view state.
|
|
348
|
-
var
|
|
349
|
-
var
|
|
350
|
-
var
|
|
365
|
+
var _29 = useState([]), listViewData = _29[0], setListViewData = _29[1];
|
|
366
|
+
var _30 = useState(0), first = _30[0], setFirst = _30[1];
|
|
367
|
+
var _31 = useState(((_a = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _a === void 0 ? void 0 : _a.defaultPageSize)
|
|
351
368
|
? (_b = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _b === void 0 ? void 0 : _b.defaultPageSize
|
|
352
|
-
: 10), rows =
|
|
353
|
-
var
|
|
354
|
-
var
|
|
355
|
-
var
|
|
356
|
-
var
|
|
357
|
-
var
|
|
358
|
-
var
|
|
359
|
-
var
|
|
360
|
-
var
|
|
361
|
-
var
|
|
362
|
-
var
|
|
363
|
-
var
|
|
364
|
-
var
|
|
365
|
-
var
|
|
366
|
-
var
|
|
369
|
+
: 10), rows = _31[0], setRows = _31[1];
|
|
370
|
+
var _32 = useState(0), totalRecords = _32[0], setTotalRecords = _32[1];
|
|
371
|
+
var _33 = useState(""), sortField = _33[0], setSortField = _33[1];
|
|
372
|
+
var _34 = useState(0), sortOrder = _34[0], setSortOrder = _34[1];
|
|
373
|
+
var _35 = useState([]), selectedRecords = _35[0], setSelectedRecords = _35[1];
|
|
374
|
+
var _36 = useState([]), selectedRecoverRecords = _36[0], setSelectedRecoverRecords = _36[1];
|
|
375
|
+
var _37 = useState(true), loading = _37[0], setLoading = _37[1];
|
|
376
|
+
var _38 = useState(false), isDialogVisible = _38[0], setDialogVisible = _38[1];
|
|
377
|
+
var _39 = useState(false), isRecoverDialogVisible = _39[0], setRecoverDialogVisible = _39[1];
|
|
378
|
+
var _40 = useState(), createButtonUrl = _40[0], setCreateButtonUrl = _40[1];
|
|
379
|
+
var _41 = useState(), editButtonUrl = _41[0], setEditButtonUrl = _41[1];
|
|
380
|
+
var _42 = useState(false), showArchived = _42[0], setShowArchived = _42[1];
|
|
381
|
+
var _43 = useState(false), queryDataLoaded = _43[0], setQueryDataLoaded = _43[1];
|
|
382
|
+
var _44 = useState(null), customFilter = _44[0], setCustomFilter = _44[1];
|
|
383
|
+
var _45 = useState(false), showSaveFilterPopup = _45[0], setShowSaveFilterPopup = _45[1];
|
|
367
384
|
var sizeOptions = [
|
|
368
385
|
{ label: "Compact", value: "small", image: CompactImage },
|
|
369
386
|
{ label: "Cozy", value: "normal", image: CozyImage },
|
|
@@ -373,19 +390,18 @@ export var SolidListView = function (params) {
|
|
|
373
390
|
// { label: 'List ', value: 'list', image: ListImage },
|
|
374
391
|
// { label: 'Kanban', value: 'kanban', image: KanbanImage },
|
|
375
392
|
// ]
|
|
376
|
-
var
|
|
377
|
-
var
|
|
393
|
+
var _46 = useState(sizeOptions[1].value), size = _46[0], setSize = _46[1];
|
|
394
|
+
var _47 = useState([]), viewModes = _47[0], setViewModes = _47[1];
|
|
378
395
|
// Custom Row Action
|
|
379
|
-
var
|
|
380
|
-
var
|
|
396
|
+
var _48 = useState(false), listViewRowActionPopupState = _48[0], setListViewRowActionPopupState = _48[1];
|
|
397
|
+
var _49 = useState(), listViewRowActionData = _49[0], setListRowActionData = _49[1];
|
|
381
398
|
var toast = useRef(null);
|
|
382
399
|
// Get the list view data.
|
|
383
|
-
var
|
|
384
|
-
var
|
|
385
|
-
var
|
|
400
|
+
var _50 = useLazyGetSolidEntitiesQuery(), triggerGetSolidEntities = _50[0], _51 = _50[1], solidEntityListViewData = _51.data, isLoading = _51.isLoading, error = _51.error;
|
|
401
|
+
var _52 = useLazyRecoverSolidEntityByIdQuery(), triggerRecoverSolidEntitiesById = _52[0], _53 = _52[1], recoverByIdData = _53.data, recoverByIdIsLoading = _53.isLoading, recoverByIdError = _53.error, recoverByIdIsError = _53.isError, recoverByIdIsSuccess = _53.isSuccess;
|
|
402
|
+
var _54 = useRecoverSolidEntityMutation(), triggerRecoverSolidEntities = _54[0], _55 = _54[1], recoverByData = _55.data, recoverByIsLoading = _55.isLoading, recoverError = _55.error, recoverIsError = _55.isError, recoverByIsSuccess = _55.isSuccess;
|
|
386
403
|
// After data is fetched populate the list view state so as to be able to render the data.
|
|
387
404
|
useEffect(function () {
|
|
388
|
-
console.log("useEffect: [solidListViewMetaData] line no 310");
|
|
389
405
|
if (solidEntityListViewData) {
|
|
390
406
|
var cleanedRecords = solidEntityListViewData.records.map(function (record) {
|
|
391
407
|
var newRecord = __assign({}, record);
|
|
@@ -414,14 +430,14 @@ export var SolidListView = function (params) {
|
|
|
414
430
|
setLoading(false);
|
|
415
431
|
}
|
|
416
432
|
}, [solidEntityListViewData]);
|
|
417
|
-
var
|
|
433
|
+
var _56 = useDeleteSolidEntityMutation(), deleteSolidSingleEntiry = _56[0], isDeleteSolidSingleEntitySuccess = _56[1].isSuccess;
|
|
418
434
|
// Delete mutation
|
|
419
|
-
var
|
|
435
|
+
var _57 = useDeleteMultipleSolidEntitiesMutation(), deleteManySolidEntities = _57[0], _58 = _57[1], isSolidEntitiesDeleted = _58.isLoading, isDeleteSolidEntitiesSucess = _58.isSuccess, isSolidEntitiesDeleteError = _58.isError, SolidEntitiesDeleteError = _58.error, DeletedSolidEntities = _58.data;
|
|
420
436
|
// Fetch data after toPopulate has been populated...
|
|
421
437
|
useEffect(function () {
|
|
422
438
|
var _a, _b, _c;
|
|
423
439
|
console.log("useEffect: [isDeleteSolidEntitiesSucess, isDeleteSolidSingleEntitySuccess, recoverByIdIsSuccess, recoverByIsSuccess, solidListViewMetaData]");
|
|
424
|
-
if (solidListViewMetaData) {
|
|
440
|
+
if (solidListViewMetaData && solidListViewLayout) {
|
|
425
441
|
var queryObject = queryStringToQueryObject();
|
|
426
442
|
if (queryObject) {
|
|
427
443
|
var queryData = {
|
|
@@ -468,7 +484,69 @@ export var SolidListView = function (params) {
|
|
|
468
484
|
recoverByIdIsSuccess,
|
|
469
485
|
recoverByIsSuccess,
|
|
470
486
|
solidListViewMetaData,
|
|
487
|
+
solidListViewLayout
|
|
471
488
|
]);
|
|
489
|
+
var session = useSession();
|
|
490
|
+
var user = useSelector(function (state) { return state.auth; }).user;
|
|
491
|
+
useEffect(function () {
|
|
492
|
+
if (solidListViewMetaData && (solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) && !loading) {
|
|
493
|
+
var handleDynamicFunction = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
494
|
+
var dynamicHeader, DynamicFunctionComponent, listViewRecords, listLayout, event, updatedListData;
|
|
495
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
496
|
+
return __generator(this, function (_h) {
|
|
497
|
+
switch (_h.label) {
|
|
498
|
+
case 0:
|
|
499
|
+
dynamicHeader = (_c = (_b = (_a = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.onListLoad;
|
|
500
|
+
DynamicFunctionComponent = null;
|
|
501
|
+
listViewRecords = listViewData;
|
|
502
|
+
listLayout = (_e = (_d = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _d === void 0 ? void 0 : _d.solidView) === null || _e === void 0 ? void 0 : _e.layout;
|
|
503
|
+
if (params.customLayout) {
|
|
504
|
+
listLayout = params.customLayout;
|
|
505
|
+
}
|
|
506
|
+
event = {
|
|
507
|
+
fieldsMetadata: (_f = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _f === void 0 ? void 0 : _f.solidFieldsMetadata,
|
|
508
|
+
listData: listViewData,
|
|
509
|
+
totalRecords: totalRecords,
|
|
510
|
+
type: "onListLoad",
|
|
511
|
+
viewMetadata: (_g = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _g === void 0 ? void 0 : _g.solidView,
|
|
512
|
+
listViewLayout: listLayout,
|
|
513
|
+
queryParams: {
|
|
514
|
+
menuItemId: menuItemId,
|
|
515
|
+
menuItemName: menuItemName,
|
|
516
|
+
actionId: actionId,
|
|
517
|
+
actionName: actionName,
|
|
518
|
+
},
|
|
519
|
+
user: user,
|
|
520
|
+
session: session
|
|
521
|
+
};
|
|
522
|
+
if (!dynamicHeader) return [3 /*break*/, 3];
|
|
523
|
+
DynamicFunctionComponent = getExtensionFunction(dynamicHeader);
|
|
524
|
+
if (!DynamicFunctionComponent) return [3 /*break*/, 2];
|
|
525
|
+
return [4 /*yield*/, DynamicFunctionComponent(event)];
|
|
526
|
+
case 1:
|
|
527
|
+
updatedListData = _h.sent();
|
|
528
|
+
if (updatedListData && (updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.dataChanged) && (updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.newListData)) {
|
|
529
|
+
listViewRecords = updatedListData.newListData;
|
|
530
|
+
}
|
|
531
|
+
if (updatedListData && (updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.layoutChanged) && (updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.newLayout)) {
|
|
532
|
+
listLayout = updatedListData.newLayout;
|
|
533
|
+
}
|
|
534
|
+
_h.label = 2;
|
|
535
|
+
case 2:
|
|
536
|
+
if (listViewRecords) {
|
|
537
|
+
setListViewData(listViewRecords);
|
|
538
|
+
}
|
|
539
|
+
if (listLayout) {
|
|
540
|
+
setSolidListViewLayout(listLayout);
|
|
541
|
+
}
|
|
542
|
+
_h.label = 3;
|
|
543
|
+
case 3: return [2 /*return*/];
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
}); };
|
|
547
|
+
handleDynamicFunction();
|
|
548
|
+
}
|
|
549
|
+
}, [solidListViewMetaData, loading]);
|
|
472
550
|
useEffect(function () {
|
|
473
551
|
console.log("useEffect: [first, rows, sortField, sortOrder, showArchived, toPopulate, toPopulateMedia, customFilter, queryDataLoaded]");
|
|
474
552
|
if (queryDataLoaded) {
|
|
@@ -573,45 +651,76 @@ export var SolidListView = function (params) {
|
|
|
573
651
|
// Common utility function that gets called on filter, sort & pagination events.
|
|
574
652
|
// This function creates the query string as per the solid backend API specification
|
|
575
653
|
var setQueryString = function (offset, limit, sortField, sortOrder, filters, showArchived, locale) { return __awaiter(void 0, void 0, void 0, function () {
|
|
576
|
-
var solidFieldsMetadata, queryData, sortFieldMetadata, queryString, url, urlData;
|
|
577
|
-
var _a, _b, _c;
|
|
578
|
-
return __generator(this, function (
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
654
|
+
var solidFieldsMetadata, queryData, sortFieldMetadata, dynamicHeader, DynamicFunctionComponent, event, updatedListData, queryString, url, urlData;
|
|
655
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
656
|
+
return __generator(this, function (_j) {
|
|
657
|
+
switch (_j.label) {
|
|
658
|
+
case 0:
|
|
659
|
+
solidFieldsMetadata = (_a = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidFieldsMetadata;
|
|
660
|
+
queryData = {
|
|
661
|
+
offset: offset !== null && offset !== void 0 ? offset : first,
|
|
662
|
+
limit: limit !== null && limit !== void 0 ? limit : rows,
|
|
663
|
+
filters: filters !== null && filters !== void 0 ? filters : filters,
|
|
664
|
+
populate: toPopulate,
|
|
665
|
+
populateMedia: toPopulateMedia,
|
|
666
|
+
locale: localeName ? localeName : "en",
|
|
667
|
+
};
|
|
668
|
+
if (sortField && solidFieldsMetadata && solidFieldsMetadata[sortField]) {
|
|
669
|
+
sortFieldMetadata = solidFieldsMetadata[sortField];
|
|
670
|
+
if ((sortFieldMetadata === null || sortFieldMetadata === void 0 ? void 0 : sortFieldMetadata.type) === "relation" &&
|
|
671
|
+
(sortFieldMetadata === null || sortFieldMetadata === void 0 ? void 0 : sortFieldMetadata.relationType) === "many-to-one") {
|
|
672
|
+
sortField = "".concat(sortField, ".").concat((_c = (_b = sortFieldMetadata === null || sortFieldMetadata === void 0 ? void 0 : sortFieldMetadata.relationModel) === null || _b === void 0 ? void 0 : _b.userKeyField) === null || _c === void 0 ? void 0 : _c.name);
|
|
673
|
+
}
|
|
674
|
+
queryData.sort = [
|
|
675
|
+
"".concat(sortField, ":").concat(sortOrder == 0 ? null : sortOrder == 1 ? "asc" : "desc"),
|
|
676
|
+
];
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
queryData.sort = ["id:desc"];
|
|
680
|
+
}
|
|
681
|
+
if (showArchived) {
|
|
682
|
+
queryData.showSoftDeleted = "inclusive";
|
|
683
|
+
}
|
|
684
|
+
dynamicHeader = (_f = (_e = (_d = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _d === void 0 ? void 0 : _d.solidView) === null || _e === void 0 ? void 0 : _e.layout) === null || _f === void 0 ? void 0 : _f.onBeforeListDataLoad;
|
|
685
|
+
DynamicFunctionComponent = null;
|
|
686
|
+
event = {
|
|
687
|
+
type: "onBeforeListDataLoad",
|
|
688
|
+
fieldsMetadata: (_g = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _g === void 0 ? void 0 : _g.solidFieldsMetadata,
|
|
689
|
+
viewMetadata: (_h = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _h === void 0 ? void 0 : _h.solidView,
|
|
690
|
+
listViewLayout: solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data.solidView.layout,
|
|
691
|
+
filter: structuredClone(queryData),
|
|
692
|
+
queryParams: {
|
|
693
|
+
menuItemId: menuItemId,
|
|
694
|
+
menuItemName: menuItemName,
|
|
695
|
+
actionId: actionId,
|
|
696
|
+
actionName: actionName,
|
|
697
|
+
},
|
|
698
|
+
user: user,
|
|
699
|
+
session: session
|
|
700
|
+
};
|
|
701
|
+
if (!dynamicHeader) return [3 /*break*/, 2];
|
|
702
|
+
DynamicFunctionComponent = getExtensionFunction(dynamicHeader);
|
|
703
|
+
if (!DynamicFunctionComponent) return [3 /*break*/, 2];
|
|
704
|
+
return [4 /*yield*/, DynamicFunctionComponent(event)];
|
|
705
|
+
case 1:
|
|
706
|
+
updatedListData = _j.sent();
|
|
707
|
+
if (updatedListData && (updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.filterApplied) && (updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.newFilter)) {
|
|
708
|
+
queryData = updatedListData === null || updatedListData === void 0 ? void 0 : updatedListData.newFilter;
|
|
709
|
+
}
|
|
710
|
+
_j.label = 2;
|
|
711
|
+
case 2:
|
|
712
|
+
queryString = qs.stringify(queryData, { encodeValuesOnly: true });
|
|
713
|
+
if (customFilter) {
|
|
714
|
+
url = void 0;
|
|
715
|
+
urlData = queryData;
|
|
716
|
+
delete urlData.filters;
|
|
717
|
+
urlData.s_filter = customFilter.s_filter || {};
|
|
718
|
+
urlData.c_filter = customFilter.c_filter || {};
|
|
719
|
+
queryObjectToQueryString(urlData);
|
|
720
|
+
}
|
|
721
|
+
triggerGetSolidEntities(queryString);
|
|
722
|
+
return [2 /*return*/];
|
|
612
723
|
}
|
|
613
|
-
triggerGetSolidEntities(queryString);
|
|
614
|
-
return [2 /*return*/];
|
|
615
724
|
});
|
|
616
725
|
}); };
|
|
617
726
|
// handle filter...
|
|
@@ -635,13 +744,15 @@ export var SolidListView = function (params) {
|
|
|
635
744
|
if (solidListViewMetaData) {
|
|
636
745
|
initialFilterMethod();
|
|
637
746
|
}
|
|
638
|
-
setFilters(
|
|
747
|
+
setFilters({
|
|
748
|
+
$and: []
|
|
749
|
+
});
|
|
639
750
|
solidGlobalSearchElementRef.current.clearFilter();
|
|
640
751
|
};
|
|
641
|
-
var
|
|
752
|
+
var _59 = useState(), selectedSolidViewData = _59[0], setSelectedSolidViewData = _59[1];
|
|
642
753
|
var selectedDataRef = useRef();
|
|
643
754
|
var op = useRef(null);
|
|
644
|
-
var
|
|
755
|
+
var _60 = useState(false), deleteEntity = _60[0], setDeleteEntity = _60[1];
|
|
645
756
|
// clickable link allowing one to open the detail / form view.
|
|
646
757
|
var detailsBodyTemplate = function (solidViewData) {
|
|
647
758
|
return (_jsx("div", { children: _jsx(Button, { type: "button", text: true, size: "small", className: "", onClick: function (e) {
|
|
@@ -687,7 +798,7 @@ export var SolidListView = function (params) {
|
|
|
687
798
|
if (errorMessages.length > 0) {
|
|
688
799
|
(_b = toast === null || toast === void 0 ? void 0 : toast.current) === null || _b === void 0 ? void 0 : _b.show({
|
|
689
800
|
severity: "error",
|
|
690
|
-
summary:
|
|
801
|
+
summary: ERROR_MESSAGES.SEND_REPORT,
|
|
691
802
|
// sticky: true,
|
|
692
803
|
life: 3000,
|
|
693
804
|
//@ts-ignore
|
|
@@ -703,7 +814,7 @@ export var SolidListView = function (params) {
|
|
|
703
814
|
if (error) {
|
|
704
815
|
(_a = toast === null || toast === void 0 ? void 0 : toast.current) === null || _a === void 0 ? void 0 : _a.show({
|
|
705
816
|
severity: "error",
|
|
706
|
-
summary:
|
|
817
|
+
summary: ERROR_MESSAGES.SEND_REPORT,
|
|
707
818
|
// sticky: true,
|
|
708
819
|
life: 3000,
|
|
709
820
|
//@ts-ignore
|
|
@@ -724,7 +835,7 @@ export var SolidListView = function (params) {
|
|
|
724
835
|
(_a = toast.current) === null || _a === void 0 ? void 0 : _a.show({
|
|
725
836
|
severity: 'success',
|
|
726
837
|
summary: 'Deleted',
|
|
727
|
-
detail:
|
|
838
|
+
detail: ERROR_MESSAGES.RECORD_DELETE,
|
|
728
839
|
life: 3000,
|
|
729
840
|
});
|
|
730
841
|
setDialogVisible(false);
|
|
@@ -735,10 +846,10 @@ export var SolidListView = function (params) {
|
|
|
735
846
|
setSelectedRecords([]);
|
|
736
847
|
setSelectedRecoverRecords([]);
|
|
737
848
|
};
|
|
738
|
-
var
|
|
739
|
-
var
|
|
849
|
+
var _61 = useState(false), openLightbox = _61[0], setOpenLightbox = _61[1];
|
|
850
|
+
var _62 = useState({}), lightboxUrls = _62[0], setLightboxUrls = _62[1];
|
|
740
851
|
// Render columns dynamically based on metadata
|
|
741
|
-
var renderColumnsDynamically = function (solidListViewMetaData) {
|
|
852
|
+
var renderColumnsDynamically = function (solidListViewMetaData, solidListViewLayout) {
|
|
742
853
|
var _a;
|
|
743
854
|
if (!solidListViewMetaData) {
|
|
744
855
|
return;
|
|
@@ -751,9 +862,7 @@ export var SolidListView = function (params) {
|
|
|
751
862
|
if (!solidView || !solidFieldsMetadata) {
|
|
752
863
|
return;
|
|
753
864
|
}
|
|
754
|
-
var currentLayout =
|
|
755
|
-
? params.customLayout
|
|
756
|
-
: solidView.layout;
|
|
865
|
+
var currentLayout = solidListViewLayout;
|
|
757
866
|
return (_a = currentLayout.children) === null || _a === void 0 ? void 0 : _a.map(function (column) {
|
|
758
867
|
var _a, _b;
|
|
759
868
|
var fieldMetadata = solidFieldsMetadata[column.attrs.name];
|
|
@@ -831,7 +940,7 @@ export var SolidListView = function (params) {
|
|
|
831
940
|
case 0:
|
|
832
941
|
_g.trys.push([0, 2, , 3]);
|
|
833
942
|
if (!(selectedSolidViewData === null || selectedSolidViewData === void 0 ? void 0 : selectedSolidViewData.id)) {
|
|
834
|
-
throw new Error(
|
|
943
|
+
throw new Error(ERROR_MESSAGES.NO_ENTITY_SELECTED);
|
|
835
944
|
}
|
|
836
945
|
return [4 /*yield*/, deleteSolidSingleEntiry(selectedSolidViewData.id)];
|
|
837
946
|
case 1:
|
|
@@ -840,15 +949,15 @@ export var SolidListView = function (params) {
|
|
|
840
949
|
setDeleteEntity(false);
|
|
841
950
|
(_b = toast.current) === null || _b === void 0 ? void 0 : _b.show({
|
|
842
951
|
severity: "success",
|
|
843
|
-
summary:
|
|
844
|
-
detail:
|
|
952
|
+
summary: ERROR_MESSAGES.DELETED,
|
|
953
|
+
detail: ERROR_MESSAGES.ENTITY_DELETE,
|
|
845
954
|
life: 3000,
|
|
846
955
|
});
|
|
847
956
|
}
|
|
848
957
|
else {
|
|
849
958
|
(_c = toast.current) === null || _c === void 0 ? void 0 : _c.show({
|
|
850
959
|
severity: "error",
|
|
851
|
-
summary:
|
|
960
|
+
summary: ERROR_MESSAGES.DELETE_FAIELD,
|
|
852
961
|
detail: (_e = (_d = response === null || response === void 0 ? void 0 : response.error) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error,
|
|
853
962
|
life: 3000,
|
|
854
963
|
});
|
|
@@ -858,8 +967,8 @@ export var SolidListView = function (params) {
|
|
|
858
967
|
error_1 = _g.sent();
|
|
859
968
|
(_f = toast.current) === null || _f === void 0 ? void 0 : _f.show({
|
|
860
969
|
severity: "error",
|
|
861
|
-
summary:
|
|
862
|
-
detail:
|
|
970
|
+
summary: ERROR_MESSAGES.DELETE_FAIELD,
|
|
971
|
+
detail: ERROR_MESSAGES.SOMETHING_WRONG,
|
|
863
972
|
life: 3000,
|
|
864
973
|
});
|
|
865
974
|
return [3 /*break*/, 3];
|
|
@@ -890,10 +999,10 @@ export var SolidListView = function (params) {
|
|
|
890
999
|
: [];
|
|
891
1000
|
var hasMedia = slides.some(function (s) { return s.type === "video"; });
|
|
892
1001
|
return (_jsxs("div", { className: "page-parent-wrapper flex", children: [_jsxs("div", { className: "h-full flex-grow-1 ".concat(styles.ListContentWrapper), children: [_jsxs("div", { className: "page-header", children: [_jsx(Toast, { ref: toast }), _jsxs("div", { className: "flex gap-3 align-items-center", children: [_jsx("p", { className: "m-0 view-title", children: (_d = (_c = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _c === void 0 ? void 0 : _c.solidView) === null || _d === void 0 ? void 0 : _d.displayName }), ((_e = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _e === void 0 ? void 0 : _e.enableGlobalSearch) === true &&
|
|
893
|
-
params.embeded === false && (_jsx(SolidGlobalSearchElement, { showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, filters: filters, clearFilter: clearFilter, ref: solidGlobalSearchElementRef, viewData: solidListViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter }))] }), _jsxs("div", { className: "flex align-items-center gap-3", children: [(_h = (_g = (_f = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _f === void 0 ? void 0 : _f.headerButtons) === null || _g === void 0 ? void 0 : _g.filter(function (rb) { return rb.attrs.actionInContextMenu != true; })) === null || _h === void 0 ? void 0 : _h.map(function (button, index) { return (_jsx(SolidListViewHeaderButton, { button: button, params: params, solidListViewMetaData: solidListViewMetaData, handleCustomButtonClick: handleCustomButtonClick, selectedRecords: selectedRecords, filters: filters }, index)); }), actionsAllowed.includes("".concat(
|
|
1002
|
+
params.embeded === false && (_jsx(SolidGlobalSearchElement, { showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, filters: filters, clearFilter: clearFilter, ref: solidGlobalSearchElementRef, viewData: solidListViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter }))] }), _jsxs("div", { className: "flex align-items-center gap-3", children: [(_h = (_g = (_f = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _f === void 0 ? void 0 : _f.headerButtons) === null || _g === void 0 ? void 0 : _g.filter(function (rb) { return rb.attrs.actionInContextMenu != true; })) === null || _h === void 0 ? void 0 : _h.map(function (button, index) { return (_jsx(SolidListViewHeaderButton, { button: button, params: params, solidListViewMetaData: solidListViewMetaData, handleCustomButtonClick: handleCustomButtonClick, selectedRecords: selectedRecords, filters: filters }, index)); }), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'create'))) &&
|
|
894
1003
|
((_j = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _j === void 0 ? void 0 : _j.create) !== false &&
|
|
895
1004
|
params.embeded !== true &&
|
|
896
|
-
((_m = (_l = (_k = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _k === void 0 ? void 0 : _k.solidView) === null || _l === void 0 ? void 0 : _l.layout) === null || _m === void 0 ? void 0 : _m.attrs.showDefaultAddButton) !== false && (_jsx(SolidCreateButton, { url: createButtonUrl, solidListViewLayout: solidListViewLayout })), actionsAllowed.includes("".concat(
|
|
1005
|
+
((_m = (_l = (_k = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _k === void 0 ? void 0 : _k.solidView) === null || _l === void 0 ? void 0 : _l.layout) === null || _m === void 0 ? void 0 : _m.attrs.showDefaultAddButton) !== false && (_jsx(SolidCreateButton, { url: createButtonUrl, solidListViewLayout: solidListViewLayout })), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'create'))) &&
|
|
897
1006
|
((_o = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _o === void 0 ? void 0 : _o.create) !== false &&
|
|
898
1007
|
params.embeded == true &&
|
|
899
1008
|
params.inlineCreate == true &&
|
|
@@ -906,7 +1015,7 @@ export var SolidListView = function (params) {
|
|
|
906
1015
|
: "Add", className: "".concat((_t = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _t === void 0 ? void 0 : _t.addButtonClassName), size: "small", onClick: function () { return params.handlePopUpOpen("new"); } })), params.embeded !== true && (_jsx(Button, { type: "button", size: "small", icon: "pi pi-refresh", severity: "secondary", outlined: true, onClick: function () {
|
|
907
1016
|
setQueryString(first, rows, sortField, sortOrder, filters, showArchived);
|
|
908
1017
|
} })), showArchived && (_jsx(Button, { type: "button", icon: "pi pi-refresh", label: "Recover", size: "small", severity: "secondary", onClick: function () { return setRecoverDialogVisible(true); } })), params.embeded === false &&
|
|
909
|
-
((_u = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _u === void 0 ? void 0 : _u.configureView) !== false && (_jsx(SolidListViewConfigure, { listViewMetaData:
|
|
1018
|
+
((_u = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _u === void 0 ? void 0 : _u.configureView) !== false && (_jsx(SolidListViewConfigure, { listViewMetaData: solidListViewMetaData, solidListViewLayout: solidListViewLayout, setShowArchived: setShowArchived, showArchived: showArchived, viewData: solidListViewMetaData, sizeOptions: sizeOptions, setSize: setSize, size: size, viewModes: viewModes, params: params, actionsAllowed: actionsAllowed, selectedRecords: selectedRecords, setDialogVisible: setDialogVisible, setShowSaveFilterPopup: setShowSaveFilterPopup, filters: filters, handleFetchUpdatedRecords: handleFetchUpdatedRecords }))] })] }), isListViewEmptyWithoutFilters ? (_jsx(SolidEmptyListViewPlaceholder, { createButtonUrl: createButtonUrl, actionsAllowed: actionsAllowed, params: params, solidListViewMetaData: solidListViewMetaData })) : (_jsx("div", { className: "solid-datatable-wrapper", children: _jsxs(DataTable, { value: listViewData, rowClassName: function (rowData) {
|
|
910
1019
|
return rowData.deletedAt ? "greyed-out-row" : "";
|
|
911
1020
|
}, showGridlines: false, lazy: true, scrollable: true,
|
|
912
1021
|
// scrollHeight="90vh"
|
|
@@ -917,13 +1026,13 @@ export var SolidListView = function (params) {
|
|
|
917
1026
|
selection: params.embeded === true
|
|
918
1027
|
? null
|
|
919
1028
|
: __spreadArray(__spreadArray([], selectedRecords, true), selectedRecoverRecords, true), onSelectionChange: params.embeded === true ? undefined : onSelectionChange, selectionMode: params.embeded === true ? null : "checkbox", removableSort: true, filterIcon: _jsx(FilterIcon, {}), tableClassName: "solid-data-table", paginatorClassName: "solid-paginator", paginatorTemplate: "RowsPerPageDropdown CurrentPageReport PrevPageLink NextPageLink", currentPageReportTemplate: "{first} - {last} of {totalRecords}", onRowClick: function (e) {
|
|
920
|
-
var _a;
|
|
1029
|
+
var _a, _b;
|
|
921
1030
|
var rowData = e.data;
|
|
922
|
-
if ((solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs.disableRowClick) === true)
|
|
1031
|
+
if (((_a = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _a === void 0 ? void 0 : _a.disableRowClick) === true)
|
|
923
1032
|
return;
|
|
924
|
-
var hasFindPermission = actionsAllowed.includes(
|
|
925
|
-
var hasUpdatePermission = actionsAllowed.includes(
|
|
926
|
-
((
|
|
1033
|
+
var hasFindPermission = actionsAllowed.includes(permissionExpression(params.modelName, 'findOne'));
|
|
1034
|
+
var hasUpdatePermission = actionsAllowed.includes(permissionExpression(params.modelName, 'update')) &&
|
|
1035
|
+
((_b = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _b === void 0 ? void 0 : _b.edit) !== false;
|
|
927
1036
|
if (!(hasFindPermission || hasUpdatePermission))
|
|
928
1037
|
return;
|
|
929
1038
|
if (params.embeded === true) {
|
|
@@ -935,15 +1044,16 @@ export var SolidListView = function (params) {
|
|
|
935
1044
|
}
|
|
936
1045
|
router.push("".concat(editButtonUrl, "/").concat(rowData === null || rowData === void 0 ? void 0 : rowData.id, "?viewMode=view"));
|
|
937
1046
|
}
|
|
938
|
-
}, children: [params.embeded === true ? null : (_jsx(Column, { selectionMode: "multiple", headerStyle: { width: "3em" } })), renderColumnsDynamically(
|
|
1047
|
+
}, children: [params.embeded === true ? null : (_jsx(Column, { selectionMode: "multiple", headerStyle: { width: "3em" } })), solidListViewMetaData && solidListViewLayout && renderColumnsDynamically(solidListViewMetaData, solidListViewLayout), ((_z = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _z === void 0 ? void 0 : _z.rowButtons) &&
|
|
939
1048
|
((_0 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _0 === void 0 ? void 0 : _0.rowButtons.filter(function (rb) {
|
|
940
|
-
var _a, _b;
|
|
1049
|
+
var _a, _b, _c;
|
|
941
1050
|
var roles = ((_a = rb === null || rb === void 0 ? void 0 : rb.attrs) === null || _a === void 0 ? void 0 : _a.roles) || [];
|
|
942
1051
|
var isInContextMenu = rb.attrs.actionInContextMenu === true;
|
|
943
1052
|
// Only check hasAnyRole if roles are provided
|
|
944
1053
|
var isAllowed = roles.length === 0 ||
|
|
945
1054
|
hasAnyRole((_b = user === null || user === void 0 ? void 0 : user.user) === null || _b === void 0 ? void 0 : _b.roles, roles);
|
|
946
|
-
|
|
1055
|
+
var isVisible = ((_c = rb === null || rb === void 0 ? void 0 : rb.attrs) === null || _c === void 0 ? void 0 : _c.visible) !== false;
|
|
1056
|
+
return !isInContextMenu && isAllowed && isVisible;
|
|
947
1057
|
}).map(function (button, index) {
|
|
948
1058
|
// const hasRole = button.attrs.roles && button.attrs.roles.length > 0 ? useHasAnyRole(button.attrs.roles) : true;
|
|
949
1059
|
// if (!hasRole) return null;
|
|
@@ -959,57 +1069,64 @@ export var SolidListView = function (params) {
|
|
|
959
1069
|
var event = {
|
|
960
1070
|
params: params,
|
|
961
1071
|
rowData: rowData,
|
|
962
|
-
solidListViewMetaData: solidListViewMetaData.data,
|
|
1072
|
+
solidListViewMetaData: solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data,
|
|
963
1073
|
};
|
|
964
1074
|
handleCustomButtonClick(button.attrs, event);
|
|
965
1075
|
} }));
|
|
966
1076
|
} }, index));
|
|
967
|
-
})), actionsAllowed.includes("".concat(
|
|
1077
|
+
})), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'update'))) &&
|
|
968
1078
|
((_1 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _1 === void 0 ? void 0 : _1.edit) !== false &&
|
|
969
1079
|
((_2 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _2 === void 0 ? void 0 : _2.showRowEditInContextMenu) ===
|
|
970
1080
|
false && (_jsx(Column, { header: "Edit", body: function (rowData) {
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
params.
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1081
|
+
var shouldHideEditOrDeleteButton = isDraftPublishWorkflowEnabled && (rowData === null || rowData === void 0 ? void 0 : rowData.publishedAt);
|
|
1082
|
+
return (_jsx(_Fragment, { children: !shouldHideEditOrDeleteButton && (_jsx(Button, { text: true, type: "button", severity: "secondary", className: "", label: "", size: "small", iconPos: "left", icon: "pi pi-pencil", onClick: function () {
|
|
1083
|
+
if (params.embeded == true) {
|
|
1084
|
+
params.handlePopUpOpen(rowData === null || rowData === void 0 ? void 0 : rowData.id);
|
|
1085
|
+
}
|
|
1086
|
+
else {
|
|
1087
|
+
router.push("".concat(editButtonUrl, "/").concat(rowData === null || rowData === void 0 ? void 0 : rowData.id, "?viewMode=edit"));
|
|
1088
|
+
}
|
|
1089
|
+
} })) }));
|
|
1090
|
+
} })), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'delete'))) &&
|
|
980
1091
|
((_3 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _3 === void 0 ? void 0 : _3.delete) !== false &&
|
|
981
1092
|
((_4 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _4 === void 0 ? void 0 : _4.showRowDeleteInContextMenu) ===
|
|
982
1093
|
false && (_jsx(Column, { header: "Delete", body: function (rowData) {
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1094
|
+
var shouldHideEditOrDeleteButton = isDraftPublishWorkflowEnabled && (rowData === null || rowData === void 0 ? void 0 : rowData.publishedAt);
|
|
1095
|
+
return (_jsx(_Fragment, { children: !shouldHideEditOrDeleteButton && (_jsx(Button, { text: true, type: "button", className: "", size: "small", iconPos: "left", severity: "danger", icon: "pi pi-trash", onClick: function () {
|
|
1096
|
+
setSelectedSolidViewData(rowData);
|
|
1097
|
+
setDeleteEntity(true);
|
|
1098
|
+
} })) }));
|
|
1099
|
+
} })), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'update'))) &&
|
|
988
1100
|
((_5 = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _5 === void 0 ? void 0 : _5.edit) !== false && (_jsx(Column, { frozen: true, alignFrozen: "right", body: function (rowData) {
|
|
989
|
-
var _a, _b, _c, _d;
|
|
1101
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
990
1102
|
return (rowData === null || rowData === void 0 ? void 0 : rowData.deletedAt) ? (_jsx("a", { onClick: function (event) {
|
|
991
1103
|
event.stopPropagation();
|
|
992
1104
|
recoverById(rowData.id);
|
|
993
1105
|
}, className: "retrieve-button", children: _jsx("i", { className: "pi pi-refresh", style: { fontSize: "1rem" } }) })) : (_jsx(_Fragment, { children: ((_a = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _a === void 0 ? void 0 : _a.showRowContextMenu) !==
|
|
994
|
-
false && (_jsxs(_Fragment, { children: [detailsBodyTemplate(rowData), _jsx(OverlayPanel, { ref: op, className: "solid-custom-overlay", style: { top: 10, minWidth: 120 }, children: _jsxs("div", { className: "flex flex-column gap-1 p-1", children: [(solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs.showDefaultEditButton) !== false &&
|
|
995
|
-
(solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs
|
|
1106
|
+
false && (_jsxs(_Fragment, { children: [detailsBodyTemplate(rowData), _jsx(OverlayPanel, { ref: op, className: "solid-custom-overlay", style: { top: 10, minWidth: 120 }, children: _jsxs("div", { className: "flex flex-column gap-1 p-1", children: [((_b = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _b === void 0 ? void 0 : _b.showDefaultEditButton) !== false &&
|
|
1107
|
+
((_c = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _c === void 0 ? void 0 : _c.showRowEditInContextMenu) !== false &&
|
|
1108
|
+
!(isDraftPublishWorkflowEnabled && ((_d = selectedDataRef.current) === null || _d === void 0 ? void 0 : _d.publishedAt)) && (_jsx(Button, { type: "button", className: "w-full text-left gap-1", label: "Edit", size: "small", iconPos: "left", icon: "pi pi-pencil", onClick: function () {
|
|
1109
|
+
var _a, _b;
|
|
996
1110
|
if (params.embeded == true) {
|
|
997
|
-
params.handlePopUpOpen(
|
|
1111
|
+
params.handlePopUpOpen((_a = selectedDataRef.current) === null || _a === void 0 ? void 0 : _a.id);
|
|
998
1112
|
}
|
|
999
1113
|
else {
|
|
1000
|
-
router.push("".concat(editButtonUrl, "/").concat(
|
|
1114
|
+
router.push("".concat(editButtonUrl, "/").concat((_b = selectedDataRef.current) === null || _b === void 0 ? void 0 : _b.id, "?viewMode=edit"));
|
|
1001
1115
|
}
|
|
1002
|
-
} })), actionsAllowed.includes("".concat(
|
|
1003
|
-
((
|
|
1116
|
+
} })), actionsAllowed.includes("".concat(permissionExpression(params.modelName, 'delete'))) &&
|
|
1117
|
+
((_e = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _e === void 0 ? void 0 : _e.delete) !==
|
|
1004
1118
|
false &&
|
|
1005
|
-
(
|
|
1006
|
-
return
|
|
1119
|
+
((_f = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _f === void 0 ? void 0 : _f.showRowDeleteInContextMenu) !== false &&
|
|
1120
|
+
!(isDraftPublishWorkflowEnabled && ((_g = selectedDataRef.current) === null || _g === void 0 ? void 0 : _g.publishedAt)) && (_jsx(Button, { text: true, type: "button", className: "w-full text-left gap-1", label: "Delete", size: "small", iconPos: "left", severity: "danger", icon: "pi pi-trash", onClick: function () { return setDeleteEntity(true); } })), (_j = (_h = solidListViewLayout === null || solidListViewLayout === void 0 ? void 0 : solidListViewLayout.attrs) === null || _h === void 0 ? void 0 : _h.rowButtons) === null || _j === void 0 ? void 0 : _j.filter(function (rb) {
|
|
1121
|
+
var _a, _b;
|
|
1122
|
+
return ((_a = rb === null || rb === void 0 ? void 0 : rb.attrs) === null || _a === void 0 ? void 0 : _a.actionInContextMenu) === true &&
|
|
1123
|
+
((_b = rb === null || rb === void 0 ? void 0 : rb.attrs) === null || _b === void 0 ? void 0 : _b.visible) !== false;
|
|
1007
1124
|
}).map(function (button, index) {
|
|
1008
1125
|
var _a;
|
|
1009
1126
|
return (_jsx(SolidListViewRowButtonContextMenu, { button: button, params: params, getSelectedSolidViewData: function () { return selectedDataRef.current; },
|
|
1010
1127
|
// selectedSolidViewData={selectedSolidViewData}
|
|
1011
|
-
solidListViewMetaData: solidListViewMetaData, handleCustomButtonClick: handleCustomButtonClick }, "".concat(index, "-").concat(((_a = selectedDataRef.current) === null || _a === void 0 ? void 0 : _a.id) || '')));
|
|
1012
|
-
})] }) }
|
|
1128
|
+
solidListViewMetaData: solidListViewMetaData, handleCustomButtonClick: handleCustomButtonClick }, "".concat(index, "-").concat(((_a = selectedDataRef === null || selectedDataRef === void 0 ? void 0 : selectedDataRef.current) === null || _a === void 0 ? void 0 : _a.id) || '')));
|
|
1129
|
+
})] }) })] })) }));
|
|
1013
1130
|
} }))] }) }))] }), process.env.NEXT_PUBLIC_ENABLE_SOLIDX_AI === "true" &&
|
|
1014
1131
|
params.embeded !== true && (_jsxs("div", { className: "chatter-section ".concat(isOpenSolidXAiPanel === false ? "collapsed" : ""), style: { width: chatterWidth }, children: [isOpenSolidXAiPanel && (_jsx("div", { style: {
|
|
1015
1132
|
width: 5,
|
|
@@ -1020,7 +1137,7 @@ export var SolidListView = function (params) {
|
|
|
1020
1137
|
bottom: 0,
|
|
1021
1138
|
height: "100%",
|
|
1022
1139
|
zIndex: 9,
|
|
1023
|
-
}, onMouseDown: function () { return setIsResizing(true); } })), isOpenSolidXAiPanel && (_jsx(Button, { icon: "pi pi-angle-double-right", size: "small", text: true, className: "chatter-collapse-btn", style: { width: 30, height: 30, aspectRatio: "1/1" }, onClick: handleCloseSolidXAIPanel })), isOpenSolidXAiPanel === false ? (_jsxs("div", { className: "flex flex-column gap-2 justify-content-center p-2", children: [_jsx("div", { className: "chatter-collapsed-content", onClick: handleOpenSolidXAIPanel, children: _jsxs("div", { className: "flex gap-2", children: [" ", _jsx(SolidXAIIcon, {}), " SolidX AI", " "] }) }), _jsx(Button, { icon: "pi pi-chevron-left", size: "small", className: "px-0", style: { width: 30 }, onClick: handleOpenSolidXAIPanel })] })) : (_jsx(
|
|
1140
|
+
}, onMouseDown: function () { return setIsResizing(true); } })), isOpenSolidXAiPanel && (_jsx(Button, { icon: "pi pi-angle-double-right", size: "small", text: true, className: "chatter-collapse-btn", style: { width: 30, height: 30, aspectRatio: "1/1" }, onClick: handleCloseSolidXAIPanel })), isOpenSolidXAiPanel === false ? (_jsxs("div", { className: "flex flex-column gap-2 justify-content-center p-2", children: [_jsx("div", { className: "chatter-collapsed-content", onClick: handleOpenSolidXAIPanel, children: _jsxs("div", { className: "flex gap-2", children: [" ", _jsx(SolidXAIIcon, {}), " SolidX AI", " "] }) }), _jsx(Button, { icon: "pi pi-chevron-left", size: "small", className: "px-0", style: { width: 30 }, onClick: handleOpenSolidXAIPanel })] })) : (_jsx(SolidAiMainWrapper, { showHeader: true, inListView: true }))] })), _jsxs(Dialog, { visible: isDialogVisible, header: "Confirm Delete", onHide: function () { return setDialogVisible(false); }, headerClassName: "py-2", contentClassName: "px-0 pb-0", style: { width: '20vw' }, children: [_jsx(Divider, { className: "m-0" }), _jsxs("div", { className: "p-4", children: [_jsx("p", { className: "m-0 solid-primary-title", style: { fontSize: 16 }, children: "Are you sure you want to delete the selected records?" }), _jsxs("div", { className: "flex align-items-center gap-2 mt-3", children: [_jsx(Button, { label: "Delete", severity: "danger", size: "small", onClick: handleDeleteEntity, autoFocus: true, onClick: deleteBulk }), _jsx(Button, { label: "Cancel", size: "small", onClick: onDeleteClose, outlined: true, className: 'bg-primary-reverse' })] })] })] }), _jsx(Dialog, { visible: isRecoverDialogVisible, header: "Confirm Recover", modal: true, footer: function () { return (_jsxs("div", { className: "flex justify-content-center", children: [_jsx(Button, { label: "Yes", icon: "pi pi-check", severity: "danger", autoFocus: true, onClick: recoverAll }), _jsx(Button, { label: "No", icon: "pi pi-times", onClick: function () { return setRecoverDialogVisible(false); } })] })); }, onHide: function () { return setRecoverDialogVisible(false); }, children: _jsx("p", { children: "Are you sure you want to recover all records?" }) }), listViewRowActionData && (_jsx(Dialog, { visible: listViewRowActionPopupState, modal: true, onHide: closeListViewRowActionPopup, children: _jsx(ListViewRowActionPopup, { context: listViewRowActionData }) })), _jsxs(Dialog, { header: "Delete ".concat(((_8 = (_7 = (_6 = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _6 === void 0 ? void 0 : _6.solidView) === null || _7 === void 0 ? void 0 : _7.model) === null || _8 === void 0 ? void 0 : _8.displayName)
|
|
1024
1141
|
? (_11 = (_10 = (_9 = solidListViewMetaData === null || solidListViewMetaData === void 0 ? void 0 : solidListViewMetaData.data) === null || _9 === void 0 ? void 0 : _9.solidView) === null || _10 === void 0 ? void 0 : _10.model) === null || _11 === void 0 ? void 0 : _11.displayName
|
|
1025
1142
|
: params === null || params === void 0 ? void 0 : params.modelName), headerClassName: "py-2", contentClassName: "px-0 pb-0", visible: deleteEntity, style: { width: "20vw" }, onHide: function () {
|
|
1026
1143
|
if (!deleteEntity)
|