@acorex/platform 18.0.2 → 18.0.4
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/lib/app/application.types.d.ts +43 -26
- package/common/lib/common.module.d.ts +6 -5
- package/common/lib/data/data-provider.types.d.ts +1 -1
- package/common/lib/data/dexie-storage.service.d.ts +15 -0
- package/common/lib/data/entity-data-provider.d.ts +14 -0
- package/common/lib/data/index.d.ts +3 -0
- package/common/lib/data/storage-service.d.ts +22 -0
- package/common/lib/schema/entity/entity.class.d.ts +3 -0
- package/common/lib/utils/data-generator.d.ts +2 -0
- package/esm2022/common/lib/app/application.types.mjs +1 -1
- package/esm2022/common/lib/common.module.mjs +19 -2
- package/esm2022/common/lib/data/data-provider.types.mjs +1 -1
- package/esm2022/common/lib/data/dexie-storage.service.mjs +36 -0
- package/esm2022/common/lib/data/entity-data-provider.mjs +26 -0
- package/esm2022/common/lib/data/index.mjs +4 -1
- package/esm2022/common/lib/data/storage-service.mjs +5 -0
- package/esm2022/common/lib/schema/entity/entity-registery.service.mjs +2 -2
- package/esm2022/common/lib/schema/entity/entity.class.mjs +1 -1
- package/esm2022/common/lib/utils/data-generator.mjs +22 -1
- package/esm2022/common/lib/workflows/common.workflow.mjs +3 -3
- package/esm2022/layout/builder/lib/builder/builder.service.mjs +7 -2
- package/esm2022/layout/builder/lib/builder/widget.types.mjs +5 -1
- package/esm2022/layout/entity/lib/entity-detail-list.viewmodel.mjs +9 -8
- package/esm2022/layout/entity/lib/entity-master-create.viewmodel.mjs +34 -21
- package/esm2022/layout/entity/lib/entity-master-list.viewmodel.mjs +23 -15
- package/esm2022/layout/entity/lib/entity-master-single.viewmodel.mjs +46 -49
- package/esm2022/layout/entity/lib/entity-master-update.viewmodel.mjs +9 -7
- package/esm2022/layout/entity/lib/entity-registery.service.mjs +2 -2
- package/esm2022/layout/entity/lib/entity.module.mjs +13 -4
- package/esm2022/layout/entity/lib/entity.viewmodel.mjs +7 -6
- package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.mjs +127 -39
- package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.component.mjs +83 -37
- package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.viewmodel.mjs +34 -23
- package/esm2022/layout/entity/lib/workflows/create-entity.workflow.mjs +17 -20
- package/esm2022/layout/entity/lib/workflows/delete-entity.workflow.mjs +17 -15
- package/esm2022/layout/entity/lib/workflows/modify-section.workflow.mjs +11 -23
- package/esm2022/layout/entity/lib/workflows/show-details.workflow.mjs +3 -3
- package/esm2022/layout/entity/lib/workflows/show-list.workflow.mjs +35 -0
- package/esm2022/layouts/lib/admin/entity-layout/entity-create-view/entity-create-view.component.mjs +3 -3
- package/esm2022/layouts/lib/admin/entity-layout/workflows/delete-entity.workflow.mjs +2 -2
- package/esm2022/layouts/lib/layout.module.mjs +3 -3
- package/esm2022/themes/default/lib/default.module.mjs +3 -3
- package/esm2022/themes/default/lib/entity-reuse.strategy.mjs +2 -2
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-create-view/entity-master-create-view.component.mjs +2 -2
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/{entity-list-view.component.mjs → entity-master-list-view.component.mjs} +8 -2
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-sorting/list-view-option-sorting.component.mjs +2 -1
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.mjs +1 -1
- package/esm2022/widgets/lib/editors/date-time-box-widget/date-time-box-widget-column.component.mjs +2 -2
- package/esm2022/widgets/lib/editors/date-time-box-widget/date-time-box-widget-edit.component.mjs +21 -12
- package/esm2022/widgets/lib/editors/date-time-box-widget/date-time-box-widget-view.component.mjs +3 -2
- package/esm2022/widgets/lib/editors/number-box-widget/number-box-widget-column.component.mjs +2 -2
- package/esm2022/widgets/lib/editors/number-box-widget/number-box-widget-view.component.mjs +2 -2
- package/esm2022/workflow/lib/actions/start-workflow.action.mjs +28 -0
- package/esm2022/workflow/lib/workflow.module.mjs +7 -2
- package/esm2022/workflow/lib/workflow.service.mjs +53 -6
- package/esm2022/workflow/lib/workflow.types.mjs +12 -6
- package/fesm2022/{acorex-platform-common-avatar-widget-edit.component-DAmNXjDm.mjs → acorex-platform-common-avatar-widget-edit.component-B-of5ssU.mjs} +3 -2
- package/fesm2022/{acorex-platform-common-avatar-widget-edit.component-DAmNXjDm.mjs.map → acorex-platform-common-avatar-widget-edit.component-B-of5ssU.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-avatar-widget-view.component-BlA_cFkP.mjs → acorex-platform-common-avatar-widget-view.component-CJvrSkTv.mjs} +4 -3
- package/fesm2022/acorex-platform-common-avatar-widget-view.component-CJvrSkTv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-boolean-widget-filter.component-CEqibiML.mjs → acorex-platform-common-boolean-widget-filter.component-BTcOjuUm.mjs} +4 -3
- package/fesm2022/acorex-platform-common-boolean-widget-filter.component-BTcOjuUm.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-checkbox-widget-column.component-BiUHPDqV.mjs → acorex-platform-common-checkbox-widget-column.component-X9d1iY_F.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-checkbox-widget-column.component-BiUHPDqV.mjs.map → acorex-platform-common-checkbox-widget-column.component-X9d1iY_F.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-checkbox-widget-edit.component-BVG9_XXh.mjs → acorex-platform-common-checkbox-widget-edit.component-_jtT03Vn.mjs} +4 -3
- package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-_jtT03Vn.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-checkbox-widget-view.component-CfGkMcDi.mjs → acorex-platform-common-checkbox-widget-view.component-nYmtb8bK.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-checkbox-widget-view.component-CfGkMcDi.mjs.map → acorex-platform-common-checkbox-widget-view.component-nYmtb8bK.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-dateTime-widget-column.component-BlXTU887.mjs → acorex-platform-common-dateTime-widget-column.component-5ljYmtHI.mjs} +4 -3
- package/fesm2022/acorex-platform-common-dateTime-widget-column.component-5ljYmtHI.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-dateTime-widget-edit.component-B0s6FN-g.mjs → acorex-platform-common-dateTime-widget-edit.component-D8FSiqAo.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-dateTime-widget-edit.component-B0s6FN-g.mjs.map → acorex-platform-common-dateTime-widget-edit.component-D8FSiqAo.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-dateTime-widget-filter.component-B7KBCsUt.mjs → acorex-platform-common-dateTime-widget-filter.component-Df0DuDtw.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-dateTime-widget-filter.component-B7KBCsUt.mjs.map → acorex-platform-common-dateTime-widget-filter.component-Df0DuDtw.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-dateTime-widget-view.component-Dy7pAkGG.mjs → acorex-platform-common-dateTime-widget-view.component-CjVjQkPh.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-dateTime-widget-view.component-Dy7pAkGG.mjs.map → acorex-platform-common-dateTime-widget-view.component-CjVjQkPh.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-email-widget-column.component-D_UNn2dW.mjs → acorex-platform-common-email-widget-column.component-BgNdL62k.mjs} +4 -3
- package/fesm2022/acorex-platform-common-email-widget-column.component-BgNdL62k.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-email-widget-edit.component-DWT24mCM.mjs → acorex-platform-common-email-widget-edit.component-CgHPGccx.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-email-widget-edit.component-DWT24mCM.mjs.map → acorex-platform-common-email-widget-edit.component-CgHPGccx.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-email-widget-view.component-B6puyycL.mjs → acorex-platform-common-email-widget-view.component-C2aQ14k-.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-email-widget-view.component-B6puyycL.mjs.map → acorex-platform-common-email-widget-view.component-C2aQ14k-.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-file-widget-column.component-C1faGR4K.mjs → acorex-platform-common-file-widget-column.component-CwFzLLHt.mjs} +4 -3
- package/fesm2022/acorex-platform-common-file-widget-column.component-CwFzLLHt.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-file-widget-edit.component-CTvS9ls8.mjs → acorex-platform-common-file-widget-edit.component-DxoQR4CU.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-file-widget-edit.component-CTvS9ls8.mjs.map → acorex-platform-common-file-widget-edit.component-DxoQR4CU.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-file-widget-filter.component-D4AMg5M0.mjs → acorex-platform-common-file-widget-filter.component-BvG0iaKU.mjs} +4 -3
- package/fesm2022/acorex-platform-common-file-widget-filter.component-BvG0iaKU.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-file-widget-view.component-CHI4VCvt.mjs → acorex-platform-common-file-widget-view.component-BC9l3YrO.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-file-widget-view.component-CHI4VCvt.mjs.map → acorex-platform-common-file-widget-view.component-BC9l3YrO.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-gallery-widget-edit.component-CAOctYzV.mjs → acorex-platform-common-gallery-widget-edit.component-BihOIJ9T.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-gallery-widget-edit.component-CAOctYzV.mjs.map → acorex-platform-common-gallery-widget-edit.component-BihOIJ9T.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-gallery-widget-filter.component-lgaYDZeD.mjs → acorex-platform-common-gallery-widget-filter.component-DS1PCIJp.mjs} +4 -3
- package/fesm2022/acorex-platform-common-gallery-widget-filter.component-DS1PCIJp.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-gallery-widget-view.component-Ci50jeO5.mjs → acorex-platform-common-gallery-widget-view.component-CnQONVdg.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-gallery-widget-view.component-Ci50jeO5.mjs.map → acorex-platform-common-gallery-widget-view.component-CnQONVdg.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-largetext-widget-edit.component-DFKG-kum.mjs → acorex-platform-common-largetext-widget-edit.component-BCtGkz1a.mjs} +4 -3
- package/fesm2022/acorex-platform-common-largetext-widget-edit.component-BCtGkz1a.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-lookup-widget-column.component-CFzCGcqA.mjs → acorex-platform-common-lookup-widget-column.component-Cl-vO5XW.mjs} +4 -3
- package/fesm2022/acorex-platform-common-lookup-widget-column.component-Cl-vO5XW.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-lookup-widget-edit.component-CYTSeEOq.mjs → acorex-platform-common-lookup-widget-edit.component-D9UhViUG.mjs} +4 -3
- package/fesm2022/acorex-platform-common-lookup-widget-edit.component-D9UhViUG.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-lookup-widget-filter.component-BkxT9_Hh.mjs → acorex-platform-common-lookup-widget-filter.component-RWweQQaO.mjs} +4 -3
- package/fesm2022/acorex-platform-common-lookup-widget-filter.component-RWweQQaO.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-lookup-widget-view.component-5YeixMp7.mjs → acorex-platform-common-lookup-widget-view.component-mXo8VADX.mjs} +4 -3
- package/fesm2022/acorex-platform-common-lookup-widget-view.component-mXo8VADX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-map-widget-edit.component-CE3QQBmX.mjs → acorex-platform-common-map-widget-edit.component-SSrR3xxv.mjs} +4 -3
- package/fesm2022/acorex-platform-common-map-widget-edit.component-SSrR3xxv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-map-widget-view.component-Cv4OCTxz.mjs → acorex-platform-common-map-widget-view.component-DrGG3gzg.mjs} +4 -3
- package/fesm2022/acorex-platform-common-map-widget-view.component-DrGG3gzg.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-messenger-widget-column.component-CJdh6TKb.mjs → acorex-platform-common-messenger-widget-column.component-BJ_XzNKc.mjs} +4 -3
- package/fesm2022/acorex-platform-common-messenger-widget-column.component-BJ_XzNKc.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-messenger-widget-edit.component-kiEHxJia.mjs → acorex-platform-common-messenger-widget-edit.component-B_FG_n0O.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-messenger-widget-edit.component-kiEHxJia.mjs.map → acorex-platform-common-messenger-widget-edit.component-B_FG_n0O.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-messenger-widget-view.component-DzbjgZA7.mjs → acorex-platform-common-messenger-widget-view.component-EBiPO9ds.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-messenger-widget-view.component-DzbjgZA7.mjs.map → acorex-platform-common-messenger-widget-view.component-EBiPO9ds.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-number-widget-edit.component-BRuIP96Y.mjs → acorex-platform-common-number-widget-edit.component-B1XXga-9.mjs} +4 -3
- package/fesm2022/acorex-platform-common-number-widget-edit.component-B1XXga-9.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-number-widget-filter.component-jQ4DaFQH.mjs → acorex-platform-common-number-widget-filter.component-B2JCpDjU.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-number-widget-filter.component-jQ4DaFQH.mjs.map → acorex-platform-common-number-widget-filter.component-B2JCpDjU.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-number-widget-view.component-BzUWjT8m.mjs → acorex-platform-common-number-widget-view.component-DD0tkoc4.mjs} +4 -3
- package/fesm2022/acorex-platform-common-number-widget-view.component-DD0tkoc4.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-password-widget-column.component-BRzyuK5c.mjs → acorex-platform-common-password-widget-column.component-eyqgQlAt.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-password-widget-column.component-BRzyuK5c.mjs.map → acorex-platform-common-password-widget-column.component-eyqgQlAt.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-password-widget-edit.component-q6R2dw5k.mjs → acorex-platform-common-password-widget-edit.component-C2yNb9Pl.mjs} +4 -3
- package/fesm2022/acorex-platform-common-password-widget-edit.component-C2yNb9Pl.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-password-widget-view.component-CKaQItON.mjs → acorex-platform-common-password-widget-view.component-o9S7pwJW.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-password-widget-view.component-CKaQItON.mjs.map → acorex-platform-common-password-widget-view.component-o9S7pwJW.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-phone-widget-column.component-BD7BScjW.mjs → acorex-platform-common-phone-widget-column.component-BL9Xl2XH.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-phone-widget-column.component-BD7BScjW.mjs.map → acorex-platform-common-phone-widget-column.component-BL9Xl2XH.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-phone-widget-edit.component-D8tGKfNj.mjs → acorex-platform-common-phone-widget-edit.component-DSh9zoZj.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-phone-widget-edit.component-D8tGKfNj.mjs.map → acorex-platform-common-phone-widget-edit.component-DSh9zoZj.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-phone-widget-view.component-CFiMsGOB.mjs → acorex-platform-common-phone-widget-view.component-Br3xbaDd.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-phone-widget-view.component-CFiMsGOB.mjs.map → acorex-platform-common-phone-widget-view.component-Br3xbaDd.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-rich-text-widget-column.component-BPzwY_8L.mjs → acorex-platform-common-rich-text-widget-column.component-DDT58tca.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-rich-text-widget-column.component-BPzwY_8L.mjs.map → acorex-platform-common-rich-text-widget-column.component-DDT58tca.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-rich-text-widget-edit.component-CA2xRfVg.mjs → acorex-platform-common-rich-text-widget-edit.component-Dz1toc21.mjs} +4 -3
- package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-Dz1toc21.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-rich-text-widget-view.component-DYfTZ64H.mjs → acorex-platform-common-rich-text-widget-view.component-CxTPcEIQ.mjs} +4 -3
- package/fesm2022/acorex-platform-common-rich-text-widget-view.component-CxTPcEIQ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-selection-list-widget-column.component-_MglaOmo.mjs → acorex-platform-common-selection-list-widget-column.component-BCCmg8MI.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-selection-list-widget-column.component-_MglaOmo.mjs.map → acorex-platform-common-selection-list-widget-column.component-BCCmg8MI.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-selection-list-widget-edit.component-QKw_tyOd.mjs → acorex-platform-common-selection-list-widget-edit.component-B5eUdN2R.mjs} +4 -3
- package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-B5eUdN2R.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-selection-list-widget-filter.component-DRToTnHQ.mjs → acorex-platform-common-selection-list-widget-filter.component-DPpZq1TB.mjs} +4 -3
- package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-DPpZq1TB.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-selection-list-widget-view.component-CjDiuUdj.mjs → acorex-platform-common-selection-list-widget-view.component-Bxvd_AKZ.mjs} +4 -3
- package/fesm2022/acorex-platform-common-selection-list-widget-view.component-Bxvd_AKZ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-signature-pad-widget-edit.component-DF29uWl2.mjs → acorex-platform-common-signature-pad-widget-edit.component-CNjYCEi6.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-signature-pad-widget-edit.component-DF29uWl2.mjs.map → acorex-platform-common-signature-pad-widget-edit.component-CNjYCEi6.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-signature-pad-widget-view.component-BWzoR4HM.mjs → acorex-platform-common-signature-pad-widget-view.component-CsiBv_7i.mjs} +4 -3
- package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-CsiBv_7i.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-string-widget-filter.component-Di_GFHme.mjs → acorex-platform-common-string-widget-filter.component-CrGt6Bov.mjs} +4 -3
- package/fesm2022/acorex-platform-common-string-widget-filter.component-CrGt6Bov.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-text-widget-column.component-BSYd1CbC.mjs → acorex-platform-common-text-widget-column.component-qXusAevm.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-text-widget-column.component-BSYd1CbC.mjs.map → acorex-platform-common-text-widget-column.component-qXusAevm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-text-widget-edit.component-K9z9N1qw.mjs → acorex-platform-common-text-widget-edit.component-ed0MUYnD.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-text-widget-edit.component-K9z9N1qw.mjs.map → acorex-platform-common-text-widget-edit.component-ed0MUYnD.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-text-widget-view.component-WbZtm_bf.mjs → acorex-platform-common-text-widget-view.component-BpxTaeQW.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-text-widget-view.component-WbZtm_bf.mjs.map → acorex-platform-common-text-widget-view.component-BpxTaeQW.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-toggle-widget-column.component-ZCBSYMuz.mjs → acorex-platform-common-toggle-widget-column.component-BqiUQrmV.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-toggle-widget-column.component-ZCBSYMuz.mjs.map → acorex-platform-common-toggle-widget-column.component-BqiUQrmV.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-toggle-widget-edit.component-rkDfLA-J.mjs → acorex-platform-common-toggle-widget-edit.component-CDG62BJN.mjs} +4 -3
- package/fesm2022/acorex-platform-common-toggle-widget-edit.component-CDG62BJN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-toggle-widget-view.component-DLDIrci1.mjs → acorex-platform-common-toggle-widget-view.component-DWYcIPTd.mjs} +4 -3
- package/fesm2022/{acorex-platform-common-toggle-widget-view.component-DLDIrci1.mjs.map → acorex-platform-common-toggle-widget-view.component-DWYcIPTd.mjs.map} +1 -1
- package/fesm2022/acorex-platform-common.mjs +252 -149
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +10 -1
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +445 -261
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layouts-entity-create-view.component-BmSMt95H.mjs → acorex-platform-layouts-entity-create-view.component-fkKPKxlb.mjs} +3 -3
- package/fesm2022/acorex-platform-layouts-entity-create-view.component-fkKPKxlb.mjs.map +1 -0
- package/fesm2022/acorex-platform-layouts.mjs +4 -4
- package/fesm2022/acorex-platform-layouts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-Buanq4is.mjs → acorex-platform-themes-default-entity-master-create-view.component-BxYT9KhH.mjs} +2 -2
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BxYT9KhH.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +13 -6
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +50 -42
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +184 -104
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/lib/builder/widget.types.d.ts +3 -0
- package/layout/entity/lib/entity-master-create.viewmodel.d.ts +6 -5
- package/layout/entity/lib/entity-master-list.viewmodel.d.ts +4 -0
- package/layout/entity/lib/entity-master-single.viewmodel.d.ts +10 -5
- package/layout/entity/lib/entity-master-update.viewmodel.d.ts +0 -1
- package/layout/entity/lib/entity.viewmodel.d.ts +3 -3
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +18 -3
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.component.d.ts +8 -1
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.viewmodel.d.ts +10 -3
- package/layout/entity/lib/workflows/create-entity.workflow.d.ts +0 -2
- package/layout/entity/lib/workflows/delete-entity.workflow.d.ts +2 -4
- package/layout/entity/lib/workflows/modify-section.workflow.d.ts +2 -5
- package/layout/entity/lib/workflows/show-list.workflow.d.ts +10 -0
- package/package.json +1 -1
- package/widgets/lib/editors/date-time-box-widget/date-time-box-widget-edit.component.d.ts +4 -0
- package/workflow/lib/actions/start-workflow.action.d.ts +10 -0
- package/workflow/lib/workflow.service.d.ts +4 -2
- package/workflow/lib/workflow.types.d.ts +3 -1
- package/fesm2022/acorex-platform-common-avatar-widget-view.component-BlA_cFkP.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-boolean-widget-filter.component-CEqibiML.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-BVG9_XXh.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-dateTime-widget-column.component-BlXTU887.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-email-widget-column.component-D_UNn2dW.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-file-widget-column.component-C1faGR4K.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-file-widget-filter.component-D4AMg5M0.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-gallery-widget-filter.component-lgaYDZeD.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-largetext-widget-edit.component-DFKG-kum.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-column.component-CFzCGcqA.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-edit.component-CYTSeEOq.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-filter.component-BkxT9_Hh.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-view.component-5YeixMp7.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-map-widget-edit.component-CE3QQBmX.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-map-widget-view.component-Cv4OCTxz.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-messenger-widget-column.component-CJdh6TKb.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-number-widget-edit.component-BRuIP96Y.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-number-widget-view.component-BzUWjT8m.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-password-widget-edit.component-q6R2dw5k.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CA2xRfVg.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-rich-text-widget-view.component-DYfTZ64H.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-QKw_tyOd.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-DRToTnHQ.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-view.component-CjDiuUdj.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-BWzoR4HM.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-string-widget-filter.component-Di_GFHme.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-toggle-widget-edit.component-rkDfLA-J.mjs.map +0 -1
- package/fesm2022/acorex-platform-layouts-entity-create-view.component-BmSMt95H.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Buanq4is.mjs.map +0 -1
- /package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/{entity-list-view.component.d.ts → entity-master-list-view.component.d.ts} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, NgModule, Optional, Inject
|
|
2
|
+
import { Injectable, inject, NgModule, Optional, Inject } from '@angular/core';
|
|
3
3
|
import { Subject, filter } from 'rxjs';
|
|
4
|
+
import { cloneDeep, set, get, merge } from 'lodash-es';
|
|
4
5
|
|
|
5
6
|
class AXPWorkflowError extends Error {
|
|
6
7
|
constructor(message, inner = null) {
|
|
@@ -67,110 +68,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
|
67
68
|
}]
|
|
68
69
|
}] });
|
|
69
70
|
|
|
70
|
-
class AXPWorkflowModule {
|
|
71
|
-
static forRoot(config) {
|
|
72
|
-
return {
|
|
73
|
-
ngModule: AXPWorkflowModule,
|
|
74
|
-
providers: [
|
|
75
|
-
{
|
|
76
|
-
provide: 'AXPWorkflowModuleFactory',
|
|
77
|
-
useFactory: (registry) => () => {
|
|
78
|
-
if (config?.functions) {
|
|
79
|
-
for (const [key, type] of Object.entries(config.functions)) {
|
|
80
|
-
registry.registerFunction(key, type);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
//
|
|
84
|
-
if (config?.actions) {
|
|
85
|
-
for (const [key, type] of Object.entries(config.actions)) {
|
|
86
|
-
registry.registerAction(key, type);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//
|
|
90
|
-
if (config?.workflows) {
|
|
91
|
-
for (const [key, type] of Object.entries(config.workflows)) {
|
|
92
|
-
registry.registerWorkflow(key, type);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
deps: [AXPWorkflowRegistryService],
|
|
97
|
-
multi: true
|
|
98
|
-
},
|
|
99
|
-
...Object.values(config?.actions ?? {}),
|
|
100
|
-
...Object.values(config?.functions ?? {}),
|
|
101
|
-
]
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
static forChild(config) {
|
|
105
|
-
return {
|
|
106
|
-
ngModule: AXPWorkflowModule,
|
|
107
|
-
providers: [
|
|
108
|
-
{
|
|
109
|
-
provide: 'AXPWorkflowModuleFactory',
|
|
110
|
-
useFactory: (registry) => () => {
|
|
111
|
-
if (config?.functions) {
|
|
112
|
-
for (const [key, type] of Object.entries(config.functions)) {
|
|
113
|
-
registry.registerFunction(key, type);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
//
|
|
117
|
-
if (config?.actions) {
|
|
118
|
-
for (const [key, type] of Object.entries(config.actions)) {
|
|
119
|
-
registry.registerAction(key, type);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
//
|
|
123
|
-
if (config?.workflows) {
|
|
124
|
-
for (const [key, type] of Object.entries(config.workflows)) {
|
|
125
|
-
registry.registerWorkflow(key, type);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
deps: [AXPWorkflowRegistryService],
|
|
130
|
-
multi: true
|
|
131
|
-
},
|
|
132
|
-
...Object.values(config?.actions ?? {}),
|
|
133
|
-
...Object.values(config?.functions ?? {})
|
|
134
|
-
]
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* @ignore
|
|
139
|
-
*/
|
|
140
|
-
constructor(instances) {
|
|
141
|
-
instances?.forEach(f => {
|
|
142
|
-
f();
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPWorkflowModule, deps: [{ token: 'AXPWorkflowModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
146
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.2", ngImport: i0, type: AXPWorkflowModule }); }
|
|
147
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPWorkflowModule }); }
|
|
148
|
-
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPWorkflowModule, decorators: [{
|
|
150
|
-
type: NgModule,
|
|
151
|
-
args: [{
|
|
152
|
-
imports: [],
|
|
153
|
-
exports: [],
|
|
154
|
-
declarations: [],
|
|
155
|
-
}]
|
|
156
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
157
|
-
type: Optional
|
|
158
|
-
}, {
|
|
159
|
-
type: Inject,
|
|
160
|
-
args: ['AXPWorkflowModuleFactory']
|
|
161
|
-
}] }] });
|
|
162
|
-
|
|
163
71
|
class AXPWorkflowContext {
|
|
164
|
-
constructor() {
|
|
165
|
-
|
|
72
|
+
constructor(initialData = {}) {
|
|
73
|
+
//private variables: Map<string, any> = new Map();
|
|
74
|
+
this.variables = {};
|
|
166
75
|
this.stepOutputs = new Map();
|
|
167
|
-
|
|
76
|
+
this.variables = cloneDeep(initialData);
|
|
168
77
|
}
|
|
169
78
|
setVariable(key, value) {
|
|
170
|
-
this.variables
|
|
79
|
+
set(this.variables, key, value);
|
|
171
80
|
}
|
|
172
81
|
getVariable(key) {
|
|
173
|
-
return this.variables
|
|
82
|
+
return get(this.variables, key);
|
|
174
83
|
}
|
|
175
84
|
setOutput(stepId, output) {
|
|
176
85
|
this.stepOutputs.set(stepId, output);
|
|
@@ -178,6 +87,10 @@ class AXPWorkflowContext {
|
|
|
178
87
|
getOutput(stepId) {
|
|
179
88
|
return this.stepOutputs.get(stepId);
|
|
180
89
|
}
|
|
90
|
+
mergeWith(context) {
|
|
91
|
+
this.stepOutputs = new Map([...this.stepOutputs, ...context.stepOutputs]);
|
|
92
|
+
this.variables = merge(this.variables, context.variables);
|
|
93
|
+
}
|
|
181
94
|
}
|
|
182
95
|
class AXPWorkflowAction {
|
|
183
96
|
constructor() {
|
|
@@ -221,9 +134,8 @@ class AXPWorkflowService {
|
|
|
221
134
|
// Instantiate or retrieve the workflow
|
|
222
135
|
const wk = typeof workflow === 'string' ? this.getWorkflowInstance(workflow) : workflow;
|
|
223
136
|
let currentStepId = wk.startStepId;
|
|
224
|
-
const context = new AXPWorkflowContext();
|
|
137
|
+
const context = new AXPWorkflowContext(initialContext);
|
|
225
138
|
// Initialize context with initial variables
|
|
226
|
-
Object.entries(initialContext).forEach(e => context.setVariable(e[0], e[1]));
|
|
227
139
|
while (currentStepId) {
|
|
228
140
|
const currentStep = wk.steps[currentStepId];
|
|
229
141
|
if (!currentStep) {
|
|
@@ -232,12 +144,18 @@ class AXPWorkflowService {
|
|
|
232
144
|
// Instantiate or retrieve the action
|
|
233
145
|
const action = typeof currentStep.action === 'string' ? this.getActionInstance(currentStep.action) : currentStep.action;
|
|
234
146
|
if (currentStep.input) {
|
|
235
|
-
|
|
147
|
+
let inputs = {};
|
|
148
|
+
await this.processInputs(cloneDeep(currentStep.input), inputs, '', context);
|
|
149
|
+
Object.assign(action, inputs);
|
|
236
150
|
}
|
|
237
151
|
try {
|
|
238
|
-
await
|
|
152
|
+
await new Promise((resolve) => setTimeout(async () => {
|
|
153
|
+
await action.execute(context);
|
|
154
|
+
resolve(0);
|
|
155
|
+
}, 0));
|
|
239
156
|
}
|
|
240
157
|
catch (error) {
|
|
158
|
+
console.error(error);
|
|
241
159
|
throw new AXPWorkflowError('Workflow Error', error);
|
|
242
160
|
}
|
|
243
161
|
// Determine the next step based on the conditions
|
|
@@ -249,6 +167,15 @@ class AXPWorkflowService {
|
|
|
249
167
|
break; // Exit the loop if no next step is determined
|
|
250
168
|
}
|
|
251
169
|
}
|
|
170
|
+
return context;
|
|
171
|
+
}
|
|
172
|
+
//TODO : replace with AXDataGenerator
|
|
173
|
+
uuid() {
|
|
174
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {
|
|
175
|
+
const random = (Math.random() * 16) | 0;
|
|
176
|
+
const value = char === 'x' ? random : (random & 0x3) | 0x8;
|
|
177
|
+
return value.toString(16);
|
|
178
|
+
});
|
|
252
179
|
}
|
|
253
180
|
getActionInstance(actionName) {
|
|
254
181
|
const actionType = this.registryService.getAction(actionName);
|
|
@@ -304,8 +231,19 @@ class AXPWorkflowService {
|
|
|
304
231
|
throw new AXPWorkflowError(`Unsupported condition type: ${condition.type}`);
|
|
305
232
|
}
|
|
306
233
|
}
|
|
307
|
-
async evaluateExpression(
|
|
234
|
+
async evaluateExpression(templateExpression, context) {
|
|
308
235
|
try {
|
|
236
|
+
let expression = '';
|
|
237
|
+
if (typeof templateExpression === 'string' && templateExpression.trim().includes('{{')) {
|
|
238
|
+
const expressionMatch = templateExpression.match(/\{\{\s*(.*?)\s*\}\}/);
|
|
239
|
+
if (!expressionMatch) {
|
|
240
|
+
throw Error(`No valid expression found in "${templateExpression}"`);
|
|
241
|
+
}
|
|
242
|
+
expression = expressionMatch[1];
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
expression = templateExpression;
|
|
246
|
+
}
|
|
309
247
|
// Create a scope that includes context and registered functions
|
|
310
248
|
const scope = { context, ...this.createFunctionScope() };
|
|
311
249
|
// Evaluating the expression within the created scope
|
|
@@ -318,6 +256,27 @@ class AXPWorkflowService {
|
|
|
318
256
|
return false;
|
|
319
257
|
}
|
|
320
258
|
}
|
|
259
|
+
async processInputs(obj, inputs, pathPrefix = '', context = {}) {
|
|
260
|
+
if (!obj)
|
|
261
|
+
return;
|
|
262
|
+
for await (const i of Object.entries(obj)) {
|
|
263
|
+
const key = i[0];
|
|
264
|
+
const value = i[1];
|
|
265
|
+
const currentPath = pathPrefix ? `${pathPrefix}.${key}` : key;
|
|
266
|
+
if (typeof value === 'string' && value.trim().includes('{{')) {
|
|
267
|
+
const expValue = await this.evaluateExpression(value, context);
|
|
268
|
+
set(inputs, currentPath, expValue);
|
|
269
|
+
}
|
|
270
|
+
else if (typeof value === 'object' && value !== null && (value.constructor === Object || Array.isArray(value))) {
|
|
271
|
+
// Recursively handle nested objects
|
|
272
|
+
this.processInputs(value, inputs, currentPath, context);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
// Apply static values directly
|
|
276
|
+
set(inputs, currentPath, value);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
321
280
|
createFunctionScope() {
|
|
322
281
|
const scope = {};
|
|
323
282
|
this.registryService.getFunctionNames().forEach((name) => {
|
|
@@ -342,6 +301,127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
|
342
301
|
}]
|
|
343
302
|
}], ctorParameters: () => [{ type: AXPWorkflowRegistryService }, { type: i0.Injector }] });
|
|
344
303
|
|
|
304
|
+
class AXPStartWorkflowAction extends AXPWorkflowAction {
|
|
305
|
+
constructor() {
|
|
306
|
+
super(...arguments);
|
|
307
|
+
this.workflowService = inject(AXPWorkflowService);
|
|
308
|
+
}
|
|
309
|
+
async execute(context) {
|
|
310
|
+
try {
|
|
311
|
+
let newContext = await this.workflowService.execute(this.workflow, this.context);
|
|
312
|
+
context.mergeWith(newContext);
|
|
313
|
+
}
|
|
314
|
+
catch (e) {
|
|
315
|
+
throw e;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPStartWorkflowAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
319
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPStartWorkflowAction, providedIn: 'root' }); }
|
|
320
|
+
}
|
|
321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPStartWorkflowAction, decorators: [{
|
|
322
|
+
type: Injectable,
|
|
323
|
+
args: [{
|
|
324
|
+
providedIn: 'root',
|
|
325
|
+
}]
|
|
326
|
+
}] });
|
|
327
|
+
|
|
328
|
+
class AXPWorkflowModule {
|
|
329
|
+
static forRoot(config) {
|
|
330
|
+
return {
|
|
331
|
+
ngModule: AXPWorkflowModule,
|
|
332
|
+
providers: [
|
|
333
|
+
{
|
|
334
|
+
provide: 'AXPWorkflowModuleFactory',
|
|
335
|
+
useFactory: (registry) => () => {
|
|
336
|
+
registry.registerAction("start-workflow", AXPStartWorkflowAction);
|
|
337
|
+
//
|
|
338
|
+
if (config?.functions) {
|
|
339
|
+
for (const [key, type] of Object.entries(config.functions)) {
|
|
340
|
+
registry.registerFunction(key, type);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
//
|
|
344
|
+
if (config?.actions) {
|
|
345
|
+
for (const [key, type] of Object.entries(config.actions)) {
|
|
346
|
+
registry.registerAction(key, type);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
//
|
|
350
|
+
if (config?.workflows) {
|
|
351
|
+
for (const [key, type] of Object.entries(config.workflows)) {
|
|
352
|
+
registry.registerWorkflow(key, type);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
deps: [AXPWorkflowRegistryService],
|
|
357
|
+
multi: true
|
|
358
|
+
},
|
|
359
|
+
...Object.values(config?.actions ?? { AXPStartWorkflowAction }),
|
|
360
|
+
...Object.values(config?.functions ?? {}),
|
|
361
|
+
]
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
static forChild(config) {
|
|
365
|
+
return {
|
|
366
|
+
ngModule: AXPWorkflowModule,
|
|
367
|
+
providers: [
|
|
368
|
+
{
|
|
369
|
+
provide: 'AXPWorkflowModuleFactory',
|
|
370
|
+
useFactory: (registry) => () => {
|
|
371
|
+
registry.registerAction("start-workflow", AXPStartWorkflowAction);
|
|
372
|
+
//
|
|
373
|
+
if (config?.functions) {
|
|
374
|
+
for (const [key, type] of Object.entries(config.functions)) {
|
|
375
|
+
registry.registerFunction(key, type);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
//
|
|
379
|
+
if (config?.actions) {
|
|
380
|
+
for (const [key, type] of Object.entries(config.actions)) {
|
|
381
|
+
registry.registerAction(key, type);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
//
|
|
385
|
+
if (config?.workflows) {
|
|
386
|
+
for (const [key, type] of Object.entries(config.workflows)) {
|
|
387
|
+
registry.registerWorkflow(key, type);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
deps: [AXPWorkflowRegistryService],
|
|
392
|
+
multi: true
|
|
393
|
+
},
|
|
394
|
+
...Object.values(config?.actions ?? {}),
|
|
395
|
+
...Object.values(config?.functions ?? {})
|
|
396
|
+
]
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* @ignore
|
|
401
|
+
*/
|
|
402
|
+
constructor(instances) {
|
|
403
|
+
instances?.forEach(f => {
|
|
404
|
+
f();
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPWorkflowModule, deps: [{ token: 'AXPWorkflowModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
408
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.2", ngImport: i0, type: AXPWorkflowModule }); }
|
|
409
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPWorkflowModule }); }
|
|
410
|
+
}
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPWorkflowModule, decorators: [{
|
|
412
|
+
type: NgModule,
|
|
413
|
+
args: [{
|
|
414
|
+
imports: [],
|
|
415
|
+
exports: [],
|
|
416
|
+
declarations: [],
|
|
417
|
+
}]
|
|
418
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
419
|
+
type: Optional
|
|
420
|
+
}, {
|
|
421
|
+
type: Inject,
|
|
422
|
+
args: ['AXPWorkflowModuleFactory']
|
|
423
|
+
}] }] });
|
|
424
|
+
|
|
345
425
|
/**
|
|
346
426
|
* Generated bundle index. Do not edit.
|
|
347
427
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-workflow.mjs","sources":["../../../../libs/platform/workflow/src/lib/errors.types.ts","../../../../libs/platform/workflow/src/lib/workflow-event-dispatcher.service.ts","../../../../libs/platform/workflow/src/lib/workflow-registery.service.ts","../../../../libs/platform/workflow/src/lib/workflow.module.ts","../../../../libs/platform/workflow/src/lib/workflow.types.ts","../../../../libs/platform/workflow/src/lib/workflow.service.ts","../../../../libs/platform/workflow/src/acorex-platform-workflow.ts"],"sourcesContent":["export class AXPWorkflowError extends Error {\r\n constructor(message: string, public inner: Error | null = null) {\r\n super(message);\r\n this.name = 'AXPWorkflowError';\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { AXPWorkflowEvent } from './workflow.types';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AXPWorkflowEventService {\r\n private eventSubject = new Subject<AXPWorkflowEvent>();\r\n\r\n dispatch(event: AXPWorkflowEvent): void {\r\n this.eventSubject.next(event);\r\n }\r\n\r\n get events$(): Observable<AXPWorkflowEvent> {\r\n return this.eventSubject.asObservable();\r\n }\r\n}\r\n","import { Injectable, Type } from '@angular/core';\r\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction } from './workflow.types';\r\n\r\n\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AXPWorkflowRegistryService {\r\n private functionsMap = new Map<string, Type<AXPWorkflowFunction>>();\r\n private actionsMap = new Map<string, Type<AXPWorkflowAction>>();\r\n private workflowsMap = new Map<string, AXPWorkflow>();\r\n\r\n registerWorkflow(name: string, workflow: AXPWorkflow): void {\r\n this.workflowsMap.set(name, workflow);\r\n }\r\n\r\n getWorkflow(name: string): AXPWorkflow | undefined {\r\n return this.workflowsMap.get(name);\r\n }\r\n\r\n registerAction(name: string, action: Type<AXPWorkflowAction>): void {\r\n this.actionsMap.set(name, action);\r\n }\r\n\r\n getAction(name: string): Type<AXPWorkflowAction> | undefined {\r\n return this.actionsMap.get(name);\r\n }\r\n\r\n registerFunction(name: string, func: Type<AXPWorkflowFunction>): void {\r\n this.functionsMap.set(name, func);\r\n }\r\n\r\n getFunction(name: string): Type<AXPWorkflowFunction> | undefined {\r\n return this.functionsMap.get(name);\r\n }\r\n\r\n getFunctionNames(): string[] {\r\n return Array.from(this.functionsMap.keys());\r\n }\r\n}","import { Inject, ModuleWithProviders, NgModule, Optional, Type } from \"@angular/core\";\r\nimport { AXPWorkflowRegistryService } from \"./workflow-registery.service\";\r\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction } from \"./workflow.types\";\r\n\r\n\r\nexport interface AXPWorkflowModuleConfigs {\r\n functions?: {\r\n [name: string]: Type<AXPWorkflowFunction>\r\n },\r\n actions?: {\r\n [name: string]: Type<AXPWorkflowAction>\r\n },\r\n workflows?: {\r\n [name: string]: AXPWorkflow\r\n }\r\n}\r\n\r\n@NgModule({\r\n imports: [],\r\n exports: [],\r\n declarations: [],\r\n})\r\nexport class AXPWorkflowModule {\r\n\r\n static forRoot(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule> {\r\n return {\r\n ngModule: AXPWorkflowModule,\r\n providers: [\r\n {\r\n provide: 'AXPWorkflowModuleFactory',\r\n useFactory: (registry: AXPWorkflowRegistryService) => () => {\r\n if (config?.functions) {\r\n for (const [key, type] of Object.entries(config.functions)) {\r\n registry.registerFunction(key, type);\r\n }\r\n }\r\n //\r\n if (config?.actions) {\r\n for (const [key, type] of Object.entries(config.actions)) {\r\n registry.registerAction(key, type);\r\n }\r\n }\r\n //\r\n if (config?.workflows) {\r\n for (const [key, type] of Object.entries(config.workflows)) {\r\n registry.registerWorkflow(key, type);\r\n }\r\n }\r\n },\r\n deps: [AXPWorkflowRegistryService],\r\n multi: true\r\n },\r\n ...Object.values(config?.actions ?? {}),\r\n ...Object.values(config?.functions ?? {}),\r\n ]\r\n };\r\n }\r\n\r\n static forChild(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule> {\r\n return {\r\n ngModule: AXPWorkflowModule,\r\n providers: [\r\n {\r\n provide: 'AXPWorkflowModuleFactory',\r\n useFactory: (registry: AXPWorkflowRegistryService) => () => {\r\n if (config?.functions) {\r\n for (const [key, type] of Object.entries(config.functions)) {\r\n registry.registerFunction(key, type);\r\n }\r\n }\r\n //\r\n if (config?.actions) {\r\n for (const [key, type] of Object.entries(config.actions)) {\r\n registry.registerAction(key, type);\r\n }\r\n }\r\n //\r\n if (config?.workflows) {\r\n for (const [key, type] of Object.entries(config.workflows)) {\r\n registry.registerWorkflow(key, type);\r\n }\r\n }\r\n },\r\n deps: [AXPWorkflowRegistryService],\r\n multi: true\r\n },\r\n ...Object.values(config?.actions ?? {}),\r\n ...Object.values(config?.functions ?? {})\r\n ]\r\n };\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(@Optional() @Inject('AXPWorkflowModuleFactory') instances: any[]) {\r\n instances?.forEach(f => {\r\n f();\r\n });\r\n }\r\n}\r\n","import { Injectable, inject } from '@angular/core';\r\nimport { filter } from 'rxjs';\r\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\r\n\r\nexport interface AXPWorkflow {\r\n steps: { [stepName: string]: AXPWorkflowStep };\r\n startStepId: string;\r\n}\r\n\r\n\r\nexport class AXPWorkflowContext {\r\n private variables: Map<string, any> = new Map();\r\n private stepOutputs: Map<string, any> = new Map();\r\n\r\n setVariable(key: string, value: any): void {\r\n this.variables.set(key, value);\r\n }\r\n\r\n getVariable<T = any>(key: string): T {\r\n return this.variables.get(key);\r\n }\r\n\r\n setOutput(stepId: string, output: any): void {\r\n this.stepOutputs.set(stepId, output);\r\n }\r\n\r\n getOutput<T = any>(stepId: string): T {\r\n return this.stepOutputs.get(stepId);\r\n }\r\n\r\n // You can add more helper methods as needed\r\n}\r\n\r\nexport type AXPWorkflowActionInput = any;\r\n\r\nexport type AXPWorkflowConditionType = 'AND' | 'OR' | 'SINGLE';\r\n\r\nexport interface AXPWorkflowCondition {\r\n type: AXPWorkflowConditionType;\r\n conditions?: AXPWorkflowCondition[]; // Nested conditions\r\n expression?: string; // Used if type is 'SINGLE'\r\n}\r\n\r\nexport interface AXPWorkflowNextStep {\r\n conditions: AXPWorkflowCondition[];\r\n nextStepId: string;\r\n}\r\n\r\nexport interface AXPWorkflowStep {\r\n id: string;\r\n action: AXPWorkflowAction | string;\r\n input?: AXPWorkflowActionInput;\r\n nextSteps?: AXPWorkflowNextStep[];\r\n conditions?: AXPWorkflowCondition[];\r\n}\r\n@Injectable()\r\nexport abstract class AXPWorkflowAction {\r\n private eventService = inject(AXPWorkflowEventService);\r\n\r\n protected dispatch(event: AXPWorkflowEvent): void {\r\n this.eventService.dispatch(event);\r\n }\r\n\r\n abstract execute(context: AXPWorkflowContext): Promise<void>;\r\n}\r\n\r\n@Injectable()\r\nexport abstract class AXPWorkflowFunction {\r\n abstract execute(...args: any[]): Promise<any> | any;\r\n}\r\n\r\nexport interface AXPWorkflowEvent<T = any> {\r\n type: string;\r\n payload?: T;\r\n}\r\n\r\n\r\n\r\nexport function createWorkFlowEvent<T>(type: string) {\r\n const eventCreator = (payload: T) => ({ type, payload });\r\n eventCreator.type = type;\r\n return eventCreator;\r\n}\r\n\r\nexport function ofType<T extends { type: string }>(...allowedTypes: Array<{ type: string }>) {\r\n return filter((event: T) => allowedTypes.some((type) => event.type === type.type));\r\n}\r\n","import { Injectable, Injector, inject } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { AXPWorkflowError } from './errors.types';\r\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\r\nimport { AXPWorkflowRegistryService } from './workflow-registery.service';\r\nimport {\r\n AXPWorkflow,\r\n AXPWorkflowAction,\r\n AXPWorkflowCondition,\r\n AXPWorkflowContext,\r\n AXPWorkflowEvent,\r\n AXPWorkflowFunction,\r\n AXPWorkflowNextStep,\r\n AXPWorkflowStep,\r\n} from './workflow.types';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AXPWorkflowService {\r\n private eventService = inject(AXPWorkflowEventService);\r\n\r\n get events$(): Observable<AXPWorkflowEvent> {\r\n return this.eventService.events$;\r\n }\r\n\r\n constructor(private registryService: AXPWorkflowRegistryService, private injector: Injector) { }\r\n\r\n async execute(workflow: AXPWorkflow | string, initialContext: any = {}): Promise<void> {\r\n // Instantiate or retrieve the workflow\r\n const wk = typeof workflow === 'string' ? this.getWorkflowInstance(workflow) : workflow;\r\n\r\n let currentStepId = wk.startStepId;\r\n const context = new AXPWorkflowContext();\r\n // Initialize context with initial variables\r\n Object.entries(initialContext).forEach(e => context.setVariable(e[0], e[1]));\r\n\r\n while (currentStepId) {\r\n const currentStep = wk.steps[currentStepId];\r\n if (!currentStep) {\r\n throw new AXPWorkflowError(`Step '${currentStepId}' not found in the workflow steps.`);\r\n }\r\n\r\n // Instantiate or retrieve the action\r\n const action =\r\n typeof currentStep.action === 'string' ? this.getActionInstance(currentStep.action) : currentStep.action;\r\n if (currentStep.input) {\r\n Object.assign(action, currentStep.input);\r\n }\r\n\r\n try {\r\n await action.execute(context);\r\n } catch (error) {\r\n throw new AXPWorkflowError('Workflow Error', error as Error);\r\n }\r\n // Determine the next step based on the conditions\r\n const nextStepInfo = await this.determineNextStep(currentStep, context);\r\n if (nextStepInfo) {\r\n currentStepId = nextStepInfo.nextStepId;\r\n } else {\r\n break; // Exit the loop if no next step is determined\r\n }\r\n }\r\n }\r\n\r\n private getActionInstance(actionName: string): AXPWorkflowAction {\r\n const actionType = this.registryService.getAction(actionName);\r\n if (!actionType) {\r\n throw new AXPWorkflowError(`Action type '${actionName}' not found in the registry.`);\r\n }\r\n return this.injector.get(actionType);\r\n }\r\n\r\n private getWorkflowInstance(workflowName: string): AXPWorkflow {\r\n const workflowType = this.registryService.getWorkflow(workflowName);\r\n if (!workflowType) {\r\n throw new AXPWorkflowError(`Workflow type '${workflowName}' not found in the registry.`);\r\n }\r\n return workflowType;\r\n }\r\n\r\n private async determineNextStep(\r\n currentStep: AXPWorkflowStep,\r\n context: AXPWorkflowContext\r\n ): Promise<AXPWorkflowNextStep | null> {\r\n if (!currentStep.nextSteps) {\r\n return null;\r\n }\r\n for (const nextStep of currentStep.nextSteps) {\r\n if (await this.evaluateCondition(nextStep.conditions, context)) {\r\n return nextStep;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private async evaluateCondition(conditions: AXPWorkflowCondition[], context: AXPWorkflowContext): Promise<boolean> {\r\n if (!conditions || conditions.length === 0) {\r\n return true; // If no conditions, the step proceeds\r\n }\r\n\r\n // Map each condition to a promise using evaluateSingleCondition\r\n const conditionPromises = conditions.map((condition) => this.evaluateSingleCondition(condition, context));\r\n\r\n // Wait for all promises to resolve\r\n const results = await Promise.all(conditionPromises);\r\n\r\n // Check if every condition is true\r\n return results.every((result) => result);\r\n }\r\n\r\n private async evaluateSingleCondition(\r\n condition: AXPWorkflowCondition,\r\n context: AXPWorkflowContext\r\n ): Promise<boolean> {\r\n switch (condition.type) {\r\n case 'SINGLE':\r\n return (!condition.expression ? true : await this.evaluateExpression(condition.expression, context)) as boolean;\r\n case 'AND':\r\n // Evaluate all conditions with 'AND' logic\r\n const andConditions = condition.conditions ?? [];\r\n const andResults = await Promise.all(andConditions.map((cond) => this.evaluateSingleCondition(cond, context)));\r\n return andResults.every((result) => result);\r\n\r\n case 'OR':\r\n // Evaluate all conditions with 'OR' logic\r\n const orConditions = condition.conditions ?? [];\r\n const orResults = await Promise.all(orConditions.map((cond) => this.evaluateSingleCondition(cond, context)));\r\n return orResults.some((result) => result);\r\n\r\n default:\r\n throw new AXPWorkflowError(`Unsupported condition type: ${condition.type}`);\r\n }\r\n }\r\n\r\n private async evaluateExpression(expression: string, context: AXPWorkflowContext): Promise<Boolean> {\r\n try {\r\n // Create a scope that includes context and registered functions\r\n const scope = { context, ...this.createFunctionScope() };\r\n\r\n // Evaluating the expression within the created scope\r\n const sandbox = new Function('scope', `return (async function() { with (scope) { return ${expression}; } })();`);\r\n const result = await sandbox(scope);\r\n return result;\r\n } catch (error) {\r\n console.error('Error evaluating expression:', error);\r\n return false;\r\n }\r\n }\r\n\r\n private createFunctionScope(): any {\r\n const scope: any = {};\r\n this.registryService.getFunctionNames().forEach((name) => {\r\n scope[name] = this.getFunctionInstance(name).execute;\r\n });\r\n return scope;\r\n }\r\n\r\n private getFunctionInstance(functionName: string): AXPWorkflowFunction {\r\n const functionType = this.registryService.getFunction(functionName);\r\n if (!functionType) {\r\n throw new AXPWorkflowError(`Function type '${functionName}' not found in the registry.`);\r\n }\r\n return this.injector.get(functionType);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AXPWorkflowRegistryService"],"mappings":";;;;AAAM,MAAO,gBAAiB,SAAQ,KAAK,CAAA;IACvC,WAAY,CAAA,OAAe,EAAS,KAAA,GAAsB,IAAI,EAAA;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QADiB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAqB;AAE1D,QAAA,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;KAClC;AACJ;;MCEY,uBAAuB,CAAA;AAHpC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAoB,CAAC;AASxD,KAAA;AAPC,IAAA,QAAQ,CAAC,KAAuB,EAAA;AAC9B,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC/B;AAED,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;KACzC;8GATU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAA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A,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-workflow.mjs","sources":["../../../../libs/platform/workflow/src/lib/errors.types.ts","../../../../libs/platform/workflow/src/lib/workflow-event-dispatcher.service.ts","../../../../libs/platform/workflow/src/lib/workflow-registery.service.ts","../../../../libs/platform/workflow/src/lib/workflow.types.ts","../../../../libs/platform/workflow/src/lib/workflow.service.ts","../../../../libs/platform/workflow/src/lib/actions/start-workflow.action.ts","../../../../libs/platform/workflow/src/lib/workflow.module.ts","../../../../libs/platform/workflow/src/acorex-platform-workflow.ts"],"sourcesContent":["export class AXPWorkflowError extends Error {\r\n constructor(message: string, public inner: Error | null = null) {\r\n super(message);\r\n this.name = 'AXPWorkflowError';\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { AXPWorkflowEvent } from './workflow.types';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AXPWorkflowEventService {\r\n private eventSubject = new Subject<AXPWorkflowEvent>();\r\n\r\n dispatch(event: AXPWorkflowEvent): void {\r\n this.eventSubject.next(event);\r\n }\r\n\r\n get events$(): Observable<AXPWorkflowEvent> {\r\n return this.eventSubject.asObservable();\r\n }\r\n}\r\n","import { Injectable, Type } from '@angular/core';\r\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction } from './workflow.types';\r\n\r\n\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AXPWorkflowRegistryService {\r\n private functionsMap = new Map<string, Type<AXPWorkflowFunction>>();\r\n private actionsMap = new Map<string, Type<AXPWorkflowAction>>();\r\n private workflowsMap = new Map<string, AXPWorkflow>();\r\n\r\n registerWorkflow(name: string, workflow: AXPWorkflow): void {\r\n this.workflowsMap.set(name, workflow);\r\n }\r\n\r\n getWorkflow(name: string): AXPWorkflow | undefined {\r\n return this.workflowsMap.get(name);\r\n }\r\n\r\n registerAction(name: string, action: Type<AXPWorkflowAction>): void {\r\n this.actionsMap.set(name, action);\r\n }\r\n\r\n getAction(name: string): Type<AXPWorkflowAction> | undefined {\r\n return this.actionsMap.get(name);\r\n }\r\n\r\n registerFunction(name: string, func: Type<AXPWorkflowFunction>): void {\r\n this.functionsMap.set(name, func);\r\n }\r\n\r\n getFunction(name: string): Type<AXPWorkflowFunction> | undefined {\r\n return this.functionsMap.get(name);\r\n }\r\n\r\n getFunctionNames(): string[] {\r\n return Array.from(this.functionsMap.keys());\r\n }\r\n}","import { Injectable, inject } from '@angular/core';\r\nimport { filter } from 'rxjs';\r\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\r\nimport { cloneDeep, get, merge, set } from 'lodash-es';\r\n\r\nexport interface AXPWorkflow {\r\n steps: { [stepName: string]: AXPWorkflowStep };\r\n startStepId: string;\r\n}\r\n\r\n\r\nexport class AXPWorkflowContext {\r\n\r\n constructor(initialData: any = {}) {\r\n this.variables = cloneDeep(initialData);\r\n }\r\n\r\n //private variables: Map<string, any> = new Map();\r\n private variables: any = {};\r\n private stepOutputs: Map<string, any> = new Map();\r\n\r\n setVariable(key: string, value: any): void {\r\n set(this.variables, key, value);\r\n }\r\n\r\n getVariable<T = any>(key: string): T {\r\n return get(this.variables, key);\r\n }\r\n\r\n setOutput(stepId: string, output: any): void {\r\n this.stepOutputs.set(stepId, output);\r\n }\r\n\r\n getOutput<T = any>(stepId: string): T {\r\n return this.stepOutputs.get(stepId);\r\n }\r\n\r\n mergeWith(context: AXPWorkflowContext) {\r\n this.stepOutputs = new Map([...this.stepOutputs, ...context.stepOutputs])\r\n this.variables = merge(this.variables, context.variables);\r\n }\r\n\r\n // You can add more helper methods as needed\r\n}\r\n\r\nexport type AXPWorkflowActionInput = any;\r\n\r\nexport type AXPWorkflowConditionType = 'AND' | 'OR' | 'SINGLE';\r\n\r\nexport interface AXPWorkflowCondition {\r\n type: AXPWorkflowConditionType;\r\n conditions?: AXPWorkflowCondition[]; // Nested conditions\r\n expression?: string; // Used if type is 'SINGLE'\r\n}\r\n\r\nexport interface AXPWorkflowNextStep {\r\n conditions: AXPWorkflowCondition[];\r\n nextStepId: string;\r\n}\r\n\r\nexport interface AXPWorkflowStep {\r\n id?: string;\r\n action: AXPWorkflowAction | string;\r\n input?: AXPWorkflowActionInput;\r\n nextSteps?: AXPWorkflowNextStep[];\r\n conditions?: AXPWorkflowCondition[];\r\n}\r\n@Injectable()\r\nexport abstract class AXPWorkflowAction {\r\n private eventService = inject(AXPWorkflowEventService);\r\n\r\n protected dispatch(event: AXPWorkflowEvent): void {\r\n this.eventService.dispatch(event);\r\n }\r\n\r\n abstract execute(context: AXPWorkflowContext): Promise<void>;\r\n}\r\n\r\n@Injectable()\r\nexport abstract class AXPWorkflowFunction {\r\n abstract execute(...args: any[]): Promise<any> | any;\r\n}\r\n\r\nexport interface AXPWorkflowEvent<T = any> {\r\n type: string;\r\n payload?: T;\r\n}\r\n\r\n\r\n\r\nexport function createWorkFlowEvent<T>(type: string) {\r\n const eventCreator = (payload: T) => ({ type, payload });\r\n eventCreator.type = type;\r\n return eventCreator;\r\n}\r\n\r\nexport function ofType<T extends { type: string }>(...allowedTypes: Array<{ type: string }>) {\r\n return filter((event: T) => allowedTypes.some((type) => event.type === type.type));\r\n}\r\n","import { Injectable, Injector, inject } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { AXPWorkflowError } from './errors.types';\r\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\r\nimport { AXPWorkflowRegistryService } from './workflow-registery.service';\r\nimport {\r\n AXPWorkflow,\r\n AXPWorkflowAction,\r\n AXPWorkflowCondition,\r\n AXPWorkflowContext,\r\n AXPWorkflowEvent,\r\n AXPWorkflowFunction,\r\n AXPWorkflowNextStep,\r\n AXPWorkflowStep,\r\n} from './workflow.types';\r\nimport { cloneDeep, set } from 'lodash-es';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AXPWorkflowService {\r\n private eventService = inject(AXPWorkflowEventService);\r\n\r\n\r\n get events$(): Observable<AXPWorkflowEvent> {\r\n return this.eventService.events$;\r\n }\r\n\r\n constructor(private registryService: AXPWorkflowRegistryService, private injector: Injector) { }\r\n\r\n async execute(workflow: AXPWorkflow | string, initialContext: any = {}): Promise<AXPWorkflowContext> {\r\n // Instantiate or retrieve the workflow\r\n const wk = typeof workflow === 'string' ? this.getWorkflowInstance(workflow) : workflow;\r\n\r\n let currentStepId = wk.startStepId;\r\n const context = new AXPWorkflowContext(initialContext);\r\n // Initialize context with initial variables\r\n\r\n while (currentStepId) {\r\n const currentStep = wk.steps[currentStepId];\r\n if (!currentStep) {\r\n throw new AXPWorkflowError(`Step '${currentStepId}' not found in the workflow steps.`);\r\n }\r\n\r\n // Instantiate or retrieve the action\r\n const action = typeof currentStep.action === 'string' ? this.getActionInstance(currentStep.action) : currentStep.action;\r\n if (currentStep.input) {\r\n let inputs: any = {};\r\n await this.processInputs(cloneDeep(currentStep.input), inputs, '', context);\r\n Object.assign(action, inputs);\r\n }\r\n try {\r\n await new Promise((resolve) => setTimeout(async () => {\r\n await action.execute(context);\r\n resolve(0);\r\n }, 0));\r\n } catch (error) {\r\n console.error(error);\r\n throw new AXPWorkflowError('Workflow Error', error as Error);\r\n }\r\n // Determine the next step based on the conditions\r\n const nextStepInfo = await this.determineNextStep(currentStep, context);\r\n if (nextStepInfo) {\r\n currentStepId = nextStepInfo.nextStepId;\r\n } else {\r\n break; // Exit the loop if no next step is determined\r\n }\r\n }\r\n return context;\r\n }\r\n\r\n //TODO : replace with AXDataGenerator\r\n private uuid(): string {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {\r\n const random = (Math.random() * 16) | 0;\r\n const value = char === 'x' ? random : (random & 0x3) | 0x8;\r\n return value.toString(16);\r\n });\r\n }\r\n\r\n private getActionInstance(actionName: string): AXPWorkflowAction {\r\n const actionType = this.registryService.getAction(actionName);\r\n if (!actionType) {\r\n throw new AXPWorkflowError(`Action type '${actionName}' not found in the registry.`);\r\n }\r\n return this.injector.get(actionType,);\r\n }\r\n\r\n private getWorkflowInstance(workflowName: string): AXPWorkflow {\r\n const workflowType = this.registryService.getWorkflow(workflowName);\r\n if (!workflowType) {\r\n throw new AXPWorkflowError(`Workflow type '${workflowName}' not found in the registry.`);\r\n }\r\n return workflowType;\r\n }\r\n\r\n private async determineNextStep(\r\n currentStep: AXPWorkflowStep,\r\n context: AXPWorkflowContext\r\n ): Promise<AXPWorkflowNextStep | null> {\r\n if (!currentStep.nextSteps) {\r\n return null;\r\n }\r\n for (const nextStep of currentStep.nextSteps) {\r\n if (await this.evaluateCondition(nextStep.conditions, context)) {\r\n return nextStep;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private async evaluateCondition(conditions: AXPWorkflowCondition[], context: AXPWorkflowContext): Promise<boolean> {\r\n if (!conditions || conditions.length === 0) {\r\n return true; // If no conditions, the step proceeds\r\n }\r\n\r\n // Map each condition to a promise using evaluateSingleCondition\r\n const conditionPromises = conditions.map((condition) => this.evaluateSingleCondition(condition, context));\r\n\r\n // Wait for all promises to resolve\r\n const results = await Promise.all(conditionPromises);\r\n\r\n // Check if every condition is true\r\n return results.every((result) => result);\r\n }\r\n\r\n private async evaluateSingleCondition(\r\n condition: AXPWorkflowCondition,\r\n context: AXPWorkflowContext\r\n ): Promise<boolean> {\r\n switch (condition.type) {\r\n case 'SINGLE':\r\n return (!condition.expression ? true : await this.evaluateExpression(condition.expression, context)) as boolean;\r\n case 'AND':\r\n // Evaluate all conditions with 'AND' logic\r\n const andConditions = condition.conditions ?? [];\r\n const andResults = await Promise.all(andConditions.map((cond) => this.evaluateSingleCondition(cond, context)));\r\n return andResults.every((result) => result);\r\n\r\n case 'OR':\r\n // Evaluate all conditions with 'OR' logic\r\n const orConditions = condition.conditions ?? [];\r\n const orResults = await Promise.all(orConditions.map((cond) => this.evaluateSingleCondition(cond, context)));\r\n return orResults.some((result) => result);\r\n\r\n default:\r\n throw new AXPWorkflowError(`Unsupported condition type: ${condition.type}`);\r\n }\r\n }\r\n\r\n private async evaluateExpression(templateExpression: string, context: AXPWorkflowContext): Promise<Boolean> {\r\n try {\r\n let expression = '';\r\n if (typeof templateExpression === 'string' && templateExpression.trim().includes('{{')) {\r\n const expressionMatch = templateExpression.match(/\\{\\{\\s*(.*?)\\s*\\}\\}/);\r\n if (!expressionMatch) {\r\n throw Error(`No valid expression found in \"${templateExpression}\"`);\r\n }\r\n expression = expressionMatch[1];\r\n }\r\n else {\r\n expression = templateExpression;\r\n }\r\n // Create a scope that includes context and registered functions\r\n const scope = { context, ...this.createFunctionScope() };\r\n // Evaluating the expression within the created scope\r\n const sandbox = new Function('scope', `return (async function() { with (scope) { return ${expression}; } })();`);\r\n const result = await sandbox(scope);\r\n return result;\r\n } catch (error) {\r\n console.error('Error evaluating expression:', error);\r\n return false;\r\n }\r\n }\r\n\r\n async processInputs(obj: any, inputs: any, pathPrefix: string = '', context: any = {}): Promise<void> {\r\n if (!obj)\r\n return;\r\n\r\n for await (const i of Object.entries(obj)) {\r\n const key = i[0];\r\n const value = i[1];\r\n const currentPath = pathPrefix ? `${pathPrefix}.${key}` : key;\r\n if (typeof value === 'string' && value.trim().includes('{{')) {\r\n const expValue = await this.evaluateExpression(value, context);\r\n set(inputs, currentPath, expValue);\r\n }\r\n else if (typeof value === 'object' && value !== null && (value.constructor === Object || Array.isArray(value))) {\r\n // Recursively handle nested objects\r\n this.processInputs(value, inputs, currentPath, context);\r\n } else {\r\n // Apply static values directly\r\n set(inputs, currentPath, value);\r\n }\r\n }\r\n }\r\n\r\n private createFunctionScope(): any {\r\n const scope: any = {};\r\n this.registryService.getFunctionNames().forEach((name) => {\r\n scope[name] = this.getFunctionInstance(name).execute;\r\n });\r\n return scope;\r\n }\r\n\r\n private getFunctionInstance(functionName: string): AXPWorkflowFunction {\r\n const functionType = this.registryService.getFunction(functionName);\r\n if (!functionType) {\r\n throw new AXPWorkflowError(`Function type '${functionName}' not found in the registry.`);\r\n }\r\n return this.injector.get(functionType);\r\n }\r\n}\r\n","import { inject, Injectable } from \"@angular/core\";\r\nimport { AXPWorkflowAction, AXPWorkflowContext } from \"../workflow.types\";\r\nimport { AXPWorkflowService } from \"../workflow.service\";\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AXPStartWorkflowAction extends AXPWorkflowAction {\r\n\r\n private workflowService = inject(AXPWorkflowService)\r\n private workflow: string;\r\n private context: any;\r\n\r\n async execute(context: AXPWorkflowContext): Promise<void> {\r\n try {\r\n let newContext = await this.workflowService.execute(this.workflow, this.context);\r\n context.mergeWith(newContext);\r\n }\r\n catch (e: unknown) {\r\n throw e;\r\n }\r\n\r\n }\r\n}","import { Inject, ModuleWithProviders, NgModule, Optional, Type } from \"@angular/core\";\r\nimport { AXPWorkflowRegistryService } from \"./workflow-registery.service\";\r\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction } from \"./workflow.types\";\r\nimport { AXPStartWorkflowAction } from \"./actions/start-workflow.action\";\r\n\r\n\r\nexport interface AXPWorkflowModuleConfigs {\r\n functions?: {\r\n [name: string]: Type<AXPWorkflowFunction>\r\n },\r\n actions?: {\r\n [name: string]: Type<AXPWorkflowAction>\r\n },\r\n workflows?: {\r\n [name: string]: AXPWorkflow\r\n }\r\n}\r\n\r\n@NgModule({\r\n imports: [],\r\n exports: [],\r\n declarations: [],\r\n})\r\nexport class AXPWorkflowModule {\r\n\r\n static forRoot(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule> {\r\n return {\r\n ngModule: AXPWorkflowModule,\r\n providers: [\r\n {\r\n provide: 'AXPWorkflowModuleFactory',\r\n useFactory: (registry: AXPWorkflowRegistryService) => () => {\r\n registry.registerAction(\"start-workflow\", AXPStartWorkflowAction);\r\n //\r\n if (config?.functions) {\r\n for (const [key, type] of Object.entries(config.functions)) {\r\n registry.registerFunction(key, type);\r\n }\r\n }\r\n //\r\n if (config?.actions) {\r\n for (const [key, type] of Object.entries(config.actions)) {\r\n registry.registerAction(key, type);\r\n }\r\n }\r\n //\r\n if (config?.workflows) {\r\n for (const [key, type] of Object.entries(config.workflows)) {\r\n registry.registerWorkflow(key, type);\r\n }\r\n }\r\n },\r\n deps: [AXPWorkflowRegistryService],\r\n multi: true\r\n },\r\n ...Object.values(config?.actions ?? { AXPStartWorkflowAction }),\r\n ...Object.values(config?.functions ?? {}),\r\n ]\r\n };\r\n }\r\n\r\n static forChild(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule> {\r\n return {\r\n ngModule: AXPWorkflowModule,\r\n providers: [\r\n {\r\n provide: 'AXPWorkflowModuleFactory',\r\n useFactory: (registry: AXPWorkflowRegistryService) => () => {\r\n registry.registerAction(\"start-workflow\", AXPStartWorkflowAction);\r\n //\r\n if (config?.functions) {\r\n for (const [key, type] of Object.entries(config.functions)) {\r\n registry.registerFunction(key, type);\r\n }\r\n }\r\n //\r\n if (config?.actions) {\r\n for (const [key, type] of Object.entries(config.actions)) {\r\n registry.registerAction(key, type);\r\n }\r\n }\r\n //\r\n if (config?.workflows) {\r\n for (const [key, type] of Object.entries(config.workflows)) {\r\n registry.registerWorkflow(key, type);\r\n }\r\n }\r\n },\r\n deps: [AXPWorkflowRegistryService],\r\n multi: true\r\n },\r\n ...Object.values(config?.actions ?? {}),\r\n ...Object.values(config?.functions ?? {})\r\n ]\r\n };\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(@Optional() @Inject('AXPWorkflowModuleFactory') instances: any[]) {\r\n instances?.forEach(f => {\r\n f();\r\n });\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\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AAE,SAAS,IAAI,EAAE,CAAC;AAC5C,aAAA;SACJ,CAAC;KACL;AAED;;AAEG;AACH,IAAA,WAAA,CAA4D,SAAgB,EAAA;AACxE,QAAA,SAAS,EAAE,OAAO,CAAC,CAAC,IAAG;AACnB,YAAA,CAAC,EAAE,CAAC;AACR,SAAC,CAAC,CAAC;KACN;AAjFQ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,kBA6EM,0BAA0B,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GA7EjD,iBAAiB,EAAA,CAAA,CAAA,EAAA;+GAAjB,iBAAiB,EAAA,CAAA,CAAA,EAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AACnB,iBAAA,CAAA;;0BA8EgB,QAAQ;;0BAAI,MAAM;2BAAC,0BAA0B,CAAA;;;ACpG9D;;AAEG;;;;"}
|
|
@@ -38,6 +38,8 @@ export interface AXPWidgetConfig {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
export interface AXPLayoutContextEvent {
|
|
41
|
+
oldValue: any;
|
|
42
|
+
newValue: any;
|
|
41
43
|
path?: string | null;
|
|
42
44
|
data: any;
|
|
43
45
|
}
|
|
@@ -57,6 +59,7 @@ export declare abstract class AXPWidgetBase<T = any | null | void> {
|
|
|
57
59
|
setOption(path: string, value: any): void;
|
|
58
60
|
setOptions(values: any): void;
|
|
59
61
|
call(name: string, ...args: any[]): void;
|
|
62
|
+
onValueChanged(oldValue: T, newValue: T): void;
|
|
60
63
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWidgetBase<any>, never>;
|
|
61
64
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWidgetBase<any>>;
|
|
62
65
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Injector } from "@angular/core";
|
|
2
2
|
import { AXPWidgetNode } from "@acorex/platform/layout/builder";
|
|
3
|
-
import { AXPEntity, AXPEntityPropertyGroup, AXPGridLayoutOptions, AXPEntityProperty } from "@acorex/platform/common";
|
|
3
|
+
import { AXPEntity, AXPEntityPropertyGroup, AXPGridLayoutOptions, AXPEntityProperty, AXPEntityPropertyCreateView, AXPEntitySectionView } from "@acorex/platform/common";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class AXPEntityCreateViewSectionViewModel {
|
|
6
6
|
private entity;
|
|
7
|
-
private
|
|
8
|
-
constructor(entity: AXPEntity,
|
|
7
|
+
private section;
|
|
8
|
+
constructor(entity: AXPEntity, section: AXPEntitySectionView);
|
|
9
|
+
group: AXPEntityPropertyGroup;
|
|
9
10
|
name: import("@angular/core").WritableSignal<string>;
|
|
10
11
|
title: import("@angular/core").Signal<string>;
|
|
11
12
|
description: import("@angular/core").Signal<string | null | undefined>;
|
|
@@ -16,12 +17,12 @@ export declare class AXPEntityCreateViewElementViewModel {
|
|
|
16
17
|
private entity;
|
|
17
18
|
private section;
|
|
18
19
|
private property;
|
|
19
|
-
|
|
20
|
+
private createProp;
|
|
21
|
+
constructor(entity: AXPEntity, section: AXPEntityCreateViewSectionViewModel, property: AXPEntityProperty, createProp: AXPEntityPropertyCreateView);
|
|
20
22
|
name: import("@angular/core").WritableSignal<string>;
|
|
21
23
|
title: import("@angular/core").WritableSignal<string>;
|
|
22
24
|
description: import("@angular/core").WritableSignal<string | undefined>;
|
|
23
25
|
editable: import("@angular/core").Signal<boolean>;
|
|
24
|
-
order: import("@angular/core").WritableSignal<number>;
|
|
25
26
|
isRequired: import("@angular/core").Signal<boolean>;
|
|
26
27
|
layout: import("@angular/core").Signal<AXPGridLayoutOptions>;
|
|
27
28
|
node: import("@angular/core").Signal<AXPWidgetNode>;
|
|
@@ -3,6 +3,7 @@ import { ResolveFn } from "@angular/router";
|
|
|
3
3
|
import { AXPEntityCommandTriggerViewModel, AXPEntityListViewColumnViewModel } from "./entity.viewmodel";
|
|
4
4
|
import { AXDataSource } from "@acorex/components/common";
|
|
5
5
|
import { AXPEntity, AXPQueryView, AXPBeardCrumb } from "@acorex/platform/common";
|
|
6
|
+
import { Subject } from "rxjs";
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export interface AXPEntityMasterListViewSortPropViewModel {
|
|
8
9
|
name: string;
|
|
@@ -28,6 +29,9 @@ export declare class AXPEntityMasterListViewModel {
|
|
|
28
29
|
private formatService;
|
|
29
30
|
private session;
|
|
30
31
|
private workflow;
|
|
32
|
+
events$: Subject<{
|
|
33
|
+
action: string;
|
|
34
|
+
}>;
|
|
31
35
|
dataSource: AXDataSource<unknown>;
|
|
32
36
|
constructor(injector: Injector, config: AXPEntity);
|
|
33
37
|
selectedItems: import("@angular/core").WritableSignal<any[]>;
|
|
@@ -3,12 +3,14 @@ import { ResolveFn } from "@angular/router";
|
|
|
3
3
|
import { AXPEntityCommandTriggerViewModel } from "./entity.viewmodel";
|
|
4
4
|
import { AXPWidgetNode } from "@acorex/platform/layout/builder";
|
|
5
5
|
import { AXPEntityDetailListViewModel } from "./entity-detail-list.viewmodel";
|
|
6
|
-
import { AXPBeardCrumb, AXPEntity,
|
|
6
|
+
import { AXPBeardCrumb, AXPEntity, AXPEntityPropertyView, AXPEntitySectionView, AXPGridLayoutOptions } from "@acorex/platform/common";
|
|
7
|
+
import { Subject } from "rxjs";
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class AXPEntityMasterSingleViewGroupViewModel {
|
|
9
10
|
private entity;
|
|
10
|
-
private
|
|
11
|
-
constructor(entity: AXPEntity,
|
|
11
|
+
private section;
|
|
12
|
+
constructor(entity: AXPEntity, section: AXPEntitySectionView);
|
|
13
|
+
group: import("@acorex/platform/common").AXPEntityPropertyGroup;
|
|
12
14
|
name: import("@angular/core").WritableSignal<string>;
|
|
13
15
|
isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
14
16
|
title: import("@angular/core").Signal<string>;
|
|
@@ -21,12 +23,12 @@ export declare class AXPEntityMasterSingleViewGroupViewModel {
|
|
|
21
23
|
export declare class AXPEntityMasterSingleElementViewModel {
|
|
22
24
|
private entity;
|
|
23
25
|
private section;
|
|
26
|
+
private propertyView;
|
|
27
|
+
constructor(entity: AXPEntity, section: AXPEntityMasterSingleViewGroupViewModel, propertyView: AXPEntityPropertyView);
|
|
24
28
|
private property;
|
|
25
|
-
constructor(entity: AXPEntity, section: AXPEntityMasterSingleViewGroupViewModel, property: AXPEntityProperty);
|
|
26
29
|
name: import("@angular/core").WritableSignal<string>;
|
|
27
30
|
title: import("@angular/core").WritableSignal<string>;
|
|
28
31
|
description: import("@angular/core").WritableSignal<string | undefined>;
|
|
29
|
-
order: import("@angular/core").WritableSignal<number>;
|
|
30
32
|
layout: import("@angular/core").Signal<AXPGridLayoutOptions>;
|
|
31
33
|
node: import("@angular/core").Signal<AXPWidgetNode>;
|
|
32
34
|
}
|
|
@@ -39,6 +41,9 @@ export declare class AXPEntityMasterSingleViewModel {
|
|
|
39
41
|
private session;
|
|
40
42
|
private formatService;
|
|
41
43
|
private workflow;
|
|
44
|
+
events$: Subject<{
|
|
45
|
+
action: string;
|
|
46
|
+
}>;
|
|
42
47
|
constructor(injector: Injector, config: AXPEntity, entityData: any);
|
|
43
48
|
context: import("@angular/core").WritableSignal<any>;
|
|
44
49
|
private actions;
|
|
@@ -10,7 +10,6 @@ export declare class AXPEntityMasterUpdateElementViewModel {
|
|
|
10
10
|
title: import("@angular/core").WritableSignal<string>;
|
|
11
11
|
description: import("@angular/core").WritableSignal<string | undefined>;
|
|
12
12
|
editable: import("@angular/core").Signal<boolean>;
|
|
13
|
-
order: import("@angular/core").WritableSignal<number>;
|
|
14
13
|
isRequired: import("@angular/core").Signal<boolean>;
|
|
15
14
|
layout: import("@angular/core").Signal<AXPGridLayoutOptions>;
|
|
16
15
|
node: import("@angular/core").Signal<AXPWidgetNode>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AXStyleColorType } from "@acorex/components/common";
|
|
2
2
|
import { AXPWidgetColumnNode } from "@acorex/platform/layout/builder";
|
|
3
|
-
import { AXPEntity, AXPEntityAction, AXPEntityCommandScope, AXPEntityProperty } from "@acorex/platform/common";
|
|
3
|
+
import { AXPEntity, AXPEntityAction, AXPEntityCommandScope, AXPEntityProperty, AXPEntityTableColumn } from "@acorex/platform/common";
|
|
4
4
|
export declare class AXPEntityCommandTriggerViewModel {
|
|
5
5
|
priority: 'primary' | 'secondary';
|
|
6
6
|
color: AXStyleColorType;
|
|
@@ -13,10 +13,10 @@ export declare class AXPEntityCommandTriggerViewModel {
|
|
|
13
13
|
}
|
|
14
14
|
export declare class AXPEntityListViewColumnViewModel {
|
|
15
15
|
private property;
|
|
16
|
-
|
|
16
|
+
private column;
|
|
17
|
+
constructor(property: AXPEntityProperty, column: AXPEntityTableColumn);
|
|
17
18
|
name: string;
|
|
18
19
|
title: string;
|
|
19
|
-
description: string | undefined;
|
|
20
20
|
visible: boolean;
|
|
21
21
|
node: import("@angular/core").Signal<AXPWidgetColumnNode>;
|
|
22
22
|
}
|