@acorex/modules 19.2.12 → 19.2.15
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/application-management/lib/application-management.service.d.ts +1 -1
- package/application-management/lib/application-management.types.d.ts +1 -1
- package/application-management/lib/services/application-management.service.d.ts +1 -1
- package/application-management/lib/services/application-module-management.service.d.ts +1 -1
- package/application-management/lib/services/edition-management.service.d.ts +1 -1
- package/application-management/lib/services/entity-management.service.d.ts +1 -1
- package/application-management/lib/services/feature-management.service.d.ts +1 -1
- package/application-management/lib/services/module-management.service.d.ts +1 -1
- package/application-management/lib/services/permission-management.service.d.ts +1 -1
- package/application-management/lib/services/property-management.service.d.ts +1 -1
- package/auth/lib/auth.module.d.ts +2 -3
- package/auth/lib/pages/login/password/password.component.d.ts +1 -0
- package/conversation/lib/entities/chat/chat.service.d.ts +1 -1
- package/conversation/lib/entities/chat/chat.type.d.ts +1 -1
- package/conversation/lib/entities/chat/pages/chat/chat.component.d.ts +1 -1
- package/conversation/lib/entities/comments/comments.service.d.ts +1 -1
- package/conversation/lib/entities/comments/comments.type.d.ts +1 -1
- package/document-management/index.d.ts +1 -0
- package/document-management/lib/const.d.ts +6 -5
- package/document-management/lib/document-management.module.d.ts +3 -1
- package/document-management/lib/entities/document/document.service.d.ts +8 -5
- package/document-management/lib/entities/document/document.types.d.ts +2 -1
- package/document-management/lib/entities/document-type/document-type.service.d.ts +1 -1
- package/document-management/lib/entities/document-type/document-type.types.d.ts +16 -1
- package/document-management/lib/entities/document-type-meta-definition/document-type-meta-definition.service.d.ts +1 -1
- package/document-management/lib/entities/document-type-meta-definition/document-type-meta-definition.types.d.ts +1 -1
- package/document-management/lib/entities/document-type-meta-value/document-type-meta-value.service.d.ts +1 -1
- package/document-management/lib/entities/document-type-meta-value/document-type-meta-value.types.d.ts +1 -1
- package/document-management/lib/entities/document-type-status-definition/document-type-status-definition.service.d.ts +1 -1
- package/document-management/lib/entities/document-type-status-definition/document-type-status-definition.types.d.ts +1 -1
- package/document-management/lib/entities/folder/folder.entity.d.ts +3 -0
- package/document-management/lib/entities/folder/folder.service.d.ts +12 -0
- package/document-management/lib/entities/folder/folder.types.d.ts +37 -0
- package/document-management/lib/entities/folder/index.d.ts +3 -0
- package/document-management/lib/entities/index.d.ts +6 -0
- package/document-management/lib/features/document-explorer/components/create-folder-dialog/create-folder-dialog.component.d.ts +14 -0
- package/document-management/lib/features/document-explorer/document-explorer.component.d.ts +74 -0
- package/document-management/lib/features/document-explorer/document-explorer.viewmodel.d.ts +57 -0
- package/document-management/lib/features/document-explorer/index.d.ts +3 -0
- package/document-management/lib/features/document-explorer/settings.keys.d.ts +5 -0
- package/document-management/lib/features/drive/drive.component.d.ts +200 -0
- package/document-management/lib/features/drive/index.d.ts +3 -0
- package/document-management/lib/features/file-type/file-type.module.d.ts +6 -0
- package/document-management/lib/features/file-type/index.d.ts +2 -0
- package/document-management/lib/features/file-type/providers/archive.file.d.ts +4 -0
- package/document-management/lib/features/file-type/providers/audio.file.d.ts +4 -0
- package/document-management/lib/features/file-type/providers/code.file.d.ts +4 -0
- package/document-management/lib/features/file-type/providers/document.file.d.ts +4 -0
- package/document-management/lib/features/file-type/providers/image.file.d.ts +4 -0
- package/document-management/lib/features/file-type/providers/index.d.ts +6 -0
- package/document-management/lib/features/file-type/providers/video.file.d.ts +4 -0
- package/document-management/lib/features/file-type/widgets/file-type-extension/file-type-extension-column.component.d.ts +6 -0
- package/document-management/lib/features/file-type/widgets/file-type-extension/file-type-extension-designer.component.d.ts +6 -0
- package/document-management/lib/features/file-type/widgets/file-type-extension/file-type-extension-edit.component.d.ts +18 -0
- package/document-management/lib/features/file-type/widgets/file-type-extension/file-type-extension-view.component.d.ts +6 -0
- package/document-management/lib/features/file-type/widgets/file-type-extension/file-type-extension-widget.config.d.ts +7 -0
- package/document-management/lib/features/file-type/widgets/file-type-extension/index.d.ts +5 -0
- package/document-management/lib/features/file-type/widgets/index.d.ts +1 -0
- package/document-management/lib/features/shared/document-manager.service.d.ts +130 -0
- package/document-management/lib/features/shared/document-manager.types.d.ts +21 -0
- package/document-management/lib/features/shared/index.d.ts +1 -0
- package/document-management/lib/menu.provider.d.ts +1 -0
- package/fesm2022/acorex-modules-application-management.mjs +3 -3
- package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-D1qxdECo.mjs → acorex-modules-auth-acorex-modules-auth-CZ_nTBkL.mjs} +53 -133
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-CZ_nTBkL.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-8GCTwtb2.mjs → acorex-modules-auth-app-chooser.component-CGSygSjS.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-8GCTwtb2.mjs.map → acorex-modules-auth-app-chooser.component-CGSygSjS.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-DR3QLEM-.mjs → acorex-modules-auth-login.module-B1sF3B_O.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-DR3QLEM-.mjs.map → acorex-modules-auth-login.module-B1sF3B_O.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-BMJ5mW63.mjs → acorex-modules-auth-master.layout-CK4nyS8D.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-BMJ5mW63.mjs.map → acorex-modules-auth-master.layout-CK4nyS8D.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-avrMwyr8.mjs → acorex-modules-auth-password.component-DC_zi8bV.mjs} +6 -6
- package/fesm2022/{acorex-modules-auth-password.component-avrMwyr8.mjs.map → acorex-modules-auth-password.component-DC_zi8bV.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth-password.component-DqvmIMDR.mjs +127 -0
- package/fesm2022/acorex-modules-auth-password.component-DqvmIMDR.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-routes-BPYBFOxg.mjs → acorex-modules-auth-routes-DwHgPrDP.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-BPYBFOxg.mjs.map → acorex-modules-auth-routes-DwHgPrDP.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor-code.component-YhAHhKIr.mjs → acorex-modules-auth-two-factor-code.component-DrV3UBuT.mjs} +5 -5
- package/fesm2022/{acorex-modules-auth-two-factor-code.component-YhAHhKIr.mjs.map → acorex-modules-auth-two-factor-code.component-DrV3UBuT.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-B_V_nQN_.mjs → acorex-modules-auth-two-factor.module-BatKQRdJ.mjs} +3 -3
- package/fesm2022/{acorex-modules-auth-two-factor.module-B_V_nQN_.mjs.map → acorex-modules-auth-two-factor.module-BatKQRdJ.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-conversation.mjs +2 -2
- package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
- package/fesm2022/acorex-modules-document-management-drive.component-bjnFFaLS.mjs +951 -0
- package/fesm2022/acorex-modules-document-management-drive.component-bjnFFaLS.mjs.map +1 -0
- package/fesm2022/acorex-modules-document-management.mjs +1450 -114
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-BTQ4VpFG.mjs → acorex-modules-form-template-management-acorex-modules-form-template-management-szDh56Bk.mjs} +174 -64
- package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-szDh56Bk.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-category.entity-ChxSjvOF.mjs → acorex-modules-form-template-management-category.entity-BZXqnhwK.mjs} +4 -17
- package/fesm2022/acorex-modules-form-template-management-category.entity-BZXqnhwK.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-designer.page-BLbPLLdP.mjs → acorex-modules-form-template-management-designer.page-Bd_bZ_7p.mjs} +4 -3
- package/fesm2022/acorex-modules-form-template-management-designer.page-Bd_bZ_7p.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-setting.provider-CByIOZMr.mjs → acorex-modules-form-template-management-setting.provider-o2_TSVfK.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-setting.provider-CByIOZMr.mjs.map → acorex-modules-form-template-management-setting.provider-o2_TSVfK.mjs.map} +1 -1
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-BxOdV3y2.mjs +191 -0
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-BxOdV3y2.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-Chle-W7b.mjs → acorex-modules-form-template-management-template-widget-edit.component--MGoF75g.mjs} +32 -49
- package/fesm2022/acorex-modules-form-template-management-template-widget-edit.component--MGoF75g.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template.entity-BIBMNXD5.mjs → acorex-modules-form-template-management-template.entity-JvWcqjzi.mjs} +3 -3
- package/fesm2022/acorex-modules-form-template-management-template.entity-JvWcqjzi.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-DPxTaC2A.mjs → acorex-modules-form-template-management-viewer-popup.component-Bllb70Ih.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-DPxTaC2A.mjs.map → acorex-modules-form-template-management-viewer-popup.component-Bllb70Ih.mjs.map} +1 -1
- package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +10 -3
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-organization-management-add-item.component-BXRyhcjE.mjs → acorex-modules-organization-management-add-item.component-Y-i6xDkl.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-add-item.component-BXRyhcjE.mjs.map → acorex-modules-organization-management-add-item.component-Y-i6xDkl.mjs.map} +1 -1
- package/fesm2022/acorex-modules-organization-management-branch.entity-DhObzxhh.mjs +344 -0
- package/fesm2022/acorex-modules-organization-management-branch.entity-DhObzxhh.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-employee.entity-PwlBjkYo.mjs → acorex-modules-organization-management-employee.entity-DcJCJN3R.mjs} +4 -4
- package/fesm2022/acorex-modules-organization-management-employee.entity-DcJCJN3R.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-DjzqBdaS.mjs → acorex-modules-organization-management-org-chart-configuration.page-DO8wSZqZ.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-DjzqBdaS.mjs.map → acorex-modules-organization-management-org-chart-configuration.page-DO8wSZqZ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart.page-DMxaL-70.mjs → acorex-modules-organization-management-org-chart.page-DXyAFXwE.mjs} +16 -10
- package/fesm2022/acorex-modules-organization-management-org-chart.page-DXyAFXwE.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-position.entity-B7ceEEbu.mjs → acorex-modules-organization-management-position.entity-D17Yembh.mjs} +2 -2
- package/fesm2022/acorex-modules-organization-management-position.entity-D17Yembh.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-branch.entity-CxxFiBPd.mjs → acorex-modules-organization-management-role.entity-Cmbyle8P.mjs} +36 -54
- package/fesm2022/acorex-modules-organization-management-role.entity-Cmbyle8P.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-setting.provider-eLv_qnmE.mjs → acorex-modules-organization-management-setting.provider-CAU8Bve9.mjs} +7 -7
- package/fesm2022/acorex-modules-organization-management-setting.provider-CAU8Bve9.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management-team.entity-DcurAtLd.mjs +238 -0
- package/fesm2022/acorex-modules-organization-management-team.entity-DcurAtLd.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management.mjs +200 -105
- package/fesm2022/acorex-modules-organization-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-platform-management-list-version.component-CoZBz85x.mjs +59 -0
- package/fesm2022/acorex-modules-platform-management-list-version.component-CoZBz85x.mjs.map +1 -0
- package/fesm2022/acorex-modules-platform-management.mjs +867 -610
- package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-scheduler-job-management.mjs +2 -2
- package/fesm2022/acorex-modules-scheduler-job-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-security-management.mjs +61 -29
- package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-text-template-management.mjs +324 -6
- package/fesm2022/acorex-modules-text-template-management.mjs.map +1 -1
- package/form-template-management/lib/entities/category/category.service.d.ts +1 -1
- package/form-template-management/lib/entities/category/category.types.d.ts +2 -1
- package/form-template-management/lib/entities/template/template.service.d.ts +1 -1
- package/form-template-management/lib/entities/template/template.types.d.ts +1 -1
- package/form-template-management/lib/features/designer/designer.page.d.ts +1 -0
- package/form-template-management/lib/features/designer/template.provider.d.ts +1 -1
- package/form-template-management/lib/features/designer/widgets/template/template-widget-edit.component.d.ts +0 -4
- package/form-template-management/lib/features/designer/widgets/template-designer/template-designer-widget-view.component.d.ts +1 -0
- package/form-template-management/lib/features/designer/widgets/template-picker/template-picker.component.d.ts +14 -4
- package/form-template-management/lib/features/designer/widgets/template-picker/template.provider.d.ts +2 -1
- package/form-template-management/lib/features/designer/workflows/design-template.workflow.d.ts +1 -8
- package/form-template-management/lib/features/designer/workflows/workflow.actions.d.ts +17 -0
- package/form-template-management/lib/menu.provider.d.ts +1 -0
- package/notification-management/lib/entities/channel/channel.service.d.ts +1 -1
- package/notification-management/lib/entities/channel/channel.types.d.ts +2 -1
- package/notification-management/lib/entities/notification/notification.service.d.ts +1 -1
- package/notification-management/lib/entities/notification/notification.types.d.ts +1 -1
- package/notification-management/lib/entities/template/template.service.d.ts +1 -1
- package/notification-management/lib/entities/template/template.types.d.ts +1 -1
- package/notification-management/lib/menu.provider.d.ts +1 -0
- package/organization-management/lib/const.d.ts +3 -0
- package/organization-management/lib/entities/branch/branch.service.d.ts +1 -1
- package/organization-management/lib/entities/branch/branch.types.d.ts +1 -1
- package/organization-management/lib/entities/chart/chart.service.d.ts +1 -1
- package/organization-management/lib/entities/chart/chart.types.d.ts +1 -1
- package/organization-management/lib/entities/company/company.service.d.ts +1 -1
- package/organization-management/lib/entities/company/company.types.d.ts +1 -1
- package/organization-management/lib/entities/department/department.service.d.ts +1 -1
- package/organization-management/lib/entities/department/department.types.d.ts +1 -1
- package/organization-management/lib/entities/division/division.service.d.ts +1 -1
- package/organization-management/lib/entities/division/division.types.d.ts +1 -1
- package/organization-management/lib/entities/employee/employee.service.d.ts +1 -1
- package/organization-management/lib/entities/employee/employee.types.d.ts +1 -1
- package/organization-management/lib/entities/employment-type/employment-type.service.d.ts +1 -1
- package/organization-management/lib/entities/employment-type/employment-type.types.d.ts +1 -1
- package/organization-management/lib/entities/index.d.ts +6 -4
- package/organization-management/lib/entities/position/position.service.d.ts +1 -1
- package/organization-management/lib/entities/position/position.types.d.ts +1 -1
- package/organization-management/lib/entities/role/index.d.ts +3 -0
- package/organization-management/lib/entities/role/role.entity.d.ts +3 -0
- package/organization-management/lib/entities/role/role.module.d.ts +6 -0
- package/organization-management/lib/entities/role/role.service.d.ts +10 -0
- package/organization-management/lib/entities/role/role.types.d.ts +5 -0
- package/organization-management/lib/entities/team/index.d.ts +3 -0
- package/organization-management/lib/entities/team/team.entity.d.ts +3 -0
- package/organization-management/lib/entities/team/team.module.d.ts +6 -0
- package/organization-management/lib/entities/team/team.service.d.ts +10 -0
- package/organization-management/lib/entities/team/team.types.d.ts +5 -0
- package/organization-management/lib/features/organization-chart/org-chart-configuration.page.d.ts +3 -0
- package/organization-management/lib/features/organization-chart/org-chart.page.d.ts +3 -0
- package/organization-management/lib/organization-management.module.d.ts +11 -9
- package/package.json +1 -1
- package/platform-management/lib/common/regional/data-source.provider.d.ts +10 -0
- package/platform-management/lib/const.d.ts +6 -0
- package/platform-management/lib/entities/app-term/app-term.service.d.ts +1 -1
- package/platform-management/lib/entities/app-term/app-term.types.d.ts +1 -1
- package/platform-management/lib/entities/app-version/app-version.service.d.ts +1 -1
- package/platform-management/lib/entities/app-version/app-version.types.d.ts +1 -1
- package/platform-management/lib/entities/app-version/components/slots/app-version-slot.component.d.ts +1 -1
- package/platform-management/lib/entities/app-version/workflows/change-log.workflow.d.ts +1 -1
- package/platform-management/lib/entities/app-version/workflows/show-release-notes.workflow.d.ts +9 -0
- package/platform-management/lib/entities/data-source/data-source.service.d.ts +1 -1
- package/platform-management/lib/entities/data-source/data-source.types.d.ts +1 -1
- package/platform-management/lib/entities/global-variable/global-variables.service.d.ts +1 -1
- package/platform-management/lib/entities/global-variable/global-variables.types.d.ts +1 -1
- package/platform-management/lib/entities/index.d.ts +1 -1
- package/platform-management/lib/entities/meta-data-definition/index.d.ts +0 -1
- package/platform-management/lib/entities/meta-data-definition/meta-data-definition.service.d.ts +5 -5
- package/platform-management/lib/entities/meta-data-definition/meta-data-definition.types.d.ts +3 -4
- package/platform-management/lib/entities/promotion/promotion.service.d.ts +1 -1
- package/platform-management/lib/entities/promotion/promotion.types.d.ts +2 -1
- package/platform-management/lib/platform-management.module.d.ts +4 -5
- package/scheduler-job-management/lib/entities/scheduler-job/scheduler-job.service.d.ts +1 -1
- package/scheduler-job-management/lib/entities/scheduler-job/scheduler-job.types.d.ts +1 -1
- package/security-management/lib/entities/index.d.ts +2 -0
- package/security-management/lib/entities/profile/profile.types.d.ts +1 -1
- package/security-management/lib/entities/roles/roles.service.d.ts +1 -1
- package/security-management/lib/entities/roles/roles.types.d.ts +3 -1
- package/security-management/lib/entities/users/users.service.d.ts +1 -1
- package/security-management/lib/entities/users/users.types.d.ts +12 -3
- package/text-template-management/lib/const.d.ts +6 -0
- package/text-template-management/lib/entities/category/category.service.d.ts +1 -1
- package/text-template-management/lib/entities/category/category.types.d.ts +1 -1
- package/text-template-management/lib/entities/index.d.ts +1 -0
- package/text-template-management/lib/entities/tag-template/index.d.ts +3 -0
- package/text-template-management/lib/entities/tag-template/tag-template.entity.d.ts +3 -0
- package/text-template-management/lib/entities/tag-template/tag-template.service.d.ts +10 -0
- package/text-template-management/lib/entities/tag-template/tag-template.types.d.ts +5 -0
- package/text-template-management/lib/entities/template/template.service.d.ts +1 -1
- package/text-template-management/lib/entities/template/template.types.d.ts +1 -1
- package/auth/lib/store/auth.effects.d.ts +0 -18
- package/auth/lib/store/index.d.ts +0 -1
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-D1qxdECo.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-password.component-EXWlXGez.mjs +0 -121
- package/fesm2022/acorex-modules-auth-password.component-EXWlXGez.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-BTQ4VpFG.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-category.entity-ChxSjvOF.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-designer.page-BLbPLLdP.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-BGSucRLY.mjs +0 -126
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-BGSucRLY.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template-widget-edit.component-Chle-W7b.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template.entity-BIBMNXD5.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-branch.entity-CxxFiBPd.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-employee.entity-PwlBjkYo.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-org-chart.page-DMxaL-70.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-position.entity-B7ceEEbu.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-setting.provider-eLv_qnmE.mjs.map +0 -1
- package/platform-management/lib/entities/meta-data-definition/meta-data-definition.module.d.ts +0 -6
@@ -1,7 +1,6 @@
|
|
1
1
|
import { AXPEntityQueryType, AXPEntityCommandScope } from '@acorex/platform/common';
|
2
2
|
import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
3
|
-
import {
|
4
|
-
import { A as AXMFormTemplateManagementCategoryEntityService, R as RootConfig } from './acorex-modules-form-template-management-acorex-modules-form-template-management-BTQ4VpFG.mjs';
|
3
|
+
import { A as AXMFormTemplateManagementCategoryEntityService, R as RootConfig } from './acorex-modules-form-template-management-acorex-modules-form-template-management-szDh56Bk.mjs';
|
5
4
|
|
6
5
|
async function factory(injector) {
|
7
6
|
const dataService = injector.get(AXMFormTemplateManagementCategoryEntityService);
|
@@ -56,7 +55,7 @@ async function factory(injector) {
|
|
56
55
|
interface: {
|
57
56
|
type: AXPWidgetsCatalog.lookup,
|
58
57
|
options: {
|
59
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.category}`,
|
58
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.category.name}`,
|
60
59
|
},
|
61
60
|
},
|
62
61
|
},
|
@@ -90,19 +89,7 @@ async function factory(injector) {
|
|
90
89
|
},
|
91
90
|
list: {
|
92
91
|
execute: async (e) => {
|
93
|
-
|
94
|
-
const sortedItems = applySortArray(list, e.sort);
|
95
|
-
const filteredItems = applyFilterArray(sortedItems, e.filter ? [e.filter] : []);
|
96
|
-
if (e.filter?.field === 'parentId') {
|
97
|
-
return {
|
98
|
-
items: filteredItems,
|
99
|
-
total: filteredItems.length,
|
100
|
-
};
|
101
|
-
}
|
102
|
-
return {
|
103
|
-
total: filteredItems.filter((i) => !i.parentId).length,
|
104
|
-
items: filteredItems.filter((i) => !i.parentId).slice(e.skip, (e.skip ?? 0) + (e.take ?? 0)),
|
105
|
-
};
|
92
|
+
return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
|
106
93
|
},
|
107
94
|
type: AXPEntityQueryType.List,
|
108
95
|
},
|
@@ -244,4 +231,4 @@ async function factory(injector) {
|
|
244
231
|
}
|
245
232
|
|
246
233
|
export { factory };
|
247
|
-
//# sourceMappingURL=acorex-modules-form-template-management-category.entity-
|
234
|
+
//# sourceMappingURL=acorex-modules-form-template-management-category.entity-BZXqnhwK.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-form-template-management-category.entity-BZXqnhwK.mjs","sources":["../../../../libs/modules/form-template-management/src/lib/entities/category/category.entity.ts"],"sourcesContent":["import { AXPEntity, AXPEntityCommandScope, AXPEntityQueryType } from '@acorex/platform/common';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';\nimport { Injector } from '@angular/core';\n\nimport { RootConfig } from '../../const';\nimport { AXMFormTemplateManagementCategoryEntityService } from './category.service';\n\nexport async function factory(injector: Injector): Promise<AXPEntity | null> {\n const dataService = injector.get(AXMFormTemplateManagementCategoryEntityService);\n const i18n = RootConfig.config.i18n;\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.category.name,\n parentKey: 'parentId',\n source: '',\n title: RootConfig.entities.category.title,\n formats: {\n individual: `t(\"category\", { scope: \"${i18n}\" })`,\n plural: `t(\"categories\", { scope: \"${i18n}\" })`,\n searchResult: {\n title: '{{ title }}',\n description: RootConfig.module.title,\n },\n },\n relatedEntities: [],\n groups: [\n {\n id: 'section',\n title: `t(\"category\", { scope: \"common\" })`,\n },\n ],\n properties: [\n {\n name: 'title',\n title: `t(\"title\",{ scope: \"common\" })`,\n groupId: 'section',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.text,\n options: {\n width: '400px',\n },\n },\n },\n validations: [\n {\n rule: 'required',\n },\n ],\n },\n {\n name: 'parentId',\n title: `t(\"parentId\",{ scope: \"${i18n}\" })`,\n groupId: 'section',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.lookup,\n options: {\n entity: `${RootConfig.module.name}.${RootConfig.entities.category.name}`,\n },\n },\n },\n },\n ],\n columns: [{ name: 'title' }],\n commands: {\n create: {\n execute: async (data: any) => {\n const res = await dataService.insertOne(data);\n return { id: res };\n },\n },\n delete: {\n execute: async (id: any) => {\n return await dataService.deleteOne(id);\n },\n },\n update: {\n execute: async (data: any) => {\n return await dataService.updateOne(data.id, data);\n },\n },\n },\n queries: {\n byKey: {\n execute: async (id: string) => {\n return await dataService.getOne(id);\n },\n type: AXPEntityQueryType.Single,\n },\n list: {\n execute: async (e: any) => {\n return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });\n },\n type: AXPEntityQueryType.List,\n },\n },\n interfaces: {\n master: {\n create: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n {\n name: 'parentId',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n update: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n {\n name: 'parentId',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n single: {\n title: '{{title}}',\n sections: [\n {\n id: 'section',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 6,\n },\n },\n },\n },\n ],\n actions: [],\n },\n list: {\n actions: [\n {\n title: `t(\"create\", { scope: \"common\" })`,\n command: 'create-entity',\n priority: 'primary',\n type: 'create',\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n title: 't(\"deleteItems\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'primary',\n type: 'delete',\n scope: AXPEntityCommandScope.Selected,\n },\n {\n title: 't(\"detail\", { scope: \"common\" })',\n command: 'open-entity',\n priority: 'secondary',\n type: 'view',\n scope: AXPEntityCommandScope.Individual,\n },\n {\n title: 't(\"delete\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'secondary',\n type: 'delete',\n scope: AXPEntityCommandScope.Individual,\n },\n ],\n views: [\n {\n name: 'all',\n title: 't(\"allItem\", { scope: \"common\" })',\n fixed: true,\n columns: [],\n conditions: [],\n sorts: [],\n },\n ],\n },\n },\n },\n };\n\n return entityDef;\n}\n"],"names":[],"mappings":";;;;AAOO,eAAe,OAAO,CAAC,QAAkB,EAAA;IAC9C,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,8CAA8C,CAAC;AAChF,IAAA,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;AAEnC,IAAA,MAAM,SAAS,GAAc;AAC3B,QAAA,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC9B,QAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI;AACvC,QAAA,SAAS,EAAE,UAAU;AACrB,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK;AACzC,QAAA,OAAO,EAAE;YACP,UAAU,EAAE,CAA2B,wBAAA,EAAA,IAAI,CAAM,IAAA,CAAA;YACjD,MAAM,EAAE,CAA6B,0BAAA,EAAA,IAAI,CAAM,IAAA,CAAA;AAC/C,YAAA,YAAY,EAAE;AACZ,gBAAA,KAAK,EAAE,aAAa;AACpB,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AACrC,aAAA;AACF,SAAA;AACD,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,MAAM,EAAE;AACN,YAAA;AACE,gBAAA,EAAE,EAAE,SAAS;AACb,gBAAA,KAAK,EAAE,CAAoC,kCAAA,CAAA;AAC5C,aAAA;AACF,SAAA;AACD,QAAA,UAAU,EAAE;AACV,YAAA;AACE,gBAAA,IAAI,EAAE,OAAO;AACb,gBAAA,KAAK,EAAE,CAAiC,+BAAA,CAAA;AACxC,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,MAAM,EAAE;AACN,oBAAA,QAAQ,EAAE,QAAQ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O,EAAE,eAAe;AACxB,4BAAA,QAAQ,EAAE,SAAS;AACnB,4BAAA,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,qBAAqB,CAAC,SAAS;AACvC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,uCAAuC;AAC9C,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,QAAQ,EAAE,SAAS;AACnB,4BAAA,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,qBAAqB,CAAC,QAAQ;AACtC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,kCAAkC;AACzC,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,QAAQ,EAAE,WAAW;AACrB,4BAAA,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,qBAAqB,CAAC,UAAU;AACxC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,kCAAkC;AACzC,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,QAAQ,EAAE,WAAW;AACrB,4BAAA,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,qBAAqB,CAAC,UAAU;AACxC,yBAAA;AACF,qBAAA;AACD,oBAAA,KAAK,EAAE;AACL,wBAAA;AACE,4BAAA,IAAI,EAAE,KAAK;AACX,4BAAA,KAAK,EAAE,mCAAmC;AAC1C,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,OAAO,EAAE,EAAE;AACX,4BAAA,UAAU,EAAE,EAAE;AACd,4BAAA,KAAK,EAAE,EAAE;AACV,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;;;;"}
|
@@ -12,12 +12,13 @@ class AXMFormTemplateManagementModuleDesignerPage {
|
|
12
12
|
constructor() {
|
13
13
|
this.router = inject(ActivatedRoute);
|
14
14
|
this.templateId = signal(this.router.snapshot.queryParams['id']);
|
15
|
+
this.strategy = signal(this.router.snapshot.queryParams['strategy']);
|
15
16
|
}
|
16
17
|
ngAfterViewInit() {
|
17
18
|
document.querySelector('html')?.classList.remove('ax-dark');
|
18
19
|
}
|
19
20
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementModuleDesignerPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMFormTemplateManagementModuleDesignerPage, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<axp-layout-designer [id]=\"templateId()\"> </axp-layout-designer>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXPWidgetsModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: AXPLayoutDesignerComponent, selector: "axp-layout-designer", inputs: ["id"] }] }); }
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMFormTemplateManagementModuleDesignerPage, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<axp-layout-designer [id]=\"templateId()\" [strategy]=\"strategy()\"> </axp-layout-designer>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXPWidgetsModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: AXPLayoutDesignerComponent, selector: "axp-layout-designer", inputs: ["id", "strategy"] }] }); }
|
21
22
|
}
|
22
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementModuleDesignerPage, decorators: [{
|
23
24
|
type: Component,
|
@@ -28,8 +29,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
28
29
|
AXPLayoutBuilderModule,
|
29
30
|
AXButtonModule,
|
30
31
|
AXPLayoutDesignerComponent,
|
31
|
-
], template: "<axp-layout-designer [id]=\"templateId()\"> </axp-layout-designer>" }]
|
32
|
+
], template: "<axp-layout-designer [id]=\"templateId()\" [strategy]=\"strategy()\"> </axp-layout-designer>" }]
|
32
33
|
}] });
|
33
34
|
|
34
35
|
export { AXMFormTemplateManagementModuleDesignerPage };
|
35
|
-
//# sourceMappingURL=acorex-modules-form-template-management-designer.page-
|
36
|
+
//# sourceMappingURL=acorex-modules-form-template-management-designer.page-Bd_bZ_7p.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-form-template-management-designer.page-Bd_bZ_7p.mjs","sources":["../../../../libs/modules/form-template-management/src/lib/features/designer/designer.page.ts","../../../../libs/modules/form-template-management/src/lib/features/designer/designer.page.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';\nimport { AXPLayoutDesignerComponent } from '@acorex/platform/layout/designer';\nimport { AXPWidgetsModule } from '@acorex/platform/widgets';\nimport { CommonModule } from '@angular/common';\nimport { Component, inject, signal } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\n@Component({\n templateUrl: 'designer.page.html',\n imports: [\n CommonModule,\n AXDecoratorModule,\n AXPWidgetsModule,\n AXPLayoutBuilderModule,\n AXButtonModule,\n AXPLayoutDesignerComponent,\n ]\n})\nexport class AXMFormTemplateManagementModuleDesignerPage {\n private router = inject(ActivatedRoute);\n protected templateId = signal<string | null>(this.router.snapshot.queryParams['id']);\n protected strategy = signal<string | null>(this.router.snapshot.queryParams['strategy']);\n\n ngAfterViewInit(): void {\n document.querySelector('html')?.classList.remove('ax-dark');\n }\n}\n","<axp-layout-designer [id]=\"templateId()\" [strategy]=\"strategy()\"> </axp-layout-designer>"],"names":[],"mappings":";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AAA,CAAA,EAAA,CAAA,CAAA;;2FAGjB,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBAXvD,SAAS;AAEC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,gBAAgB;wBAChB,sBAAsB;wBACtB,cAAc;wBACd,0BAA0B;AAC3B,qBAAA,EAAA,QAAA,EAAA,8FAAA,EAAA;;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
2
|
-
import { R as RootConfig } from './acorex-modules-form-template-management-acorex-modules-form-template-management-
|
2
|
+
import { R as RootConfig } from './acorex-modules-form-template-management-acorex-modules-form-template-management-szDh56Bk.mjs';
|
3
3
|
|
4
4
|
class AXMSettingProvider {
|
5
5
|
async provide(context) {
|
@@ -62,4 +62,4 @@ class AXMSettingProvider {
|
|
62
62
|
}
|
63
63
|
|
64
64
|
export { AXMSettingProvider };
|
65
|
-
//# sourceMappingURL=acorex-modules-form-template-management-setting.provider-
|
65
|
+
//# sourceMappingURL=acorex-modules-form-template-management-setting.provider-o2_TSVfK.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-modules-form-template-management-setting.provider-
|
1
|
+
{"version":3,"file":"acorex-modules-form-template-management-setting.provider-o2_TSVfK.mjs","sources":["../../../../libs/modules/form-template-management/src/lib/setting.provider.ts"],"sourcesContent":["import { AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '@acorex/platform/common';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';\nimport { RootConfig } from './const';\n\nexport class AXMSettingProvider implements AXPSettingDefinitionProvider {\n\n async provide(context: AXPSettingDefinitionProviderContext): Promise<void> {\n context\n // Add Form Template Group\n .addGroup('form-template', 'Form Template', 'Settings related to form templates.', RootConfig.module.icon)\n\n // Start Interface Section\n .addSection('interface', 'UI Interface', 'Customize the user interface for forms.')\n .addSetting({\n key: 'history-panel',\n title: 'Show History Panel',\n scope: 'U',\n isInherited: true,\n defaultValue: false,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n },\n description: 'Enable or disable the history panel for forms.',\n validationRules: [\n {\n rule: 'required',\n },\n ],\n })\n .endSection()\n\n // Start Saving Section\n .addSection('saving', 'Saving', 'Settings related to saving form data.')\n .addSetting({\n key: 'auto-save',\n title: 'Auto Save',\n scope: 'U',\n isInherited: true,\n defaultValue: false,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n },\n description: 'Automatically save form data at regular intervals.',\n })\n .addSetting({\n key: 'auto-save-interval',\n title: 'Auto Save Interval',\n scope: 'U',\n isInherited: true,\n defaultValue: 1,\n widget: {\n type: AXPWidgetsCatalog.number,\n options: {\n visibility: `{{ context.eval('auto-save') }}`,\n hasClearButton: false,\n minValue: 1,\n maxValue: 60,\n }\n },\n\n description: 'Set the time interval (in minites) for auto-saving form data.',\n })\n .endSection()\n\n // End Form Template Group\n .endGroup();\n }\n}\n"],"names":[],"mappings":";;;MAIa,kBAAkB,CAAA;IAE7B,MAAM,OAAO,CAAC,OAA4C,EAAA;QACxD;;AAEG,aAAA,QAAQ,CAAC,eAAe,EAAE,eAAe,EAAE,qCAAqC,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;;AAGxG,aAAA,UAAU,CAAC,WAAW,EAAE,cAAc,EAAE,yCAAyC;AACjF,aAAA,UAAU,CAAC;AACV,YAAA,GAAG,EAAE,eAAe;AACpB,YAAA,KAAK,EAAE,oBAAoB;AAC3B,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB,CAAC,MAAM;AAC/B,aAAA;AACD,YAAA,WAAW,EAAE,gDAAgD;AAC7D,YAAA,eAAe,EAAE;AACf,gBAAA;AACE,oBAAA,IAAI,EAAE,UAAU;AACjB,iBAAA;AACF,aAAA;SACF;AACA,aAAA,UAAU;;AAGV,aAAA,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,uCAAuC;AACtE,aAAA,UAAU,CAAC;AACV,YAAA,GAAG,EAAE,WAAW;AAChB,YAAA,KAAK,EAAE,WAAW;AAClB,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB,CAAC,MAAM;AAC/B,aAAA;AACD,YAAA,WAAW,EAAE,oDAAoD;SAClE;AACA,aAAA,UAAU,CAAC;AACV,YAAA,GAAG,EAAE,oBAAoB;AACzB,YAAA,KAAK,EAAE,oBAAoB;AAC3B,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,YAAY,EAAE,CAAC;AACf,YAAA,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB,CAAC,MAAM;AAC9B,gBAAA,OAAO,EAAE;AACP,oBAAA,UAAU,EAAE,CAAiC,+BAAA,CAAA;AAC7C,oBAAA,cAAc,EAAE,KAAK;AACrB,oBAAA,QAAQ,EAAE,CAAC;AACX,oBAAA,QAAQ,EAAE,EAAE;AACb;AACF,aAAA;AAED,YAAA,WAAW,EAAE,+DAA+D;SAC7E;AACA,aAAA,UAAU;;AAGV,aAAA,QAAQ,EAAE;;AAEhB;;;;"}
|
package/fesm2022/acorex-modules-form-template-management-template-picker.component-BxOdV3y2.mjs
ADDED
@@ -0,0 +1,191 @@
|
|
1
|
+
import * as i4 from '@acorex/components/button';
|
2
|
+
import { AXButtonModule } from '@acorex/components/button';
|
3
|
+
import * as i3 from '@acorex/components/common';
|
4
|
+
import { AXCommonModule } from '@acorex/components/common';
|
5
|
+
import * as i5 from '@acorex/components/decorators';
|
6
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
7
|
+
import { AXBasePageComponent } from '@acorex/components/page';
|
8
|
+
import * as i6 from '@acorex/components/search-box';
|
9
|
+
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
10
|
+
import { AXPSettingService, AXPSettingScope } from '@acorex/platform/common';
|
11
|
+
import * as i1 from '@angular/common';
|
12
|
+
import { CommonModule } from '@angular/common';
|
13
|
+
import * as i0 from '@angular/core';
|
14
|
+
import { inject, model, signal, computed, Component, ViewEncapsulation } from '@angular/core';
|
15
|
+
import * as i2 from '@angular/forms';
|
16
|
+
import { FormsModule } from '@angular/forms';
|
17
|
+
import { orderBy } from 'lodash-es';
|
18
|
+
import * as i7 from '@acorex/components/side-menu';
|
19
|
+
import { AXSideMenuModule } from '@acorex/components/side-menu';
|
20
|
+
import * as i3$1 from '@acorex/core/translation';
|
21
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
22
|
+
|
23
|
+
class AXPTemplateWidgetPickerComponent extends AXBasePageComponent {
|
24
|
+
constructor() {
|
25
|
+
super(...arguments);
|
26
|
+
this.settingService = inject(AXPSettingService);
|
27
|
+
this.lastSelectedCategoryKey = 'forms:templates:picker:lastSelectedCategory';
|
28
|
+
this.pinnedSettingKey = 'forms:templates:picker:pinned';
|
29
|
+
this.searchTerm = model('');
|
30
|
+
// Signals
|
31
|
+
this.widgets = [];
|
32
|
+
this.displayWidgets = signal([]);
|
33
|
+
// Signal to track selected widgets
|
34
|
+
this.selectedWidgets = signal([]);
|
35
|
+
// Computed for filtered and ordered widget list
|
36
|
+
this.orderedList = computed(() => {
|
37
|
+
const search = this.searchTerm().toLowerCase();
|
38
|
+
const selectedCategory = this.selectedCategory();
|
39
|
+
const selectedCategoryId = selectedCategory ? selectedCategory.id : null;
|
40
|
+
const filterByCategory = (widget) => {
|
41
|
+
if (!selectedCategoryId)
|
42
|
+
return true;
|
43
|
+
const categoryIds = [selectedCategoryId, ...(selectedCategory?.children?.map(c => c.id) || [])];
|
44
|
+
return categoryIds.includes(widget.group.name);
|
45
|
+
};
|
46
|
+
return orderBy(this.displayWidgets().filter((w) => {
|
47
|
+
const matchesCategory = filterByCategory(w);
|
48
|
+
const matchesSearch = !search || w.title.toLowerCase().includes(search) || w.description?.toLowerCase().includes(search);
|
49
|
+
return matchesCategory && matchesSearch;
|
50
|
+
}), ['pinned', 'title'], ['desc', 'asc']);
|
51
|
+
});
|
52
|
+
// Pinned and regular lists
|
53
|
+
this.pinnedList = computed(() => this.orderedList().filter((c) => c.pinned));
|
54
|
+
this.regularList = computed(() => this.orderedList().filter((c) => !c.pinned));
|
55
|
+
this.currentTabIndex = signal(0);
|
56
|
+
//#region Category Tree
|
57
|
+
this.categories = [];
|
58
|
+
this.displayCategories = computed(() => {
|
59
|
+
const map = (node) => {
|
60
|
+
const children = this.categories.filter(i => i.parentId == node.id).map(map);
|
61
|
+
return {
|
62
|
+
id: node.id,
|
63
|
+
text: node.title,
|
64
|
+
parentId: node.parentId,
|
65
|
+
hasChild: children.length > 0,
|
66
|
+
children: children
|
67
|
+
};
|
68
|
+
};
|
69
|
+
return this.categories.filter(c => !c.parentId).map(map);
|
70
|
+
});
|
71
|
+
this.selectedCategory = signal(null);
|
72
|
+
}
|
73
|
+
async ngOnInit() {
|
74
|
+
super.ngOnInit();
|
75
|
+
const pinnedWidgets = (await this.settingService.get(this.pinnedSettingKey)) || [];
|
76
|
+
this.displayWidgets.set(this.widgets.map((c) => ({ ...c, pinned: pinnedWidgets.includes(c.id), icon: c.icon ?? 'fa-solid fa-file-invoice' })));
|
77
|
+
const lastSelectedCategoryId = await this.settingService.get(this.lastSelectedCategoryKey);
|
78
|
+
if (lastSelectedCategoryId) {
|
79
|
+
const findCategory = (categories, id) => {
|
80
|
+
for (const category of categories) {
|
81
|
+
if (category.id === id)
|
82
|
+
return category;
|
83
|
+
if (category.children) {
|
84
|
+
const found = findCategory(category.children, id);
|
85
|
+
if (found)
|
86
|
+
return found;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
return null;
|
90
|
+
};
|
91
|
+
const lastSelectedCategory = findCategory(this.displayCategories(), lastSelectedCategoryId);
|
92
|
+
if (lastSelectedCategory) {
|
93
|
+
this.selectedCategory.set(lastSelectedCategory);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
isExpanded(item) {
|
98
|
+
const selectedCategory = this.selectedCategory();
|
99
|
+
if (!selectedCategory)
|
100
|
+
return false;
|
101
|
+
const isParent = (category, targetId) => {
|
102
|
+
if (category.id === targetId)
|
103
|
+
return true;
|
104
|
+
if (category.children) {
|
105
|
+
return category.children.some(child => isParent(child, targetId));
|
106
|
+
}
|
107
|
+
return false;
|
108
|
+
};
|
109
|
+
return isParent(item, selectedCategory.id);
|
110
|
+
}
|
111
|
+
// protected override async ngOnInit() {
|
112
|
+
// super.ngOnInit();
|
113
|
+
// const pinnedWidgets = (await this.settingService.get<string[]>(this.pinnedSettingKey)) || [];
|
114
|
+
// this.displayWidgets.set(this.widgets.map((c) => ({ ...c, pinned: pinnedWidgets.includes(c.id), icon: c.icon ?? 'fa-solid fa-file-invoice' })));
|
115
|
+
// }
|
116
|
+
handleTabChange(event) {
|
117
|
+
const indx = event.index;
|
118
|
+
if (this.currentTabIndex() != indx) {
|
119
|
+
this.currentTabIndex.set(indx);
|
120
|
+
}
|
121
|
+
}
|
122
|
+
handleClick(event, widget) {
|
123
|
+
if (event.ctrlKey) {
|
124
|
+
const currentSelection = this.selectedWidgets();
|
125
|
+
const isAlreadySelected = currentSelection.some((w) => w === widget);
|
126
|
+
if (isAlreadySelected) {
|
127
|
+
// Deselect widget if already selected
|
128
|
+
this.selectedWidgets.set(currentSelection.filter((w) => w !== widget));
|
129
|
+
}
|
130
|
+
else {
|
131
|
+
// Add widget to selection
|
132
|
+
this.selectedWidgets.set([...currentSelection, widget]);
|
133
|
+
}
|
134
|
+
}
|
135
|
+
else {
|
136
|
+
// If CTRL is not pressed, select only the clicked widget
|
137
|
+
this.close({ widgets: [widget] });
|
138
|
+
}
|
139
|
+
}
|
140
|
+
async handlePinClick(e, widget) {
|
141
|
+
e.stopPropagation();
|
142
|
+
widget.pinned = !widget.pinned;
|
143
|
+
// Get the current list of pinned widgets from settings
|
144
|
+
let pinnedWidgets = (await this.settingService.get(this.pinnedSettingKey)) || [];
|
145
|
+
// Update the list of pinned widgets based on the pinned status
|
146
|
+
if (widget.pinned) {
|
147
|
+
if (!pinnedWidgets.includes(widget.id)) {
|
148
|
+
pinnedWidgets.push(widget.id);
|
149
|
+
}
|
150
|
+
}
|
151
|
+
else {
|
152
|
+
pinnedWidgets = pinnedWidgets.filter((name) => name !== widget.id);
|
153
|
+
}
|
154
|
+
// Save the updated list of pinned widgets
|
155
|
+
await this.settingService.scope(AXPSettingScope.User).set(this.pinnedSettingKey, pinnedWidgets);
|
156
|
+
// Trigger a re-render of the widgets
|
157
|
+
this.displayWidgets.set([...this.displayWidgets()]);
|
158
|
+
}
|
159
|
+
// Check if a widget is selected
|
160
|
+
isWidgetSelected(widget) {
|
161
|
+
return this.selectedWidgets().includes(widget);
|
162
|
+
}
|
163
|
+
handleConfirmSelection() {
|
164
|
+
this.close({ widgets: this.selectedWidgets() });
|
165
|
+
}
|
166
|
+
handleMenuItemClick(item) {
|
167
|
+
this.selectedCategory.set(item);
|
168
|
+
this.settingService.scope(AXPSettingScope.User).set(this.lastSelectedCategoryKey, item.id);
|
169
|
+
}
|
170
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
171
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTemplateWidgetPickerComponent, isStandalone: true, selector: "ng-component", inputs: { searchTerm: { classPropertyName: "searchTerm", publicName: "searchTerm", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchTerm: "searchTermChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col lg:ax-h-[60vh]\">\n <div class=\"ax-p-2 ax-surface-lowest ax-border-b ax-flex-none\">\n <ax-search-box look=\"fill\" placeholder=\"e.g. Button, Text, ...\" class=\"ax-sm\" [(ngModel)]=\"searchTerm\"\n [delayTime]=\"300\" [axAutoFocus]=\"true\">\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\n <div class=\"ax-flex ax-flex-grow ax-h-full \">\n <div\n class=\"ax-flex ax-h-full ax-overflow-auto ax-w-1/3 ax-justify-start ax-items-start ax-surface-lowest ax-border-e \">\n <ax-side-menu look=\"pills\" [look]=\"'with-line-color'\" [location]=\"'start'\">\n <ng-container *ngFor=\"let item of displayCategories()\" [ngTemplateOutlet]=\"recursiveMenu\"\n [ngTemplateOutletContext]=\"{ item: item }\">\n </ng-container>\n </ax-side-menu>\n <ng-template #recursiveMenu let-item=\"item\">\n <ax-side-menu-item [active]=\"item ===selectedCategory()\" (onClick)=\"handleMenuItemClick(item)\"\n [isCollapsed]=\"!isExpanded(item)\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-folder ax-text-yellow-500 fa-fw\"></ax-icon>\n </ax-prefix>\n <span>{{ item.text | translate | async }}</span>\n <ng-container *ngIf=\"item.hasChild\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"recursiveMenu\"\n [ngTemplateOutletContext]=\"{ item: child }\">\n </ng-container>\n </ng-container>\n </ax-side-menu-item>\n </ng-template>\n </div>\n <div class=\"ax-flex ax-h-full ax-overflow-auto ax-flex-col ax-w-2/3 \">\n <div class=\"ax-flex ax-flex-col ax-p-4\">\n <ng-template #itemTpl let-w>\n <div (click)=\"handleClick($event, w)\"\n class=\"ax-py-2 ax-px-3 ax-rounded-md ax-flex ax-gap-3 ax-items-center ax-group hover:ax-bg-primary-100 dark:hover:ax-bg-primary-800 ax-cursor-pointer\"\n [class.ax-bg-primary-100]=\"isWidgetSelected(w)\">\n <div\n class=\"ax-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-rounded-md ax-border ax-border-neutral-200 ax-text-neutral-500 ax-bg-on-surface group-hover:ax-bg-primary-200\"\n [class.ax-bg-primary-200]=\"isWidgetSelected(w)\">\n <i [ngClass]=\"w.icon\" class=\"ax-text-lg group-hover:ax-text-primary-700 ax-text-on-surface-fore\"\n [class.ax-text-primary-700]=\"isWidgetSelected(w)\"></i>\n </div>\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-flex-1\">\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <div class=\"ax-font-semibold ax-text-sm\">{{ w.title }}</div>\n <div (click)=\"handlePinClick($event, w)\">\n @if (w.pinned) {\n <i class=\"fa-solid fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45\"></i>\n } @else {\n <i\n class=\"fa-light fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45 ax-invisible group-hover:ax-visible\"></i>\n }\n </div>\n </div>\n <span class=\"ax-text-xs ax-text-neutral-400 ax-truncate\">\n {{ w.description }}\n </span>\n </div>\n </div>\n </ng-template>\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2\">\n @for(w of pinnedList();track $index) {\n <ng-container *ngTemplateOutlet=\"itemTpl; context: { $implicit: w }\"></ng-container>\n }\n </div>\n @if(pinnedList().length) {\n <hr class=\"ax-my-4 ax-border-dashed\" />\n }\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2\">\n @for(w of regularList();track $index) {\n <ng-container *ngTemplateOutlet=\"itemTpl; context: { $implicit: w }\"></ng-container>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n\n@if(selectedWidgets().length) {\n<ax-footer>\n <ax-suffix>\n <ax-button look=\"solid\" color=\"primary\" text=\"{{ selectedWidgets().length }} Selected\"\n (onClick)=\"handleConfirmSelection()\"></ax-button>\n </ax-suffix>\n</ax-footer>\n}", styles: [".selected-widget{border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-100),var(--tw-bg-opacity, 1))}.selected-widget i{--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type:
|
172
|
+
//
|
173
|
+
AXCommonModule }, { kind: "directive", type: i3.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i5.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i5.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i5.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "component", type: i7.AXSideMenuComponent, selector: "ax-side-menu", inputs: ["items", "look", "location"], outputs: ["itemsChange"] }, { kind: "component", type: i7.AXSideMenuItemComponent, selector: "ax-side-menu-item", inputs: ["disabled", "text", "active", "isLoading", "isCollapsed", "href", "routerLink", "routerLinkActive", "routerLinkActiveOptions", "target"], outputs: ["textChange", "activeChange", "isLoadingChange", "isCollapsedChange", "onClick"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
174
|
+
}
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetPickerComponent, decorators: [{
|
176
|
+
type: Component,
|
177
|
+
args: [{ imports: [
|
178
|
+
CommonModule,
|
179
|
+
FormsModule,
|
180
|
+
//
|
181
|
+
AXCommonModule,
|
182
|
+
AXButtonModule,
|
183
|
+
AXDecoratorModule,
|
184
|
+
AXSearchBoxModule,
|
185
|
+
AXSideMenuModule,
|
186
|
+
AXTranslationModule
|
187
|
+
], encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-flex ax-flex-col lg:ax-h-[60vh]\">\n <div class=\"ax-p-2 ax-surface-lowest ax-border-b ax-flex-none\">\n <ax-search-box look=\"fill\" placeholder=\"e.g. Button, Text, ...\" class=\"ax-sm\" [(ngModel)]=\"searchTerm\"\n [delayTime]=\"300\" [axAutoFocus]=\"true\">\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\n <div class=\"ax-flex ax-flex-grow ax-h-full \">\n <div\n class=\"ax-flex ax-h-full ax-overflow-auto ax-w-1/3 ax-justify-start ax-items-start ax-surface-lowest ax-border-e \">\n <ax-side-menu look=\"pills\" [look]=\"'with-line-color'\" [location]=\"'start'\">\n <ng-container *ngFor=\"let item of displayCategories()\" [ngTemplateOutlet]=\"recursiveMenu\"\n [ngTemplateOutletContext]=\"{ item: item }\">\n </ng-container>\n </ax-side-menu>\n <ng-template #recursiveMenu let-item=\"item\">\n <ax-side-menu-item [active]=\"item ===selectedCategory()\" (onClick)=\"handleMenuItemClick(item)\"\n [isCollapsed]=\"!isExpanded(item)\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-folder ax-text-yellow-500 fa-fw\"></ax-icon>\n </ax-prefix>\n <span>{{ item.text | translate | async }}</span>\n <ng-container *ngIf=\"item.hasChild\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"recursiveMenu\"\n [ngTemplateOutletContext]=\"{ item: child }\">\n </ng-container>\n </ng-container>\n </ax-side-menu-item>\n </ng-template>\n </div>\n <div class=\"ax-flex ax-h-full ax-overflow-auto ax-flex-col ax-w-2/3 \">\n <div class=\"ax-flex ax-flex-col ax-p-4\">\n <ng-template #itemTpl let-w>\n <div (click)=\"handleClick($event, w)\"\n class=\"ax-py-2 ax-px-3 ax-rounded-md ax-flex ax-gap-3 ax-items-center ax-group hover:ax-bg-primary-100 dark:hover:ax-bg-primary-800 ax-cursor-pointer\"\n [class.ax-bg-primary-100]=\"isWidgetSelected(w)\">\n <div\n class=\"ax-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-rounded-md ax-border ax-border-neutral-200 ax-text-neutral-500 ax-bg-on-surface group-hover:ax-bg-primary-200\"\n [class.ax-bg-primary-200]=\"isWidgetSelected(w)\">\n <i [ngClass]=\"w.icon\" class=\"ax-text-lg group-hover:ax-text-primary-700 ax-text-on-surface-fore\"\n [class.ax-text-primary-700]=\"isWidgetSelected(w)\"></i>\n </div>\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-flex-1\">\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <div class=\"ax-font-semibold ax-text-sm\">{{ w.title }}</div>\n <div (click)=\"handlePinClick($event, w)\">\n @if (w.pinned) {\n <i class=\"fa-solid fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45\"></i>\n } @else {\n <i\n class=\"fa-light fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45 ax-invisible group-hover:ax-visible\"></i>\n }\n </div>\n </div>\n <span class=\"ax-text-xs ax-text-neutral-400 ax-truncate\">\n {{ w.description }}\n </span>\n </div>\n </div>\n </ng-template>\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2\">\n @for(w of pinnedList();track $index) {\n <ng-container *ngTemplateOutlet=\"itemTpl; context: { $implicit: w }\"></ng-container>\n }\n </div>\n @if(pinnedList().length) {\n <hr class=\"ax-my-4 ax-border-dashed\" />\n }\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2\">\n @for(w of regularList();track $index) {\n <ng-container *ngTemplateOutlet=\"itemTpl; context: { $implicit: w }\"></ng-container>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n\n@if(selectedWidgets().length) {\n<ax-footer>\n <ax-suffix>\n <ax-button look=\"solid\" color=\"primary\" text=\"{{ selectedWidgets().length }} Selected\"\n (onClick)=\"handleConfirmSelection()\"></ax-button>\n </ax-suffix>\n</ax-footer>\n}", styles: [".selected-widget{border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-100),var(--tw-bg-opacity, 1))}.selected-widget i{--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}\n"] }]
|
188
|
+
}] });
|
189
|
+
|
190
|
+
export { AXPTemplateWidgetPickerComponent };
|
191
|
+
//# sourceMappingURL=acorex-modules-form-template-management-template-picker.component-BxOdV3y2.mjs.map
|
package/fesm2022/acorex-modules-form-template-management-template-picker.component-BxOdV3y2.mjs.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-form-template-management-template-picker.component-BxOdV3y2.mjs","sources":["../../../../libs/modules/form-template-management/src/lib/features/designer/widgets/template-picker/template-picker.component.ts","../../../../libs/modules/form-template-management/src/lib/features/designer/widgets/template-picker/template-picker.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXSearchBoxModule } from '@acorex/components/search-box';\nimport { AXTabStripChangedEvent } from '@acorex/components/tabs';\nimport { AXPSettingScope, AXPSettingService } from '@acorex/platform/common';\nimport { CommonModule } from '@angular/common';\nimport { Component, computed, inject, model, signal, ViewEncapsulation } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { orderBy } from 'lodash-es';\nimport { AXPTemplateWidgetListItem } from './template.provider';\nimport { AXSideMenuModule } from '@acorex/components/side-menu';\nimport { AXTranslationModule } from '@acorex/core/translation';\n\nexport interface AXPDisplayWidgetProvided extends AXPTemplateWidgetListItem {\n pinned: boolean;\n}\n\nexport interface AXPCategoryDisplayModel {\n id: string;\n text: string;\n parentId?: string;\n hasChild: boolean;\n children?: AXPCategoryDisplayModel[];\n}\n\n@Component({\n imports: [\n CommonModule,\n FormsModule,\n //\n AXCommonModule,\n AXButtonModule,\n AXDecoratorModule,\n AXSearchBoxModule,\n AXSideMenuModule,\n AXTranslationModule\n ],\n templateUrl: './template-picker.component.html',\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./template-picker.component.scss']\n})\nexport class AXPTemplateWidgetPickerComponent extends AXBasePageComponent {\n private settingService = inject(AXPSettingService);\n private readonly lastSelectedCategoryKey = 'forms:templates:picker:lastSelectedCategory';\n\n protected override async ngOnInit() {\n super.ngOnInit();\n const pinnedWidgets = (await this.settingService.get<string[]>(this.pinnedSettingKey)) || [];\n this.displayWidgets.set(this.widgets.map((c) => ({ ...c, pinned: pinnedWidgets.includes(c.id), icon: c.icon ?? 'fa-solid fa-file-invoice' })));\n\n const lastSelectedCategoryId = await this.settingService.get<string>(this.lastSelectedCategoryKey);\n if (lastSelectedCategoryId) {\n const findCategory = (categories: AXPCategoryDisplayModel[], id: string): AXPCategoryDisplayModel | null => {\n for (const category of categories) {\n if (category.id === id) return category;\n if (category.children) {\n const found = findCategory(category.children, id);\n if (found) return found;\n }\n }\n return null;\n };\n const lastSelectedCategory = findCategory(this.displayCategories(), lastSelectedCategoryId);\n if (lastSelectedCategory) {\n this.selectedCategory.set(lastSelectedCategory);\n }\n }\n }\n\n protected isExpanded(item: AXPCategoryDisplayModel): boolean {\n const selectedCategory = this.selectedCategory();\n if (!selectedCategory) return false;\n\n const isParent = (category: AXPCategoryDisplayModel, targetId: string): boolean => {\n if (category.id === targetId) return true;\n if (category.children) {\n return category.children.some(child => isParent(child, targetId));\n }\n return false;\n };\n\n return isParent(item, selectedCategory.id);\n }\n\n\n private readonly pinnedSettingKey = 'forms:templates:picker:pinned';\n\n protected searchTerm = model('');\n\n // Signals\n private widgets: AXPDisplayWidgetProvided[] = [];\n private displayWidgets = signal<AXPDisplayWidgetProvided[]>([]);\n\n // Signal to track selected widgets\n protected selectedWidgets = signal<AXPDisplayWidgetProvided[]>([]);\n\n // Computed for filtered and ordered widget list\n private orderedList = computed(() => {\n const search = this.searchTerm().toLowerCase();\n const selectedCategory = this.selectedCategory();\n const selectedCategoryId = selectedCategory ? selectedCategory.id : null;\n\n const filterByCategory = (widget: AXPDisplayWidgetProvided) => {\n if (!selectedCategoryId) return true;\n const categoryIds = [selectedCategoryId, ...(selectedCategory?.children?.map(c => c.id) || [])];\n return categoryIds.includes(widget.group.name);\n };\n\n return orderBy(\n this.displayWidgets().filter((w) => {\n const matchesCategory = filterByCategory(w);\n const matchesSearch =\n !search || w.title.toLowerCase().includes(search) || w.description?.toLowerCase().includes(search);\n return matchesCategory && matchesSearch;\n }),\n ['pinned', 'title'],\n ['desc', 'asc']\n );\n });\n\n // Pinned and regular lists\n protected pinnedList = computed(() => this.orderedList().filter((c) => c.pinned));\n protected regularList = computed(() => this.orderedList().filter((c) => !c.pinned));\n\n\n protected currentTabIndex = signal(0);\n\n\n // protected override async ngOnInit() {\n // super.ngOnInit();\n // const pinnedWidgets = (await this.settingService.get<string[]>(this.pinnedSettingKey)) || [];\n // this.displayWidgets.set(this.widgets.map((c) => ({ ...c, pinned: pinnedWidgets.includes(c.id), icon: c.icon ?? 'fa-solid fa-file-invoice' })));\n // }\n\n protected handleTabChange(event: AXTabStripChangedEvent): void {\n const indx = event.index;\n if (this.currentTabIndex() != indx) {\n this.currentTabIndex.set(indx);\n }\n }\n\n protected handleClick(event: MouseEvent, widget: AXPDisplayWidgetProvided) {\n if (event.ctrlKey) {\n const currentSelection = this.selectedWidgets();\n const isAlreadySelected = currentSelection.some((w) => w === widget);\n\n if (isAlreadySelected) {\n // Deselect widget if already selected\n this.selectedWidgets.set(currentSelection.filter((w) => w !== widget));\n } else {\n // Add widget to selection\n this.selectedWidgets.set([...currentSelection, widget]);\n }\n } else {\n // If CTRL is not pressed, select only the clicked widget\n this.close({ widgets: [widget] });\n }\n }\n\n protected async handlePinClick(e: MouseEvent, widget: AXPDisplayWidgetProvided) {\n e.stopPropagation();\n widget.pinned = !widget.pinned;\n // Get the current list of pinned widgets from settings\n let pinnedWidgets = (await this.settingService.get<string[]>(this.pinnedSettingKey)) || [];\n\n // Update the list of pinned widgets based on the pinned status\n if (widget.pinned) {\n if (!pinnedWidgets.includes(widget.id)) {\n pinnedWidgets.push(widget.id);\n }\n } else {\n pinnedWidgets = pinnedWidgets.filter((name) => name !== widget.id);\n }\n\n // Save the updated list of pinned widgets\n await this.settingService.scope(AXPSettingScope.User).set(this.pinnedSettingKey, pinnedWidgets);\n\n // Trigger a re-render of the widgets\n this.displayWidgets.set([...this.displayWidgets()]);\n }\n\n // Check if a widget is selected\n protected isWidgetSelected(widget: AXPDisplayWidgetProvided): boolean {\n return this.selectedWidgets().includes(widget);\n }\n\n protected handleConfirmSelection(): void {\n this.close({ widgets: this.selectedWidgets() });\n }\n\n\n //#region Category Tree\n\n private categories: any[] = [];\n\n protected displayCategories = computed<AXPCategoryDisplayModel[]>(() => {\n const map = (node: any): AXPCategoryDisplayModel => {\n const children = this.categories.filter(i => i.parentId == node.id).map(map);\n return {\n id: node.id,\n text: node.title,\n parentId: node.parentId,\n hasChild: children.length > 0,\n children: children\n } as AXPCategoryDisplayModel\n }\n return this.categories.filter(c => !c.parentId).map(map);\n });\n\n\n protected selectedCategory = signal<AXPCategoryDisplayModel | null>(null);\n\n protected handleMenuItemClick(item: AXPCategoryDisplayModel) {\n this.selectedCategory.set(item);\n this.settingService.scope(AXPSettingScope.User).set(this.lastSelectedCategoryKey, item.id);\n }\n\n //#end region\n}\n","<div class=\"ax-flex ax-flex-col lg:ax-h-[60vh]\">\n <div class=\"ax-p-2 ax-surface-lowest ax-border-b ax-flex-none\">\n <ax-search-box look=\"fill\" placeholder=\"e.g. Button, Text, ...\" class=\"ax-sm\" [(ngModel)]=\"searchTerm\"\n [delayTime]=\"300\" [axAutoFocus]=\"true\">\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\n <div class=\"ax-flex ax-flex-grow ax-h-full \">\n <div\n class=\"ax-flex ax-h-full ax-overflow-auto ax-w-1/3 ax-justify-start ax-items-start ax-surface-lowest ax-border-e \">\n <ax-side-menu look=\"pills\" [look]=\"'with-line-color'\" [location]=\"'start'\">\n <ng-container *ngFor=\"let item of displayCategories()\" [ngTemplateOutlet]=\"recursiveMenu\"\n [ngTemplateOutletContext]=\"{ item: item }\">\n </ng-container>\n </ax-side-menu>\n <ng-template #recursiveMenu let-item=\"item\">\n <ax-side-menu-item [active]=\"item ===selectedCategory()\" (onClick)=\"handleMenuItemClick(item)\"\n [isCollapsed]=\"!isExpanded(item)\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-folder ax-text-yellow-500 fa-fw\"></ax-icon>\n </ax-prefix>\n <span>{{ item.text | translate | async }}</span>\n <ng-container *ngIf=\"item.hasChild\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"recursiveMenu\"\n [ngTemplateOutletContext]=\"{ item: child }\">\n </ng-container>\n </ng-container>\n </ax-side-menu-item>\n </ng-template>\n </div>\n <div class=\"ax-flex ax-h-full ax-overflow-auto ax-flex-col ax-w-2/3 \">\n <div class=\"ax-flex ax-flex-col ax-p-4\">\n <ng-template #itemTpl let-w>\n <div (click)=\"handleClick($event, w)\"\n class=\"ax-py-2 ax-px-3 ax-rounded-md ax-flex ax-gap-3 ax-items-center ax-group hover:ax-bg-primary-100 dark:hover:ax-bg-primary-800 ax-cursor-pointer\"\n [class.ax-bg-primary-100]=\"isWidgetSelected(w)\">\n <div\n class=\"ax-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-rounded-md ax-border ax-border-neutral-200 ax-text-neutral-500 ax-bg-on-surface group-hover:ax-bg-primary-200\"\n [class.ax-bg-primary-200]=\"isWidgetSelected(w)\">\n <i [ngClass]=\"w.icon\" class=\"ax-text-lg group-hover:ax-text-primary-700 ax-text-on-surface-fore\"\n [class.ax-text-primary-700]=\"isWidgetSelected(w)\"></i>\n </div>\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-flex-1\">\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <div class=\"ax-font-semibold ax-text-sm\">{{ w.title }}</div>\n <div (click)=\"handlePinClick($event, w)\">\n @if (w.pinned) {\n <i class=\"fa-solid fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45\"></i>\n } @else {\n <i\n class=\"fa-light fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45 ax-invisible group-hover:ax-visible\"></i>\n }\n </div>\n </div>\n <span class=\"ax-text-xs ax-text-neutral-400 ax-truncate\">\n {{ w.description }}\n </span>\n </div>\n </div>\n </ng-template>\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2\">\n @for(w of pinnedList();track $index) {\n <ng-container *ngTemplateOutlet=\"itemTpl; context: { $implicit: w }\"></ng-container>\n }\n </div>\n @if(pinnedList().length) {\n <hr class=\"ax-my-4 ax-border-dashed\" />\n }\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2\">\n @for(w of regularList();track $index) {\n <ng-container *ngTemplateOutlet=\"itemTpl; context: { $implicit: w }\"></ng-container>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n\n@if(selectedWidgets().length) {\n<ax-footer>\n <ax-suffix>\n <ax-button look=\"solid\" color=\"primary\" text=\"{{ selectedWidgets().length }} Selected\"\n (onClick)=\"handleConfirmSelection()\"></ax-button>\n </ax-suffix>\n</ax-footer>\n}"],"names":["i8"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2CM,MAAO,gCAAiC,SAAQ,mBAAmB,CAAA;AAhBzE,IAAA,WAAA,GAAA;;AAiBU,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;QACjC,IAAuB,CAAA,uBAAA,GAAG,6CAA6C;QA0CvE,IAAgB,CAAA,gBAAA,GAAG,+BAA+B;AAEzD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC;;QAGxB,IAAO,CAAA,OAAA,GAA+B,EAAE;AACxC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAA6B,EAAE,CAAC;;AAGrD,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAA6B,EAAE,CAAC;;AAG1D,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;YAClC,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,WAAW,EAAE;AAC9C,YAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAE;AAChD,YAAA,MA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B,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,IAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAMV,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAhB5C,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACP,YAAY;wBACZ,WAAW;;wBAEX,cAAc;wBACd,cAAc;wBACd,iBAAiB;wBACjB,iBAAiB;wBACjB,gBAAgB;wBAChB;qBACD,EAEc,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,2pIAAA,EAAA,MAAA,EAAA,CAAA,4VAAA,CAAA,EAAA;;;;;"}
|
@@ -1,30 +1,26 @@
|
|
1
|
-
import * as i3 from '@acorex/core/translation';
|
2
1
|
import { AXTranslationModule } from '@acorex/core/translation';
|
3
2
|
import * as i2 from '@acorex/platform/layout/builder';
|
4
3
|
import { AXPWidgetComponent, AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';
|
5
|
-
import * as i1 from '@angular/common';
|
6
4
|
import { CommonModule } from '@angular/common';
|
7
5
|
import * as i0 from '@angular/core';
|
8
6
|
import { inject, computed, signal, effect, Component, ChangeDetectionStrategy } from '@angular/core';
|
9
|
-
import {
|
10
|
-
import { d as AXPTemplateWidgetProviderService } from './acorex-modules-form-template-management-acorex-modules-form-template-management-BTQ4VpFG.mjs';
|
7
|
+
import { d as AXPTemplateWidgetProviderService } from './acorex-modules-form-template-management-acorex-modules-form-template-management-szDh56Bk.mjs';
|
11
8
|
|
12
9
|
class AXPTemplateWidgetEditComponent extends AXPWidgetComponent {
|
10
|
+
// protected allowRemove = computed<boolean>(() => this.options()['allowRemove'] as boolean ?? false);
|
11
|
+
// protected showRemove = computed(() => {
|
12
|
+
// return this.allowRemove() && this.parent?.config.name != 'template';
|
13
|
+
// });
|
13
14
|
constructor() {
|
14
15
|
super();
|
15
16
|
this.metaKey = '__meta__';
|
16
17
|
this.templateProvider = inject(AXPTemplateWidgetProviderService);
|
17
18
|
this.templateId = computed(() => this.options()['templateId']);
|
18
19
|
this.nodes = signal([]);
|
19
|
-
this.allowRemove = computed(() => this.options()['allowRemove'] ?? false);
|
20
|
-
this.showRemove = computed(() => {
|
21
|
-
return this.allowRemove() && this.parent?.config.name != 'template';
|
22
|
-
});
|
23
20
|
//
|
24
21
|
effect(async () => {
|
25
22
|
this.nodes.set([]);
|
26
|
-
const
|
27
|
-
const templateId = get(value, `${this.metaKey}.templateId`) ?? this.templateId();
|
23
|
+
const templateId = this.templateId();
|
28
24
|
if (templateId) {
|
29
25
|
const item = await this.templateProvider.get(templateId);
|
30
26
|
if (item) {
|
@@ -33,33 +29,20 @@ class AXPTemplateWidgetEditComponent extends AXPWidgetComponent {
|
|
33
29
|
}
|
34
30
|
});
|
35
31
|
}
|
36
|
-
async handleSelectClick() {
|
37
|
-
const result = await this.templateProvider.chooseTemplate();
|
38
|
-
if (result) {
|
39
|
-
this.setOptions({ templateId: result.id });
|
40
|
-
const value = this.getValue() ?? {};
|
41
|
-
set(value, this.metaKey, { templateId: result.id });
|
42
|
-
this.setValue(value);
|
43
|
-
}
|
44
|
-
}
|
45
|
-
async handleRemoveClick() {
|
46
|
-
this.setOptions({ templateId: null });
|
47
|
-
this.setValue(null);
|
48
|
-
}
|
49
32
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
50
33
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTemplateWidgetEditComponent, isStandalone: true, selector: "axp-template-widget-edit", usesInheritance: true, ngImport: i0, template: `
|
51
|
-
|
34
|
+
@for (node of nodes(); track $index) {
|
35
|
+
<ng-container axp-widget-renderer
|
36
|
+
[node]="node"
|
37
|
+
[parentNode]="this"
|
38
|
+
[mode]="this.mode">
|
39
|
+
</ng-container>
|
40
|
+
}
|
41
|
+
<!-- @if(nodes().length>0) {
|
52
42
|
<ng-container>
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
[parentNode]="this"
|
57
|
-
[mode]="this.mode"
|
58
|
-
>
|
59
|
-
</ng-container>
|
60
|
-
}
|
61
|
-
</ng-container>
|
62
|
-
@if(showRemove())
|
43
|
+
|
44
|
+
</ng-container> -->
|
45
|
+
<!-- @if(showRemove())
|
63
46
|
{
|
64
47
|
<div
|
65
48
|
class="ax-text-danger-500 hover:ax-text-danger-800 ax-mt-2 ax-text-xs ax-cursor-pointer"
|
@@ -76,26 +59,26 @@ class AXPTemplateWidgetEditComponent extends AXPWidgetComponent {
|
|
76
59
|
>
|
77
60
|
{{ 'choose-template' | translate : { scope: 'form-template-management' } | async }}
|
78
61
|
</span>
|
79
|
-
}
|
80
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "
|
62
|
+
} -->
|
63
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "directive", type: i2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
81
64
|
}
|
82
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetEditComponent, decorators: [{
|
83
66
|
type: Component,
|
84
67
|
args: [{
|
85
68
|
selector: 'axp-template-widget-edit',
|
86
69
|
template: `
|
87
|
-
|
70
|
+
@for (node of nodes(); track $index) {
|
71
|
+
<ng-container axp-widget-renderer
|
72
|
+
[node]="node"
|
73
|
+
[parentNode]="this"
|
74
|
+
[mode]="this.mode">
|
75
|
+
</ng-container>
|
76
|
+
}
|
77
|
+
<!-- @if(nodes().length>0) {
|
88
78
|
<ng-container>
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
[parentNode]="this"
|
93
|
-
[mode]="this.mode"
|
94
|
-
>
|
95
|
-
</ng-container>
|
96
|
-
}
|
97
|
-
</ng-container>
|
98
|
-
@if(showRemove())
|
79
|
+
|
80
|
+
</ng-container> -->
|
81
|
+
<!-- @if(showRemove())
|
99
82
|
{
|
100
83
|
<div
|
101
84
|
class="ax-text-danger-500 hover:ax-text-danger-800 ax-mt-2 ax-text-xs ax-cursor-pointer"
|
@@ -112,7 +95,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
112
95
|
>
|
113
96
|
{{ 'choose-template' | translate : { scope: 'form-template-management' } | async }}
|
114
97
|
</span>
|
115
|
-
}
|
98
|
+
} -->
|
116
99
|
`,
|
117
100
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
118
101
|
imports: [CommonModule, AXPLayoutBuilderModule, AXTranslationModule]
|
@@ -120,4 +103,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
120
103
|
}], ctorParameters: () => [] });
|
121
104
|
|
122
105
|
export { AXPTemplateWidgetEditComponent };
|
123
|
-
//# sourceMappingURL=acorex-modules-form-template-management-template-widget-edit.component
|
106
|
+
//# sourceMappingURL=acorex-modules-form-template-management-template-widget-edit.component--MGoF75g.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-form-template-management-template-widget-edit.component--MGoF75g.mjs","sources":["../../../../libs/modules/form-template-management/src/lib/features/designer/widgets/template/template-widget-edit.component.ts"],"sourcesContent":["import { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPLayoutBuilderModule, AXPWidgetComponent, AXPWidgetNode } from '@acorex/platform/layout/builder';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal, untracked } from '@angular/core';\nimport { get, set } from 'lodash-es';\nimport { AXPTemplateWidgetProviderService } from '../template-picker/template.provider';\n\n@Component({\n selector: 'axp-template-widget-edit',\n template: `\n @for (node of nodes(); track $index) {\n <ng-container axp-widget-renderer\n [node]=\"node\"\n [parentNode]=\"this\"\n [mode]=\"this.mode\">\n </ng-container>\n }\n <!-- @if(nodes().length>0) {\n <ng-container>\n \n </ng-container> -->\n <!-- @if(showRemove())\n {\n <div\n class=\"ax-text-danger-500 hover:ax-text-danger-800 ax-mt-2 ax-text-xs ax-cursor-pointer\"\n (click)=\"handleRemoveClick()\"\n >\n {{ 'remove-template' | translate : { scope: 'form-template-management' } | async }}\n </div>\n }\n } \n @else {\n <span\n class=\"ax-underline ax-decoration-dotted ax-underline-offset-8 hover:ax-text-primary-500 ax-cursor-pointer\"\n (click)=\"handleSelectClick()\"\n >\n {{ 'choose-template' | translate : { scope: 'form-template-management' } | async }}\n </span>\n } -->\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXPLayoutBuilderModule, AXTranslationModule]\n})\nexport class AXPTemplateWidgetEditComponent extends AXPWidgetComponent<any> {\n private metaKey = '__meta__';\n\n private templateProvider = inject(AXPTemplateWidgetProviderService);\n protected templateId = computed<string>(() => this.options()['templateId'] as string);\n protected nodes = signal<AXPWidgetNode[]>([]);\n // protected allowRemove = computed<boolean>(() => this.options()['allowRemove'] as boolean ?? false);\n\n\n // protected showRemove = computed(() => {\n // return this.allowRemove() && this.parent?.config.name != 'template';\n // });\n\n constructor() {\n super();\n //\n effect(\n async () => {\n this.nodes.set([]);\n const templateId = this.templateId();\n if (templateId) {\n const item = await this.templateProvider.get(templateId);\n if (item) {\n this.nodes.set(item.nodes);\n }\n }\n }\n );\n }\n\n //TODO: make a new widget to handle select widget in edit mode\n // protected async handleSelectClick() {\n // const result = await this.templateProvider.chooseTemplate();\n // if (result) {\n // this.setOptions({ templateId: result.id });\n // const value = this.getValue() ?? {};\n // set(value, this.metaKey, { templateId: result.id });\n // this.setValue(value);\n // }\n // }\n\n // protected async handleRemoveClick() {\n // this.setOptions({ templateId: null });\n // this.setValue(null);\n // }\n}\n"],"names":["i1"],"mappings":";;;;;;;;AA2CM,MAAO,8BAA+B,SAAQ,kBAAuB,CAAA;;;;;AAazE,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAbD,IAAO,CAAA,OAAA,GAAG,UAAU;AAEpB,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACzD,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAS,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,YAAY,CAAW,CAAC;AAC3E,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAkB,EAAE,CAAC;;QAW3C,MAAM,CACJ,YAAW;AACT,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;AAClB,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE;YACpC,IAAI,UAAU,EAAE;gBACd,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAU,CAAC;gBACxD,IAAI,IAAI,EAAE;oBACR,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;;;AAGhC,SAAC,CACF;;8GA3BQ,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,EAlC/B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAES,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,sBAAsB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,0BAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,OAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAExD,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBApC1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,sBAAsB,EAAE,mBAAmB;AACpE,iBAAA;;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AXPEntityQueryType, AXPEntityCommandScope, createAllQueryView, createQueryView } from '@acorex/platform/common';
|
2
2
|
import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
3
|
-
import { a as AXMFormTemplateManagementTemplateEntityService, R as RootConfig, b as AXMFormTemplateTypes } from './acorex-modules-form-template-management-acorex-modules-form-template-management-
|
3
|
+
import { a as AXMFormTemplateManagementTemplateEntityService, R as RootConfig, b as AXMFormTemplateTypes } from './acorex-modules-form-template-management-acorex-modules-form-template-management-szDh56Bk.mjs';
|
4
4
|
|
5
5
|
async function factory(injector) {
|
6
6
|
const dataService = injector.get(AXMFormTemplateManagementTemplateEntityService);
|
@@ -127,12 +127,12 @@ async function factory(injector) {
|
|
127
127
|
groupId: 'section',
|
128
128
|
schema: {
|
129
129
|
dataType: 'string',
|
130
|
+
defaultValue: AXMFormTemplateTypes.Form,
|
130
131
|
interface: {
|
131
132
|
type: AXPWidgetsCatalog.select,
|
132
133
|
options: {
|
133
134
|
valueField: 'id',
|
134
135
|
textField: 'title',
|
135
|
-
defaultValue: AXMFormTemplateTypes.Form,
|
136
136
|
dataSource: [AXMFormTemplateTypes.Form, AXMFormTemplateTypes.Widget],
|
137
137
|
multiple: false,
|
138
138
|
},
|
@@ -494,4 +494,4 @@ async function factory(injector) {
|
|
494
494
|
}
|
495
495
|
|
496
496
|
export { factory };
|
497
|
-
//# sourceMappingURL=acorex-modules-form-template-management-template.entity-
|
497
|
+
//# sourceMappingURL=acorex-modules-form-template-management-template.entity-JvWcqjzi.mjs.map
|