@solidstarters/solid-core-ui 1.1.69 → 1.1.71
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/CustomFooter/CustomFooter.tsx +264 -0
- package/dist/components/CustomFooter/FooterForm.tsx +19 -0
- package/dist/components/CustomHeader/CallIcon.tsx +20 -0
- package/dist/components/CustomHeader/CustomDropdown.tsx +175 -0
- package/dist/components/CustomHeader/CustomHeader.tsx +64 -0
- package/dist/components/CustomHeader/EmailIcon.tsx +12 -0
- package/dist/components/CustomHeader/HeaderCart.tsx +15 -0
- package/dist/components/CustomHeader/productNavData.tsx +180 -0
- package/dist/components/FormView/DetailsViews.tsx +46 -0
- package/dist/components/FormView/OrderAddressDetails.tsx +70 -0
- package/dist/components/FormView/OrderPaymentDetails.tsx +18 -0
- package/dist/components/FormView/OrderTableDetails.tsx +36 -0
- package/dist/components/FormView/OrderedProductDetail.tsx +22 -0
- package/dist/components/Svg/ExcelSvg.tsx +15 -0
- package/dist/components/Svg/FileSvg.tsx +19 -0
- package/dist/components/Svg/PDFSvg.tsx +15 -0
- package/dist/components/Svg/RightArrowSvg.d.ts +2 -0
- package/dist/components/Svg/RightArrowSvg.d.ts.map +1 -0
- package/dist/components/Svg/RightArrowSvg.js +5 -0
- package/dist/components/Svg/RightArrowSvg.js.map +1 -0
- package/dist/components/Svg/RightArrowSvg.tsx +9 -0
- package/dist/components/Tag/CustomTag.tsx +50 -0
- package/dist/components/auth/AuthLayout.tsx +140 -0
- package/dist/components/auth/ForgotPasswordThankYou.tsx +48 -0
- package/dist/components/auth/GoogleAuthChecking.tsx +60 -0
- package/dist/components/auth/Login.tsx +155 -0
- package/dist/components/auth/Register.tsx +239 -0
- package/dist/components/auth/SolidChangeForcePassword.tsx +145 -0
- package/dist/components/auth/SolidForgotPassword.tsx +125 -0
- package/dist/components/auth/SolidInitialLoginOtp.tsx +152 -0
- package/dist/components/auth/SolidInitiateRegisterOtp.tsx +141 -0
- package/dist/components/auth/SolidLogin.tsx +275 -0
- package/dist/components/auth/SolidOTPVerify.tsx +132 -0
- package/dist/components/auth/SolidRegister.tsx +348 -0
- package/dist/components/auth/SolidResetPassword.tsx +162 -0
- package/dist/components/common/AuthBanner.tsx +41 -0
- package/dist/components/common/AutoCompleteField.tsx +76 -0
- package/dist/components/common/BackButton.tsx +27 -0
- package/dist/components/common/CancelButton.tsx +48 -0
- package/dist/components/common/CodeEditor.tsx +26 -0
- package/dist/components/common/CreateButton.tsx +17 -0
- package/dist/components/common/DropzonePlaceholder.tsx +31 -0
- package/dist/components/common/DropzoneUpload.tsx +11 -0
- package/dist/components/common/FileReaderExt.tsx +20 -0
- package/dist/components/common/GeneralSettings.tsx +406 -0
- package/dist/components/common/HeaderDynamicTitles.tsx +13 -0
- package/dist/components/common/MarkdownViewer.tsx +16 -0
- package/dist/components/common/MultipleSelectAutoCompleteField.tsx +62 -0
- package/dist/components/common/NotFound.tsx +22 -0
- package/dist/components/common/SingleSelectAutoCompleteField.tsx +67 -0
- package/dist/components/common/SocialMediaLogin.tsx +53 -0
- package/dist/components/common/SolidAdmin.tsx +7 -0
- package/dist/components/common/SolidBreadcrumb.tsx +103 -0
- package/dist/components/common/SolidFormHeader.tsx +22 -0
- package/dist/components/common/SolidFormStepper.tsx +213 -0
- package/dist/components/common/SolidModuleHome.tsx +61 -0
- package/dist/components/common/SolidThemeLink.tsx +5 -0
- package/dist/components/common/SolidThemeProvider.tsx +44 -0
- package/dist/components/common/error.tsx +30 -0
- package/dist/components/core/chatter/SolidChatter.d.ts +7 -0
- package/dist/components/core/chatter/SolidChatter.d.ts.map +1 -0
- package/dist/components/core/chatter/SolidChatter.js +269 -0
- package/dist/components/core/chatter/SolidChatter.js.map +1 -0
- package/dist/components/core/chatter/SolidChatter.tsx +252 -0
- package/dist/components/core/chatter/SolidChatterDateDivider.d.ts +6 -0
- package/dist/components/core/chatter/SolidChatterDateDivider.d.ts.map +1 -0
- package/dist/components/core/chatter/SolidChatterDateDivider.js +7 -0
- package/dist/components/core/chatter/SolidChatterDateDivider.js.map +1 -0
- package/dist/components/core/chatter/SolidChatterDateDivider.tsx +16 -0
- package/dist/components/core/chatter/SolidChatterHeader.d.ts +17 -0
- package/dist/components/core/chatter/SolidChatterHeader.d.ts.map +1 -0
- package/dist/components/core/chatter/SolidChatterHeader.js +67 -0
- package/dist/components/core/chatter/SolidChatterHeader.js.map +1 -0
- package/dist/components/core/chatter/SolidChatterHeader.tsx +178 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.d.ts +19 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.d.ts.map +1 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.js +46 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.js.map +1 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.tsx +165 -0
- package/dist/components/core/chatter/SolidMessageComposer.d.ts +7 -0
- package/dist/components/core/chatter/SolidMessageComposer.d.ts.map +1 -0
- package/dist/components/core/chatter/SolidMessageComposer.js +119 -0
- package/dist/components/core/chatter/SolidMessageComposer.js.map +1 -0
- package/dist/components/core/chatter/SolidMessageComposer.tsx +145 -0
- package/dist/components/core/chatter/chatter.module.css +70 -0
- package/dist/components/core/common/FilterComponent.tsx +434 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.tsx +70 -0
- package/dist/components/core/common/SolidCreateButton.tsx +20 -0
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +843 -0
- package/dist/components/core/common/SolidLayoutViews.tsx +87 -0
- package/dist/components/core/common/SolidListViewOptions.tsx +31 -0
- package/dist/components/core/common/SolidSaveCustomFilterForm.tsx +74 -0
- package/dist/components/core/common/SolidSearchBox.tsx +17 -0
- package/dist/components/core/common/SolidViewLayoutManager.d.ts +1 -1
- package/dist/components/core/common/SolidViewLayoutManager.ts +85 -0
- package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeChangeHandler.ts +18 -0
- package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeLoad.ts +18 -0
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.tsx +59 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.tsx +38 -0
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.d.ts +2 -2
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js.map +1 -1
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +123 -0
- package/dist/components/core/field/FieldListViewData.tsx +312 -0
- package/dist/components/core/filter/SolidFilterFields.tsx +128 -0
- package/dist/components/core/filter/SolidManyToOneFilterElement.tsx +60 -0
- package/dist/components/core/filter/SolidSelectionDynamicFilterElement.tsx +50 -0
- package/dist/components/core/filter/SolidSelectionStaticFilterElement.tsx +32 -0
- package/dist/components/core/filter/SolidVarInputsFilterElement.tsx +180 -0
- package/dist/components/core/filter/fields/SolidBigintField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidBooleanField.tsx +50 -0
- package/dist/components/core/filter/fields/SolidComputedField.tsx +23 -0
- package/dist/components/core/filter/fields/SolidDateField.tsx +58 -0
- package/dist/components/core/filter/fields/SolidDatetimeField.tsx +51 -0
- package/dist/components/core/filter/fields/SolidDecimalField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidExternalIdField.tsx +46 -0
- package/dist/components/core/filter/fields/SolidFloatField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidIdField.tsx +46 -0
- package/dist/components/core/filter/fields/SolidIntField.tsx +56 -0
- package/dist/components/core/filter/fields/SolidLongTextField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidMediaMultipleField.tsx +54 -0
- package/dist/components/core/filter/fields/SolidMediaSingleField.tsx +56 -0
- package/dist/components/core/filter/fields/SolidRelationField.tsx +13 -0
- package/dist/components/core/filter/fields/SolidRichTextField.tsx +9 -0
- package/dist/components/core/filter/fields/SolidSelectionDynamicField.tsx +46 -0
- package/dist/components/core/filter/fields/SolidSelectionStaticField.tsx +48 -0
- package/dist/components/core/filter/fields/SolidShortTextField.tsx +54 -0
- package/dist/components/core/filter/fields/SolidTimeField.tsx +45 -0
- package/dist/components/core/filter/fields/SolidUuidField.tsx +45 -0
- package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.tsx +80 -0
- package/dist/components/core/form/SolidFormLayouts.tsx +104 -0
- package/dist/components/core/form/SolidFormUserViewLayout.tsx +85 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +53 -46
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +1352 -0
- package/dist/components/core/form/fields/ISolidField.tsx +69 -0
- package/dist/components/core/form/fields/SolidBooleanField.d.ts +4 -1
- package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.js +80 -29
- package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.tsx +269 -0
- package/dist/components/core/form/fields/SolidDateField.d.ts +3 -0
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js +45 -25
- package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.tsx +153 -0
- package/dist/components/core/form/fields/SolidDateTimeField.d.ts +3 -0
- package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.js +44 -25
- package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.tsx +154 -0
- package/dist/components/core/form/fields/SolidDecimalField.d.ts +3 -0
- package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.js +41 -21
- package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.tsx +155 -0
- package/dist/components/core/form/fields/SolidEmailField.d.ts +3 -0
- package/dist/components/core/form/fields/SolidEmailField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidEmailField.js +41 -21
- package/dist/components/core/form/fields/SolidEmailField.js.map +1 -1
- package/dist/components/core/form/fields/SolidEmailField.tsx +168 -0
- package/dist/components/core/form/fields/SolidIntegerField.d.ts +3 -0
- package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.js +41 -21
- package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.tsx +158 -0
- package/dist/components/core/form/fields/SolidJsonField.d.ts +4 -0
- package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js +51 -15
- package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.tsx +173 -0
- package/dist/components/core/form/fields/SolidLongTextField.d.ts +3 -2
- package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.js +33 -52
- package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.tsx +161 -0
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts +4 -0
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +262 -153
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +639 -0
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts +4 -0
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +243 -149
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +522 -0
- package/dist/components/core/form/fields/SolidPasswordField.d.ts +4 -0
- package/dist/components/core/form/fields/SolidPasswordField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidPasswordField.js +50 -20
- package/dist/components/core/form/fields/SolidPasswordField.js.map +1 -1
- package/dist/components/core/form/fields/SolidPasswordField.tsx +187 -0
- package/dist/components/core/form/fields/SolidRelationField.tsx +54 -0
- package/dist/components/core/form/fields/SolidRichTextField.d.ts +4 -0
- package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.js +49 -20
- package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.tsx +177 -0
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts +4 -0
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js +88 -60
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.tsx +204 -0
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts +5 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.js +88 -27
- package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.tsx +272 -0
- package/dist/components/core/form/fields/SolidShortTextField.d.ts +4 -0
- package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.js +57 -26
- package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.tsx +208 -0
- package/dist/components/core/form/fields/SolidTimeField.d.ts +3 -0
- package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js +44 -22
- package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.tsx +147 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts +4 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +77 -19
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +309 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts +5 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +136 -107
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +291 -0
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts +5 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +159 -107
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +311 -0
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.d.ts +1 -1
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.d.ts +1 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.tsx +33 -0
- package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.ts +64 -0
- package/dist/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.d.ts +1 -1
- package/dist/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.d.ts +1 -1
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.d.ts +1 -1
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.d.ts +1 -1
- package/dist/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.js +29 -0
- package/dist/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.tsx +46 -0
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.d.ts +1 -1
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.d.ts +1 -1
- package/dist/components/core/form/widgets/CustomHtml.d.ts +1 -1
- package/dist/components/core/form/widgets/CustomHtml.tsx +19 -0
- package/dist/components/core/kanban/KanbanBoard.tsx +131 -0
- package/dist/components/core/kanban/KanbanCard.tsx +255 -0
- package/dist/components/core/kanban/KanbanColumn.tsx +139 -0
- package/dist/components/core/kanban/KanbanUserViewLayout.tsx +85 -0
- package/dist/components/core/kanban/SolidKanbanView.tsx +803 -0
- package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +146 -0
- package/dist/components/core/kanban/SolidKanbanViewFields.tsx +164 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +59 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +50 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.tsx +32 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.tsx +184 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.tsx +23 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.tsx +12 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.tsx +20 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +136 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +158 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +6 -6
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +121 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.tsx +12 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +16 -0
- package/dist/components/core/list/ListViewRowActionPopup.tsx +42 -0
- package/dist/components/core/list/SolidListColumnSelector.tsx +167 -0
- package/dist/components/core/list/SolidListView.js +6 -6
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +961 -0
- package/dist/components/core/list/SolidListViewColumn.tsx +162 -0
- package/dist/components/core/list/SolidListViewConfigure.tsx +198 -0
- package/dist/components/core/list/SolidListingHeader.tsx +42 -0
- package/dist/components/core/list/SolidManyToOneFilterElement.tsx +59 -0
- package/dist/components/core/list/SolidSelectionDynamicFilterElement.tsx +50 -0
- package/dist/components/core/list/SolidSelectionStaticFilterElement.tsx +32 -0
- package/dist/components/core/list/SolidTableRowCell.tsx +12 -0
- package/dist/components/core/list/SolidVarInputsFilterElement.tsx +184 -0
- package/dist/components/core/list/columns/SolidBigintColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidBooleanColumn.d.ts +2 -0
- package/dist/components/core/list/columns/SolidBooleanColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js +33 -2
- package/dist/components/core/list/columns/SolidBooleanColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.tsx +89 -0
- package/dist/components/core/list/columns/SolidComputedColumn.tsx +23 -0
- package/dist/components/core/list/columns/SolidDateColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.js +27 -3
- package/dist/components/core/list/columns/SolidDateColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.tsx +90 -0
- package/dist/components/core/list/columns/SolidDatetimeColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.js +27 -3
- package/dist/components/core/list/columns/SolidDatetimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.tsx +79 -0
- package/dist/components/core/list/columns/SolidDecimalColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidExternalIdColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidExternalIdColumn.js +27 -3
- package/dist/components/core/list/columns/SolidExternalIdColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidExternalIdColumn.tsx +80 -0
- package/dist/components/core/list/columns/SolidFloatColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidIdColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidIdColumn.js +27 -3
- package/dist/components/core/list/columns/SolidIdColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIdColumn.tsx +79 -0
- package/dist/components/core/list/columns/SolidIntColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidIntColumn.js +27 -3
- package/dist/components/core/list/columns/SolidIntColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIntColumn.tsx +87 -0
- package/dist/components/core/list/columns/SolidLongTextColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts +2 -0
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +48 -22
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +100 -0
- package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts +2 -0
- package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js +41 -13
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.tsx +98 -0
- package/dist/components/core/list/columns/SolidRelationColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.js +7 -0
- package/dist/components/core/list/columns/SolidRelationColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.tsx +20 -0
- package/dist/components/core/list/columns/SolidRichTextColumn.tsx +9 -0
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js +27 -3
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.tsx +80 -0
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js +27 -3
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.tsx +81 -0
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts +2 -0
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js +16 -37
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.tsx +103 -0
- package/dist/components/core/list/columns/SolidTimeColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidTimeColumn.js +27 -3
- package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidTimeColumn.tsx +78 -0
- package/dist/components/core/list/columns/SolidUuidColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidUuidColumn.js +27 -3
- package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidUuidColumn.tsx +79 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToManyColumn.d.ts +6 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToManyColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToManyColumn.js +70 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToManyColumn.js.map +1 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToManyColumn.tsx +110 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts +2 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js +42 -17
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +95 -0
- package/dist/components/core/list/columns/relations/SolidRelationOneToManyColumn.d.ts +6 -0
- package/dist/components/core/list/columns/relations/SolidRelationOneToManyColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/relations/SolidRelationOneToManyColumn.js +70 -0
- package/dist/components/core/list/columns/relations/SolidRelationOneToManyColumn.js.map +1 -0
- package/dist/components/core/list/columns/relations/SolidRelationOneToManyColumn.tsx +111 -0
- package/dist/components/core/list/widgets/SolidRelationAvatarWidget.d.ts +4 -0
- package/dist/components/core/list/widgets/SolidRelationAvatarWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidRelationAvatarWidget.js +60 -0
- package/dist/components/core/list/widgets/SolidRelationAvatarWidget.js.map +1 -0
- package/dist/components/core/list/widgets/SolidRelationAvatarWidget.tsx +89 -0
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.d.ts +3 -0
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.js +42 -0
- package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.js.map +1 -0
- package/{src/components/core/list/widgets/SolidUserNameAvatarWidget.tsx → dist/components/core/list/widgets/SolidShortTextAvatarWidget.tsx} +18 -11
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.d.ts +2 -1
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.d.ts.map +1 -1
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.js +4 -4
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.js.map +1 -1
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.tsx +21 -0
- package/dist/components/core/model/CreateModel.tsx +476 -0
- package/dist/components/core/model/FieldMetaData.tsx +193 -0
- package/dist/components/core/model/FieldMetaDataForm.js +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.tsx +3048 -0
- package/dist/components/core/model/FieldSelector.tsx +62 -0
- package/dist/components/core/model/ModelListViewData.tsx +383 -0
- package/dist/components/core/model/ModelMetaData.tsx +840 -0
- package/dist/components/core/module/CreateModule.tsx +620 -0
- package/dist/components/core/module/ModuleListViewData.tsx +429 -0
- package/dist/components/core/users/CreateUser.tsx +434 -0
- package/dist/components/core/users/CreateUserRole.tsx +211 -0
- package/dist/components/core/users/UserListView.tsx +374 -0
- package/dist/components/layout/AdminLayout.tsx +62 -0
- package/dist/components/layout/AdminSidebar.tsx +65 -0
- package/dist/components/layout/AppConfig.d.ts +1 -1
- package/dist/components/layout/AppConfig.tsx +104 -0
- package/dist/components/layout/AppSidebar.tsx +225 -0
- package/dist/components/layout/ButtonLoader.tsx +7 -0
- package/dist/components/layout/CustomPagination.tsx +55 -0
- package/dist/components/layout/DashboardHeader.tsx +89 -0
- package/dist/components/layout/FilterMenu.tsx +122 -0
- package/dist/components/layout/Footer.tsx +13 -0
- package/dist/components/layout/GlobalSearch.tsx +37 -0
- package/dist/components/layout/Header.tsx +8 -0
- package/dist/components/layout/Layout.d.ts +1 -1
- package/dist/components/layout/Layout.tsx +136 -0
- package/dist/components/layout/ListingHeader.tsx +204 -0
- package/dist/components/layout/Loader.tsx +16 -0
- package/dist/components/layout/UserSidebar.tsx +53 -0
- package/dist/components/layout/context/layoutcontext.d.ts +1 -1
- package/dist/components/layout/context/layoutcontext.tsx +52 -0
- package/dist/components/layout/navbar-one.tsx +258 -0
- package/dist/components/layout/navbar-two-menu.tsx +73 -0
- package/dist/components/layout/navbar-two.tsx +37 -0
- package/dist/components/layout/user-profile-menu.tsx +120 -0
- package/dist/components/layout/user-profile.tsx +7 -0
- package/dist/components/modelsComponents/filterIcon.tsx +9 -0
- package/dist/components/tables/DemoData.tsx +318 -0
- package/dist/components/tables/DynamicTable.tsx +56 -0
- package/dist/components/tables/ListViewTable.tsx +156 -0
- package/dist/declarations.d.ts +19 -0
- package/dist/helpers/AppTitle.tsx +12 -0
- package/dist/helpers/ToastContainer.tsx +93 -0
- package/dist/helpers/authHeader.ts +20 -0
- package/dist/helpers/countries.tsx +260 -0
- package/dist/helpers/downloadMediaFile.tsx +19 -0
- package/dist/helpers/getAcceptedFileTypes.tsx +22 -0
- package/dist/helpers/getRandomColors.d.ts +4 -0
- package/dist/helpers/getRandomColors.d.ts.map +1 -0
- package/dist/helpers/getRandomColors.js +63 -0
- package/dist/helpers/getRandomColors.js.map +1 -0
- package/dist/helpers/getRandomColors.tsx +68 -0
- package/dist/helpers/helpers.ts +40 -0
- package/dist/helpers/menu.tsx +670 -0
- package/dist/helpers/permissions.ts +19 -0
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +76 -35
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +172 -0
- package/dist/helpers/revalidate.ts +7 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.ts +642 -0
- package/dist/nextAuth/authProviders.tsx +221 -0
- package/dist/nextAuth/refreshAccessToken.tsx +27 -0
- package/dist/redux/api/articleApi.ts +55 -0
- package/dist/redux/api/authApi.ts +131 -0
- package/dist/redux/api/automationApi.ts +55 -0
- package/dist/redux/api/categoryApi.tsx +46 -0
- package/dist/redux/api/cityApi.tsx +56 -0
- package/dist/redux/api/cmsBannerImageApi.tsx +55 -0
- package/dist/redux/api/countryApi.tsx +56 -0
- package/dist/redux/api/fetchBaseQuery.tsx +15 -0
- package/dist/redux/api/fieldApi.ts +78 -0
- package/dist/redux/api/mediaApi.ts +55 -0
- package/dist/redux/api/mediaStorageProviderApi.ts +55 -0
- package/dist/redux/api/menuApi.tsx +55 -0
- package/dist/redux/api/menuItemsApi.tsx +56 -0
- package/dist/redux/api/modelApi.ts +77 -0
- package/dist/redux/api/moduleApi.ts +72 -0
- package/dist/redux/api/orderAttributeApi.tsx +37 -0
- package/dist/redux/api/permissionApi.ts +32 -0
- package/dist/redux/api/pincodeApi.tsx +56 -0
- package/dist/redux/api/productData.tsx +87 -0
- package/dist/redux/api/radixExtraModelAttributeApi.tsx +37 -0
- package/dist/redux/api/radixModelMetadataApi.tsx +62 -0
- package/dist/redux/api/radixModelsApi.tsx +64 -0
- package/dist/redux/api/ratingApi.ts +55 -0
- package/dist/redux/api/reviewApi.ts +55 -0
- package/dist/redux/api/roleApi.ts +58 -0
- package/dist/redux/api/solidActionApi.ts +66 -0
- package/dist/redux/api/solidChatterMessageApi.d.ts +7 -0
- package/dist/redux/api/solidChatterMessageApi.d.ts.map +1 -0
- package/dist/redux/api/solidChatterMessageApi.js +29 -0
- package/dist/redux/api/solidChatterMessageApi.js.map +1 -0
- package/dist/redux/api/solidChatterMessageApi.ts +30 -0
- package/dist/redux/api/solidEntityApi.tsx +110 -0
- package/dist/redux/api/solidMenuApi.ts +71 -0
- package/dist/redux/api/solidSettingsApi.tsx +47 -0
- package/dist/redux/api/solidViewApi.ts +73 -0
- package/dist/redux/api/stateApi.tsx +56 -0
- package/dist/redux/api/tagApi.ts +55 -0
- package/dist/redux/api/tagGroupApi.tsx +55 -0
- package/dist/redux/api/testApi.ts +21 -0
- package/dist/redux/api/userApi.ts +120 -0
- package/dist/redux/features/authSlice.ts +19 -0
- package/dist/redux/features/dataViewSlice.ts +26 -0
- package/dist/redux/features/navbarSlice.ts +21 -0
- package/dist/redux/features/popupSlice.ts +27 -0
- package/dist/redux/features/themeSlice.ts +17 -0
- package/dist/redux/features/userSlice.ts +28 -0
- package/dist/resources/globals.css +59 -0
- package/dist/types/index.d.ts +60 -0
- package/dist/types/layout.d.ts +94 -0
- package/dist/types/next-auth.d.ts +0 -0
- package/dist/types/next.d.ts +46 -0
- package/dist/types/solid-core.d.ts +139 -0
- package/package.json +4 -3
- package/src/components/Svg/RightArrowSvg.tsx +9 -0
- package/src/components/core/chatter/SolidChatter.tsx +252 -0
- package/src/components/core/chatter/SolidChatterDateDivider.tsx +16 -0
- package/src/components/core/chatter/SolidChatterHeader.tsx +178 -0
- package/src/components/core/chatter/SolidChatterMessageBox.tsx +165 -0
- package/src/components/core/chatter/SolidMessageComposer.tsx +145 -0
- package/src/components/core/chatter/chatter.module.css +70 -0
- package/src/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +2 -2
- package/src/components/core/form/SolidFormView.tsx +166 -136
- package/src/components/core/form/fields/SolidBooleanField.tsx +170 -48
- package/src/components/core/form/fields/SolidDateField.tsx +86 -51
- package/src/components/core/form/fields/SolidDateTimeField.tsx +89 -52
- package/src/components/core/form/fields/SolidDecimalField.tsx +84 -49
- package/src/components/core/form/fields/SolidEmailField.tsx +90 -51
- package/src/components/core/form/fields/SolidIntegerField.tsx +86 -49
- package/src/components/core/form/fields/SolidJsonField.tsx +112 -42
- package/src/components/core/form/fields/SolidLongTextField.tsx +76 -117
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +474 -258
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +408 -249
- package/src/components/core/form/fields/SolidPasswordField.tsx +112 -55
- package/src/components/core/form/fields/SolidRichTextField.tsx +105 -52
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +138 -91
- package/src/components/core/form/fields/SolidSelectionStaticField.tsx +169 -37
- package/src/components/core/form/fields/SolidShortTextField.tsx +131 -74
- package/src/components/core/form/fields/SolidTimeField.tsx +85 -53
- package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +193 -30
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +206 -165
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +223 -142
- package/src/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.tsx +46 -0
- package/src/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +10 -10
- package/src/components/core/list/SolidListView.tsx +5 -5
- package/src/components/core/list/columns/SolidBooleanColumn.tsx +30 -2
- package/src/components/core/list/columns/SolidDateColumn.tsx +23 -8
- package/src/components/core/list/columns/SolidDatetimeColumn.tsx +24 -8
- package/src/components/core/list/columns/SolidExternalIdColumn.tsx +23 -8
- package/src/components/core/list/columns/SolidIdColumn.tsx +22 -7
- package/src/components/core/list/columns/SolidIntColumn.tsx +22 -7
- package/src/components/core/list/columns/SolidMediaMultipleColumn.tsx +68 -45
- package/src/components/core/list/columns/SolidMediaSingleColumn.tsx +48 -26
- package/src/components/core/list/columns/SolidRelationColumn.tsx +7 -0
- package/src/components/core/list/columns/SolidSelectionDynamicColumn.tsx +22 -7
- package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +24 -9
- package/src/components/core/list/columns/SolidShortTextColumn.tsx +26 -39
- package/src/components/core/list/columns/SolidTimeColumn.tsx +22 -7
- package/src/components/core/list/columns/SolidUuidColumn.tsx +22 -7
- package/src/components/core/list/columns/relations/SolidRelationManyToManyColumn.tsx +110 -0
- package/src/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +43 -19
- package/src/components/core/list/columns/relations/SolidRelationOneToManyColumn.tsx +111 -0
- package/src/components/core/list/widgets/SolidRelationAvatarWidget.tsx +89 -0
- package/src/components/core/list/widgets/SolidShortTextAvatarWidget.tsx +59 -0
- package/src/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.tsx +5 -3
- package/src/components/core/model/FieldMetaDataForm.tsx +1 -1
- package/src/helpers/getRandomColors.tsx +68 -0
- package/src/helpers/registry.ts +89 -38
- package/src/index.ts +1 -0
- package/src/redux/api/solidChatterMessageApi.ts +30 -0
- package/src/resources/globals.css +59 -0
- package/src/types/solid-core.d.ts +24 -16
- package/src/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.tsx +0 -74
- package/src/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.tsx +0 -103
- package/src/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.tsx +0 -79
- package/src/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.tsx +0 -68
- package/src/components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget.tsx +0 -23
- package/src/components/core/form/fields/widgets/SolidFormFieldMediaViewModeWidget.tsx +0 -13
- package/src/components/core/form/fields/widgets/SolidFormFieldPasswordViewModeWidget.tsx +0 -23
- package/src/components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget.tsx +0 -32
- package/src/components/core/form/fields/widgets/SolidFormFieldRichTextViewModeWidget.tsx +0 -17
- package/src/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.tsx +0 -174
- package/src/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.tsx +0 -115
- package/src/components/core/form/fields/widgets/SolidFormFieldViewModeWidget.tsx +0 -11
- package/src/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.tsx +0 -72
- package/src/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.tsx +0 -72
- package/src/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.tsx +0 -11
|
@@ -0,0 +1,803 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
"use client";
|
|
4
|
+
import { createPermission, deletePermission, updatePermission } from "@/helpers/permissions";
|
|
5
|
+
import { createSolidEntityApi } from "@/redux/api/solidEntityApi";
|
|
6
|
+
import { useGetSolidViewLayoutQuery } from "@/redux/api/solidViewApi";
|
|
7
|
+
import { useLazyCheckIfPermissionExistsQuery } from "@/redux/api/userApi";
|
|
8
|
+
import { DropResult } from "@hello-pangea/dnd";
|
|
9
|
+
import Link from "next/link";
|
|
10
|
+
import { FilterMatchMode } from "primereact/api";
|
|
11
|
+
import { Button } from "primereact/button";
|
|
12
|
+
import { Dialog } from "primereact/dialog";
|
|
13
|
+
import qs from "qs";
|
|
14
|
+
import { useEffect, useRef, useState } from "react";
|
|
15
|
+
import { SolidCreateButton } from "../common/SolidCreateButton";
|
|
16
|
+
import { SolidGlobalSearchElement } from "../common/SolidGlobalSearchElement";
|
|
17
|
+
import KanbanBoard from "./KanbanBoard";
|
|
18
|
+
import CompactImage from '../../../resources/images/layout/images/compact.png';
|
|
19
|
+
import CozyImage from '../../../resources/images/layout/images/cozy.png';
|
|
20
|
+
import ComfortableImage from '../../../resources/images/layout/images/comfortable.png';
|
|
21
|
+
import ListImage from '../../../resources/images/layout/images/cozy.png';
|
|
22
|
+
import KanbanImage from '../../../resources/images/layout/images/kanban.png';
|
|
23
|
+
import { capitalize } from "lodash";
|
|
24
|
+
import Lightbox from "yet-another-react-lightbox";
|
|
25
|
+
import Counter from "yet-another-react-lightbox/plugins/counter";
|
|
26
|
+
import Download from "yet-another-react-lightbox/plugins/download";
|
|
27
|
+
import "yet-another-react-lightbox/styles.css";
|
|
28
|
+
import "yet-another-react-lightbox/plugins/counter.css";
|
|
29
|
+
import { useRouter, useSearchParams } from "next/navigation";
|
|
30
|
+
import { SolidKanbanViewConfigure } from "./SolidKanbanViewConfigure";
|
|
31
|
+
import { KanbanUserViewLayout } from "./KanbanUserViewLayout";
|
|
32
|
+
import { useSelector } from "react-redux";
|
|
33
|
+
import { queryObjectToQueryString, queryStringToQueryObject } from "../list/SolidListView";
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
import { Toast } from "primereact/toast";
|
|
37
|
+
import { useSelector } from "react-redux";
|
|
38
|
+
import { queryObjectToQueryString, queryStringToQueryObject } from "../list/SolidListView";
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
type SolidKanbanViewParams = {
|
|
43
|
+
moduleName: string;
|
|
44
|
+
modelName: string;
|
|
45
|
+
embeded: boolean;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
50
|
+
const { user } = useSelector((state: any) => state.auth);
|
|
51
|
+
|
|
52
|
+
const solidGlobalSearchElementRef = useRef();
|
|
53
|
+
const searchParams = useSearchParams().toString(); // Converts the query params to a string
|
|
54
|
+
const router = useRouter();
|
|
55
|
+
// TODO: The initial filter state will be created based on the fields which are present on this kanban view.
|
|
56
|
+
const [filters, setFilters] = useState<any>();
|
|
57
|
+
const [toPopulate, setToPopulate] = useState<string[]>([]);
|
|
58
|
+
const [toPopulateMedia, setToPopulateMedia] = useState<string[]>([]);
|
|
59
|
+
const [actionsAllowed, setActionsAllowed] = useState<string[]>([]);
|
|
60
|
+
const [showGlobalSearchElement, setShowGlobalSearchElement] = useState<boolean>(false);
|
|
61
|
+
const [showArchived, setShowArchived] = useState(false);
|
|
62
|
+
const sizeOptions = [
|
|
63
|
+
{ label: 'Compact', value: 'small', image: CompactImage },
|
|
64
|
+
{ label: 'Cozy', value: 'normal', image: CozyImage },
|
|
65
|
+
{ label: 'Comfortable', value: 'large', image: ComfortableImage }
|
|
66
|
+
]
|
|
67
|
+
const [size, setSize] = useState<string | any>(sizeOptions[1].value);
|
|
68
|
+
const [viewModes, setViewModes] = useState<any>([]);
|
|
69
|
+
const [groupByFieldName, setGroupByFieldName] = useState<string>("");
|
|
70
|
+
const [groupedView, setGroupedView] = useState(true);
|
|
71
|
+
const [triggerCheckIfPermissionExists] = useLazyCheckIfPermissionExistsQuery();
|
|
72
|
+
const [openLightbox, setOpenLightbox] = useState(false);
|
|
73
|
+
const [lightboxUrls, setLightboxUrls] = useState({});
|
|
74
|
+
const [filterQueryString, setFilterQueryString] = useState<any>();
|
|
75
|
+
const [isLayoutDialogVisible, setLayoutDialogVisible] = useState(false);
|
|
76
|
+
const toast = useRef<Toast>(null);
|
|
77
|
+
|
|
78
|
+
const pushFiltersToRouter = (filterQueryString: any) => {
|
|
79
|
+
router.push(`?${filterQueryString}`, undefined, { shallow: true });
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (filterQueryString) {
|
|
84
|
+
pushFiltersToRouter(filterQueryString);
|
|
85
|
+
}
|
|
86
|
+
}, [filterQueryString]);
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
const fetchPermissions = async () => {
|
|
92
|
+
if (params.modelName) {
|
|
93
|
+
const permissionNames = [
|
|
94
|
+
createPermission(params.modelName),
|
|
95
|
+
deletePermission(params.modelName),
|
|
96
|
+
updatePermission(params.modelName)
|
|
97
|
+
]
|
|
98
|
+
const queryData = {
|
|
99
|
+
permissionNames: permissionNames
|
|
100
|
+
};
|
|
101
|
+
const queryString = qs.stringify(queryData, {
|
|
102
|
+
encodeValuesOnly: true
|
|
103
|
+
});
|
|
104
|
+
const response = await triggerCheckIfPermissionExists(queryString);
|
|
105
|
+
setActionsAllowed(response.data.data);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
fetchPermissions();
|
|
109
|
+
}, [params.modelName]);
|
|
110
|
+
|
|
111
|
+
const isFilterApplied = filters ? true : false;
|
|
112
|
+
|
|
113
|
+
// Create the RTK slices for this entity
|
|
114
|
+
const entityApi = createSolidEntityApi(params.modelName);
|
|
115
|
+
const {
|
|
116
|
+
useCreateSolidEntityMutation,
|
|
117
|
+
useDeleteMultipleSolidEntitiesMutation,
|
|
118
|
+
useDeleteSolidEntityMutation,
|
|
119
|
+
useGetSolidEntitiesQuery,
|
|
120
|
+
useGetSolidEntityByIdQuery,
|
|
121
|
+
useLazyGetSolidEntitiesQuery,
|
|
122
|
+
useGetSolidKanbanEntitiesQuery,
|
|
123
|
+
useLazyGetSolidKanbanEntitiesQuery,
|
|
124
|
+
useLazyGetSolidEntityByIdQuery,
|
|
125
|
+
usePrefetch,
|
|
126
|
+
useUpdateSolidEntityMutation,
|
|
127
|
+
usePatchUpdateSolidEntityMutation
|
|
128
|
+
} = entityApi;
|
|
129
|
+
|
|
130
|
+
// Get the kanban view layout & metadata first.
|
|
131
|
+
const kanbanViewMetaDataQs = qs.stringify({ ...params, viewType: 'kanban' }, {
|
|
132
|
+
encodeValuesOnly: true,
|
|
133
|
+
});
|
|
134
|
+
const [kanbanViewMetaData, setKanbanViewMetaData] = useState<any>({});
|
|
135
|
+
|
|
136
|
+
const {
|
|
137
|
+
data: solidKanbanViewMetaData,
|
|
138
|
+
error: solidKanbanViewMetaDataError,
|
|
139
|
+
isLoading: solidKanbanViewMetaDataIsLoading,
|
|
140
|
+
isError: solidKanbanViewMetaDataIsError
|
|
141
|
+
} = useGetSolidViewLayoutQuery(kanbanViewMetaDataQs);
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
const initialFilterMethod = () => {
|
|
146
|
+
|
|
147
|
+
const solidView = solidKanbanViewMetaData.data.solidView;
|
|
148
|
+
const solidFieldsMetadata = solidKanbanViewMetaData.data.solidFieldsMetadata;
|
|
149
|
+
|
|
150
|
+
const initialFilters: any = {};
|
|
151
|
+
const toPopulate: string[] = [];
|
|
152
|
+
const toPopulateMedia: string[] = [];
|
|
153
|
+
function extractFields(node: any, result: any = []) {
|
|
154
|
+
if (node.type === "field") {
|
|
155
|
+
result.push(node);
|
|
156
|
+
}
|
|
157
|
+
if (node.children) {
|
|
158
|
+
node.children.forEach((child: any) => extractFields(child, result));
|
|
159
|
+
}
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const data = { /* Your JSON object here */ };
|
|
164
|
+
const layoutFields = extractFields(solidView.layout);
|
|
165
|
+
|
|
166
|
+
for (let i = 0; i < layoutFields.length; i++) {
|
|
167
|
+
const column = layoutFields[i];
|
|
168
|
+
const fieldMetadata = solidFieldsMetadata[column.attrs.name];
|
|
169
|
+
|
|
170
|
+
// Form the initial filters after iterating over the columns and field metadata.
|
|
171
|
+
if (['int', 'bigint', 'float', 'decimal'].includes(fieldMetadata.type)) {
|
|
172
|
+
// initialFilters[column.attrs.name] = { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
|
173
|
+
initialFilters[column.attrs.name] = { value: null, matchMode: FilterMatchMode.EQUALS }
|
|
174
|
+
}
|
|
175
|
+
else if (['date', 'datetime', 'time', 'boolean'].includes(fieldMetadata.type)) {
|
|
176
|
+
// initialFilters[column.attrs.name] = { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] }
|
|
177
|
+
initialFilters[column.attrs.name] = { value: null, matchMode: FilterMatchMode.EQUALS }
|
|
178
|
+
}
|
|
179
|
+
else if (['relation', 'selectionStatic', 'selectionDynamic'].includes(fieldMetadata.type)) {
|
|
180
|
+
initialFilters[column.attrs.name] = { value: null, matchMode: FilterMatchMode.IN }
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
// initialFilters[column.attrs.name] = { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] }
|
|
184
|
+
initialFilters[column.attrs.name] = { value: null, matchMode: FilterMatchMode.STARTS_WITH }
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (column.attrs.name === 'id') {
|
|
188
|
+
initialFilters[column.attrs.name] = { value: null, matchMode: FilterMatchMode.IN }
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Form the "toPopulate" array.
|
|
192
|
+
if (fieldMetadata.type === 'relation' && fieldMetadata.relationType === 'many-to-one') {
|
|
193
|
+
toPopulate.push(fieldMetadata.name);
|
|
194
|
+
}
|
|
195
|
+
if (fieldMetadata.type === 'mediaSingle' || fieldMetadata.type === 'mediaMultiple') {
|
|
196
|
+
toPopulateMedia.push(fieldMetadata.name);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
// setFilters(initialFilters);
|
|
200
|
+
const recordsInSwimlane = solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.recordsInSwimlane ? solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.recordsInSwimlane : 25;
|
|
201
|
+
// setToPopulate(toPopulate);
|
|
202
|
+
// setToPopulateMedia(toPopulateMedia);
|
|
203
|
+
setRecordsInSwimlane(recordsInSwimlane);
|
|
204
|
+
setToPopulate(toPopulate);
|
|
205
|
+
setToPopulateMedia(toPopulateMedia);
|
|
206
|
+
return { recordsInSwimlane, toPopulate, toPopulateMedia }
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
// Initial Filter data
|
|
211
|
+
useEffect(() => {
|
|
212
|
+
|
|
213
|
+
if (solidKanbanViewMetaData) {
|
|
214
|
+
setKanbanViewMetaData(solidKanbanViewMetaData);
|
|
215
|
+
// initialFilterMethod();
|
|
216
|
+
const viewModes = solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews.length > 0 && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews.map((view: any) => { return { label: capitalize(view), value: view } });
|
|
217
|
+
setViewModes(viewModes);
|
|
218
|
+
if (solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.grouped !== false) {
|
|
219
|
+
setGroupByFieldName(solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.groupBy)
|
|
220
|
+
} else {
|
|
221
|
+
setGroupByFieldName("deletedTracker");
|
|
222
|
+
setGroupedView(false);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}, [solidKanbanViewMetaData]);
|
|
226
|
+
|
|
227
|
+
// All kanban view state.
|
|
228
|
+
const [kanbanViewData, setKanbanViewData] = useState<any>([]);
|
|
229
|
+
const [kanbanLoadMoreData, setKanbanLoadMoreData] = useState<any>({});
|
|
230
|
+
const [recordsInSwimlane, setRecordsInSwimlane] = useState(25);
|
|
231
|
+
const [selectedRecords, setSelectedRecords] = useState<any[]>([]);
|
|
232
|
+
const [loading, setLoading] = useState<boolean>(true);
|
|
233
|
+
const [isDialogVisible, setDialogVisible] = useState(false);
|
|
234
|
+
const [createButtonUrl, setCreateButtonUrl] = useState<string>();
|
|
235
|
+
const [editButtonUrl, setEditButtonUrl] = useState<string>();
|
|
236
|
+
const [columnsCount, setColumnsCount] = useState(5);
|
|
237
|
+
const [swimLaneCurrentPageNumber, setSwimLaneCurrentPageNumber] = useState(1);
|
|
238
|
+
const [queryDataLoaded, setQueryDataLoaded] = useState(false);
|
|
239
|
+
const [showSaveFilterPopup, setShowSaveFilterPopup] = useState<boolean>(false);
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
const showToast = (severity: "success" | "error", summary: string, detail: string) => {
|
|
243
|
+
toast.current?.show({
|
|
244
|
+
severity,
|
|
245
|
+
summary,
|
|
246
|
+
detail,
|
|
247
|
+
life: 3000,
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
// Get the kanban view data.
|
|
251
|
+
// const [triggerGetSolidEntitiesForKanban, { data: solidEntityKanbanViewData, isLoading, error }] = useLazyGetSolidKanbanEntitiesQuery();
|
|
252
|
+
const [triggerGetSolidEntities, { data: solidEntityKanbanViewData, isLoading, error }] = useLazyGetSolidEntitiesQuery();
|
|
253
|
+
|
|
254
|
+
// Delete mutation
|
|
255
|
+
const [
|
|
256
|
+
deleteManySolidEntities,
|
|
257
|
+
{
|
|
258
|
+
isLoading: isSolidEntitiesDeleted,
|
|
259
|
+
isSuccess: isDeleteSolidEntitiesSucess,
|
|
260
|
+
isError: isSolidEntitiesDeleteError,
|
|
261
|
+
error: SolidEntitiesDeleteError,
|
|
262
|
+
data: DeletedSolidEntities,
|
|
263
|
+
},
|
|
264
|
+
] = useDeleteMultipleSolidEntitiesMutation();
|
|
265
|
+
const [
|
|
266
|
+
patchKanbanView,
|
|
267
|
+
{ isSuccess: isKanbanUpdateSuccessfull, isError: isKanbanUpdateError, error: kanbanUpdateError },
|
|
268
|
+
] = usePatchUpdateSolidEntityMutation();
|
|
269
|
+
|
|
270
|
+
// After data is fetched populate the kanban view state so as to be able to render the data.
|
|
271
|
+
useEffect(() => {
|
|
272
|
+
if (solidEntityKanbanViewData) {
|
|
273
|
+
const latestKanbanGroupData = [...kanbanViewData, ...solidEntityKanbanViewData?.groupRecords]
|
|
274
|
+
setKanbanViewData(latestKanbanGroupData);
|
|
275
|
+
const loadmoredata = Object.entries(latestKanbanGroupData).reduce((acc: any, [key, value]: any) => {
|
|
276
|
+
acc[value.groupName] = {
|
|
277
|
+
offset: (value.groupData.meta.currentPage - 1) * value.groupData.meta.perPage,
|
|
278
|
+
limit: value.groupData.meta.perPage,
|
|
279
|
+
count: value.groupData.meta.totalRecords
|
|
280
|
+
};
|
|
281
|
+
return acc;
|
|
282
|
+
}, {});
|
|
283
|
+
|
|
284
|
+
setKanbanLoadMoreData(loadmoredata)
|
|
285
|
+
setLoading(false);
|
|
286
|
+
}
|
|
287
|
+
}, [solidEntityKanbanViewData]);
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
useEffect(() => {
|
|
293
|
+
if (solidKanbanViewMetaData) {
|
|
294
|
+
const createActionUrl = solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.createAction && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.createAction?.type === "custom" ? solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.createAction?.customComponent : "form/new";
|
|
295
|
+
const editActionUrl = solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.editAction && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.editAction?.type === "custom" ? solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.editAction?.customComponent : "form";
|
|
296
|
+
if (createActionUrl) {
|
|
297
|
+
setCreateButtonUrl(createActionUrl)
|
|
298
|
+
}
|
|
299
|
+
if (editActionUrl) {
|
|
300
|
+
setEditButtonUrl(editActionUrl)
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}, [solidKanbanViewMetaData])
|
|
304
|
+
|
|
305
|
+
// Fetch data after toPopulate has been populated...
|
|
306
|
+
useEffect(() => {
|
|
307
|
+
|
|
308
|
+
if (solidKanbanViewMetaData) {
|
|
309
|
+
|
|
310
|
+
const swimlanesCount = solidKanbanViewMetaData?.data.solidView?.layout?.attrs?.swimlanesCount || 5;
|
|
311
|
+
if (groupByFieldName && (toPopulate || toPopulateMedia)) {
|
|
312
|
+
|
|
313
|
+
const queryObject = queryStringToQueryObject();
|
|
314
|
+
let queryString = "";
|
|
315
|
+
if (searchParams) {
|
|
316
|
+
|
|
317
|
+
// Get Object from Url
|
|
318
|
+
const queryObject = qs.parse(searchParams,
|
|
319
|
+
{
|
|
320
|
+
decoder: str => decodeURIComponent(str),
|
|
321
|
+
allowDots: true,
|
|
322
|
+
}
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
const filters = {
|
|
326
|
+
$and: []
|
|
327
|
+
}
|
|
328
|
+
if (queryObject.s_filter) {
|
|
329
|
+
filters.$and.push(queryObject.s_filter);
|
|
330
|
+
}
|
|
331
|
+
if (queryObject.c_filter) {
|
|
332
|
+
filters.$and.push(queryObject.c_filter);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const queryData = {
|
|
336
|
+
offset: 0,
|
|
337
|
+
limit: Number(queryObject.limit) + Number(queryObject.offset),
|
|
338
|
+
fields: queryObject.fields || [`${groupByFieldName}`, `count(${groupByFieldName})`],
|
|
339
|
+
groupBy: queryObject.groupBy || groupByFieldName,
|
|
340
|
+
populateMedia: queryObject.populateMedia || toPopulateMedia,
|
|
341
|
+
populateGroup: queryObject.populateGroup || true,
|
|
342
|
+
groupFilter: {
|
|
343
|
+
limit: Number(queryObject.groupFilter.limit) + Number(queryObject.groupFilter.offset) || kanbanViewMetaData?.data?.solidView?.layout?.attrs?.recordsInSwimlane,
|
|
344
|
+
offset: 0,
|
|
345
|
+
filters: filters,
|
|
346
|
+
populate: queryObject.groupFilter.populate || toPopulate,
|
|
347
|
+
populateMedia: queryObject.groupFilter.populateMedia || toPopulateMedia
|
|
348
|
+
}
|
|
349
|
+
// sort: [`id:desc`],
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
setRecordsInSwimlane(queryData.limit);
|
|
353
|
+
setToPopulate(queryData.populate);
|
|
354
|
+
setToPopulateMedia(queryData.populateMedia);
|
|
355
|
+
setFilters(filters);
|
|
356
|
+
setQueryDataLoaded(true);
|
|
357
|
+
|
|
358
|
+
queryString = qs.stringify(queryData, {
|
|
359
|
+
encodeValuesOnly: true
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
} else {
|
|
364
|
+
const { recordsInSwimlane, toPopulate, toPopulateMedia } = initialFilterMethod();
|
|
365
|
+
const queryData = {
|
|
366
|
+
offset: 0,
|
|
367
|
+
limit: swimlanesCount,
|
|
368
|
+
fields: [`${groupByFieldName}`, `count(${groupByFieldName})`],
|
|
369
|
+
groupBy: groupByFieldName,
|
|
370
|
+
populateMedia: toPopulateMedia,
|
|
371
|
+
populateGroup: true,
|
|
372
|
+
groupFilter: {
|
|
373
|
+
limit: kanbanViewMetaData?.data?.solidView?.layout?.attrs?.recordsInSwimlane || 10,
|
|
374
|
+
offset: 0,
|
|
375
|
+
filters: filters,
|
|
376
|
+
populate: toPopulate,
|
|
377
|
+
populateMedia: toPopulateMedia
|
|
378
|
+
}
|
|
379
|
+
// sort: [`id:desc`],
|
|
380
|
+
};
|
|
381
|
+
setRecordsInSwimlane(recordsInSwimlane);
|
|
382
|
+
setToPopulate(toPopulate);
|
|
383
|
+
setToPopulateMedia(toPopulateMedia);
|
|
384
|
+
|
|
385
|
+
// fields=status&groupBy=status&fields=count(status)&populateGroup=true
|
|
386
|
+
queryString = qs.stringify(queryData, {
|
|
387
|
+
encodeValuesOnly: true
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
setQueryDataLoaded(true)
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
triggerGetSolidEntities(queryString);
|
|
394
|
+
setSelectedRecords([]);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}, [isDeleteSolidEntitiesSucess, groupByFieldName, solidKanbanViewMetaData]);
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
// clickable link allowing one to open the detail / form view.
|
|
401
|
+
const detailsBodyTemplate = (solidViewData: any) => {
|
|
402
|
+
return (
|
|
403
|
+
<Link href={`${editButtonUrl}/${solidViewData.id}`} rel="noopener noreferrer" className="text-sm font-bold p-0" style={{ color: "#12415D" }}>
|
|
404
|
+
<i className="pi pi-pencil" style={{ fontSize: "1rem" }}></i>
|
|
405
|
+
</Link>
|
|
406
|
+
);
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
// handle bulk deletion
|
|
410
|
+
const deleteBulk = () => {
|
|
411
|
+
let deleteList: any = [];
|
|
412
|
+
selectedRecords.forEach((element: any) => {
|
|
413
|
+
deleteList.push(element.id);
|
|
414
|
+
});
|
|
415
|
+
console.log(deleteList);
|
|
416
|
+
deleteManySolidEntities(deleteList);
|
|
417
|
+
setDialogVisible(false);
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
// handle closing of the delete dialog...
|
|
421
|
+
const onDeleteClose = () => {
|
|
422
|
+
setDialogVisible(false);
|
|
423
|
+
setSelectedRecords([]);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
const handleLoadMore = async (groupByField: string) => {
|
|
427
|
+
const { offset, limit, records } = kanbanLoadMoreData[groupByField];
|
|
428
|
+
const newLoadMoreData = kanbanLoadMoreData;
|
|
429
|
+
kanbanLoadMoreData[groupByField].offset = offset + limit;
|
|
430
|
+
try {
|
|
431
|
+
const queryData = {
|
|
432
|
+
offset: offset + limit,
|
|
433
|
+
limit: limit,
|
|
434
|
+
populate: toPopulate,
|
|
435
|
+
populateMedia: toPopulateMedia,
|
|
436
|
+
populateGroup: true,
|
|
437
|
+
filters: {
|
|
438
|
+
[groupByFieldName]: {
|
|
439
|
+
$in: [groupByField],
|
|
440
|
+
},
|
|
441
|
+
...filters
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
const queryString = qs.stringify(queryData, {
|
|
447
|
+
encodeValuesOnly: true
|
|
448
|
+
});
|
|
449
|
+
// router.push(`?${queryString}`);
|
|
450
|
+
const data: any = await triggerGetSolidEntities(queryString);
|
|
451
|
+
const newRecords = data.data.records;
|
|
452
|
+
const currentData = kanbanViewData;
|
|
453
|
+
const mergeData = (
|
|
454
|
+
kanbanViewData: any[],
|
|
455
|
+
newRecords: any[],
|
|
456
|
+
groupByField: string
|
|
457
|
+
) => {
|
|
458
|
+
// Find the group matching the specified groupByField
|
|
459
|
+
const originalData = structuredClone(kanbanViewData);
|
|
460
|
+
const targetGroup = originalData.find(
|
|
461
|
+
(group: any) => group.groupName === groupByField
|
|
462
|
+
);
|
|
463
|
+
if (targetGroup) {
|
|
464
|
+
const { groupData } = targetGroup;
|
|
465
|
+
|
|
466
|
+
if (targetGroup.groupData) {
|
|
467
|
+
// Extract existing records
|
|
468
|
+
const existingRecords = targetGroup.groupData.records;
|
|
469
|
+
const updatedRecords = [...existingRecords, ...newRecords];
|
|
470
|
+
targetGroup.groupData.records = updatedRecords
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
// Update the meta data (you can adjust this logic as needed)
|
|
474
|
+
groupData.meta.prevPage = groupData.meta.currentPage
|
|
475
|
+
groupData.meta.currentPage = groupData.meta.currentPage + 1
|
|
476
|
+
groupData.meta.nextPage = groupData.meta.currentPage + 1
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
return originalData;
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
const updatedData = mergeData(kanbanViewData, newRecords, groupByField);
|
|
484
|
+
setKanbanViewData(updatedData);
|
|
485
|
+
const loadmoredata = Object.entries(updatedData).reduce((acc: any, [key, value]: any) => {
|
|
486
|
+
acc[value.groupName] = {
|
|
487
|
+
offset: (value.groupData.meta.currentPage - 1) * value.groupData.meta.perPage,
|
|
488
|
+
limit: value.groupData.meta.perPage,
|
|
489
|
+
count: value.groupData.meta.totalRecords
|
|
490
|
+
};
|
|
491
|
+
return acc;
|
|
492
|
+
}, {});
|
|
493
|
+
setKanbanLoadMoreData(loadmoredata)
|
|
494
|
+
|
|
495
|
+
} catch (error) {
|
|
496
|
+
console.error("Failed to load more data:", error);
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
// Handle drag-and-drop functionality
|
|
502
|
+
const onDragEnd = async (result: DropResult): void => {
|
|
503
|
+
const { source, destination } = result;
|
|
504
|
+
if (!destination) return;
|
|
505
|
+
|
|
506
|
+
const sourceGroupName = source.droppableId;
|
|
507
|
+
const destinationGroupName = destination.droppableId;
|
|
508
|
+
|
|
509
|
+
// Find the source and destination groups
|
|
510
|
+
const sourceGroupIndex = kanbanViewData.findIndex((group: any) => group.groupName === sourceGroupName);
|
|
511
|
+
const destinationGroupIndex = kanbanViewData.findIndex((group: any) => group.groupName === destinationGroupName);
|
|
512
|
+
|
|
513
|
+
if (sourceGroupIndex === -1 || destinationGroupIndex === -1) return;
|
|
514
|
+
|
|
515
|
+
// If dragging within the same group
|
|
516
|
+
if (sourceGroupName === destinationGroupName) {
|
|
517
|
+
setKanbanViewData((prevData: typeof kanbanViewData) =>
|
|
518
|
+
prevData.map((group: any) => {
|
|
519
|
+
if (group.groupName === sourceGroupName) {
|
|
520
|
+
const updatedRecords = [...group.groupData.records];
|
|
521
|
+
const [movedItem] = updatedRecords.splice(source.index, 1); // Remove the item
|
|
522
|
+
updatedRecords.splice(destination.index, 0, movedItem); // Insert at the new position
|
|
523
|
+
|
|
524
|
+
return {
|
|
525
|
+
...group,
|
|
526
|
+
groupData: {
|
|
527
|
+
...group.groupData,
|
|
528
|
+
records: updatedRecords,
|
|
529
|
+
},
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
return group;
|
|
533
|
+
})
|
|
534
|
+
);
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// Deep clone the source and destination groups
|
|
539
|
+
const sourceGroup = JSON.parse(JSON.stringify(kanbanViewData[sourceGroupIndex]));
|
|
540
|
+
const destinationGroup = JSON.parse(JSON.stringify(kanbanViewData[destinationGroupIndex]));
|
|
541
|
+
|
|
542
|
+
// Clone the records for immutability
|
|
543
|
+
const sourceRecords = [...sourceGroup.groupData.records];
|
|
544
|
+
const destinationRecords = [...destinationGroup.groupData.records];
|
|
545
|
+
|
|
546
|
+
// Remove the item from the source
|
|
547
|
+
const [movedItem] = sourceRecords.splice(source.index, 1);
|
|
548
|
+
|
|
549
|
+
// Create a mutable copy of the moved item
|
|
550
|
+
const updatedItem = { ...movedItem, status: destinationGroupName };
|
|
551
|
+
|
|
552
|
+
// Add the updated item to the destination
|
|
553
|
+
destinationRecords.splice(destination.index, 0, updatedItem);
|
|
554
|
+
|
|
555
|
+
// Update the group data
|
|
556
|
+
sourceGroup.groupData.records = sourceRecords;
|
|
557
|
+
destinationGroup.groupData.records = destinationRecords;
|
|
558
|
+
|
|
559
|
+
// Update the kanbanViewData state
|
|
560
|
+
try {
|
|
561
|
+
const formData = new FormData();
|
|
562
|
+
formData.append(groupByFieldName, destinationGroupName);
|
|
563
|
+
const kanbanUpdateResponse = await patchKanbanView({ id: +movedItem.id, data: formData }).unwrap();
|
|
564
|
+
|
|
565
|
+
if (kanbanUpdateResponse?.statusCode === 200) {
|
|
566
|
+
showToast("success", "Success", "Kanban View Updated!");
|
|
567
|
+
// Update the kanbanViewData state
|
|
568
|
+
setKanbanViewData((prevData: typeof kanbanViewData) =>
|
|
569
|
+
prevData.map((group: any) => {
|
|
570
|
+
if (group.groupName === sourceGroupName) {
|
|
571
|
+
return sourceGroup;
|
|
572
|
+
}
|
|
573
|
+
if (group.groupName === destinationGroupName) {
|
|
574
|
+
return destinationGroup;
|
|
575
|
+
}
|
|
576
|
+
return group;
|
|
577
|
+
})
|
|
578
|
+
);
|
|
579
|
+
} else {
|
|
580
|
+
showToast("error", "Duplicate Key", kanbanUpdateResponse?.error);
|
|
581
|
+
}
|
|
582
|
+
} catch (error: any) {
|
|
583
|
+
// 6. Handle 500 or network errors
|
|
584
|
+
console.error("API error:", error);
|
|
585
|
+
showToast("error", "Something went wrong", error?.data?.message || "Something went wrong");
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
// Handle SwimLane Pagination
|
|
591
|
+
const handleSwimLanePagination = async () => {
|
|
592
|
+
|
|
593
|
+
if (solidKanbanViewMetaData) {
|
|
594
|
+
|
|
595
|
+
const swimlanesCount = solidKanbanViewMetaData?.data.solidView?.layout?.attrs?.swimlanesCount || 5;
|
|
596
|
+
const queryData = {
|
|
597
|
+
offset: swimLaneCurrentPageNumber * swimlanesCount,
|
|
598
|
+
limit: swimlanesCount,
|
|
599
|
+
fields: [`${groupByFieldName}`, `count(${groupByFieldName})`],
|
|
600
|
+
groupBy: groupByFieldName,
|
|
601
|
+
populateMedia: toPopulateMedia,
|
|
602
|
+
populateGroup: true,
|
|
603
|
+
groupFilter: {
|
|
604
|
+
limit: recordsInSwimlane,
|
|
605
|
+
offset: 0,
|
|
606
|
+
filters: filters,
|
|
607
|
+
populate: toPopulate,
|
|
608
|
+
populateMedia: toPopulateMedia
|
|
609
|
+
|
|
610
|
+
}
|
|
611
|
+
// sort: [`id:desc`],
|
|
612
|
+
};
|
|
613
|
+
// fields=status&groupBy=status&fields=count(status)&populateGroup=true
|
|
614
|
+
const queryString = qs.stringify(queryData, {
|
|
615
|
+
encodeValuesOnly: true
|
|
616
|
+
});
|
|
617
|
+
|
|
618
|
+
//Push to Router
|
|
619
|
+
router.push(`?${queryString}`);
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
const data: any = await triggerGetSolidEntities(queryString);
|
|
623
|
+
if (data && data?.data?.groupRecords.length > 0) {
|
|
624
|
+
const updatedData = [...kanbanViewData, ...data.data.groupRecords];
|
|
625
|
+
setKanbanViewData(updatedData);
|
|
626
|
+
}
|
|
627
|
+
setSwimLaneCurrentPageNumber(swimLaneCurrentPageNumber + 1)
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
// Handle the custom filter and Search Filter
|
|
633
|
+
const handleApplyCustomFilter = async (transformedFilter: any) => {
|
|
634
|
+
|
|
635
|
+
if (solidKanbanViewMetaData) {
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
const queryfilter = {
|
|
639
|
+
$and: [
|
|
640
|
+
]
|
|
641
|
+
}
|
|
642
|
+
if (transformedFilter.s_filter) {
|
|
643
|
+
queryfilter.$and.push(transformedFilter.s_filter)
|
|
644
|
+
}
|
|
645
|
+
if (transformedFilter.c_filter) {
|
|
646
|
+
queryfilter.$and.push(transformedFilter.c_filter)
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
const customFilter = transformedFilter;
|
|
650
|
+
const updatedFilter = { ...(filters || {}), ...(queryfilter || {}) };
|
|
651
|
+
setFilters((prevFilters) => ({ ...(prevFilters || {}), ...(queryfilter || {}) }));
|
|
652
|
+
|
|
653
|
+
const swimlanesCount = solidKanbanViewMetaData?.data.solidView?.layout?.attrs?.swimlanesCount || 5;
|
|
654
|
+
|
|
655
|
+
if (toPopulate) {
|
|
656
|
+
const queryData = {
|
|
657
|
+
offset: 0,
|
|
658
|
+
limit: swimlanesCount,
|
|
659
|
+
fields: [`${groupByFieldName}`, `count(${groupByFieldName})`],
|
|
660
|
+
groupBy: groupByFieldName,
|
|
661
|
+
populateGroup: true,
|
|
662
|
+
groupFilter: {
|
|
663
|
+
limit: recordsInSwimlane,
|
|
664
|
+
offset: 0,
|
|
665
|
+
filters: updatedFilter,
|
|
666
|
+
populate: toPopulate,
|
|
667
|
+
populateMedia: toPopulateMedia
|
|
668
|
+
}
|
|
669
|
+
};
|
|
670
|
+
const queryString = qs.stringify(queryData, {
|
|
671
|
+
encodeValuesOnly: true
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
// s_filter and c_filter format that needs to be passed to the router
|
|
675
|
+
// only present if handleCustomFilter is applied
|
|
676
|
+
if (customFilter) {
|
|
677
|
+
let url
|
|
678
|
+
const urlData = queryData;
|
|
679
|
+
delete urlData.filters;
|
|
680
|
+
urlData.s_filter = customFilter.s_filter || {};
|
|
681
|
+
urlData.c_filter = customFilter.c_filter || {};
|
|
682
|
+
queryObjectToQueryString(urlData);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
const data: any = await triggerGetSolidEntities(queryString);
|
|
687
|
+
|
|
688
|
+
// Update the kanban view data with the new data based on filter
|
|
689
|
+
if (data && data?.data?.groupRecords.length > 0) {
|
|
690
|
+
const updatedData = [...data.data.groupRecords];
|
|
691
|
+
setKanbanViewData(updatedData);
|
|
692
|
+
}
|
|
693
|
+
setSelectedRecords([]);
|
|
694
|
+
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
useEffect(() => {
|
|
701
|
+
if (solidKanbanViewMetaData) {
|
|
702
|
+
const createActionUrl = solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.createAction && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.createAction?.type === "custom" ? solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.createAction?.customComponent : "form/new";
|
|
703
|
+
const editActionUrl = solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.editAction && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.editAction?.type === "custom" ? solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.editAction?.customComponent : "form";
|
|
704
|
+
const viewModes = solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews.length > 0 && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews.map((view: any) => { return { label: capitalize(view), value: view } });
|
|
705
|
+
setViewModes(viewModes);
|
|
706
|
+
if (createActionUrl) {
|
|
707
|
+
setCreateButtonUrl(createActionUrl)
|
|
708
|
+
}
|
|
709
|
+
if (editActionUrl) {
|
|
710
|
+
setEditButtonUrl(editActionUrl)
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}, [solidKanbanViewMetaData])
|
|
714
|
+
|
|
715
|
+
const kanbanViewTitle = solidKanbanViewMetaData?.data?.solidView?.displayName
|
|
716
|
+
|
|
717
|
+
return (
|
|
718
|
+
<div className="page-parent-wrapper">
|
|
719
|
+
<Toast ref={toast} />
|
|
720
|
+
<div className="page-header">
|
|
721
|
+
<div className="flex gap-3 align-items-center">
|
|
722
|
+
<p className="m-0 view-title">{kanbanViewTitle}</p>
|
|
723
|
+
{solidKanbanViewMetaData?.data?.solidView?.layout?.attrs.enableGlobalSearch === true &&
|
|
724
|
+
// <SolidGlobalSearchElement viewData={solidKanbanViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter} ></SolidGlobalSearchElement>
|
|
725
|
+
<SolidGlobalSearchElement showSaveFilterPopup={showSaveFilterPopup} setShowSaveFilterPopup={setShowSaveFilterPopup} ref={solidGlobalSearchElementRef} viewData={solidKanbanViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter} ></SolidGlobalSearchElement>
|
|
726
|
+
|
|
727
|
+
}
|
|
728
|
+
</div>
|
|
729
|
+
<div className="flex align-items-center gap-3">
|
|
730
|
+
{actionsAllowed.includes(`${createPermission(params.modelName)}`) && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs.create !== false &&
|
|
731
|
+
<SolidCreateButton url={createButtonUrl} />
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
{actionsAllowed.includes(`${deletePermission(params.modelName)}`) && solidKanbanViewMetaData?.data?.solidView?.layout?.attrs.delete !== false && selectedRecords.length > 0 && <Button
|
|
735
|
+
type="button"
|
|
736
|
+
label="Delete"
|
|
737
|
+
size="small"
|
|
738
|
+
onClick={() => setDialogVisible(true)}
|
|
739
|
+
className="small-button"
|
|
740
|
+
severity="danger"
|
|
741
|
+
/>}
|
|
742
|
+
<Button
|
|
743
|
+
type="button"
|
|
744
|
+
size="small"
|
|
745
|
+
icon="pi pi-refresh"
|
|
746
|
+
severity="secondary"
|
|
747
|
+
outlined
|
|
748
|
+
onClick={() => {
|
|
749
|
+
window.location.reload()
|
|
750
|
+
}}
|
|
751
|
+
/>
|
|
752
|
+
<SolidKanbanViewConfigure
|
|
753
|
+
solidKanbanViewMetaData={solidKanbanViewMetaData}
|
|
754
|
+
actionsAllowed={actionsAllowed}
|
|
755
|
+
viewModes={viewModes}
|
|
756
|
+
setLayoutDialogVisible={setLayoutDialogVisible}
|
|
757
|
+
setShowSaveFilterPopup={setShowSaveFilterPopup}
|
|
758
|
+
/>
|
|
759
|
+
{/* <SolidConfigureLayoutElement></SolidConfigureLayoutElement> */}
|
|
760
|
+
</div>
|
|
761
|
+
</div>
|
|
762
|
+
<style>{`.p-datatable .p-datatable-loading-overlay {background-color: rgba(0, 0, 0, 0.0);}`}</style>
|
|
763
|
+
{solidKanbanViewMetaData && kanbanViewData &&
|
|
764
|
+
<KanbanBoard groupedView={groupedView} kanbanViewData={kanbanViewData} solidKanbanViewMetaData={solidKanbanViewMetaData?.data} setKanbanViewData={setKanbanViewData} handleLoadMore={handleLoadMore} onDragEnd={onDragEnd} handleSwimLanePagination={handleSwimLanePagination} setLightboxUrls={setLightboxUrls} setOpenLightbox={setOpenLightbox} editButtonUrl={editButtonUrl}></KanbanBoard>
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
<Dialog
|
|
768
|
+
visible={isDialogVisible}
|
|
769
|
+
header="Confirm Delete"
|
|
770
|
+
modal
|
|
771
|
+
footer={() => (
|
|
772
|
+
<div className="flex justify-content-center">
|
|
773
|
+
<Button label="Yes" icon="pi pi-check" className='small-button' severity="danger" autoFocus onClick={deleteBulk} />
|
|
774
|
+
<Button label="No" icon="pi pi-times" className='small-button' onClick={onDeleteClose} />
|
|
775
|
+
</div>
|
|
776
|
+
)}
|
|
777
|
+
onHide={() => setDialogVisible(false)}
|
|
778
|
+
>
|
|
779
|
+
<p>Are you sure you want to delete the selected records?</p>
|
|
780
|
+
</Dialog>
|
|
781
|
+
{openLightbox &&
|
|
782
|
+
<Lightbox
|
|
783
|
+
open={openLightbox}
|
|
784
|
+
plugins={[Counter, Download]}
|
|
785
|
+
close={() => setOpenLightbox(false)}
|
|
786
|
+
slides={lightboxUrls}
|
|
787
|
+
/>
|
|
788
|
+
}
|
|
789
|
+
<Dialog
|
|
790
|
+
visible={isLayoutDialogVisible}
|
|
791
|
+
header="Change Kanban Layout"
|
|
792
|
+
modal
|
|
793
|
+
onHide={() => setLayoutDialogVisible(false)}
|
|
794
|
+
contentStyle={{
|
|
795
|
+
width: 800
|
|
796
|
+
}}
|
|
797
|
+
>
|
|
798
|
+
<KanbanUserViewLayout solidKanbanViewMetaData={solidKanbanViewMetaData} setLayoutDialogVisible={setLayoutDialogVisible} />
|
|
799
|
+
</Dialog>
|
|
800
|
+
</div>
|
|
801
|
+
);
|
|
802
|
+
};
|
|
803
|
+
|