@acorex/modules 20.2.2 → 20.2.4-next.0
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/common/index.d.ts +16 -8
- package/content-management/index.d.ts +48 -3
- package/document-management/index.d.ts +27 -24
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-CdZ9BHOa.mjs → acorex-modules-auth-acorex-modules-auth-C8p1VeqM.mjs} +10 -10
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-CdZ9BHOa.mjs.map → acorex-modules-auth-acorex-modules-auth-C8p1VeqM.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-app-chooser.component-D4ehfpnB.mjs → acorex-modules-auth-app-chooser.component-CDKLbD_u.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-D4ehfpnB.mjs.map → acorex-modules-auth-app-chooser.component-CDKLbD_u.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-BHRC357P.mjs → acorex-modules-auth-login.module-DGPRxnXo.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-BHRC357P.mjs.map → acorex-modules-auth-login.module-DGPRxnXo.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-DAYMmpBW.mjs → acorex-modules-auth-master.layout-BNFGuQQs.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-DAYMmpBW.mjs.map → acorex-modules-auth-master.layout-BNFGuQQs.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-B0Q3w45s.mjs → acorex-modules-auth-oauth-callback.component-B3sSFdOA.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-B0Q3w45s.mjs.map → acorex-modules-auth-oauth-callback.component-B3sSFdOA.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-BJpxtJYh.mjs → acorex-modules-auth-password.component-Dyox9sR4.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-BJpxtJYh.mjs.map → acorex-modules-auth-password.component-Dyox9sR4.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth-password.component-ln2kDKPR.mjs +226 -0
- package/fesm2022/acorex-modules-auth-password.component-ln2kDKPR.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-routes-hvqL2dCH.mjs → acorex-modules-auth-routes-7vr8T08D.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-hvqL2dCH.mjs.map → acorex-modules-auth-routes-7vr8T08D.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-kPuT8yUw.mjs → acorex-modules-auth-two-factor.module-D6XCUP_A.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-kPuT8yUw.mjs.map → acorex-modules-auth-two-factor.module-D6XCUP_A.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-user-sessions.component-Chx_jTSJ.mjs → acorex-modules-auth-user-sessions.component-B5aBDmdR.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-user-sessions.component-Chx_jTSJ.mjs.map → acorex-modules-auth-user-sessions.component-B5aBDmdR.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-calendar-management.mjs +1 -1
- package/fesm2022/acorex-modules-calendar-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-common.mjs +503 -235
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-content-management.mjs +378 -457
- package/fesm2022/acorex-modules-content-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-conversation.mjs +119 -4
- package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
- package/fesm2022/acorex-modules-dashboard-management.mjs +9 -9
- package/fesm2022/acorex-modules-dashboard-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-data-management.mjs +0 -1
- package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-C4G6L94e.mjs → acorex-modules-document-management-acorex-modules-document-management-D9oPjJnn.mjs} +875 -142
- package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-D9oPjJnn.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-attachment-widget.component-CbDcYxEZ.mjs → acorex-modules-document-management-attachment-widget.component-CcWvTWv0.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-attachment-widget.component-CbDcYxEZ.mjs.map → acorex-modules-document-management-attachment-widget.component-CcWvTWv0.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-create-folder-dialog.component-BCs4aZKn.mjs → acorex-modules-document-management-create-folder-dialog.component-DPFIPNE_.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-create-folder-dialog.component-BCs4aZKn.mjs.map → acorex-modules-document-management-create-folder-dialog.component-DPFIPNE_.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-details-view.component-v1VroVv-.mjs → acorex-modules-document-management-details-view.component-BKNvUhdl.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-details-view.component-v1VroVv-.mjs.map → acorex-modules-document-management-details-view.component-BKNvUhdl.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management-document-send-to-review-popup.component-CtpLvPIr.mjs +116 -0
- package/fesm2022/acorex-modules-document-management-document-send-to-review-popup.component-CtpLvPIr.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-C5gJtH7_.mjs → acorex-modules-document-management-drive-choose.component-BOPjvKlN.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-C5gJtH7_.mjs.map → acorex-modules-document-management-drive-choose.component-BOPjvKlN.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-drive.component-D5OwpnAP.mjs → acorex-modules-document-management-drive.component-DutBXTtm.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-drive.component-D5OwpnAP.mjs.map → acorex-modules-document-management-drive.component-DutBXTtm.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-DkHt-dTD.mjs → acorex-modules-document-management-large-icons-view.component-DX2_xsbq.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-DkHt-dTD.mjs.map → acorex-modules-document-management-large-icons-view.component-DX2_xsbq.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-D2nA00k3.mjs → acorex-modules-document-management-large-tiles-view.component-CshjCgG5.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-D2nA00k3.mjs.map → acorex-modules-document-management-large-tiles-view.component-CshjCgG5.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-list-view.component-RaW67V7O.mjs → acorex-modules-document-management-list-view.component-DdLTVccZ.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-list-view.component-RaW67V7O.mjs.map → acorex-modules-document-management-list-view.component-DdLTVccZ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-meta-choose-popup.component-BZu8EbTh.mjs → acorex-modules-document-management-meta-choose-popup.component-BomZu2bT.mjs} +2 -2
- package/fesm2022/acorex-modules-document-management-meta-choose-popup.component-BomZu2bT.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-permission-definition.provider-B6nu7fmX.mjs → acorex-modules-document-management-permission-definition.provider-_AXz3sdF.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-permission-definition.provider-B6nu7fmX.mjs.map → acorex-modules-document-management-permission-definition.provider-_AXz3sdF.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component--6V1Zaoz.mjs → acorex-modules-document-management-rename-node-dialog.component-DZRAXwFy.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component--6V1Zaoz.mjs.map → acorex-modules-document-management-rename-node-dialog.component-DZRAXwFy.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-Cl1MKsX9.mjs → acorex-modules-document-management-small-icons-view.component-DG3AbQJO.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-Cl1MKsX9.mjs.map → acorex-modules-document-management-small-icons-view.component-DG3AbQJO.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-xoO1Loxt.mjs → acorex-modules-document-management-small-tiles-view.component-Cx9jczo-.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-xoO1Loxt.mjs.map → acorex-modules-document-management-small-tiles-view.component-Cx9jczo-.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management.mjs +1 -1
- package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-CeQnu6WW.mjs → acorex-modules-form-template-management-acorex-modules-form-template-management-CLSHVjDE.mjs} +34 -12
- package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-CLSHVjDE.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-category.entity-DmrE2Pfz.mjs → acorex-modules-form-template-management-category.entity-BBjVWSJ_.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-category.entity-DmrE2Pfz.mjs.map → acorex-modules-form-template-management-category.entity-BBjVWSJ_.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-permission-definition.provider-CfOa446m.mjs → acorex-modules-form-template-management-permission-definition.provider-I8BY9RVh.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-permission-definition.provider-CfOa446m.mjs.map → acorex-modules-form-template-management-permission-definition.provider-I8BY9RVh.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-settings.provider-hLlHnm-I.mjs → acorex-modules-form-template-management-settings.provider-B8ip0Ou_.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-settings.provider-hLlHnm-I.mjs.map → acorex-modules-form-template-management-settings.provider-B8ip0Ou_.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template-picker.component-bxYZqmYR.mjs → acorex-modules-form-template-management-template-picker.component-BNM3RyDv.mjs} +2 -3
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-BNM3RyDv.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-D_Ys5kRT.mjs → acorex-modules-form-template-management-template-widget-edit.component-DFfvdZqJ.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-D_Ys5kRT.mjs.map → acorex-modules-form-template-management-template-widget-edit.component-DFfvdZqJ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template.entity-CvlwS8TY.mjs → acorex-modules-form-template-management-template.entity-BCpgfVMz.mjs} +10 -14
- package/fesm2022/acorex-modules-form-template-management-template.entity-BCpgfVMz.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-CE13nuke.mjs → acorex-modules-form-template-management-viewer-popup.component-DDfjwbrL.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-CE13nuke.mjs.map → acorex-modules-form-template-management-viewer-popup.component-DDfjwbrL.mjs.map} +1 -1
- package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
- package/fesm2022/{acorex-modules-issue-management-acorex-modules-issue-management-CTFlKzqy.mjs → acorex-modules-help-desk-acorex-modules-help-desk-CAibWOZT.mjs} +77 -36
- package/fesm2022/acorex-modules-help-desk-acorex-modules-help-desk-CAibWOZT.mjs.map +1 -0
- package/fesm2022/acorex-modules-help-desk-capture-screen.component-BSBozesT.mjs +28 -0
- package/fesm2022/acorex-modules-help-desk-capture-screen.component-BSBozesT.mjs.map +1 -0
- package/fesm2022/acorex-modules-help-desk.mjs +2 -0
- package/fesm2022/acorex-modules-help-desk.mjs.map +1 -0
- package/fesm2022/acorex-modules-identifier-management.mjs +81 -39
- package/fesm2022/acorex-modules-identifier-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-location-management.mjs +4 -3
- package/fesm2022/acorex-modules-location-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-log-management.mjs +0 -1
- package/fesm2022/acorex-modules-log-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-meeting-management-meeting-publish-popup.component-PcBFprq3.mjs +121 -0
- package/fesm2022/acorex-modules-meeting-management-meeting-publish-popup.component-PcBFprq3.mjs.map +1 -0
- package/fesm2022/acorex-modules-meeting-management.mjs +2899 -0
- package/fesm2022/acorex-modules-meeting-management.mjs.map +1 -0
- package/fesm2022/acorex-modules-notification-management-notification-page.component-TLxLpxzE.mjs +544 -0
- package/fesm2022/acorex-modules-notification-management-notification-page.component-TLxLpxzE.mjs.map +1 -0
- package/fesm2022/acorex-modules-notification-management.mjs +145 -126
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-organization-management-employee.entity-CSY_U9Bl.mjs → acorex-modules-organization-management-employee.entity-CRc2YjNR.mjs} +114 -68
- package/fesm2022/acorex-modules-organization-management-employee.entity-CRc2YjNR.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management.mjs +22 -1
- package/fesm2022/acorex-modules-organization-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-party-management-acorex-modules-party-management-B8X8tXFw.mjs → acorex-modules-party-management-acorex-modules-party-management-BUc-9XOG.mjs} +6 -6
- package/fesm2022/{acorex-modules-party-management-acorex-modules-party-management-B8X8tXFw.mjs.map → acorex-modules-party-management-acorex-modules-party-management-BUc-9XOG.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-party-management-party-identifier-type.entity-b8aNBCpT.mjs → acorex-modules-party-management-party-identifier-type.entity-Bgq-y9TN.mjs} +2 -2
- package/fesm2022/{acorex-modules-party-management-party-identifier-type.entity-b8aNBCpT.mjs.map → acorex-modules-party-management-party-identifier-type.entity-Bgq-y9TN.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-party-management-party-identifier.entity-B_5MSDF1.mjs → acorex-modules-party-management-party-identifier.entity-CP47qbc-.mjs} +12 -10
- package/fesm2022/acorex-modules-party-management-party-identifier.entity-CP47qbc-.mjs.map +1 -0
- package/fesm2022/{acorex-modules-party-management-party-relationship.entity-CLAAuCde.mjs → acorex-modules-party-management-party-relationship.entity-pGea5plN.mjs} +2 -2
- package/fesm2022/{acorex-modules-party-management-party-relationship.entity-CLAAuCde.mjs.map → acorex-modules-party-management-party-relationship.entity-pGea5plN.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-party-management-party-role.entity-C5BeakjX.mjs → acorex-modules-party-management-party-role.entity-CDt7Rxu7.mjs} +7 -7
- package/fesm2022/acorex-modules-party-management-party-role.entity-CDt7Rxu7.mjs.map +1 -0
- package/fesm2022/{acorex-modules-party-management-party.entity-Blwg8o3o.mjs → acorex-modules-party-management-party.entity-DAvqOPic.mjs} +4 -4
- package/fesm2022/acorex-modules-party-management-party.entity-DAvqOPic.mjs.map +1 -0
- package/fesm2022/acorex-modules-party-management.mjs +1 -1
- package/fesm2022/{acorex-modules-platform-management-list-version.component-DTfLeVbH.mjs → acorex-modules-platform-management-list-version.component-kFe_wuWc.mjs} +3 -3
- package/fesm2022/{acorex-modules-platform-management-list-version.component-DTfLeVbH.mjs.map → acorex-modules-platform-management-list-version.component-kFe_wuWc.mjs.map} +1 -1
- package/fesm2022/acorex-modules-platform-management.mjs +12 -232
- package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-project-management.mjs +98 -97
- package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-report-management-report-create-root.component-CPR6H1R1.mjs → acorex-modules-report-management-report-create-root.component-L-7aG8op.mjs} +2 -2
- package/fesm2022/acorex-modules-report-management-report-create-root.component-L-7aG8op.mjs.map +1 -0
- package/fesm2022/acorex-modules-report-management.mjs +1 -1
- package/fesm2022/acorex-modules-security-management.mjs +5 -5
- package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-settings-management-setting-page.component-BWXHxXwS.mjs → acorex-modules-settings-management-setting-page.component-D-NKWNvS.mjs} +11 -1
- package/fesm2022/acorex-modules-settings-management-setting-page.component-D-NKWNvS.mjs.map +1 -0
- package/fesm2022/acorex-modules-settings-management.mjs +1 -1
- package/fesm2022/{acorex-modules-workflow-management-task-board.page-2UTqXn3s.mjs → acorex-modules-task-management-task-board.page-DbpqZaC7.mjs} +16 -11
- package/fesm2022/acorex-modules-task-management-task-board.page-DbpqZaC7.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +3026 -2821
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-workflow-management.mjs +39 -1
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/form-template-management/index.d.ts +3 -0
- package/help-desk/README.md +3 -0
- package/{issue-management → help-desk}/index.d.ts +12 -12
- package/identifier-management/index.d.ts +15 -16
- package/meeting-management/README.md +29 -0
- package/meeting-management/index.d.ts +248 -0
- package/notification-management/index.d.ts +6 -4
- package/package.json +24 -20
- package/platform-management/index.d.ts +1 -12
- package/task-management/index.d.ts +34 -2
- package/workflow-management/index.d.ts +4 -33
- package/fesm2022/acorex-modules-auth-password.component-NAY46d_2.mjs +0 -226
- package/fesm2022/acorex-modules-auth-password.component-NAY46d_2.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-C4G6L94e.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-meta-choose-popup.component-BZu8EbTh.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-CeQnu6WW.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-bxYZqmYR.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template.entity-CvlwS8TY.mjs.map +0 -1
- package/fesm2022/acorex-modules-issue-management-acorex-modules-issue-management-CTFlKzqy.mjs.map +0 -1
- package/fesm2022/acorex-modules-issue-management-capture-screen.component-DDvum8EG.mjs +0 -28
- package/fesm2022/acorex-modules-issue-management-capture-screen.component-DDvum8EG.mjs.map +0 -1
- package/fesm2022/acorex-modules-issue-management.mjs +0 -2
- package/fesm2022/acorex-modules-issue-management.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-employee.entity-CSY_U9Bl.mjs.map +0 -1
- package/fesm2022/acorex-modules-party-management-party-identifier.entity-B_5MSDF1.mjs.map +0 -1
- package/fesm2022/acorex-modules-party-management-party-role.entity-C5BeakjX.mjs.map +0 -1
- package/fesm2022/acorex-modules-party-management-party.entity-Blwg8o3o.mjs.map +0 -1
- package/fesm2022/acorex-modules-platform-management-list-terms.component-B1gl5xfT.mjs +0 -93
- package/fesm2022/acorex-modules-platform-management-list-terms.component-B1gl5xfT.mjs.map +0 -1
- package/fesm2022/acorex-modules-report-management-report-create-root.component-CPR6H1R1.mjs.map +0 -1
- package/fesm2022/acorex-modules-settings-management-setting-page.component-BWXHxXwS.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-acorex-modules-workflow-management-BfE17ZXY.mjs +0 -244
- package/fesm2022/acorex-modules-workflow-management-acorex-modules-workflow-management-BfE17ZXY.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-task-board.page-2UTqXn3s.mjs.map +0 -1
- package/issue-management/README.md +0 -3
|
@@ -1,15 +1,39 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injector, Injectable, signal, Component, NgModule } from '@angular/core';
|
|
3
|
-
import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
4
|
-
import { AXPSearchCommandProvider, AXPFileStorageService, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, createAllQueryView, createQueryView, AXPEntityCommandScope, AXPEntityQueryType } from '@acorex/platform/common';
|
|
5
|
-
import { AXPEntityService, AXMEntityCrudServiceImpl, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
6
|
-
import * as
|
|
7
|
-
import { AXPComponentSlotModule } from '@acorex/platform/layout/components';
|
|
8
|
-
import { AXP_DATASOURCE_DEFINITION_PROVIDER } from '@acorex/platform/core';
|
|
2
|
+
import { inject, Injector, Injectable, signal, Component, NgModule, HostListener } from '@angular/core';
|
|
3
|
+
import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
4
|
+
import { AXPSearchCommandProvider, AXPFileStorageService, AXPSettingService, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, createAllQueryView, createQueryView, AXPEntityCommandScope, AXPEntityQueryType } from '@acorex/platform/common';
|
|
5
|
+
import { AXPEntityService, AXMEntityCrudServiceImpl, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_CONFIG_TOKEN } from '@acorex/platform/layout/entity';
|
|
6
|
+
import * as i3$1 from '@acorex/platform/layout/components';
|
|
7
|
+
import { AXPComponentSlotModule, AXPThemeLayoutBlockComponent } from '@acorex/platform/layout/components';
|
|
8
|
+
import { AXPPlatformScope, AXPAppStartUpService, AXP_DATASOURCE_DEFINITION_PROVIDER } from '@acorex/platform/core';
|
|
9
9
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
10
10
|
import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
|
11
11
|
import { AXSafePipe } from '@acorex/core/pipes';
|
|
12
|
+
import { ROUTES } from '@angular/router';
|
|
13
|
+
import * as i2$1 from '@acorex/platform/workflow';
|
|
14
|
+
import { AXPWorkflowAction, AXPWorkflowService, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
15
|
+
import { AXPopupService } from '@acorex/components/popup';
|
|
16
|
+
import * as i4 from '@acorex/components/button';
|
|
17
|
+
import { AXButtonModule } from '@acorex/components/button';
|
|
18
|
+
import * as i2 from '@acorex/components/check-box';
|
|
19
|
+
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
|
20
|
+
import * as i3 from '@acorex/components/decorators';
|
|
21
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
22
|
+
import * as i1 from '@acorex/components/label';
|
|
23
|
+
import { AXLabelModule } from '@acorex/components/label';
|
|
24
|
+
import { AXBasePageComponent } from '@acorex/components/page';
|
|
25
|
+
import * as i6 from '@acorex/core/translation';
|
|
26
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
|
27
|
+
import * as i5 from '@angular/common';
|
|
28
|
+
import { CommonModule } from '@angular/common';
|
|
12
29
|
import { AXPWidgetsList } from '@acorex/modules/common';
|
|
30
|
+
import * as i3$2 from '@acorex/cdk/outline';
|
|
31
|
+
import { AXOutlineModule } from '@acorex/cdk/outline';
|
|
32
|
+
import * as i2$2 from '@acorex/components/side-menu';
|
|
33
|
+
import { AXSideMenuModule } from '@acorex/components/side-menu';
|
|
34
|
+
import * as i5$1 from '@acorex/core/format';
|
|
35
|
+
import { AXFormatModule } from '@acorex/core/format';
|
|
36
|
+
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
|
|
13
37
|
|
|
14
38
|
const config = {
|
|
15
39
|
i18n: 'content-management',
|
|
@@ -49,16 +73,23 @@ const RootConfig = {
|
|
|
49
73
|
class AXMMenuProvider {
|
|
50
74
|
constructor() {
|
|
51
75
|
this.entityService = inject(AXPEntityService);
|
|
76
|
+
this.sessionService = inject(AXPSessionService);
|
|
52
77
|
}
|
|
53
78
|
async provide(context) {
|
|
54
79
|
const scope = RootConfig.config.i18n;
|
|
55
80
|
const module = RootConfig.module;
|
|
81
|
+
const appName = this.sessionService.application?.name;
|
|
56
82
|
context.addItems([
|
|
57
83
|
{
|
|
58
84
|
priority: 9002,
|
|
59
85
|
text: `t('module-name', {scope:"${scope}"})`,
|
|
60
86
|
icon: module.icon,
|
|
61
87
|
name: 'content-management-menu',
|
|
88
|
+
data: {
|
|
89
|
+
requiredPermission: [
|
|
90
|
+
'platform'
|
|
91
|
+
],
|
|
92
|
+
},
|
|
62
93
|
children: [
|
|
63
94
|
{
|
|
64
95
|
text: RootConfig.entities.promotion.title,
|
|
@@ -67,13 +98,13 @@ class AXMMenuProvider {
|
|
|
67
98
|
priority: 1,
|
|
68
99
|
name: 'content-management-promotion-menu-item'
|
|
69
100
|
},
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
101
|
+
// {
|
|
102
|
+
// text: RootConfig.entities.glossary?.title,
|
|
103
|
+
// path: this.entityService.createPath(module.name, RootConfig.entities.glossary?.name),
|
|
104
|
+
// icon: RootConfig.entities.glossary?.icon,
|
|
105
|
+
// priority: 2,
|
|
106
|
+
// name: 'content-management-glossary-menu-item'
|
|
107
|
+
// },
|
|
77
108
|
{
|
|
78
109
|
text: RootConfig.entities.appTerm?.title,
|
|
79
110
|
path: this.entityService.createPath(module.name, RootConfig.entities.appTerm?.name),
|
|
@@ -84,6 +115,15 @@ class AXMMenuProvider {
|
|
|
84
115
|
],
|
|
85
116
|
},
|
|
86
117
|
]);
|
|
118
|
+
context.find('app-help').addItems([
|
|
119
|
+
{
|
|
120
|
+
name: 'app-terms',
|
|
121
|
+
text: `t('terms-conditions',{scope: "${scope}"})`,
|
|
122
|
+
icon: 'fa-light fa-circle-info',
|
|
123
|
+
path: `${appName}/terms`,
|
|
124
|
+
priority: 100031,
|
|
125
|
+
},
|
|
126
|
+
]);
|
|
87
127
|
}
|
|
88
128
|
}
|
|
89
129
|
|
|
@@ -219,7 +259,6 @@ class AXMPromotionDataSourceDefinition {
|
|
|
219
259
|
};
|
|
220
260
|
}
|
|
221
261
|
catch (e) {
|
|
222
|
-
console.log(e);
|
|
223
262
|
throw e;
|
|
224
263
|
}
|
|
225
264
|
},
|
|
@@ -341,10 +380,167 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
341
380
|
type: Injectable
|
|
342
381
|
}], ctorParameters: () => [] });
|
|
343
382
|
|
|
383
|
+
class AXMNotifyAppTermComponent extends AXBasePageComponent {
|
|
384
|
+
constructor() {
|
|
385
|
+
super(...arguments);
|
|
386
|
+
this.isConfirm = false;
|
|
387
|
+
this.i18n = RootConfig.config.i18n;
|
|
388
|
+
}
|
|
389
|
+
transformContent(content) {
|
|
390
|
+
return content.replace(/\n/g, '<br>');
|
|
391
|
+
}
|
|
392
|
+
send() {
|
|
393
|
+
this.close({ data: this.data });
|
|
394
|
+
}
|
|
395
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMNotifyAppTermComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
396
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: AXMNotifyAppTermComponent, isStandalone: true, selector: "axm-notify-app", usesInheritance: true, ngImport: i0, template: "@for (item of data; track $index) {\n<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-font-bold\">{{ item.title }}</ax-content>\n<ax-content class=\"ax-block ax-px-4 ax-pb-4 ax-text-base/6\" [innerHTML]=\"transformContent(item.content) | safe : 'html'\"></ax-content>\n}\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isConfirm\">\n <ax-label>{{ 'agreeTerm' | translate : { scope: i18n } | async }}</ax-label>\n </ax-check-box>\n <ax-button (click)=\"send()\" [text]=\"'okay' | translate | async\" [disabled]=\"!isConfirm\" color=\"primary\"></ax-button>\n</ax-footer>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i2.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.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: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AXSafePipe, name: "safe" }] }); }
|
|
397
|
+
}
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMNotifyAppTermComponent, decorators: [{
|
|
399
|
+
type: Component,
|
|
400
|
+
args: [{ selector: 'axm-notify-app', imports: [
|
|
401
|
+
CommonModule,
|
|
402
|
+
AXLabelModule,
|
|
403
|
+
AXCheckBoxModule,
|
|
404
|
+
AXDecoratorModule,
|
|
405
|
+
AXButtonModule,
|
|
406
|
+
AXTranslationModule,
|
|
407
|
+
AXSafePipe,
|
|
408
|
+
], template: "@for (item of data; track $index) {\n<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-font-bold\">{{ item.title }}</ax-content>\n<ax-content class=\"ax-block ax-px-4 ax-pb-4 ax-text-base/6\" [innerHTML]=\"transformContent(item.content) | safe : 'html'\"></ax-content>\n}\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isConfirm\">\n <ax-label>{{ 'agreeTerm' | translate : { scope: i18n } | async }}</ax-label>\n </ax-check-box>\n <ax-button (click)=\"send()\" [text]=\"'okay' | translate | async\" [disabled]=\"!isConfirm\" color=\"primary\"></ax-button>\n</ax-footer>" }]
|
|
409
|
+
}] });
|
|
410
|
+
|
|
411
|
+
class AXMNotifyNewTermPopupAction extends AXPWorkflowAction {
|
|
412
|
+
constructor() {
|
|
413
|
+
super(...arguments);
|
|
414
|
+
this.popupService = inject(AXPopupService);
|
|
415
|
+
}
|
|
416
|
+
async execute(context) {
|
|
417
|
+
const data = context.getVariable();
|
|
418
|
+
await this.popupService.open(AXMNotifyAppTermComponent, {
|
|
419
|
+
title: 'New Terms And Conditions',
|
|
420
|
+
data: { data },
|
|
421
|
+
closeButton: false,
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMNotifyNewTermPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
425
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMNotifyNewTermPopupAction }); }
|
|
426
|
+
}
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMNotifyNewTermPopupAction, decorators: [{
|
|
428
|
+
type: Injectable
|
|
429
|
+
}] });
|
|
430
|
+
class AXMTermUpdateSettingAction extends AXPWorkflowAction {
|
|
431
|
+
constructor() {
|
|
432
|
+
super(...arguments);
|
|
433
|
+
this.settingService = inject(AXPSettingService);
|
|
434
|
+
}
|
|
435
|
+
async execute(context) {
|
|
436
|
+
const dataList = context.getVariable();
|
|
437
|
+
for (const data of dataList) {
|
|
438
|
+
await this.settingService.scope(AXPPlatformScope.User).set(`is-confirm-term-${data.id}`, true);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMTermUpdateSettingAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
442
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMTermUpdateSettingAction }); }
|
|
443
|
+
}
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMTermUpdateSettingAction, decorators: [{
|
|
445
|
+
type: Injectable
|
|
446
|
+
}] });
|
|
447
|
+
const AXMNewTermWorkflow = {
|
|
448
|
+
startStepId: 'show-popup',
|
|
449
|
+
steps: {
|
|
450
|
+
'show-popup': {
|
|
451
|
+
action: 'AXMNotifyNewTermPopupAction',
|
|
452
|
+
nextSteps: [
|
|
453
|
+
{
|
|
454
|
+
conditions: [],
|
|
455
|
+
nextStepId: 'first-time-add-to-setting',
|
|
456
|
+
},
|
|
457
|
+
],
|
|
458
|
+
},
|
|
459
|
+
'first-time-add-to-setting': {
|
|
460
|
+
action: 'AXMTermUpdateSettingAction',
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
var AXPApplicationTermsSettings;
|
|
466
|
+
(function (AXPApplicationTermsSettings) {
|
|
467
|
+
AXPApplicationTermsSettings["ApplicationTerms"] = "general:startup:application-terms";
|
|
468
|
+
})(AXPApplicationTermsSettings || (AXPApplicationTermsSettings = {}));
|
|
469
|
+
|
|
470
|
+
class AppTermsCheckService {
|
|
471
|
+
constructor() {
|
|
472
|
+
this.settingsService = inject(AXPSettingService);
|
|
473
|
+
this.workflowService = inject(AXPWorkflowService);
|
|
474
|
+
this.appTermService = inject(AXMAppTermService);
|
|
475
|
+
this.appInitService = inject(AXPAppStartUpService);
|
|
476
|
+
this.sessionService = inject(AXPSessionService);
|
|
477
|
+
this.appInitService.registerTask({
|
|
478
|
+
name: 'Terms',
|
|
479
|
+
statusText: 'Check New Terms And Conditions...',
|
|
480
|
+
priority: 6,
|
|
481
|
+
run: async () => {
|
|
482
|
+
this.sessionService.application$.subscribe(async (app) => {
|
|
483
|
+
if (app != null) {
|
|
484
|
+
const filterTerms = [];
|
|
485
|
+
const terms = await this.appTermService.query();
|
|
486
|
+
for (const term of terms.items) {
|
|
487
|
+
const isConfirm = await this.settingsService
|
|
488
|
+
.scope(AXPPlatformScope.User)
|
|
489
|
+
.get(`is-confirm-term-${term.id}`);
|
|
490
|
+
const isEnableToShow = await this.settingsService
|
|
491
|
+
.scope(AXPPlatformScope.User)
|
|
492
|
+
.get(AXPApplicationTermsSettings.ApplicationTerms);
|
|
493
|
+
if (!isConfirm && isEnableToShow) {
|
|
494
|
+
filterTerms.push(term);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (filterTerms.length > 0) {
|
|
498
|
+
setTimeout(() => {
|
|
499
|
+
this.workflowService.execute('new-term', filterTerms);
|
|
500
|
+
}, 500);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
},
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AppTermsCheckService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
508
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AppTermsCheckService }); }
|
|
509
|
+
}
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AppTermsCheckService, decorators: [{
|
|
511
|
+
type: Injectable
|
|
512
|
+
}], ctorParameters: () => [] });
|
|
513
|
+
|
|
344
514
|
class AXMContentManagementModule {
|
|
345
|
-
|
|
346
|
-
|
|
515
|
+
/**
|
|
516
|
+
* @ignore
|
|
517
|
+
*/
|
|
518
|
+
constructor(appTermsCheck) { }
|
|
519
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMContentManagementModule, deps: [{ token: AppTermsCheckService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
520
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.6", ngImport: i0, type: AXMContentManagementModule, imports: [i2$1.AXPWorkflowModule, i3$1.AXPComponentSlotModule] }); }
|
|
347
521
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMContentManagementModule, providers: [
|
|
522
|
+
{
|
|
523
|
+
provide: ROUTES,
|
|
524
|
+
multi: true,
|
|
525
|
+
useFactory: () => {
|
|
526
|
+
const config = inject(AXP_ENTITY_CONFIG_TOKEN);
|
|
527
|
+
const routes = [
|
|
528
|
+
{
|
|
529
|
+
path: ':app/terms',
|
|
530
|
+
loadComponent: () => {
|
|
531
|
+
return config.viewers.root();
|
|
532
|
+
},
|
|
533
|
+
children: [
|
|
534
|
+
{
|
|
535
|
+
path: '',
|
|
536
|
+
loadComponent: () => Promise.resolve().then(function () { return listTerms_component; }).then((c) => c.AXMListTermsComponent),
|
|
537
|
+
},
|
|
538
|
+
],
|
|
539
|
+
},
|
|
540
|
+
];
|
|
541
|
+
return routes;
|
|
542
|
+
},
|
|
543
|
+
},
|
|
348
544
|
{
|
|
349
545
|
provide: AXP_MENU_PROVIDER,
|
|
350
546
|
useClass: AXMMenuProvider,
|
|
@@ -387,7 +583,17 @@ class AXMContentManagementModule {
|
|
|
387
583
|
useClass: AXMPromotionDataSourceDefinition,
|
|
388
584
|
multi: true,
|
|
389
585
|
},
|
|
390
|
-
|
|
586
|
+
AppTermsCheckService
|
|
587
|
+
], imports: [AXPWorkflowModule.forChild({
|
|
588
|
+
actions: {
|
|
589
|
+
AXMNotifyNewTermPopupAction,
|
|
590
|
+
AXMTermUpdateSettingAction,
|
|
591
|
+
},
|
|
592
|
+
workflows: {
|
|
593
|
+
'new-term': AXMNewTermWorkflow,
|
|
594
|
+
},
|
|
595
|
+
}),
|
|
596
|
+
AXPComponentSlotModule.forChild({
|
|
391
597
|
'side-menu-footer': [
|
|
392
598
|
{
|
|
393
599
|
name: 'side-menu-footer-promotion',
|
|
@@ -413,6 +619,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
413
619
|
type: NgModule,
|
|
414
620
|
args: [{
|
|
415
621
|
imports: [
|
|
622
|
+
AXPWorkflowModule.forChild({
|
|
623
|
+
actions: {
|
|
624
|
+
AXMNotifyNewTermPopupAction,
|
|
625
|
+
AXMTermUpdateSettingAction,
|
|
626
|
+
},
|
|
627
|
+
workflows: {
|
|
628
|
+
'new-term': AXMNewTermWorkflow,
|
|
629
|
+
},
|
|
630
|
+
}),
|
|
416
631
|
AXPComponentSlotModule.forChild({
|
|
417
632
|
'side-menu-footer': [
|
|
418
633
|
{
|
|
@@ -438,6 +653,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
438
653
|
exports: [],
|
|
439
654
|
declarations: [],
|
|
440
655
|
providers: [
|
|
656
|
+
{
|
|
657
|
+
provide: ROUTES,
|
|
658
|
+
multi: true,
|
|
659
|
+
useFactory: () => {
|
|
660
|
+
const config = inject(AXP_ENTITY_CONFIG_TOKEN);
|
|
661
|
+
const routes = [
|
|
662
|
+
{
|
|
663
|
+
path: ':app/terms',
|
|
664
|
+
loadComponent: () => {
|
|
665
|
+
return config.viewers.root();
|
|
666
|
+
},
|
|
667
|
+
children: [
|
|
668
|
+
{
|
|
669
|
+
path: '',
|
|
670
|
+
loadComponent: () => Promise.resolve().then(function () { return listTerms_component; }).then((c) => c.AXMListTermsComponent),
|
|
671
|
+
},
|
|
672
|
+
],
|
|
673
|
+
},
|
|
674
|
+
];
|
|
675
|
+
return routes;
|
|
676
|
+
},
|
|
677
|
+
},
|
|
441
678
|
{
|
|
442
679
|
provide: AXP_MENU_PROVIDER,
|
|
443
680
|
useClass: AXMMenuProvider,
|
|
@@ -480,90 +717,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
480
717
|
useClass: AXMPromotionDataSourceDefinition,
|
|
481
718
|
multi: true,
|
|
482
719
|
},
|
|
720
|
+
AppTermsCheckService
|
|
483
721
|
]
|
|
484
722
|
}]
|
|
485
|
-
}] });
|
|
723
|
+
}], ctorParameters: () => [{ type: AppTermsCheckService }] });
|
|
486
724
|
|
|
487
|
-
/**
|
|
488
|
-
* Deeply sanitizes an object for storage in IndexedDB by removing non-serializable content
|
|
489
|
-
*/
|
|
490
|
-
function sanitizeForStorage(obj) {
|
|
491
|
-
if (!obj) {
|
|
492
|
-
return obj;
|
|
493
|
-
}
|
|
494
|
-
// Handle primitive values
|
|
495
|
-
if (typeof obj !== 'object') {
|
|
496
|
-
return obj;
|
|
497
|
-
}
|
|
498
|
-
// Handle arrays
|
|
499
|
-
if (Array.isArray(obj)) {
|
|
500
|
-
return obj.map((item) => sanitizeForStorage(item));
|
|
501
|
-
}
|
|
502
|
-
// Handle Date objects
|
|
503
|
-
if (obj instanceof Date) {
|
|
504
|
-
return obj;
|
|
505
|
-
}
|
|
506
|
-
// Handle File objects specially
|
|
507
|
-
if (obj instanceof File) {
|
|
508
|
-
// File objects are handled separately, return as is
|
|
509
|
-
return obj;
|
|
510
|
-
}
|
|
511
|
-
// Handle Blob objects
|
|
512
|
-
if (obj instanceof Blob) {
|
|
513
|
-
// Blob objects are handled separately
|
|
514
|
-
return obj;
|
|
515
|
-
}
|
|
516
|
-
// Handle regular objects
|
|
517
|
-
const cleanedObj = {};
|
|
518
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
519
|
-
// Skip functions, symbols and other non-serializable types
|
|
520
|
-
if (typeof value === 'function' || typeof value === 'symbol') {
|
|
521
|
-
continue;
|
|
522
|
-
}
|
|
523
|
-
// Handle null values
|
|
524
|
-
if (value === null) {
|
|
525
|
-
cleanedObj[key] = null;
|
|
526
|
-
continue;
|
|
527
|
-
}
|
|
528
|
-
// Recursively sanitize objects
|
|
529
|
-
if (typeof value === 'object') {
|
|
530
|
-
cleanedObj[key] = sanitizeForStorage(value);
|
|
531
|
-
}
|
|
532
|
-
else {
|
|
533
|
-
cleanedObj[key] = value;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
return cleanedObj;
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Sanitizes a filename by:
|
|
540
|
-
* 1. Removing special characters
|
|
541
|
-
* 2. Replacing spaces with hyphens
|
|
542
|
-
* 3. Ensuring unique timestamp
|
|
543
|
-
*/
|
|
544
|
-
function sanitizeFileName(fileName) {
|
|
545
|
-
if (!fileName)
|
|
546
|
-
return '';
|
|
547
|
-
// Get file extension
|
|
548
|
-
const ext = fileName.split('.').pop() || '';
|
|
549
|
-
// Get base name without extension
|
|
550
|
-
let baseName = fileName.slice(0, -(ext.length + 1));
|
|
551
|
-
// Remove special characters and replace spaces with hyphens
|
|
552
|
-
baseName = baseName
|
|
553
|
-
.replace(/[^\w\s-]/g, '') // Remove special chars except spaces and hyphens
|
|
554
|
-
.replace(/\s+/g, '-') // Replace spaces with hyphens
|
|
555
|
-
.replace(/-+/g, '-') // Replace multiple hyphens with single hyphen
|
|
556
|
-
.trim();
|
|
557
|
-
// Add timestamp to ensure uniqueness
|
|
558
|
-
const timestamp = new Date().getTime();
|
|
559
|
-
// Combine everything
|
|
560
|
-
return `${baseName}-${timestamp}.${ext}`;
|
|
561
|
-
}
|
|
562
725
|
async function promotionEntityFactory(injector) {
|
|
563
726
|
const dataService = injector.get(AXMAppPromotionService);
|
|
564
|
-
const fileStorageService = injector.get(AXPFileStorageService);
|
|
565
727
|
const i18n = RootConfig.config.i18n;
|
|
566
728
|
const entityDef = {
|
|
729
|
+
plugins: [
|
|
730
|
+
{ name: 'history' },
|
|
731
|
+
{ name: 'lock' },
|
|
732
|
+
{ name: 'compare' },
|
|
733
|
+
{ name: 'comments' },
|
|
734
|
+
{
|
|
735
|
+
name: 'attachments',
|
|
736
|
+
options: {
|
|
737
|
+
field: 'imageId',
|
|
738
|
+
accept: '.jpg,.jpeg,.png,.gif,.webp',
|
|
739
|
+
multiple: true,
|
|
740
|
+
fileEditable: true,
|
|
741
|
+
},
|
|
742
|
+
},
|
|
743
|
+
],
|
|
567
744
|
module: RootConfig.module.name,
|
|
568
745
|
name: RootConfig.entities.promotion.name,
|
|
569
746
|
source: '',
|
|
@@ -582,10 +759,6 @@ async function promotionEntityFactory(injector) {
|
|
|
582
759
|
id: 'promotion',
|
|
583
760
|
title: 'Promotion',
|
|
584
761
|
},
|
|
585
|
-
{
|
|
586
|
-
id: 'comments',
|
|
587
|
-
title: 'Comments',
|
|
588
|
-
},
|
|
589
762
|
],
|
|
590
763
|
properties: [
|
|
591
764
|
{
|
|
@@ -651,20 +824,7 @@ async function promotionEntityFactory(injector) {
|
|
|
651
824
|
},
|
|
652
825
|
],
|
|
653
826
|
},
|
|
654
|
-
|
|
655
|
-
name: 'imageId',
|
|
656
|
-
title: `t("Gallery", { scope: "${i18n}" })`,
|
|
657
|
-
groupId: 'promotion',
|
|
658
|
-
schema: {
|
|
659
|
-
dataType: 'string',
|
|
660
|
-
interface: {
|
|
661
|
-
type: AXPWidgetsCatalog.fileUploader,
|
|
662
|
-
options: {
|
|
663
|
-
multiple: true,
|
|
664
|
-
},
|
|
665
|
-
},
|
|
666
|
-
},
|
|
667
|
-
},
|
|
827
|
+
// attachments property comes from plugin when configured to create property
|
|
668
828
|
{
|
|
669
829
|
name: 'contentType',
|
|
670
830
|
title: `t("contentType", { scope: "${i18n}" })`,
|
|
@@ -794,137 +954,13 @@ async function promotionEntityFactory(injector) {
|
|
|
794
954
|
// },
|
|
795
955
|
// }
|
|
796
956
|
//},
|
|
797
|
-
{
|
|
798
|
-
name: 'comments',
|
|
799
|
-
title: `Comments`,
|
|
800
|
-
groupId: 'comments',
|
|
801
|
-
schema: {
|
|
802
|
-
dataType: 'object',
|
|
803
|
-
interface: {
|
|
804
|
-
type: 'comment',
|
|
805
|
-
options: {
|
|
806
|
-
refrenceType: RootConfig.module.name + '.' + RootConfig.entities.promotion.name,
|
|
807
|
-
refrenceId: '{{ context.eval("id") }}',
|
|
808
|
-
subject: '{{ context.eval("title") }}',
|
|
809
|
-
},
|
|
810
|
-
},
|
|
811
|
-
},
|
|
812
|
-
},
|
|
813
957
|
],
|
|
814
|
-
columns: [{ name: 'title' }, { name: 'placement' }
|
|
958
|
+
columns: [{ name: 'title' }, { name: 'placement' }],
|
|
815
959
|
commands: {
|
|
816
960
|
create: {
|
|
817
961
|
execute: async (data) => {
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
entityPayload.imageId = entityPayload.imageId || [];
|
|
821
|
-
const filesToUploadAfterSave = [];
|
|
822
|
-
if (Array.isArray(entityPayload.imageId)) {
|
|
823
|
-
const processedImageIdForEntitySave = [];
|
|
824
|
-
for (const fileItem of entityPayload.imageId) {
|
|
825
|
-
if (fileItem.source?.kind === 'blob' && fileItem.source.value instanceof Blob) {
|
|
826
|
-
// Sanitize the filename
|
|
827
|
-
const sanitizedName = sanitizeFileName(fileItem.name);
|
|
828
|
-
filesToUploadAfterSave.push({
|
|
829
|
-
fileItem: { ...fileItem, name: sanitizedName },
|
|
830
|
-
blob: fileItem.source.value,
|
|
831
|
-
});
|
|
832
|
-
processedImageIdForEntitySave.push({
|
|
833
|
-
tempId: fileItem.id,
|
|
834
|
-
name: sanitizedName,
|
|
835
|
-
size: fileItem.size,
|
|
836
|
-
type: fileItem.source.value.type,
|
|
837
|
-
status: 'pending_upload',
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
else if (fileItem.source?.kind === 'fileId' &&
|
|
841
|
-
fileItem.id &&
|
|
842
|
-
typeof fileItem.source.value === 'string') {
|
|
843
|
-
// If it's a fileId, we assume it's already processed. We don't have type directly on AXPFileListItem.
|
|
844
|
-
// We'll reconstruct it from fileStorageService or it should be part of what's saved if needed.
|
|
845
|
-
processedImageIdForEntitySave.push({
|
|
846
|
-
id: fileItem.id,
|
|
847
|
-
name: fileItem.name,
|
|
848
|
-
size: fileItem.size,
|
|
849
|
-
// type: fileItem.type, // Removed: AXPFileListItem does not have .type
|
|
850
|
-
status: 'uploaded',
|
|
851
|
-
source: { kind: 'fileId', value: fileItem.source.value },
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
else if (fileItem.id && fileItem.name) {
|
|
855
|
-
// Fallback for items that might be from a previous save
|
|
856
|
-
processedImageIdForEntitySave.push({
|
|
857
|
-
id: fileItem.id,
|
|
858
|
-
name: fileItem.name,
|
|
859
|
-
size: fileItem.size,
|
|
860
|
-
// type: fileItem.type, // Removed: AXPFileListItem does not have .type
|
|
861
|
-
status: fileItem.status, // Preserve existing status
|
|
862
|
-
source: fileItem.source ? { kind: fileItem.source.kind, value: fileItem.source.value } : undefined,
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
entityPayload.imageId = processedImageIdForEntitySave;
|
|
867
|
-
}
|
|
868
|
-
const savedEntityId = await dataService.insertOne(entityPayload);
|
|
869
|
-
// const entityId = savedEntity.id; // Corrected based on typical service return
|
|
870
|
-
const finalImageIdReferences = (entityPayload.imageId || []).filter((f) => f.status !== 'pending_upload');
|
|
871
|
-
for (const { fileItem, blob } of filesToUploadAfterSave) {
|
|
872
|
-
try {
|
|
873
|
-
if (!fileStorageService) {
|
|
874
|
-
throw new Error('fileStorageService is not available.');
|
|
875
|
-
}
|
|
876
|
-
const fileStorageInfo = await fileStorageService.save({
|
|
877
|
-
file: blob,
|
|
878
|
-
refId: savedEntityId,
|
|
879
|
-
refType: `${RootConfig.module.name}.${RootConfig.entities.promotion.name}`,
|
|
880
|
-
category: '',
|
|
881
|
-
name: blob.name,
|
|
882
|
-
});
|
|
883
|
-
await fileStorageService.commit(fileStorageInfo.fileId);
|
|
884
|
-
finalImageIdReferences.push({
|
|
885
|
-
id: fileStorageInfo.fileId,
|
|
886
|
-
name: fileStorageInfo.name || blob.name,
|
|
887
|
-
size: fileStorageInfo.size || blob.size,
|
|
888
|
-
type: fileStorageInfo.mimeType || blob.type,
|
|
889
|
-
status: 'uploaded',
|
|
890
|
-
source: { kind: 'fileId', value: fileStorageInfo.fileId },
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
catch (err) {
|
|
894
|
-
// Typed error
|
|
895
|
-
console.error('Error uploading file to FileStorage for entityId:', savedEntityId, 'file:', fileItem.name, err);
|
|
896
|
-
finalImageIdReferences.push({
|
|
897
|
-
tempId: fileItem.id,
|
|
898
|
-
name: fileItem.name,
|
|
899
|
-
size: fileItem.size,
|
|
900
|
-
type: blob.type, // Correctly access type from Blob/File
|
|
901
|
-
status: 'upload_failed',
|
|
902
|
-
error: err.message,
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
if (filesToUploadAfterSave.length > 0) {
|
|
907
|
-
let needsUpdate = true;
|
|
908
|
-
if (entityPayload.imageId && entityPayload.imageId.length === finalImageIdReferences.length) {
|
|
909
|
-
const oldIds = entityPayload.imageId
|
|
910
|
-
.map((f) => f.id || f.tempId)
|
|
911
|
-
.sort()
|
|
912
|
-
.join(',');
|
|
913
|
-
const newIds = finalImageIdReferences
|
|
914
|
-
.map((f) => f.id || f.tempId)
|
|
915
|
-
.sort()
|
|
916
|
-
.join(',');
|
|
917
|
-
if (oldIds === newIds && !finalImageIdReferences.some((f) => f.status === 'upload_failed')) {
|
|
918
|
-
needsUpdate = false;
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
if (needsUpdate) {
|
|
922
|
-
// Assuming updateOne takes the ID and an object of fields to update
|
|
923
|
-
console.log(finalImageIdReferences);
|
|
924
|
-
await dataService.updateOne(savedEntityId, { imageId: finalImageIdReferences });
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
return { id: savedEntityId };
|
|
962
|
+
const res = await dataService.insertOne(data);
|
|
963
|
+
return { id: res };
|
|
928
964
|
},
|
|
929
965
|
},
|
|
930
966
|
delete: {
|
|
@@ -934,86 +970,7 @@ async function promotionEntityFactory(injector) {
|
|
|
934
970
|
},
|
|
935
971
|
update: {
|
|
936
972
|
execute: async (data) => {
|
|
937
|
-
await
|
|
938
|
-
const entityId = data.id;
|
|
939
|
-
const filesToUpload = [];
|
|
940
|
-
const processedImageReferences = [];
|
|
941
|
-
if (data.imageId && Array.isArray(data.imageId)) {
|
|
942
|
-
for (const fileItem of data.imageId) {
|
|
943
|
-
if (fileItem.status === 'deleted') {
|
|
944
|
-
continue;
|
|
945
|
-
}
|
|
946
|
-
if (fileItem.source?.kind === 'blob' && fileItem.source.value instanceof Blob) {
|
|
947
|
-
// Sanitize the filename for new uploads
|
|
948
|
-
const sanitizedName = sanitizeFileName(fileItem.name);
|
|
949
|
-
filesToUpload.push({
|
|
950
|
-
fileItem: { ...fileItem, name: sanitizedName },
|
|
951
|
-
blob: fileItem.source.value,
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
else if (fileItem.source?.kind === 'fileId' &&
|
|
955
|
-
fileItem.id &&
|
|
956
|
-
typeof fileItem.source.value === 'string') {
|
|
957
|
-
// This is an existing file, keep its reference.
|
|
958
|
-
processedImageReferences.push({
|
|
959
|
-
id: fileItem.id,
|
|
960
|
-
name: fileItem.name,
|
|
961
|
-
size: fileItem.size,
|
|
962
|
-
status: fileItem.status || 'uploaded',
|
|
963
|
-
source: { kind: 'fileId', value: fileItem.source.value },
|
|
964
|
-
});
|
|
965
|
-
}
|
|
966
|
-
else if (fileItem.id && fileItem.name) {
|
|
967
|
-
processedImageReferences.push({
|
|
968
|
-
id: fileItem.id,
|
|
969
|
-
name: fileItem.name,
|
|
970
|
-
size: fileItem.size,
|
|
971
|
-
status: fileItem.status || 'uploaded',
|
|
972
|
-
source: fileItem.source ? { kind: fileItem.source.kind, value: fileItem.source.value } : undefined,
|
|
973
|
-
});
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
// Upload new files and add their successful/failed info to processedImageReferences
|
|
978
|
-
for (const { fileItem, blob } of filesToUpload) {
|
|
979
|
-
try {
|
|
980
|
-
if (!fileStorageService) {
|
|
981
|
-
throw new Error('fileStorageService is not available.');
|
|
982
|
-
}
|
|
983
|
-
const fileStorageInfo = await fileStorageService.save({
|
|
984
|
-
file: blob,
|
|
985
|
-
refId: entityId,
|
|
986
|
-
refType: `${RootConfig.module.name}.${RootConfig.entities.promotion.name}`,
|
|
987
|
-
category: '',
|
|
988
|
-
name: fileItem.name, // Use the sanitized name from fileItem
|
|
989
|
-
});
|
|
990
|
-
await fileStorageService.commit(fileStorageInfo.fileId);
|
|
991
|
-
processedImageReferences.push({
|
|
992
|
-
id: fileStorageInfo.fileId,
|
|
993
|
-
name: fileStorageInfo.name || fileItem.name,
|
|
994
|
-
size: fileStorageInfo.size || blob.size,
|
|
995
|
-
type: fileStorageInfo.mimeType || blob.type,
|
|
996
|
-
status: 'uploaded',
|
|
997
|
-
source: { kind: 'fileId', value: fileStorageInfo.fileId },
|
|
998
|
-
});
|
|
999
|
-
}
|
|
1000
|
-
catch (err) {
|
|
1001
|
-
console.error('Error uploading file to FileStorage during update for entityId:', entityId, 'file:', fileItem.name, err);
|
|
1002
|
-
processedImageReferences.push({
|
|
1003
|
-
tempId: fileItem.id,
|
|
1004
|
-
name: fileItem.name,
|
|
1005
|
-
size: fileItem.size,
|
|
1006
|
-
type: blob.type,
|
|
1007
|
-
status: 'upload_failed',
|
|
1008
|
-
error: err.message,
|
|
1009
|
-
});
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
// Construct the final data payload for the update.
|
|
1013
|
-
const finalUpdatePayload = { ...data };
|
|
1014
|
-
finalUpdatePayload.imageId = processedImageReferences;
|
|
1015
|
-
const fullySanitizedPayload = sanitizeForStorage(finalUpdatePayload);
|
|
1016
|
-
return await dataService.updateOne(entityId, fullySanitizedPayload);
|
|
973
|
+
return await dataService.updateOne(data.id, data);
|
|
1017
974
|
},
|
|
1018
975
|
},
|
|
1019
976
|
},
|
|
@@ -1065,7 +1022,9 @@ async function promotionEntityFactory(injector) {
|
|
|
1065
1022
|
},
|
|
1066
1023
|
list: {
|
|
1067
1024
|
execute: async (e) => {
|
|
1068
|
-
|
|
1025
|
+
const x = await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
|
|
1026
|
+
console.log(x);
|
|
1027
|
+
return x;
|
|
1069
1028
|
},
|
|
1070
1029
|
type: AXPEntityQueryType.List,
|
|
1071
1030
|
},
|
|
@@ -1101,17 +1060,7 @@ async function promotionEntityFactory(injector) {
|
|
|
1101
1060
|
},
|
|
1102
1061
|
},
|
|
1103
1062
|
},
|
|
1104
|
-
|
|
1105
|
-
name: 'imageId',
|
|
1106
|
-
layout: {
|
|
1107
|
-
positions: {
|
|
1108
|
-
lg: {
|
|
1109
|
-
colSpan: 12,
|
|
1110
|
-
order: 6,
|
|
1111
|
-
},
|
|
1112
|
-
},
|
|
1113
|
-
},
|
|
1114
|
-
},
|
|
1063
|
+
// attachments property layout injected via plugin
|
|
1115
1064
|
{
|
|
1116
1065
|
name: 'contentType',
|
|
1117
1066
|
layout: {
|
|
@@ -1187,17 +1136,7 @@ async function promotionEntityFactory(injector) {
|
|
|
1187
1136
|
},
|
|
1188
1137
|
},
|
|
1189
1138
|
},
|
|
1190
|
-
|
|
1191
|
-
name: 'imageId',
|
|
1192
|
-
layout: {
|
|
1193
|
-
positions: {
|
|
1194
|
-
lg: {
|
|
1195
|
-
colSpan: 12,
|
|
1196
|
-
order: 6,
|
|
1197
|
-
},
|
|
1198
|
-
},
|
|
1199
|
-
},
|
|
1200
|
-
},
|
|
1139
|
+
// attachments property layout injected via plugin
|
|
1201
1140
|
{
|
|
1202
1141
|
name: 'contentType',
|
|
1203
1142
|
layout: {
|
|
@@ -1250,9 +1189,9 @@ async function promotionEntityFactory(injector) {
|
|
|
1250
1189
|
{
|
|
1251
1190
|
id: 'promotion',
|
|
1252
1191
|
},
|
|
1253
|
-
{
|
|
1254
|
-
|
|
1255
|
-
},
|
|
1192
|
+
// {
|
|
1193
|
+
// id: 'comments',
|
|
1194
|
+
// },
|
|
1256
1195
|
],
|
|
1257
1196
|
properties: [
|
|
1258
1197
|
{
|
|
@@ -1275,17 +1214,7 @@ async function promotionEntityFactory(injector) {
|
|
|
1275
1214
|
},
|
|
1276
1215
|
},
|
|
1277
1216
|
},
|
|
1278
|
-
|
|
1279
|
-
name: 'imageId',
|
|
1280
|
-
layout: {
|
|
1281
|
-
positions: {
|
|
1282
|
-
lg: {
|
|
1283
|
-
colSpan: 12,
|
|
1284
|
-
order: 2,
|
|
1285
|
-
},
|
|
1286
|
-
},
|
|
1287
|
-
},
|
|
1288
|
-
},
|
|
1217
|
+
// attachments property layout injected via plugin
|
|
1289
1218
|
{
|
|
1290
1219
|
name: 'contentType',
|
|
1291
1220
|
layout: {
|
|
@@ -1319,20 +1248,20 @@ async function promotionEntityFactory(injector) {
|
|
|
1319
1248
|
},
|
|
1320
1249
|
},
|
|
1321
1250
|
},
|
|
1322
|
-
{
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
},
|
|
1251
|
+
// {
|
|
1252
|
+
// name: 'comments',
|
|
1253
|
+
// layout: {
|
|
1254
|
+
// label: {
|
|
1255
|
+
// visible: false,
|
|
1256
|
+
// },
|
|
1257
|
+
// positions: {
|
|
1258
|
+
// lg: {
|
|
1259
|
+
// colSpan: 12,
|
|
1260
|
+
// order: 7,
|
|
1261
|
+
// },
|
|
1262
|
+
// },
|
|
1263
|
+
// },
|
|
1264
|
+
// },
|
|
1336
1265
|
],
|
|
1337
1266
|
actions: [],
|
|
1338
1267
|
},
|
|
@@ -1375,90 +1304,7 @@ async function promotionEntityFactory(injector) {
|
|
|
1375
1304
|
scope: AXPEntityCommandScope.Individual,
|
|
1376
1305
|
disabled: `{{ lock.check(context.eval("id"), "${RootConfig.module.name}.${RootConfig.entities.promotion.name}") }}`,
|
|
1377
1306
|
},
|
|
1378
|
-
//
|
|
1379
|
-
{
|
|
1380
|
-
title: '@document-management:actions.upload-files',
|
|
1381
|
-
command: {
|
|
1382
|
-
name: 'show-file-uploader-popup',
|
|
1383
|
-
options: {
|
|
1384
|
-
id: '{{ context.eval("id") }}',
|
|
1385
|
-
files: '{{ context.eval("imageId") }}',
|
|
1386
|
-
multiple: true,
|
|
1387
|
-
accept: '.jpg,.jpeg,.png,.gif,.webp',
|
|
1388
|
-
key: 'imageId',
|
|
1389
|
-
fileEditable: true,
|
|
1390
|
-
},
|
|
1391
|
-
},
|
|
1392
|
-
priority: 'secondary',
|
|
1393
|
-
type: 'upload',
|
|
1394
|
-
scope: AXPEntityCommandScope.Individual,
|
|
1395
|
-
},
|
|
1396
|
-
{
|
|
1397
|
-
title: '@activity-log:actions.view-history',
|
|
1398
|
-
command: {
|
|
1399
|
-
name: 'show-version-history-popup',
|
|
1400
|
-
options: {
|
|
1401
|
-
refId: '{{ context.eval("id") }}',
|
|
1402
|
-
refType: RootConfig.module.name + '.' + RootConfig.entities.promotion.name,
|
|
1403
|
-
},
|
|
1404
|
-
},
|
|
1405
|
-
priority: 'secondary',
|
|
1406
|
-
type: 'version-history',
|
|
1407
|
-
scope: AXPEntityCommandScope.Individual,
|
|
1408
|
-
},
|
|
1409
|
-
{
|
|
1410
|
-
title: '@conversation:actions.show-comment-popup',
|
|
1411
|
-
command: {
|
|
1412
|
-
name: 'show-comment-popup',
|
|
1413
|
-
options: {
|
|
1414
|
-
refId: '{{ context.eval("id") }}',
|
|
1415
|
-
refType: RootConfig.module.name + '.' + RootConfig.entities.promotion.name,
|
|
1416
|
-
subject: '{{ context.eval("title") }}',
|
|
1417
|
-
},
|
|
1418
|
-
},
|
|
1419
|
-
priority: 'secondary',
|
|
1420
|
-
type: 'version-history',
|
|
1421
|
-
scope: AXPEntityCommandScope.Individual,
|
|
1422
|
-
},
|
|
1423
|
-
{
|
|
1424
|
-
title: 'Compare',
|
|
1425
|
-
command: {
|
|
1426
|
-
name: 'show-entity-records-compare',
|
|
1427
|
-
},
|
|
1428
|
-
priority: 'secondary',
|
|
1429
|
-
type: 'version-history',
|
|
1430
|
-
scope: AXPEntityCommandScope.Selected,
|
|
1431
|
-
},
|
|
1432
|
-
{
|
|
1433
|
-
title: '@common:actions.lock',
|
|
1434
|
-
name: 'lock-entity',
|
|
1435
|
-
command: {
|
|
1436
|
-
name: 'lock-popup',
|
|
1437
|
-
options: {
|
|
1438
|
-
refId: '{{ context.eval("id") }}',
|
|
1439
|
-
refType: RootConfig.module.name + '.' + RootConfig.entities.promotion.name,
|
|
1440
|
-
},
|
|
1441
|
-
},
|
|
1442
|
-
priority: 'secondary',
|
|
1443
|
-
type: 'update',
|
|
1444
|
-
scope: AXPEntityCommandScope.Individual,
|
|
1445
|
-
hidden: `{{ lock.check(context.eval("id"), "${RootConfig.module.name}.${RootConfig.entities.promotion.name}") }}`,
|
|
1446
|
-
},
|
|
1447
|
-
{
|
|
1448
|
-
title: '@common:actions.unlock',
|
|
1449
|
-
name: 'unlock-entity',
|
|
1450
|
-
command: {
|
|
1451
|
-
name: 'unlock-confirm',
|
|
1452
|
-
options: {
|
|
1453
|
-
refId: '{{ context.eval("id") }}',
|
|
1454
|
-
refType: RootConfig.module.name + '.' + RootConfig.entities.promotion.name,
|
|
1455
|
-
},
|
|
1456
|
-
},
|
|
1457
|
-
priority: 'secondary',
|
|
1458
|
-
type: 'update',
|
|
1459
|
-
scope: AXPEntityCommandScope.Individual,
|
|
1460
|
-
hidden: `{{ (await lock.check(context.eval("id"), "${RootConfig.module.name}.${RootConfig.entities.promotion.name}")) == false }}`,
|
|
1461
|
-
},
|
|
1307
|
+
// upload files action is injected via attachments plugin
|
|
1462
1308
|
],
|
|
1463
1309
|
views: [
|
|
1464
1310
|
createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] }),
|
|
@@ -2225,11 +2071,86 @@ var glossary_entity = /*#__PURE__*/Object.freeze({
|
|
|
2225
2071
|
glossaryEntityFactory: glossaryEntityFactory
|
|
2226
2072
|
});
|
|
2227
2073
|
|
|
2228
|
-
|
|
2074
|
+
class AXMListTermsComponent extends AXPPageLayoutBaseComponent {
|
|
2075
|
+
constructor() {
|
|
2076
|
+
super(...arguments);
|
|
2077
|
+
this.service = inject(AXMAppTermService);
|
|
2078
|
+
this.terms = [];
|
|
2079
|
+
this.loaded = signal(false, ...(ngDevMode ? [{ debugName: "loaded" }] : []));
|
|
2080
|
+
this.showScrollSide = signal(true, ...(ngDevMode ? [{ debugName: "showScrollSide" }] : []));
|
|
2081
|
+
}
|
|
2082
|
+
ngAfterViewInit() {
|
|
2083
|
+
this.checkScroll();
|
|
2084
|
+
}
|
|
2085
|
+
onResize() {
|
|
2086
|
+
this.checkScroll();
|
|
2087
|
+
}
|
|
2088
|
+
checkScroll() {
|
|
2089
|
+
const contentElement = document.getElementById('contentDiv');
|
|
2090
|
+
if (contentElement != null) {
|
|
2091
|
+
this.showScrollSide.set(contentElement.offsetHeight > window.innerHeight - 140);
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
async ngOnInit() {
|
|
2095
|
+
super.ngOnInit();
|
|
2096
|
+
const result = await this.service.query({
|
|
2097
|
+
skip: 0,
|
|
2098
|
+
take: 1000,
|
|
2099
|
+
});
|
|
2100
|
+
this.terms = result.items.map((term) => {
|
|
2101
|
+
return {
|
|
2102
|
+
...term,
|
|
2103
|
+
content: term.content.replace(/\n/g, '<br>'),
|
|
2104
|
+
};
|
|
2105
|
+
});
|
|
2106
|
+
this.loaded.set(true);
|
|
2107
|
+
setTimeout(() => this.checkScroll(), 50);
|
|
2108
|
+
}
|
|
2109
|
+
getPageTitle() {
|
|
2110
|
+
return `t("app-term.page-title", {scope:"${RootConfig.config.i18n}"})`;
|
|
2111
|
+
}
|
|
2112
|
+
getPageDescription() {
|
|
2113
|
+
return `t("app-term.page-description", {scope:"${RootConfig.config.i18n}"})`;
|
|
2114
|
+
}
|
|
2115
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMListTermsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2116
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: AXMListTermsComponent, isStandalone: true, selector: "ng-component", host: { listeners: { "window:resize": "onResize()" } }, providers: [
|
|
2117
|
+
{
|
|
2118
|
+
provide: AXPPageLayoutBase,
|
|
2119
|
+
useExisting: AXMListTermsComponent,
|
|
2120
|
+
},
|
|
2121
|
+
], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n @if(loaded()){\n <axp-page-content id=\"contentDiv\" axOutlineContainer target=\"h2\" [scrollableElementId]=\"'axp-page-layout'\"\n [activationOffset]=\"120\" class=\"ax-flex ax-flex-row\">\n <div class=\"ax-flex ax-flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"ax-flex ax-flex-col\">\n <h2 class=\"ax-px-4 ax-font-semibold ax-text-xl\">{{ term.title }}</h2>\n <p class=\"ax-px-4 ax-text-sm ax-leading-5 ax-opacity-65\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"ax-pt-3 ax-pb-6 ax-px-4 ax-text-base/6\" [innerHTML]=\"term.content | safe:'html'\"></div>\n </div>\n }\n </div>\n @if(showScrollSide()){\n <div class=\"ax-hidden lg:ax-block ax-min-w-60\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"ax-w-full ax-sticky ax-top-24\"></ax-side-menu>\n </div>\n }\n </axp-page-content>\n }\n</axp-page-layout>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i6.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "component", type: i2$2.AXSideMenuComponent, selector: "ax-side-menu", inputs: ["items", "look", "location"], outputs: ["itemsChange"] }, { kind: "directive", type: i2$2.AXOutlineSideMenuDirective, selector: "[axOutlineSideMenu]", exportAs: ["axOutlineSideMenu"] }, { kind: "ngmodule", type: AXOutlineModule }, { kind: "directive", type: i3$2.AXOutlineContainerDirective, selector: "[axOutlineContainer]", inputs: ["target", "smoothScroll", "showHashItem", "activationOffset", "copyUrlOnClick", "activateLastAtBottom", "scrollableElementId"], exportAs: ["axOutlineContainer"] }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i5$1.AXFormatPipe, name: "format" }, { kind: "pipe", type: AXSafePipe, name: "safe" }] }); }
|
|
2122
|
+
}
|
|
2123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXMListTermsComponent, decorators: [{
|
|
2124
|
+
type: Component,
|
|
2125
|
+
args: [{ imports: [
|
|
2126
|
+
CommonModule,
|
|
2127
|
+
AXDecoratorModule,
|
|
2128
|
+
AXFormatModule,
|
|
2129
|
+
AXPThemeLayoutBlockComponent,
|
|
2130
|
+
AXTranslationModule,
|
|
2131
|
+
AXSideMenuModule,
|
|
2132
|
+
AXOutlineModule,
|
|
2133
|
+
AXPPageLayoutComponent,
|
|
2134
|
+
AXSafePipe,
|
|
2135
|
+
], providers: [
|
|
2136
|
+
{
|
|
2137
|
+
provide: AXPPageLayoutBase,
|
|
2138
|
+
useExisting: AXMListTermsComponent,
|
|
2139
|
+
},
|
|
2140
|
+
], template: "<axp-page-layout *translate=\"let t\">\n @if(loaded()){\n <axp-page-content id=\"contentDiv\" axOutlineContainer target=\"h2\" [scrollableElementId]=\"'axp-page-layout'\"\n [activationOffset]=\"120\" class=\"ax-flex ax-flex-row\">\n <div class=\"ax-flex ax-flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"ax-flex ax-flex-col\">\n <h2 class=\"ax-px-4 ax-font-semibold ax-text-xl\">{{ term.title }}</h2>\n <p class=\"ax-px-4 ax-text-sm ax-leading-5 ax-opacity-65\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"ax-pt-3 ax-pb-6 ax-px-4 ax-text-base/6\" [innerHTML]=\"term.content | safe:'html'\"></div>\n </div>\n }\n </div>\n @if(showScrollSide()){\n <div class=\"ax-hidden lg:ax-block ax-min-w-60\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"ax-w-full ax-sticky ax-top-24\"></ax-side-menu>\n </div>\n }\n </axp-page-content>\n }\n</axp-page-layout>" }]
|
|
2141
|
+
}], propDecorators: { onResize: [{
|
|
2142
|
+
type: HostListener,
|
|
2143
|
+
args: ['window:resize']
|
|
2144
|
+
}] } });
|
|
2145
|
+
|
|
2146
|
+
var listTerms_component = /*#__PURE__*/Object.freeze({
|
|
2147
|
+
__proto__: null,
|
|
2148
|
+
AXMListTermsComponent: AXMListTermsComponent
|
|
2149
|
+
});
|
|
2229
2150
|
|
|
2230
2151
|
/**
|
|
2231
2152
|
* Generated bundle index. Do not edit.
|
|
2232
2153
|
*/
|
|
2233
2154
|
|
|
2234
|
-
export { AXMAppPromotionService, AXMAppTermService, AXMAppTermServiceImpl, AXMContentManagementModule, AXMEntityProvider, AXMGlossaryService, AXMGlossaryServiceImpl, AXMMenuProvider, AXMPromotionDataSourceDefinition, AXMPromotionServiceImpl, AXMPromotionSlotComponent, AXMSearchCommandProvider, AXMSettingProvider, RootConfig, appTermEntityEntityFactory, glossaryEntityFactory, promotionEntityFactory };
|
|
2155
|
+
export { AXMAppPromotionService, AXMAppTermService, AXMAppTermServiceImpl, AXMContentManagementModule, AXMEntityProvider, AXMGlossaryService, AXMGlossaryServiceImpl, AXMListTermsComponent, AXMMenuProvider, AXMNotifyAppTermComponent, AXMPromotionDataSourceDefinition, AXMPromotionServiceImpl, AXMPromotionSlotComponent, AXMSearchCommandProvider, AXMSettingProvider, RootConfig, appTermEntityEntityFactory, glossaryEntityFactory, promotionEntityFactory };
|
|
2235
2156
|
//# sourceMappingURL=acorex-modules-content-management.mjs.map
|