@acorex/platform 19.1.5 → 19.1.7
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/auth/lib/permission/index.d.ts +4 -3
- package/auth/lib/permission/permission.service.d.ts +18 -0
- package/auth/lib/permission/permission.types.d.ts +5 -0
- package/common/index.d.ts +3 -2
- package/common/lib/app/application.types.d.ts +16 -4
- package/common/lib/layout/menu/index.d.ts +4 -2
- package/common/lib/layout/menu/search-definition.provider.d.ts +4 -0
- package/common/lib/layout/menu/search.provider.d.ts +20 -0
- package/common/lib/search/index.d.ts +5 -0
- package/common/lib/search/search-definition.builder.d.ts +23 -0
- package/common/lib/search/search-definition.provider.d.ts +18 -0
- package/common/lib/search/search.provider.d.ts +4 -0
- package/common/lib/search/search.service.d.ts +12 -0
- package/common/lib/search/search.types.d.ts +42 -0
- package/common/lib/settings/search-definition.provider.d.ts +4 -0
- package/common/lib/settings/search.provider.d.ts +10 -0
- package/fesm2022/acorex-platform-auth.mjs +78 -43
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +1439 -2234
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +20 -7
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-filters.mjs +0 -2
- package/fesm2022/acorex-platform-layout-filters.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-search.mjs +183 -0
- package/fesm2022/acorex-platform-layout-search.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-setting.mjs +21 -20
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-K9B_-q_K.mjs → acorex-platform-themes-default-entity-master-create-view.component-DpWOMxW9.mjs} +5 -5
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-K9B_-q_K.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-DpWOMxW9.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-xlBBA76O.mjs → acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs} +14 -14
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-Cd2gxLZt.mjs → acorex-platform-themes-default-entity-master-modify-view.component-C1kGZwYp.mjs} +3 -3
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-Cd2gxLZt.mjs.map → acorex-platform-themes-default-entity-master-modify-view.component-C1kGZwYp.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-6sZdw013.mjs → acorex-platform-themes-default-entity-master-single-view.component-CAgt5S3B.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-6sZdw013.mjs.map → acorex-platform-themes-default-entity-master-single-view.component-CAgt5S3B.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default-search-popup.component-Blpan821.mjs +62 -0
- package/fesm2022/acorex-platform-themes-default-search-popup.component-Blpan821.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs → acorex-platform-themes-default-setting-page.component-BXwdFLy4.mjs} +3 -3
- package/fesm2022/{acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs.map → acorex-platform-themes-default-setting-page.component-BXwdFLy4.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs → acorex-platform-themes-default-setting-view.component-BXsmvaIi.mjs} +5 -5
- package/fesm2022/{acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs.map → acorex-platform-themes-default-setting-view.component-BXsmvaIi.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +29 -17
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +2 -2
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +164 -99
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/entity/lib/index.d.ts +1 -0
- package/{layouts/lib/admin/entity-layout → layout/entity/lib}/workflows/index.d.ts +1 -1
- package/layout/search/README.md +3 -0
- package/layout/search/index.d.ts +1 -0
- package/layout/search/lib/index.d.ts +3 -0
- package/layout/search/lib/search-slot.component.d.ts +9 -0
- package/layout/search/lib/search.config.d.ts +5 -0
- package/layout/search/lib/search.module.d.ts +11 -0
- package/layout/search/lib/search.viewmodel.d.ts +13 -0
- package/layout/search/lib/workflows/search.workflow.d.ts +10 -0
- package/layout/setting/lib/setting.viewmodel.d.ts +1 -1
- package/package.json +13 -13
- package/themes/default/lib/layouts/search-layout/search-popup.component.d.ts +11 -0
- package/themes/shared/index.d.ts +1 -1
- package/themes/shared/lib/components/layout-elements/index.d.ts +1 -1
- package/themes/shared/lib/components/layout-elements/{layout-list-component.d.ts → layout-list.component.d.ts} +1 -1
- package/themes/shared/lib/components/{theme-slot.component.d.ts → slots/theme-slot.component.d.ts} +7 -7
- package/widgets/lib/widgets/filters/date-time-filter/date-time-filter-widget-edit.component.d.ts +2 -3
- package/widgets/lib/widgets/filters/select-filter/select-filter-widget-edit.component.d.ts +1 -1
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +15 -9
- package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +6 -5
- package/widgets/lib/widgets/property-editors/spacing/spacing-widget-editor.component.d.ts +1 -0
- package/common/lib/schema/component-loader.d.ts +0 -24
- package/common/lib/schema/entity/entity-registery.service.d.ts +0 -34
- package/common/lib/schema/entity/entity.class.d.ts +0 -161
- package/common/lib/schema/entity/entity.loader.d.ts +0 -9
- package/common/lib/schema/entity/index.d.ts +0 -3
- package/common/lib/schema/formats.d.ts +0 -8
- package/common/lib/schema/index.d.ts +0 -8
- package/common/lib/schema/schema-registery.service.d.ts +0 -20
- package/common/lib/schema/schema.module.d.ts +0 -12
- package/common/lib/schema/schema.types.d.ts +0 -16
- package/common/lib/schema/widget/index.d.ts +0 -5
- package/common/lib/schema/widget/widget-base.d.ts +0 -45
- package/common/lib/schema/widget/widget-column-renderer.d.ts +0 -34
- package/common/lib/schema/widget/widget-filter-renderer.d.ts +0 -30
- package/common/lib/schema/widget/widget-renderer.d.ts +0 -27
- package/common/lib/schema/widget/widget-token.d.ts +0 -16
- package/common/lib/schema/widgets/avatar/avatar-widget-edit.component.d.ts +0 -16
- package/common/lib/schema/widgets/avatar/avatar-widget-view.component.d.ts +0 -13
- package/common/lib/schema/widgets/checkbox/checkbox-widget-column.component.d.ts +0 -11
- package/common/lib/schema/widgets/checkbox/checkbox-widget-edit.component.d.ts +0 -6
- package/common/lib/schema/widgets/checkbox/checkbox-widget-view.component.d.ts +0 -11
- package/common/lib/schema/widgets/common-widget-filter/boolean-widget-filter.component.d.ts +0 -18
- package/common/lib/schema/widgets/common-widget-filter/number-widget-filter.component.d.ts +0 -12
- package/common/lib/schema/widgets/common-widget-filter/string-widget-filter.component.d.ts +0 -12
- package/common/lib/schema/widgets/common-widgets.module.d.ts +0 -32
- package/common/lib/schema/widgets/dateTime/dateTime-widget-column.component.d.ts +0 -11
- package/common/lib/schema/widgets/dateTime/dateTime-widget-edit.component.d.ts +0 -24
- package/common/lib/schema/widgets/dateTime/dateTime-widget-filter.component.d.ts +0 -19
- package/common/lib/schema/widgets/dateTime/dateTime-widget-view.component.d.ts +0 -11
- package/common/lib/schema/widgets/email/email-widget-column.component.d.ts +0 -16
- package/common/lib/schema/widgets/email/email-widget-edit.component.d.ts +0 -26
- package/common/lib/schema/widgets/email/email-widget-view.component.d.ts +0 -16
- package/common/lib/schema/widgets/file/file-widget-column.component.d.ts +0 -8
- package/common/lib/schema/widgets/file/file-widget-edit.component.d.ts +0 -17
- package/common/lib/schema/widgets/file/file-widget-filter.component.d.ts +0 -6
- package/common/lib/schema/widgets/file/file-widget-view.component.d.ts +0 -17
- package/common/lib/schema/widgets/gallery/gallery-widget-edit.component.d.ts +0 -15
- package/common/lib/schema/widgets/gallery/gallery-widget-filter.component.d.ts +0 -6
- package/common/lib/schema/widgets/gallery/gallery-widget-types.d.ts +0 -10
- package/common/lib/schema/widgets/gallery/gallery-widget-view.component.d.ts +0 -16
- package/common/lib/schema/widgets/index.d.ts +0 -1
- package/common/lib/schema/widgets/lookup/lookup-widget-column.component.d.ts +0 -17
- package/common/lib/schema/widgets/lookup/lookup-widget-edit.component.d.ts +0 -18
- package/common/lib/schema/widgets/lookup/lookup-widget-filter.component.d.ts +0 -17
- package/common/lib/schema/widgets/lookup/lookup-widget-view.component.d.ts +0 -18
- package/common/lib/schema/widgets/map/map-widget-edit.component.d.ts +0 -15
- package/common/lib/schema/widgets/map/map-widget-view.component.d.ts +0 -17
- package/common/lib/schema/widgets/messenger/messenger-widget-column.component.d.ts +0 -15
- package/common/lib/schema/widgets/messenger/messenger-widget-edit.component.d.ts +0 -14
- package/common/lib/schema/widgets/messenger/messenger-widget-view.component.d.ts +0 -17
- package/common/lib/schema/widgets/number/number-widget-edit.component.d.ts +0 -7
- package/common/lib/schema/widgets/number/number-widget-view.component.d.ts +0 -8
- package/common/lib/schema/widgets/password/change-password.component.d.ts +0 -16
- package/common/lib/schema/widgets/password/password-widget-column.component.d.ts +0 -14
- package/common/lib/schema/widgets/password/password-widget-edit.component.d.ts +0 -6
- package/common/lib/schema/widgets/password/password-widget-view.component.d.ts +0 -18
- package/common/lib/schema/widgets/phone/phone-widget-column.component.d.ts +0 -15
- package/common/lib/schema/widgets/phone/phone-widget-edit.component.d.ts +0 -29
- package/common/lib/schema/widgets/phone/phone-widget-view.component.d.ts +0 -18
- package/common/lib/schema/widgets/rich-text/rich-text-widget-column.component.d.ts +0 -11
- package/common/lib/schema/widgets/rich-text/rich-text-widget-edit.component.d.ts +0 -33
- package/common/lib/schema/widgets/rich-text/rich-text-widget-view.component.d.ts +0 -10
- package/common/lib/schema/widgets/selection-list/selection-list-widget-column.component.d.ts +0 -16
- package/common/lib/schema/widgets/selection-list/selection-list-widget-edit.component.d.ts +0 -12
- package/common/lib/schema/widgets/selection-list/selection-list-widget-filter.component.d.ts +0 -9
- package/common/lib/schema/widgets/selection-list/selection-list-widget-view.component.d.ts +0 -15
- package/common/lib/schema/widgets/signature-pad/signature-pad-widget-edit.component.d.ts +0 -19
- package/common/lib/schema/widgets/signature-pad/signature-pad-widget-view.component.d.ts +0 -8
- package/common/lib/schema/widgets/text/largetext-widget-edit.component.d.ts +0 -6
- package/common/lib/schema/widgets/text/text-widget-column.component.d.ts +0 -12
- package/common/lib/schema/widgets/text/text-widget-edit.component.d.ts +0 -21
- package/common/lib/schema/widgets/text/text-widget-view.component.d.ts +0 -11
- package/common/lib/schema/widgets/toggle/toggle-widget-column.component.d.ts +0 -11
- package/common/lib/schema/widgets/toggle/toggle-widget-edit.component.d.ts +0 -6
- package/common/lib/schema/widgets/toggle/toggle-widget-view.component.d.ts +0 -11
- package/fesm2022/acorex-platform-common-avatar-widget-edit.component-syRKKn21.mjs +0 -166
- package/fesm2022/acorex-platform-common-avatar-widget-edit.component-syRKKn21.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-avatar-widget-view.component-DSju_bgg.mjs +0 -64
- package/fesm2022/acorex-platform-common-avatar-widget-view.component-DSju_bgg.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-boolean-widget-filter.component-aaKT0FyC.mjs +0 -155
- package/fesm2022/acorex-platform-common-boolean-widget-filter.component-aaKT0FyC.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-change-password.component-DFoC5nP2.mjs +0 -176
- package/fesm2022/acorex-platform-common-change-password.component-DFoC5nP2.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-checkbox-widget-column.component-DZxykkVr.mjs +0 -55
- package/fesm2022/acorex-platform-common-checkbox-widget-column.component-DZxykkVr.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-CNmYVpMu.mjs +0 -24
- package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-CNmYVpMu.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-checkbox-widget-view.component-3XLnJx9A.mjs +0 -49
- package/fesm2022/acorex-platform-common-checkbox-widget-view.component-3XLnJx9A.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-dateTime-widget-column.component-CKaMC189.mjs +0 -46
- package/fesm2022/acorex-platform-common-dateTime-widget-column.component-CKaMC189.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-dateTime-widget-edit.component-B50J-bwp.mjs +0 -178
- package/fesm2022/acorex-platform-common-dateTime-widget-edit.component-B50J-bwp.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-dateTime-widget-filter.component-CTV2a3c0.mjs +0 -286
- package/fesm2022/acorex-platform-common-dateTime-widget-filter.component-CTV2a3c0.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-dateTime-widget-view.component-C7hmUXLz.mjs +0 -73
- package/fesm2022/acorex-platform-common-dateTime-widget-view.component-C7hmUXLz.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-email-widget-column.component-BPoSZTqM.mjs +0 -75
- package/fesm2022/acorex-platform-common-email-widget-column.component-BPoSZTqM.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-email-widget-edit.component-aLPGOG3r.mjs +0 -249
- package/fesm2022/acorex-platform-common-email-widget-edit.component-aLPGOG3r.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-email-widget-view.component-dMByK5bc.mjs +0 -109
- package/fesm2022/acorex-platform-common-email-widget-view.component-dMByK5bc.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-file-widget-column.component-Dafc2zLc.mjs +0 -29
- package/fesm2022/acorex-platform-common-file-widget-column.component-Dafc2zLc.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-file-widget-edit.component-C31kfJSw.mjs +0 -202
- package/fesm2022/acorex-platform-common-file-widget-edit.component-C31kfJSw.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-file-widget-filter.component-BNCcBun4.mjs +0 -29
- package/fesm2022/acorex-platform-common-file-widget-filter.component-BNCcBun4.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-file-widget-view.component-T3r6musY.mjs +0 -155
- package/fesm2022/acorex-platform-common-file-widget-view.component-T3r6musY.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-gallery-widget-edit.component-zBsaBkzu.mjs +0 -191
- package/fesm2022/acorex-platform-common-gallery-widget-edit.component-zBsaBkzu.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-gallery-widget-filter.component-BhLYuB6p.mjs +0 -29
- package/fesm2022/acorex-platform-common-gallery-widget-filter.component-BhLYuB6p.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-gallery-widget-view.component-Dxf4Oj1E.mjs +0 -175
- package/fesm2022/acorex-platform-common-gallery-widget-view.component-Dxf4Oj1E.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-largetext-widget-edit.component-BYMIaLCI.mjs +0 -38
- package/fesm2022/acorex-platform-common-largetext-widget-edit.component-BYMIaLCI.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-column.component-BB0Mdx2u.mjs +0 -45
- package/fesm2022/acorex-platform-common-lookup-widget-column.component-BB0Mdx2u.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-edit.component-DUPsS_ZW.mjs +0 -96
- package/fesm2022/acorex-platform-common-lookup-widget-edit.component-DUPsS_ZW.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-filter.component-CLyl94AJ.mjs +0 -161
- package/fesm2022/acorex-platform-common-lookup-widget-filter.component-CLyl94AJ.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-view.component-CJijszjn.mjs +0 -56
- package/fesm2022/acorex-platform-common-lookup-widget-view.component-CJijszjn.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-map-widget-edit.component-BTHORlG5.mjs +0 -94
- package/fesm2022/acorex-platform-common-map-widget-edit.component-BTHORlG5.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-map-widget-view.component-CQzW1ZeD.mjs +0 -66
- package/fesm2022/acorex-platform-common-map-widget-view.component-CQzW1ZeD.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-messenger-widget-column.component-Brm4vLGA.mjs +0 -73
- package/fesm2022/acorex-platform-common-messenger-widget-column.component-Brm4vLGA.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-messenger-widget-edit.component-CJHvut2C.mjs +0 -138
- package/fesm2022/acorex-platform-common-messenger-widget-edit.component-CJHvut2C.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-messenger-widget-view.component-DVylp_2t.mjs +0 -133
- package/fesm2022/acorex-platform-common-messenger-widget-view.component-DVylp_2t.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-number-widget-edit.component-DZf-n-yr.mjs +0 -48
- package/fesm2022/acorex-platform-common-number-widget-edit.component-DZf-n-yr.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-number-widget-filter.component-womVAhSr.mjs +0 -137
- package/fesm2022/acorex-platform-common-number-widget-filter.component-womVAhSr.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-number-widget-view.component-L2pxAqqz.mjs +0 -33
- package/fesm2022/acorex-platform-common-number-widget-view.component-L2pxAqqz.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-password-widget-column.component-3ubqJk-d.mjs +0 -68
- package/fesm2022/acorex-platform-common-password-widget-column.component-3ubqJk-d.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-password-widget-edit.component-BokyEDfK.mjs +0 -43
- package/fesm2022/acorex-platform-common-password-widget-edit.component-BokyEDfK.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-password-widget-view.component-BuFoE2fz.mjs +0 -110
- package/fesm2022/acorex-platform-common-password-widget-view.component-BuFoE2fz.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-phone-widget-column.component-79Me_VNP.mjs +0 -93
- package/fesm2022/acorex-platform-common-phone-widget-column.component-79Me_VNP.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-phone-widget-edit.component-CIayMoT1.mjs +0 -249
- package/fesm2022/acorex-platform-common-phone-widget-edit.component-CIayMoT1.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-phone-widget-view.component-B1Xu_rxC.mjs +0 -124
- package/fesm2022/acorex-platform-common-phone-widget-view.component-B1Xu_rxC.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-rich-text-widget-column.component-Dbn3JMOu.mjs +0 -63
- package/fesm2022/acorex-platform-common-rich-text-widget-column.component-Dbn3JMOu.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CHT12edE.mjs +0 -69
- package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CHT12edE.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-rich-text-widget-view.component-qvUpx39D.mjs +0 -37
- package/fesm2022/acorex-platform-common-rich-text-widget-view.component-qvUpx39D.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-column.component-E7yRTViz.mjs +0 -47
- package/fesm2022/acorex-platform-common-selection-list-widget-column.component-E7yRTViz.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-B8dmJ_jJ.mjs +0 -55
- package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-B8dmJ_jJ.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-i4syx0Bj.mjs +0 -47
- package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-i4syx0Bj.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-view.component-B7disiIF.mjs +0 -47
- package/fesm2022/acorex-platform-common-selection-list-widget-view.component-B7disiIF.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-signature-pad-widget-edit.component-CMoiIhgJ.mjs +0 -130
- package/fesm2022/acorex-platform-common-signature-pad-widget-edit.component-CMoiIhgJ.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-HfArY6VQ.mjs +0 -43
- package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-HfArY6VQ.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs +0 -127
- package/fesm2022/acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-text-widget-column.component-7yp4qqIb.mjs +0 -49
- package/fesm2022/acorex-platform-common-text-widget-column.component-7yp4qqIb.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-text-widget-edit.component-5koh5Aws.mjs +0 -162
- package/fesm2022/acorex-platform-common-text-widget-edit.component-5koh5Aws.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-text-widget-view.component-BH0LTD80.mjs +0 -69
- package/fesm2022/acorex-platform-common-text-widget-view.component-BH0LTD80.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-toggle-widget-column.component-C5dMjerm.mjs +0 -59
- package/fesm2022/acorex-platform-common-toggle-widget-column.component-C5dMjerm.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-toggle-widget-edit.component-JOnGMn-9.mjs +0 -27
- package/fesm2022/acorex-platform-common-toggle-widget-edit.component-JOnGMn-9.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-toggle-widget-view.component-DguoIz_c.mjs +0 -51
- package/fesm2022/acorex-platform-common-toggle-widget-view.component-DguoIz_c.mjs.map +0 -1
- package/fesm2022/acorex-platform-layouts-entity-create-view.component-1Yw4H3CW.mjs +0 -121
- package/fesm2022/acorex-platform-layouts-entity-create-view.component-1Yw4H3CW.mjs.map +0 -1
- package/fesm2022/acorex-platform-layouts-entity-import-view.component-BIHTWoXR.mjs +0 -91
- package/fesm2022/acorex-platform-layouts-entity-import-view.component-BIHTWoXR.mjs.map +0 -1
- package/fesm2022/acorex-platform-layouts-entity-modify-view.component-Cb2Yvtav.mjs +0 -96
- package/fesm2022/acorex-platform-layouts-entity-modify-view.component-Cb2Yvtav.mjs.map +0 -1
- package/fesm2022/acorex-platform-layouts.mjs +0 -2483
- package/fesm2022/acorex-platform-layouts.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-xlBBA76O.mjs.map +0 -1
- package/layouts/README.md +0 -3
- package/layouts/index.d.ts +0 -2
- package/layouts/lib/admin/admin.module.d.ts +0 -11
- package/layouts/lib/admin/admin.routes.d.ts +0 -2
- package/layouts/lib/admin/custom-reuse.strategy.d.ts +0 -8
- package/layouts/lib/admin/entity-layout/entity-create-view/entity-create-view.component.d.ts +0 -20
- package/layouts/lib/admin/entity-layout/entity-create-view/entity-create-view.config.d.ts +0 -54
- package/layouts/lib/admin/entity-layout/entity-details-view/detail-view.config.d.ts +0 -48
- package/layouts/lib/admin/entity-layout/entity-details-view/entity-details-view.component.d.ts +0 -83
- package/layouts/lib/admin/entity-layout/entity-details-view/index.d.ts +0 -2
- package/layouts/lib/admin/entity-layout/entity-import-view/entity-import-view.component.d.ts +0 -27
- package/layouts/lib/admin/entity-layout/entity-list-view/components/entity-custom-view/entity-custom-view.component.d.ts +0 -46
- package/layouts/lib/admin/entity-layout/entity-list-view/components/index.d.ts +0 -5
- package/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-columns/list-view-option-columns.component.d.ts +0 -20
- package/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-conditions/list-view-option-conditions.component.d.ts +0 -33
- package/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-conditions/list-view-option-filter-operator.component.d.ts +0 -18
- package/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-sorting/list-view-option-sorting.component.d.ts +0 -21
- package/layouts/lib/admin/entity-layout/entity-list-view/entity-list-view.component.d.ts +0 -79
- package/layouts/lib/admin/entity-layout/entity-list-view/index.d.ts +0 -4
- package/layouts/lib/admin/entity-layout/entity-list-view/list-view.config.d.ts +0 -113
- package/layouts/lib/admin/entity-layout/entity-list-view/list-view.module.d.ts +0 -42
- package/layouts/lib/admin/entity-layout/entity-modify-view/entity-modify-view.component.d.ts +0 -25
- package/layouts/lib/admin/entity-layout/entity-modify-view/entity-modify-view.config.d.ts +0 -31
- package/layouts/lib/admin/entity-layout/entity-quick-view/entity-quick-view.component.d.ts +0 -24
- package/layouts/lib/admin/entity-layout/entity-quick-view/index.d.ts +0 -1
- package/layouts/lib/admin/entity-layout/index.d.ts +0 -4
- package/layouts/lib/admin/entity-layout/workflows/create-entity.workflow.d.ts +0 -31
- package/layouts/lib/admin/entity-layout/workflows/delete-entity.workflow.d.ts +0 -33
- package/layouts/lib/admin/entity-layout/workflows/import-entity.workflow.d.ts +0 -27
- package/layouts/lib/admin/entity-layout/workflows/modify-entity.workflow.d.ts +0 -32
- package/layouts/lib/admin/entity-layout/workflows/modify-section.workflow.d.ts +0 -12
- package/layouts/lib/admin/entity-layout/workflows/show-details.workflow.d.ts +0 -10
- package/layouts/lib/admin/entity-layout/workflows/show-list.workflow.d.ts +0 -10
- package/layouts/lib/admin/entity-layout/workflows/show-quick-view.workflow.d.ts +0 -12
- package/layouts/lib/admin/entity.resolver.d.ts +0 -4
- package/layouts/lib/admin/index.d.ts +0 -5
- package/layouts/lib/layout.module.d.ts +0 -9
|
@@ -1,2483 +0,0 @@
|
|
|
1
|
-
import * as i1$3 from '@acorex/components/action-sheet';
|
|
2
|
-
import { AXActionSheetModule } from '@acorex/components/action-sheet';
|
|
3
|
-
import * as i5 from '@acorex/components/badge';
|
|
4
|
-
import { AXBadgeModule } from '@acorex/components/badge';
|
|
5
|
-
import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
|
|
6
|
-
import * as i4 from '@acorex/components/button';
|
|
7
|
-
import { AXButtonModule } from '@acorex/components/button';
|
|
8
|
-
import * as i4$1 from '@acorex/components/decorators';
|
|
9
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
10
|
-
import { AXDialogService, AXDialogModule } from '@acorex/components/dialog';
|
|
11
|
-
import * as i11 from '@acorex/components/drawer';
|
|
12
|
-
import { AXDrawerModule } from '@acorex/components/drawer';
|
|
13
|
-
import * as i6 from '@acorex/components/dropdown';
|
|
14
|
-
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
15
|
-
import * as i2$1 from '@acorex/components/form';
|
|
16
|
-
import { AXFormModule } from '@acorex/components/form';
|
|
17
|
-
import * as i7 from '@acorex/components/image';
|
|
18
|
-
import { AXImageModule } from '@acorex/components/image';
|
|
19
|
-
import { AXLoadingModule } from '@acorex/components/loading';
|
|
20
|
-
import * as i6$1 from '@acorex/components/popover';
|
|
21
|
-
import { AXPopoverModule } from '@acorex/components/popover';
|
|
22
|
-
import * as i8$1 from '@acorex/components/switch';
|
|
23
|
-
import { AXSwitchModule } from '@acorex/components/switch';
|
|
24
|
-
import * as i9 from '@acorex/components/tabs';
|
|
25
|
-
import { AXTabsModule } from '@acorex/components/tabs';
|
|
26
|
-
import { AXTooltipModule } from '@acorex/components/tooltip';
|
|
27
|
-
import * as i8 from '@acorex/core/translation';
|
|
28
|
-
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
29
|
-
import * as i2 from '@acorex/core/utils';
|
|
30
|
-
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
31
|
-
import * as i14$1 from '@acorex/platform/auth';
|
|
32
|
-
import { AXPSessionService, AXPAuthModule, AXPAuthGuard } from '@acorex/platform/auth';
|
|
33
|
-
import * as i10 from '@acorex/platform/common';
|
|
34
|
-
import { AXPEntityRegistryService, AXPWorkflowNavigateAction, AXPSchemaModule, AXPCommonWidgetModule, AXPStickyDirective, AXPSchemaRegistryService, EQ_OPER, convertPropertiesToColumns, AXPEntityListViewConfigEmpty, AXPFilterOperatorMiddlewareService, AXPCommonModule, AXMWorkflowErrorHandler, AXPDialogConfirmAction, AXPToastAction } from '@acorex/platform/common';
|
|
35
|
-
import * as i1$4 from '@acorex/platform/workflow';
|
|
36
|
-
import { createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowFunction, AXPWorkflowService, ofType as ofType$1, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
37
|
-
import * as i1$1 from '@angular/common';
|
|
38
|
-
import { Location, CommonModule } from '@angular/common';
|
|
39
|
-
import * as i0 from '@angular/core';
|
|
40
|
-
import { inject, Injectable, signal, Component, ChangeDetectionStrategy, ViewChild, computed, Input, EventEmitter, Output, ViewEncapsulation, ChangeDetectorRef, NgModule, InjectionToken } from '@angular/core';
|
|
41
|
-
import { ActivatedRoute, RouterModule, RouteReuseStrategy } from '@angular/router';
|
|
42
|
-
import * as i1 from '@ngrx/effects';
|
|
43
|
-
import { ofType } from '@ngrx/effects';
|
|
44
|
-
import { cloneDeep, assign } from 'lodash-es';
|
|
45
|
-
import { BehaviorSubject, defaultIfEmpty, switchMap, of, map, first } from 'rxjs';
|
|
46
|
-
import { AXPopupService } from '@acorex/components/popup';
|
|
47
|
-
import * as i3 from '@acorex/core/platform';
|
|
48
|
-
import { AXPlatform } from '@acorex/core/platform';
|
|
49
|
-
import { AXFormatService } from '@acorex/core/format';
|
|
50
|
-
import { Store } from '@ngrx/store';
|
|
51
|
-
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
52
|
-
import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
|
|
53
|
-
import { AXBasePageComponent } from '@acorex/components/page';
|
|
54
|
-
import { AXToastService } from '@acorex/components/toast';
|
|
55
|
-
import * as i15 from '@angular/cdk/drag-drop';
|
|
56
|
-
import { moveItemInArray, CdkDropList, CdkDrag, CdkDragPlaceholder, CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
57
|
-
import * as i1$2 from '@angular/forms';
|
|
58
|
-
import { FormsModule } from '@angular/forms';
|
|
59
|
-
import * as i10$1 from '@acorex/components/select-box';
|
|
60
|
-
import { AXSelectBoxComponent, AXSelectBoxModule } from '@acorex/components/select-box';
|
|
61
|
-
import * as i11$1 from '@acorex/components/text-box';
|
|
62
|
-
import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
63
|
-
import * as i7$1 from '@acorex/components/label';
|
|
64
|
-
import { AXLabelModule } from '@acorex/components/label';
|
|
65
|
-
import * as i13 from '@acorex/components/selection-list';
|
|
66
|
-
import { AXSelectionListModule } from '@acorex/components/selection-list';
|
|
67
|
-
import * as i14 from '@acorex/components/dropdown-button';
|
|
68
|
-
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
69
|
-
import * as i6$2 from '@acorex/components/data-table';
|
|
70
|
-
import { AXDataTableModule } from '@acorex/components/data-table';
|
|
71
|
-
import * as i12 from '@acorex/components/search-box';
|
|
72
|
-
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
73
|
-
import { AXCollapseModule } from '@acorex/components/collapse';
|
|
74
|
-
import { AXCommonModule, AXDataSource } from '@acorex/components/common';
|
|
75
|
-
import { AXListModule } from '@acorex/components/list';
|
|
76
|
-
import { PortalModule } from '@angular/cdk/portal';
|
|
77
|
-
|
|
78
|
-
class AXPEntityCreateLoaderDefault {
|
|
79
|
-
constructor(config, store, formatService) {
|
|
80
|
-
this.config = config;
|
|
81
|
-
this.store = store;
|
|
82
|
-
this.formatService = formatService;
|
|
83
|
-
this._data = {};
|
|
84
|
-
this._currentSection = 'default';
|
|
85
|
-
this._sections$ = new BehaviorSubject(this.sections);
|
|
86
|
-
//****************** Properties ******************//
|
|
87
|
-
this.getProp = (name) => this.entity.properties.find((c) => c.name == name);
|
|
88
|
-
this.isRequired = (name) => this.getProp(name)?.validationRules?.some(c => c.rule == 'required') || false;
|
|
89
|
-
this._currentSection = this.sections[0]?.name || 'default';
|
|
90
|
-
}
|
|
91
|
-
get entity() {
|
|
92
|
-
if (!this._config) {
|
|
93
|
-
this._config = cloneDeep(this.config);
|
|
94
|
-
}
|
|
95
|
-
return this._config;
|
|
96
|
-
}
|
|
97
|
-
get data() {
|
|
98
|
-
return this._data;
|
|
99
|
-
}
|
|
100
|
-
get view() {
|
|
101
|
-
return this.entity.views.createView;
|
|
102
|
-
}
|
|
103
|
-
//****************** Sections ******************//
|
|
104
|
-
get sections() {
|
|
105
|
-
return this.view.root.sections?.length
|
|
106
|
-
? this.view.root.sections
|
|
107
|
-
: [
|
|
108
|
-
{
|
|
109
|
-
name: 'default',
|
|
110
|
-
title: 'Default',
|
|
111
|
-
properties: this.view.root.properties,
|
|
112
|
-
},
|
|
113
|
-
];
|
|
114
|
-
}
|
|
115
|
-
get sections$() {
|
|
116
|
-
return this._sections$.pipe(defaultIfEmpty([]));
|
|
117
|
-
}
|
|
118
|
-
get section$() {
|
|
119
|
-
return this.sections$.pipe(switchMap((sections) => {
|
|
120
|
-
const section = sections.find((c) => c.name === this._currentSection) ?? this.sections[0];
|
|
121
|
-
if (!section.sections?.length) {
|
|
122
|
-
section.sections = [
|
|
123
|
-
{
|
|
124
|
-
name: 'default',
|
|
125
|
-
title: 'Details',
|
|
126
|
-
properties: section.properties,
|
|
127
|
-
},
|
|
128
|
-
];
|
|
129
|
-
}
|
|
130
|
-
return of(section);
|
|
131
|
-
}));
|
|
132
|
-
}
|
|
133
|
-
get hasSections$() {
|
|
134
|
-
return this.sections$.pipe(map((c) => c.length > 1));
|
|
135
|
-
}
|
|
136
|
-
get isLast$() {
|
|
137
|
-
return this.sections$.pipe(map((c) => this.sections.length - this.sections.findIndex((c) => c.name == this._currentSection) == 1));
|
|
138
|
-
}
|
|
139
|
-
get isFirst$() {
|
|
140
|
-
return this.sections$.pipe(map((c) => this.sections.findIndex((c) => c.name == this._currentSection) == 0));
|
|
141
|
-
}
|
|
142
|
-
get currentIndex$() {
|
|
143
|
-
return this.sections$.pipe(map((c) => this.sections.findIndex((c) => c.name == this._currentSection)));
|
|
144
|
-
}
|
|
145
|
-
setSection(name) {
|
|
146
|
-
this._currentSection = name ?? 'default';
|
|
147
|
-
const updatedSection = this.sections.find((c) => c.name === this._currentSection) || {
|
|
148
|
-
name: 'default',
|
|
149
|
-
title: 'Default',
|
|
150
|
-
properties: this.view.root.properties,
|
|
151
|
-
};
|
|
152
|
-
const currentSections = this._sections$.value;
|
|
153
|
-
const updatedSections = currentSections.map((section) => {
|
|
154
|
-
if (section.name === updatedSection.name) {
|
|
155
|
-
return updatedSection;
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
return section;
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
this._sections$.next(updatedSections);
|
|
162
|
-
}
|
|
163
|
-
next() {
|
|
164
|
-
const nextIndex = this.sections.findIndex((c) => c.name == this._currentSection) + 1;
|
|
165
|
-
if (nextIndex >= this.sections.length) {
|
|
166
|
-
return Promise.resolve();
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
this.setSection(this.sections[nextIndex].name);
|
|
170
|
-
return Promise.resolve();
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
back() {
|
|
174
|
-
const prevIndex = this.sections.findIndex((c) => c.name == this._currentSection) - 1;
|
|
175
|
-
if (prevIndex < 0) {
|
|
176
|
-
return Promise.resolve();
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
this.setSection(this.sections[prevIndex].name);
|
|
180
|
-
return Promise.resolve();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
class AXPEntityCreateViewLoaderFactory {
|
|
185
|
-
constructor() {
|
|
186
|
-
this.entityService = inject(AXPEntityRegistryService);
|
|
187
|
-
this.formatService = inject(AXFormatService);
|
|
188
|
-
this.layout = inject(AXPLayoutThemeService);
|
|
189
|
-
this.store = inject(Store);
|
|
190
|
-
}
|
|
191
|
-
async create(moduleName, entityName) {
|
|
192
|
-
const config = await this.entityService.resolve(moduleName, entityName);
|
|
193
|
-
this.layout.setNavigationLoading(true);
|
|
194
|
-
if (config.dataSource.byKey) {
|
|
195
|
-
this.layout.setNavigationLoading(false);
|
|
196
|
-
return new AXPEntityCreateLoaderDefault(config, this.store, this.formatService);
|
|
197
|
-
}
|
|
198
|
-
return Promise.reject('cannot fetch ');
|
|
199
|
-
}
|
|
200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateViewLoaderFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
201
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateViewLoaderFactory, providedIn: 'root' }); }
|
|
202
|
-
}
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateViewLoaderFactory, decorators: [{
|
|
204
|
-
type: Injectable,
|
|
205
|
-
args: [{ providedIn: 'root' }]
|
|
206
|
-
}] });
|
|
207
|
-
|
|
208
|
-
const AXPEntityCreateEvent = createWorkFlowEvent('[Entity] Created!');
|
|
209
|
-
class AXPEntityCreatePopupAction extends AXPWorkflowAction {
|
|
210
|
-
constructor() {
|
|
211
|
-
super(...arguments);
|
|
212
|
-
this.entityRegistery = inject(AXPEntityRegistryService);
|
|
213
|
-
this.popupService = inject(AXPopupService);
|
|
214
|
-
this.platform = inject(AXPlatform);
|
|
215
|
-
this.entityCreateFactory = inject(AXPEntityCreateViewLoaderFactory);
|
|
216
|
-
this.translateService = inject(AXTranslationService);
|
|
217
|
-
}
|
|
218
|
-
async execute(context) {
|
|
219
|
-
const { module, entity: entityName } = context.getVariable('payload');
|
|
220
|
-
const entity = await this.entityRegistery.resolve(module, entityName);
|
|
221
|
-
const com = await import('./acorex-platform-layouts-entity-create-view.component-1Yw4H3CW.mjs');
|
|
222
|
-
const result = await this.popupService.open(com.AXPEntityCreateViewComponent, {
|
|
223
|
-
title: await this.translateService.translateAsync('create-new') + ' ' + entity.title,
|
|
224
|
-
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
|
|
225
|
-
data: {
|
|
226
|
-
loader: await this.entityCreateFactory.create(module, entityName),
|
|
227
|
-
entity,
|
|
228
|
-
},
|
|
229
|
-
});
|
|
230
|
-
if (result.data?.save) {
|
|
231
|
-
context.setOutput('popupResult', true);
|
|
232
|
-
context.setVariable('redirect', result.data.redirect);
|
|
233
|
-
context.setVariable('id', result.data.recordId);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreatePopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
237
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreatePopupAction }); }
|
|
238
|
-
}
|
|
239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreatePopupAction, decorators: [{
|
|
240
|
-
type: Injectable
|
|
241
|
-
}] });
|
|
242
|
-
class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
|
|
243
|
-
async execute(context) {
|
|
244
|
-
const { module, entity: entity } = context.getVariable('payload');
|
|
245
|
-
this.dispatch(AXPEntityCreateEvent({ entity, module }));
|
|
246
|
-
}
|
|
247
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateSubmittedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
248
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateSubmittedAction }); }
|
|
249
|
-
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateSubmittedAction, decorators: [{
|
|
251
|
-
type: Injectable
|
|
252
|
-
}] });
|
|
253
|
-
const AXPCreateEntityWorkflow = {
|
|
254
|
-
startStepId: 'createPopup',
|
|
255
|
-
steps: {
|
|
256
|
-
createPopup: {
|
|
257
|
-
id: 'createPopup',
|
|
258
|
-
action: 'AXPEntityCreatePopupAction',
|
|
259
|
-
nextSteps: [
|
|
260
|
-
{
|
|
261
|
-
conditions: [{ type: 'SINGLE', expression: 'context.getOutput("popupResult") == true' }],
|
|
262
|
-
nextStepId: 'successToast',
|
|
263
|
-
},
|
|
264
|
-
],
|
|
265
|
-
},
|
|
266
|
-
successToast: {
|
|
267
|
-
id: 'successToast',
|
|
268
|
-
action: 'AXPToastAction',
|
|
269
|
-
input: {
|
|
270
|
-
color: 'success',
|
|
271
|
-
title: 'Entity Created',
|
|
272
|
-
content: 'New Record has been successfully created.',
|
|
273
|
-
},
|
|
274
|
-
nextSteps: [
|
|
275
|
-
{
|
|
276
|
-
conditions: [],
|
|
277
|
-
nextStepId: 'createSubmitted',
|
|
278
|
-
},
|
|
279
|
-
],
|
|
280
|
-
},
|
|
281
|
-
createSubmitted: {
|
|
282
|
-
id: 'createSubmitted',
|
|
283
|
-
action: 'AXPEntityCreateSubmittedAction',
|
|
284
|
-
nextSteps: [
|
|
285
|
-
{
|
|
286
|
-
conditions: [{ type: 'SINGLE', expression: 'context.getVariable("redirect") == true' }],
|
|
287
|
-
nextStepId: 'showDetailView',
|
|
288
|
-
},
|
|
289
|
-
],
|
|
290
|
-
},
|
|
291
|
-
showDetailView: {
|
|
292
|
-
id: 'showDetailView',
|
|
293
|
-
action: 'AXPShowDetailViewAction',
|
|
294
|
-
},
|
|
295
|
-
},
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
const AXPEntityDeletedEvent = createWorkFlowEvent('[Entity] Deleted');
|
|
299
|
-
class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
300
|
-
constructor() {
|
|
301
|
-
super(...arguments);
|
|
302
|
-
this.entityRegistery = inject(AXPEntityRegistryService);
|
|
303
|
-
this.dialogService = inject(AXDialogService);
|
|
304
|
-
this.loadingDialog = inject(AXLoadingDialogService);
|
|
305
|
-
}
|
|
306
|
-
async execute(context) {
|
|
307
|
-
const moduleName = context.getVariable('module');
|
|
308
|
-
const entityName = context.getVariable('entity');
|
|
309
|
-
const ids = context.getVariable('ids');
|
|
310
|
-
const entity = await this.entityRegistery.resolve(moduleName, entityName);
|
|
311
|
-
let deletedCount = 0;
|
|
312
|
-
context.setVariable('deleteSuccessful', false);
|
|
313
|
-
const dialog = this.loadingDialog.show({
|
|
314
|
-
title: 'Deleting Record...',
|
|
315
|
-
mode: 'determinate',
|
|
316
|
-
status: 'Deleting...',
|
|
317
|
-
progressValue: 0,
|
|
318
|
-
text: `0/${ids.length}`,
|
|
319
|
-
buttons: [
|
|
320
|
-
{
|
|
321
|
-
text: 'Cancel',
|
|
322
|
-
color: 'danger',
|
|
323
|
-
onClick: () => {
|
|
324
|
-
dialog.close();
|
|
325
|
-
},
|
|
326
|
-
},
|
|
327
|
-
],
|
|
328
|
-
});
|
|
329
|
-
if (entity.commands?.delete != null) {
|
|
330
|
-
const wrappedPromises = ids
|
|
331
|
-
.map((id, i) => {
|
|
332
|
-
return new Promise((resolve) => {
|
|
333
|
-
setTimeout(() => {
|
|
334
|
-
resolve(entity.commands?.delete?.(id));
|
|
335
|
-
}, i * 200);
|
|
336
|
-
});
|
|
337
|
-
})
|
|
338
|
-
.map((p) => p?.then((value) => {
|
|
339
|
-
deletedCount++;
|
|
340
|
-
dialog.setProgressText(`${deletedCount}/${ids.length}`);
|
|
341
|
-
dialog.setProgressValue((deletedCount / ids.length) * 100);
|
|
342
|
-
return { status: 'fulfilled', value };
|
|
343
|
-
}, (reason) => ({ status: 'rejected', reason })));
|
|
344
|
-
const results = await Promise.all(wrappedPromises);
|
|
345
|
-
const successfulPromises = results.filter((result) => result?.status === 'fulfilled').length;
|
|
346
|
-
const failedPromises = results.filter((result) => result?.status === 'rejected').length;
|
|
347
|
-
setTimeout(() => {
|
|
348
|
-
dialog.close();
|
|
349
|
-
}, 300);
|
|
350
|
-
// Handle different scenarios for alerts
|
|
351
|
-
if (successfulPromises > 0 && failedPromises === 0) {
|
|
352
|
-
// All items deleted successfully
|
|
353
|
-
await this.dialogService.alert('Deletion Successful', `${successfulPromises} item(s) has been deleted.`, 'success');
|
|
354
|
-
// Dispatch actions
|
|
355
|
-
this.dispatch(AXPEntityDeletedEvent({ module: moduleName, entity: entityName, id: ids }));
|
|
356
|
-
}
|
|
357
|
-
else if (successfulPromises > 0 && failedPromises > 0) {
|
|
358
|
-
// Some items deleted successfully, some failed
|
|
359
|
-
await this.dialogService.alert('Partial Deletion Completed', `${successfulPromises} item(s) deleted successfully. However, ${failedPromises} item(s) could not be deleted.`, 'warning');
|
|
360
|
-
// Dispatch actions
|
|
361
|
-
this.dispatch(AXPEntityDeletedEvent({ module: moduleName, entity: entityName, id: ids }));
|
|
362
|
-
}
|
|
363
|
-
else if (successfulPromises === 0 && failedPromises > 0) {
|
|
364
|
-
// No items deleted, all failed
|
|
365
|
-
await this.dialogService.alert('Deletion Failed', `No items were deleted. ${failedPromises} item(s) failed to delete.`, 'danger');
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
// No items to delete (no successful or failed promises)
|
|
369
|
-
await this.dialogService.alert('No Deletion Needed', 'No items were available to delete.', 'primary');
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
else {
|
|
373
|
-
throw new Error(`The delete operation cannot be performed on ${entity.title}. This action might be restricted or not applicable for the selected item.`);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityPerformDeleteAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
377
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityPerformDeleteAction }); }
|
|
378
|
-
}
|
|
379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityPerformDeleteAction, decorators: [{
|
|
380
|
-
type: Injectable
|
|
381
|
-
}] });
|
|
382
|
-
class AXPMyCustomFunc extends AXPWorkflowFunction {
|
|
383
|
-
constructor() {
|
|
384
|
-
super(...arguments);
|
|
385
|
-
this.entityRegistery = inject(AXPEntityRegistryService);
|
|
386
|
-
this.dialogService = inject(AXDialogService);
|
|
387
|
-
}
|
|
388
|
-
async execute(val) {
|
|
389
|
-
return val == 'abc';
|
|
390
|
-
}
|
|
391
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMyCustomFunc, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
392
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMyCustomFunc }); }
|
|
393
|
-
}
|
|
394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMyCustomFunc, decorators: [{
|
|
395
|
-
type: Injectable
|
|
396
|
-
}] });
|
|
397
|
-
const AXPDeleteEntityWorkflow = {
|
|
398
|
-
startStepId: 'confirmDelete',
|
|
399
|
-
steps: {
|
|
400
|
-
confirmDelete: {
|
|
401
|
-
id: 'confirmDelete',
|
|
402
|
-
action: 'AXPDialogConfirmAction',
|
|
403
|
-
input: {
|
|
404
|
-
title: 'Warning',
|
|
405
|
-
message: `Are you sure want to delete selected item(s)?`,
|
|
406
|
-
type: 'danger',
|
|
407
|
-
},
|
|
408
|
-
nextSteps: [
|
|
409
|
-
{
|
|
410
|
-
conditions: [
|
|
411
|
-
{
|
|
412
|
-
type: 'AND',
|
|
413
|
-
conditions: [
|
|
414
|
-
{ type: 'SINGLE', expression: 'context.getOutput("result") == true' },
|
|
415
|
-
{ type: 'SINGLE', expression: 'await test("abc")' },
|
|
416
|
-
],
|
|
417
|
-
},
|
|
418
|
-
],
|
|
419
|
-
nextStepId: 'performDelete',
|
|
420
|
-
},
|
|
421
|
-
],
|
|
422
|
-
},
|
|
423
|
-
performDelete: {
|
|
424
|
-
id: 'performDelete',
|
|
425
|
-
action: 'AXPEntityPerformDeleteAction',
|
|
426
|
-
},
|
|
427
|
-
},
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
class AXPEntityModifyLoaderDefault {
|
|
431
|
-
constructor(config, selectedData, selectedSection) {
|
|
432
|
-
this.config = config;
|
|
433
|
-
this.selectedData = selectedData;
|
|
434
|
-
this.selectedSection = selectedSection;
|
|
435
|
-
this._data = {};
|
|
436
|
-
//****************** Properties ******************//
|
|
437
|
-
this.getProp = (name) => this.entity.properties.find((c) => c.name == name);
|
|
438
|
-
this._data = this.selectedData;
|
|
439
|
-
this._currentSection = this.selectedSection;
|
|
440
|
-
}
|
|
441
|
-
get entity() {
|
|
442
|
-
if (!this._config) {
|
|
443
|
-
this._config = cloneDeep(this.config);
|
|
444
|
-
}
|
|
445
|
-
return this._config;
|
|
446
|
-
}
|
|
447
|
-
get data() {
|
|
448
|
-
return this._data;
|
|
449
|
-
}
|
|
450
|
-
get section() {
|
|
451
|
-
return this._currentSection;
|
|
452
|
-
}
|
|
453
|
-
get view() {
|
|
454
|
-
return this.entity.views.detailView;
|
|
455
|
-
}
|
|
456
|
-
//****************** update ******************//
|
|
457
|
-
async update(values) {
|
|
458
|
-
if (this._config.commands?.update) {
|
|
459
|
-
const updated = await this._config.commands?.update(this._data.id, values);
|
|
460
|
-
Object.assign(this._data, updated);
|
|
461
|
-
return Promise.resolve();
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
return Promise.reject(`There is not any update commands for '${this.config.name}'`);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
class AXPEntityModifyViewLoaderFactory {
|
|
469
|
-
constructor() {
|
|
470
|
-
this.entityService = inject(AXPEntityRegistryService);
|
|
471
|
-
this.layout = inject(AXPLayoutThemeService);
|
|
472
|
-
}
|
|
473
|
-
async create(moduleName, entityName, id, section) {
|
|
474
|
-
this.layout.setNavigationLoading(true);
|
|
475
|
-
const config = await this.entityService.resolve(moduleName, entityName);
|
|
476
|
-
if (config.dataSource.byKey) {
|
|
477
|
-
const data = await config.dataSource.byKey(id);
|
|
478
|
-
this.layout.setNavigationLoading(false);
|
|
479
|
-
return new AXPEntityModifyLoaderDefault(config, data, section);
|
|
480
|
-
}
|
|
481
|
-
this.layout.setNavigationLoading(false);
|
|
482
|
-
return Promise.reject('cannot fetch ');
|
|
483
|
-
}
|
|
484
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyViewLoaderFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
485
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyViewLoaderFactory, providedIn: 'root' }); }
|
|
486
|
-
}
|
|
487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyViewLoaderFactory, decorators: [{
|
|
488
|
-
type: Injectable,
|
|
489
|
-
args: [{ providedIn: 'root' }]
|
|
490
|
-
}] });
|
|
491
|
-
|
|
492
|
-
const AXPEntityModifyEvent = createWorkFlowEvent('[Entity] Modified');
|
|
493
|
-
class AXPEntityModifyPopupAction extends AXPWorkflowAction {
|
|
494
|
-
constructor() {
|
|
495
|
-
super(...arguments);
|
|
496
|
-
this.popupService = inject(AXPopupService);
|
|
497
|
-
this.platform = inject(AXPlatform);
|
|
498
|
-
this.translateService = inject(AXTranslationService);
|
|
499
|
-
this.entityRegistery = inject(AXPEntityRegistryService);
|
|
500
|
-
this.entityCreateFactory = inject(AXPEntityModifyViewLoaderFactory);
|
|
501
|
-
}
|
|
502
|
-
async execute(context) {
|
|
503
|
-
const payload = context.getVariable('payload');
|
|
504
|
-
const { module, entity: entityName, section, id } = payload;
|
|
505
|
-
const entity = await this.entityRegistery.resolve(module, entityName);
|
|
506
|
-
const loader = await this.entityCreateFactory.create(module, entityName, id, section);
|
|
507
|
-
const com = await import('./acorex-platform-layouts-entity-modify-view.component-Cb2Yvtav.mjs');
|
|
508
|
-
const popup = await this.popupService.open(com.AXPEntityModifyViewComponent, {
|
|
509
|
-
title: `${await this.translateService.translateAsync('entity.modify')} ${payload.section.title}`,
|
|
510
|
-
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
|
|
511
|
-
data: {
|
|
512
|
-
context: loader.data,
|
|
513
|
-
loader: loader,
|
|
514
|
-
properties: payload.section.properties,
|
|
515
|
-
entity,
|
|
516
|
-
},
|
|
517
|
-
});
|
|
518
|
-
context.setOutput('popupResult', false);
|
|
519
|
-
if (popup.data?.result == true) {
|
|
520
|
-
context.setOutput('popupResult', true);
|
|
521
|
-
context.setVariable('updatedData', cloneDeep(popup.data.context));
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
525
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyPopupAction }); }
|
|
526
|
-
}
|
|
527
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyPopupAction, decorators: [{
|
|
528
|
-
type: Injectable
|
|
529
|
-
}] });
|
|
530
|
-
class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
|
|
531
|
-
constructor() {
|
|
532
|
-
super(...arguments);
|
|
533
|
-
this.entityRegistery = inject(AXPEntityRegistryService);
|
|
534
|
-
}
|
|
535
|
-
async execute(context) {
|
|
536
|
-
const payload = context.getVariable('payload');
|
|
537
|
-
const updatedData = context.getVariable('updatedData');
|
|
538
|
-
const entity = await this.entityRegistery.resolve(payload.module, payload.entity);
|
|
539
|
-
this.dispatch(AXPEntityModifyEvent({ module: entity.module, entity: entity.name, updateValues: updatedData }));
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
const AXPModifyEntityWorkflow = {
|
|
543
|
-
startStepId: 'modifyPopup',
|
|
544
|
-
steps: {
|
|
545
|
-
modifyPopup: {
|
|
546
|
-
id: 'modifyPopup',
|
|
547
|
-
action: 'AXPEntityModifyPopupAction',
|
|
548
|
-
nextSteps: [
|
|
549
|
-
{
|
|
550
|
-
conditions: [{ type: 'SINGLE', expression: 'context.getOutput("popupResult") == true' }],
|
|
551
|
-
nextStepId: 'successToast',
|
|
552
|
-
},
|
|
553
|
-
],
|
|
554
|
-
},
|
|
555
|
-
successToast: {
|
|
556
|
-
id: 'successToast',
|
|
557
|
-
action: 'AXPToastAction',
|
|
558
|
-
input: {
|
|
559
|
-
color: 'success',
|
|
560
|
-
title: 'Entity Modified',
|
|
561
|
-
content: 'Record has been successfully updated.',
|
|
562
|
-
},
|
|
563
|
-
nextSteps: [
|
|
564
|
-
{
|
|
565
|
-
conditions: [],
|
|
566
|
-
nextStepId: 'modifyConfirmed',
|
|
567
|
-
},
|
|
568
|
-
],
|
|
569
|
-
},
|
|
570
|
-
modifyConfirmed: {
|
|
571
|
-
id: 'modifyConfirmed',
|
|
572
|
-
action: 'AXPEntityModifyConfirmedAction',
|
|
573
|
-
nextSteps: [
|
|
574
|
-
{
|
|
575
|
-
conditions: [],
|
|
576
|
-
nextStepId: '',
|
|
577
|
-
},
|
|
578
|
-
],
|
|
579
|
-
},
|
|
580
|
-
},
|
|
581
|
-
};
|
|
582
|
-
|
|
583
|
-
class AXPShowQuickViewAction extends AXPWorkflowAction {
|
|
584
|
-
constructor() {
|
|
585
|
-
super(...arguments);
|
|
586
|
-
this.entityRegistery = inject(AXPEntityRegistryService);
|
|
587
|
-
this.formatService = inject(AXFormatService);
|
|
588
|
-
this.popupService = inject(AXPopupService);
|
|
589
|
-
this.platform = inject(AXPlatform);
|
|
590
|
-
}
|
|
591
|
-
async execute(context) {
|
|
592
|
-
const payload = context.getVariable('payload');
|
|
593
|
-
const entity = await this.entityRegistery.resolve(payload.module, payload.entity);
|
|
594
|
-
const suggestedProps = entity.properties.find((c) => ['title', 'name', 'code'].includes(c.name));
|
|
595
|
-
let suggestedFormat = 'Item #{{id}}';
|
|
596
|
-
if (suggestedProps)
|
|
597
|
-
suggestedFormat = `{{${suggestedProps.name}}}`;
|
|
598
|
-
const title = this.formatService.format(entity.formats?.header ?? entity.formats?.default ?? suggestedFormat, 'string', payload.data);
|
|
599
|
-
//
|
|
600
|
-
const com = await Promise.resolve().then(function () { return entityQuickView_component; });
|
|
601
|
-
this.popupService.open(com.AXPEntityQuickViewComponent, {
|
|
602
|
-
title: `${title} - Quick View`,
|
|
603
|
-
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
|
|
604
|
-
data: {
|
|
605
|
-
entity: entity,
|
|
606
|
-
data: payload.data,
|
|
607
|
-
},
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPShowQuickViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
611
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPShowQuickViewAction }); }
|
|
612
|
-
}
|
|
613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPShowQuickViewAction, decorators: [{
|
|
614
|
-
type: Injectable
|
|
615
|
-
}] });
|
|
616
|
-
const AXPShowQuickViewWorkflow = {
|
|
617
|
-
startStepId: 'showQuickView',
|
|
618
|
-
steps: {
|
|
619
|
-
showQuickView: {
|
|
620
|
-
id: 'showQuickView',
|
|
621
|
-
action: 'AXPShowQuickViewAction',
|
|
622
|
-
},
|
|
623
|
-
},
|
|
624
|
-
};
|
|
625
|
-
|
|
626
|
-
class AXPShowDetailViewAction extends AXPWorkflowAction {
|
|
627
|
-
constructor() {
|
|
628
|
-
super(...arguments);
|
|
629
|
-
this.navigation = inject(AXPWorkflowNavigateAction);
|
|
630
|
-
this.sessionService = inject(AXPSessionService);
|
|
631
|
-
}
|
|
632
|
-
async execute(context) {
|
|
633
|
-
const payload = context.getVariable('payload');
|
|
634
|
-
const id = context.getVariable('id');
|
|
635
|
-
const newPayload = {
|
|
636
|
-
commands: `/${this.sessionService.application?.name}/${payload.module}/e/${payload.entity}/${id}/view`,
|
|
637
|
-
};
|
|
638
|
-
context.setVariable('payload', newPayload);
|
|
639
|
-
this.navigation.execute(context);
|
|
640
|
-
}
|
|
641
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPShowDetailViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
642
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPShowDetailViewAction }); }
|
|
643
|
-
}
|
|
644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPShowDetailViewAction, decorators: [{
|
|
645
|
-
type: Injectable
|
|
646
|
-
}] });
|
|
647
|
-
const AXPShowDetailsViewWorkflow = {
|
|
648
|
-
startStepId: 'showDetailView',
|
|
649
|
-
steps: {
|
|
650
|
-
showDetailView: {
|
|
651
|
-
id: 'showDetailView',
|
|
652
|
-
action: 'AXPShowDetailViewAction',
|
|
653
|
-
},
|
|
654
|
-
},
|
|
655
|
-
};
|
|
656
|
-
|
|
657
|
-
class AXPShowListViewAction extends AXPWorkflowAction {
|
|
658
|
-
constructor() {
|
|
659
|
-
super(...arguments);
|
|
660
|
-
this.navigation = inject(AXPWorkflowNavigateAction);
|
|
661
|
-
this.sessionService = inject(AXPSessionService);
|
|
662
|
-
}
|
|
663
|
-
async execute(context) {
|
|
664
|
-
const payload = context.getVariable('payload');
|
|
665
|
-
const newPayload = {
|
|
666
|
-
commands: `/${this.sessionService.application?.name}/${payload.module}/e/${payload.entity}/list`,
|
|
667
|
-
};
|
|
668
|
-
context.setVariable('payload', newPayload);
|
|
669
|
-
this.navigation.execute(context);
|
|
670
|
-
}
|
|
671
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPShowListViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
672
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPShowListViewAction }); }
|
|
673
|
-
}
|
|
674
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPShowListViewAction, decorators: [{
|
|
675
|
-
type: Injectable
|
|
676
|
-
}] });
|
|
677
|
-
const AXPShowListViewWorkflow = {
|
|
678
|
-
startStepId: 'showListView',
|
|
679
|
-
steps: {
|
|
680
|
-
showListView: {
|
|
681
|
-
id: 'showListView',
|
|
682
|
-
action: 'AXPShowListViewAction',
|
|
683
|
-
},
|
|
684
|
-
},
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
class AXPEntityDetailsViewComponent {
|
|
688
|
-
constructor(actions$, unsubscriber) {
|
|
689
|
-
this.actions$ = actions$;
|
|
690
|
-
this.unsubscriber = unsubscriber;
|
|
691
|
-
this.sessionService = inject(AXPSessionService);
|
|
692
|
-
this.activeRoute = inject(ActivatedRoute);
|
|
693
|
-
this.location = inject(Location);
|
|
694
|
-
this.workflow = inject(AXPWorkflowService);
|
|
695
|
-
this.loader = this.activeRoute.snapshot.data['loader'];
|
|
696
|
-
this.store = inject(AXPLayoutThemeService);
|
|
697
|
-
//
|
|
698
|
-
this.canDelete = this.loader.entity.editOptions?.delete ?? true;
|
|
699
|
-
this.canCreate = this.loader.entity.editOptions?.create ?? true;
|
|
700
|
-
this.canUpdate = this.loader.entity.editOptions?.update ?? true;
|
|
701
|
-
//
|
|
702
|
-
this.context = signal(cloneDeep(this.loader.data));
|
|
703
|
-
this.activeRoute.paramMap.pipe(first()).subscribe((c) => {
|
|
704
|
-
this.setSection(c.get('section'));
|
|
705
|
-
});
|
|
706
|
-
//
|
|
707
|
-
this.workflow.events$.pipe(ofType(AXPEntityDeletedEvent), this.unsubscriber.takeUntilDestroy).subscribe((event) => {
|
|
708
|
-
if (event.payload.entity == this.loader.entity.name &&
|
|
709
|
-
event.payload.module == this.loader.entity.module &&
|
|
710
|
-
event.payload.id.includes(this.loader.data.id)) {
|
|
711
|
-
this.workflow.execute('show-list-view', {
|
|
712
|
-
payload: {
|
|
713
|
-
module: this.loader.entity.module,
|
|
714
|
-
entity: this.loader.entity.name,
|
|
715
|
-
},
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
});
|
|
719
|
-
this.workflow.events$.pipe(ofType(AXPEntityModifyEvent), this.unsubscriber.takeUntilDestroy).subscribe(async (event) => {
|
|
720
|
-
if (event.payload.entity == this.loader.entity.name &&
|
|
721
|
-
event.payload.module == this.loader.entity.module &&
|
|
722
|
-
event.payload.updateValues.id === this.loader.data.id) {
|
|
723
|
-
await this.loader.update(event.payload.updateValues);
|
|
724
|
-
this.context.set(cloneDeep(this.loader.data));
|
|
725
|
-
}
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
handleMenuClick(e, item) {
|
|
729
|
-
const entity = this.loader.entity;
|
|
730
|
-
const path = `/${this.sessionService.application?.name}/${entity.module}/e/${entity.name}/${this.loader.data?.id}/view/${item.name}`;
|
|
731
|
-
this.location.go(path);
|
|
732
|
-
this.setSection(item.name);
|
|
733
|
-
}
|
|
734
|
-
setSection(name) {
|
|
735
|
-
this.loader.setSection(name);
|
|
736
|
-
}
|
|
737
|
-
async handleSectionEdit(section) {
|
|
738
|
-
this.workflow.execute('modify-entity', {
|
|
739
|
-
payload: {
|
|
740
|
-
module: this.loader.entity.module,
|
|
741
|
-
entity: this.loader.entity.name,
|
|
742
|
-
id: this.loader.data.id,
|
|
743
|
-
section: section,
|
|
744
|
-
},
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
isActive(item) {
|
|
748
|
-
return item.name == window.location.pathname.split('/').pop();
|
|
749
|
-
}
|
|
750
|
-
handleCommandClick(command) {
|
|
751
|
-
switch (command) {
|
|
752
|
-
case 'delete':
|
|
753
|
-
this.workflow.execute('delete-entity', {
|
|
754
|
-
module: this.loader.entity.module,
|
|
755
|
-
entity: this.loader.entity.name,
|
|
756
|
-
ids: [this.loader.data.id],
|
|
757
|
-
});
|
|
758
|
-
break;
|
|
759
|
-
case 'create': {
|
|
760
|
-
this.workflow.execute('create-entity', {
|
|
761
|
-
payload: {
|
|
762
|
-
module: this.loader.entity.module,
|
|
763
|
-
entity: this.loader.entity.name,
|
|
764
|
-
},
|
|
765
|
-
});
|
|
766
|
-
break;
|
|
767
|
-
}
|
|
768
|
-
default:
|
|
769
|
-
break;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityDetailsViewComponent, deps: [{ token: i1.Actions }, { token: i2.AXUnsubscriber }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
773
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityDetailsViewComponent, isStandalone: true, selector: "ng-component", providers: [AXUnsubscriber], viewQueries: [{ propertyName: "drawer", first: true, predicate: ["drawer"], descendants: true }], ngImport: i0, template: "<ax-drawer-container>\n <ax-content #content class=\"ax-overflow-x-hidden\">\n <div\n class=\"ax-flex ax-flex-col ax-gap-4 ax-min-h-full ax-px-4 ax-pb-4 md:ax-px-6 ax-bg-surface ax-border-b md:ax-border-0 md:ax-bg-default\">\n <div class=\"ax-flex ax-flex-col ax-pt-4 ax-sticky ax-top-0 ax-z-10 ax-transition-all\" #sticky=\"axpSticky\"\n [axpSticky]=\"'ax-bg-surface ax-px-6 ax-py-3 -ax-mx-6 ax-shadow-xl'\" [stickyParent]=\"content.getHostElement()\">\n <!-------- Begin Toolbar -------->\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <!-------- Begin Title -------->\n <div class=\"ax-flex ax-gap-1 ax-items-center\">\n <!-- <ax-button class=\"lg:ax-hidden\">\n <ax-icon class=\"fa-solid fa-chevron-left\"></ax-icon>\n </ax-button> -->\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <div class=\"ax-text-xl md:ax-text-2xl ax-font-bold\">{{ loader.title }}</div>\n <!-- <ax-breadcrumbs class=\"child:ax-font-normal child:ax-text-neutral-400\">\n <ng-template #divider>\n <i class=\"fa-solid fa-chevron-right ax-text-xs ax-mx-2\"></i>\n </ng-template>\n <ax-breadcrumbs-item>\n <a>Home</a>\n </ax-breadcrumbs-item>\n <ax-breadcrumbs-item>\n <a>{{ loader.entity.title }}</a>\n </ax-breadcrumbs-item>\n <ax-breadcrumbs-item [active]=\"true\" class=\"!ax-font-semibold !ax-text-neutral-600\">\n {{ loader.title }}\n </ax-breadcrumbs-item>\n </ax-breadcrumbs> -->\n </div>\n </div>\n <!-------- Finish Title -------->\n <!--------------------------------------------------------------->\n <!-- Begin Action Menu -->\n <div class=\"ax-flex ax-items-center ax-gap-3\">\n @if(canCreate || canUpdate) {\n <ax-button [text]=\"(store.isSmall()) ? null : 'Actions'\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <!-- <ax-button-item text=\"Share\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-share\"> </ax-icon>\n </ax-prefix>\n </ax-button-item> \n <ax-divider></ax-divider>-->\n @if(canCreate) {\n <ax-button-item [text]=\"('create-new' | translate | async) ?? ' '\"\n class=\"ax-font-semibold ax-text-primary\" (onClick)=\"handleCommandClick('create')\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-add\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n } @if(canDelete) {\n <ax-button-item text=\"Delete\" class=\"ax-font-semibold ax-text-danger\"\n (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-trash\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n </div>\n <!-- Finish Action Menu -->\n </div>\n <!----- Finish Toolbar ----->\n <!--------------------------------------------------------------->\n <!-- Begin Section Tab Items -->\n @if((loader.hasSections$| async)) {\n <ax-tabs look=\"with-line\" location=\"bottom\" class=\"ax-mt-2\">\n @for(tab of (loader.sections$ | async); track tab.name) {\n <ax-tab-item [text]=\"tab.title\" [active]=\"isActive(tab)\" (onClick)=\"handleMenuClick($event, tab)\"\n class=\"first:!ax-ms-0\"> </ax-tab-item>\n }\n </ax-tabs>\n }\n <!-- Finish Section Tab Items -->\n </div>\n @for(section of (loader.section$ | async)?.sections; track section.name) {\n <ax-form #form>\n <div class=\"ax-card ax-shadow-md\">\n <div class=\"ax-card-header\">\n <p>{{ section.title }}</p>\n @if(canUpdate) {\n <ax-button text=\"{{ 'entity.modify' | translate | async }}\" class=\"ax-sm\" color=\"primary\"\n (onClick)=\"handleSectionEdit(section)\">\n <ax-icon class=\"fa-solid fa-pen\"> </ax-icon>\n </ax-button>\n }\n </div>\n <div class=\"ax-card-body ax-divide-y ax-divide-gray-100 dark:ax-divide-gray-700 !ax-gap-0\">\n <ng-container *ngFor=\"let name of section.properties\">\n <ng-container *ngIf=\"loader.getProp(name) as prop\">\n <div class=\"ax-grid md:ax-grid-cols-12 ax-gap-2 ax-py-4 first:ax-pt-0 last:ax-pb-0\">\n @if(section.options?.showPropTitle!=false){\n <div\n class=\"ax-col-span-12 md:ax-col-span-3 lg:ax-col-span-2 ax-flex ax-items-center md:ax-items-start ax-justify-between\">\n <div class=\"ax-flex ax-flex-col ax-items-start\">\n <span class=\"ax-font-semibold\">{{ prop.title }}</span>\n <!-- @if(prop.description) {\n <i\n class=\"fa-solid fa-circle-info fa-sm ax-text-neutral-500 dark:ax-text-neutral-400 ax-cursor-pointer\"\n [axTooltip]=\"prop.description\"\n [axTooltipPlacement]=\"'end'\"\n ></i>\n } -->\n @if(prop.description) {\n <span class=\"ax-text-neutral-500 ax-text-xs\">{{ prop.description }}</span>\n }\n </div>\n </div>\n }\n <div\n [class]=\"section.options?.showPropTitle == false ? 'ax-col-span-12' : 'ax-col-span-12 md:ax-col-span-9 lg:ax-col-span-10'\">\n <axp-widget-renderer [schema]=\"prop.schema\" [context]=\"context()\" [prop]=\"prop\"\n [mode]=\"'view'\"></axp-widget-renderer>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ax-form>\n }\n </div>\n </ax-content>\n</ax-drawer-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i6.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$1.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXImageModule }, { kind: "ngmodule", type: AXActionSheetModule }, { kind: "ngmodule", type: AXSwitchModule }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i11.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDialogModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i9.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i9.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXPSchemaModule }, { kind: "component", type: i10.AXPWidgetRendererComponent, selector: "axp-widget-renderer", inputs: ["context", "prop", "mode", "schema"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }, { kind: "ngmodule", type:
|
|
774
|
-
//
|
|
775
|
-
AXPCommonWidgetModule }, { kind: "directive", type: AXPStickyDirective, selector: "[axpSticky]", inputs: ["axpSticky", "stickyOffset", "stickyParent", "stickyTarget"], outputs: ["isStickyChange"], exportAs: ["axpSticky"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
776
|
-
}
|
|
777
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityDetailsViewComponent, decorators: [{
|
|
778
|
-
type: Component,
|
|
779
|
-
args: [{ imports: [
|
|
780
|
-
CommonModule,
|
|
781
|
-
RouterModule,
|
|
782
|
-
AXButtonModule,
|
|
783
|
-
AXDecoratorModule,
|
|
784
|
-
AXBadgeModule,
|
|
785
|
-
AXDropdownModule,
|
|
786
|
-
AXPopoverModule,
|
|
787
|
-
AXFormModule,
|
|
788
|
-
AXImageModule,
|
|
789
|
-
AXActionSheetModule,
|
|
790
|
-
AXSwitchModule,
|
|
791
|
-
AXDrawerModule,
|
|
792
|
-
AXDialogModule,
|
|
793
|
-
AXLoadingModule,
|
|
794
|
-
AXTabsModule,
|
|
795
|
-
AXBadgeModule,
|
|
796
|
-
AXButtonModule,
|
|
797
|
-
AXSwitchModule,
|
|
798
|
-
AXPSchemaModule,
|
|
799
|
-
AXTooltipModule,
|
|
800
|
-
AXBreadcrumbsModule,
|
|
801
|
-
AXTranslationModule,
|
|
802
|
-
//
|
|
803
|
-
AXPCommonWidgetModule,
|
|
804
|
-
AXPStickyDirective,
|
|
805
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [AXUnsubscriber], template: "<ax-drawer-container>\n <ax-content #content class=\"ax-overflow-x-hidden\">\n <div\n class=\"ax-flex ax-flex-col ax-gap-4 ax-min-h-full ax-px-4 ax-pb-4 md:ax-px-6 ax-bg-surface ax-border-b md:ax-border-0 md:ax-bg-default\">\n <div class=\"ax-flex ax-flex-col ax-pt-4 ax-sticky ax-top-0 ax-z-10 ax-transition-all\" #sticky=\"axpSticky\"\n [axpSticky]=\"'ax-bg-surface ax-px-6 ax-py-3 -ax-mx-6 ax-shadow-xl'\" [stickyParent]=\"content.getHostElement()\">\n <!-------- Begin Toolbar -------->\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <!-------- Begin Title -------->\n <div class=\"ax-flex ax-gap-1 ax-items-center\">\n <!-- <ax-button class=\"lg:ax-hidden\">\n <ax-icon class=\"fa-solid fa-chevron-left\"></ax-icon>\n </ax-button> -->\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <div class=\"ax-text-xl md:ax-text-2xl ax-font-bold\">{{ loader.title }}</div>\n <!-- <ax-breadcrumbs class=\"child:ax-font-normal child:ax-text-neutral-400\">\n <ng-template #divider>\n <i class=\"fa-solid fa-chevron-right ax-text-xs ax-mx-2\"></i>\n </ng-template>\n <ax-breadcrumbs-item>\n <a>Home</a>\n </ax-breadcrumbs-item>\n <ax-breadcrumbs-item>\n <a>{{ loader.entity.title }}</a>\n </ax-breadcrumbs-item>\n <ax-breadcrumbs-item [active]=\"true\" class=\"!ax-font-semibold !ax-text-neutral-600\">\n {{ loader.title }}\n </ax-breadcrumbs-item>\n </ax-breadcrumbs> -->\n </div>\n </div>\n <!-------- Finish Title -------->\n <!--------------------------------------------------------------->\n <!-- Begin Action Menu -->\n <div class=\"ax-flex ax-items-center ax-gap-3\">\n @if(canCreate || canUpdate) {\n <ax-button [text]=\"(store.isSmall()) ? null : 'Actions'\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <!-- <ax-button-item text=\"Share\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-share\"> </ax-icon>\n </ax-prefix>\n </ax-button-item> \n <ax-divider></ax-divider>-->\n @if(canCreate) {\n <ax-button-item [text]=\"('create-new' | translate | async) ?? ' '\"\n class=\"ax-font-semibold ax-text-primary\" (onClick)=\"handleCommandClick('create')\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-add\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n } @if(canDelete) {\n <ax-button-item text=\"Delete\" class=\"ax-font-semibold ax-text-danger\"\n (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-trash\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n </div>\n <!-- Finish Action Menu -->\n </div>\n <!----- Finish Toolbar ----->\n <!--------------------------------------------------------------->\n <!-- Begin Section Tab Items -->\n @if((loader.hasSections$| async)) {\n <ax-tabs look=\"with-line\" location=\"bottom\" class=\"ax-mt-2\">\n @for(tab of (loader.sections$ | async); track tab.name) {\n <ax-tab-item [text]=\"tab.title\" [active]=\"isActive(tab)\" (onClick)=\"handleMenuClick($event, tab)\"\n class=\"first:!ax-ms-0\"> </ax-tab-item>\n }\n </ax-tabs>\n }\n <!-- Finish Section Tab Items -->\n </div>\n @for(section of (loader.section$ | async)?.sections; track section.name) {\n <ax-form #form>\n <div class=\"ax-card ax-shadow-md\">\n <div class=\"ax-card-header\">\n <p>{{ section.title }}</p>\n @if(canUpdate) {\n <ax-button text=\"{{ 'entity.modify' | translate | async }}\" class=\"ax-sm\" color=\"primary\"\n (onClick)=\"handleSectionEdit(section)\">\n <ax-icon class=\"fa-solid fa-pen\"> </ax-icon>\n </ax-button>\n }\n </div>\n <div class=\"ax-card-body ax-divide-y ax-divide-gray-100 dark:ax-divide-gray-700 !ax-gap-0\">\n <ng-container *ngFor=\"let name of section.properties\">\n <ng-container *ngIf=\"loader.getProp(name) as prop\">\n <div class=\"ax-grid md:ax-grid-cols-12 ax-gap-2 ax-py-4 first:ax-pt-0 last:ax-pb-0\">\n @if(section.options?.showPropTitle!=false){\n <div\n class=\"ax-col-span-12 md:ax-col-span-3 lg:ax-col-span-2 ax-flex ax-items-center md:ax-items-start ax-justify-between\">\n <div class=\"ax-flex ax-flex-col ax-items-start\">\n <span class=\"ax-font-semibold\">{{ prop.title }}</span>\n <!-- @if(prop.description) {\n <i\n class=\"fa-solid fa-circle-info fa-sm ax-text-neutral-500 dark:ax-text-neutral-400 ax-cursor-pointer\"\n [axTooltip]=\"prop.description\"\n [axTooltipPlacement]=\"'end'\"\n ></i>\n } -->\n @if(prop.description) {\n <span class=\"ax-text-neutral-500 ax-text-xs\">{{ prop.description }}</span>\n }\n </div>\n </div>\n }\n <div\n [class]=\"section.options?.showPropTitle == false ? 'ax-col-span-12' : 'ax-col-span-12 md:ax-col-span-9 lg:ax-col-span-10'\">\n <axp-widget-renderer [schema]=\"prop.schema\" [context]=\"context()\" [prop]=\"prop\"\n [mode]=\"'view'\"></axp-widget-renderer>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ax-form>\n }\n </div>\n </ax-content>\n</ax-drawer-container>" }]
|
|
806
|
-
}], ctorParameters: () => [{ type: i1.Actions }, { type: i2.AXUnsubscriber }], propDecorators: { drawer: [{
|
|
807
|
-
type: ViewChild,
|
|
808
|
-
args: ['drawer']
|
|
809
|
-
}] } });
|
|
810
|
-
|
|
811
|
-
class AXPEntityDetailLoaderDefault {
|
|
812
|
-
constructor(config, store, entityData, formatService) {
|
|
813
|
-
this.config = config;
|
|
814
|
-
this.store = store;
|
|
815
|
-
this.entityData = entityData;
|
|
816
|
-
this.formatService = formatService;
|
|
817
|
-
this._currentSection = 'default';
|
|
818
|
-
this._sections$ = new BehaviorSubject(this.sections);
|
|
819
|
-
//****************** Properties ******************//
|
|
820
|
-
this.getProp = (name) => this.entity.properties.find((c) => c.name == name);
|
|
821
|
-
}
|
|
822
|
-
get entity() {
|
|
823
|
-
if (!this._config) {
|
|
824
|
-
this._config = cloneDeep(this.config);
|
|
825
|
-
}
|
|
826
|
-
return this._config;
|
|
827
|
-
}
|
|
828
|
-
get data() {
|
|
829
|
-
return this.entityData;
|
|
830
|
-
}
|
|
831
|
-
get view() {
|
|
832
|
-
return (this.entity.views.detailView ?? this.entity.views.quickView);
|
|
833
|
-
}
|
|
834
|
-
//****************** Titles ******************//
|
|
835
|
-
get title() {
|
|
836
|
-
const suggestedProps = this.entity.properties.find((c) => ['title', 'name', 'code'].includes(c.name));
|
|
837
|
-
let suggestedFormat = 'Item #{{id}}';
|
|
838
|
-
if (suggestedProps)
|
|
839
|
-
suggestedFormat = `{{${suggestedProps.name}}}`;
|
|
840
|
-
const title = this.formatService.format(this.entity.formats?.header ?? this.entity.formats?.default ?? suggestedFormat, 'string', this.data);
|
|
841
|
-
return title;
|
|
842
|
-
}
|
|
843
|
-
get sectionTitle() {
|
|
844
|
-
return `${this.entity.title}`;
|
|
845
|
-
}
|
|
846
|
-
//****************** Sections ******************//
|
|
847
|
-
get sections() {
|
|
848
|
-
return this.view.root.sections?.length
|
|
849
|
-
? this.view.root.sections
|
|
850
|
-
: [
|
|
851
|
-
{
|
|
852
|
-
name: 'default',
|
|
853
|
-
title: 'Default',
|
|
854
|
-
properties: this.view.root.properties,
|
|
855
|
-
},
|
|
856
|
-
];
|
|
857
|
-
}
|
|
858
|
-
get sections$() {
|
|
859
|
-
return this._sections$.pipe(defaultIfEmpty([]));
|
|
860
|
-
}
|
|
861
|
-
get section$() {
|
|
862
|
-
return this.sections$.pipe(switchMap((sections) => {
|
|
863
|
-
const section = sections.find((c) => c.name === this._currentSection) ?? this.sections[0];
|
|
864
|
-
if (!section.sections?.length) {
|
|
865
|
-
section.sections = [
|
|
866
|
-
{
|
|
867
|
-
name: 'default',
|
|
868
|
-
title: 'Details',
|
|
869
|
-
properties: section.properties,
|
|
870
|
-
},
|
|
871
|
-
];
|
|
872
|
-
}
|
|
873
|
-
return of(section);
|
|
874
|
-
}));
|
|
875
|
-
}
|
|
876
|
-
get hasSections$() {
|
|
877
|
-
return this.sections$.pipe(map((c) => c.length > 1));
|
|
878
|
-
}
|
|
879
|
-
setSection(name) {
|
|
880
|
-
this._currentSection = name ?? 'default';
|
|
881
|
-
const updatedSection = this.sections.find((c) => c.name === this._currentSection) || {
|
|
882
|
-
name: 'default',
|
|
883
|
-
title: 'Default',
|
|
884
|
-
properties: this.view.root.properties,
|
|
885
|
-
};
|
|
886
|
-
const currentSections = this._sections$.value;
|
|
887
|
-
const updatedSections = currentSections.map((section) => {
|
|
888
|
-
if (section.name === updatedSection.name) {
|
|
889
|
-
return updatedSection;
|
|
890
|
-
}
|
|
891
|
-
else {
|
|
892
|
-
return section;
|
|
893
|
-
}
|
|
894
|
-
});
|
|
895
|
-
this._sections$.next(updatedSections);
|
|
896
|
-
}
|
|
897
|
-
//****************** Update ******************//
|
|
898
|
-
async update(values) {
|
|
899
|
-
assign(this.data, values);
|
|
900
|
-
this.setSection(this._currentSection);
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
class AXPEntityDetailViewLoaderFactory {
|
|
904
|
-
constructor() {
|
|
905
|
-
this.entityService = inject(AXPEntityRegistryService);
|
|
906
|
-
this.formatService = inject(AXFormatService);
|
|
907
|
-
this.layout = inject(AXPLayoutThemeService);
|
|
908
|
-
this.store = inject(Store);
|
|
909
|
-
}
|
|
910
|
-
async create(moduleName, entityName, id) {
|
|
911
|
-
const config = await this.entityService.resolve(moduleName, entityName);
|
|
912
|
-
this.layout.setNavigationLoading(true);
|
|
913
|
-
if (config.dataSource.byKey) {
|
|
914
|
-
const data = await config.dataSource.byKey(id);
|
|
915
|
-
this.layout.setNavigationLoading(false);
|
|
916
|
-
return new AXPEntityDetailLoaderDefault(config, this.store, data, this.formatService);
|
|
917
|
-
}
|
|
918
|
-
this.layout.setNavigationLoading(false);
|
|
919
|
-
return Promise.reject('cannot fetch ');
|
|
920
|
-
}
|
|
921
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityDetailViewLoaderFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
922
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityDetailViewLoaderFactory, providedIn: 'root' }); }
|
|
923
|
-
}
|
|
924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityDetailViewLoaderFactory, decorators: [{
|
|
925
|
-
type: Injectable,
|
|
926
|
-
args: [{ providedIn: 'root' }]
|
|
927
|
-
}] });
|
|
928
|
-
|
|
929
|
-
class AXPEntityCreateCustomViewComponent extends AXBasePageComponent {
|
|
930
|
-
constructor() {
|
|
931
|
-
super(...arguments);
|
|
932
|
-
this.schemaRegistry = inject(AXPSchemaRegistryService);
|
|
933
|
-
this.toastService = inject(AXToastService);
|
|
934
|
-
this.dialogService = inject(AXDialogService);
|
|
935
|
-
this.subscriber = inject(AXUnsubscriber);
|
|
936
|
-
this.mode = 'create';
|
|
937
|
-
this.selectedView = {};
|
|
938
|
-
this.showNameInput = signal(false);
|
|
939
|
-
this.props = signal([]);
|
|
940
|
-
this.columns = signal([]);
|
|
941
|
-
this.visibleColumns = computed(() => this.columns().filter((c) => c.visible));
|
|
942
|
-
this.conditions = signal([]);
|
|
943
|
-
this.sorts = signal([]);
|
|
944
|
-
this.selectedConditionNames = [];
|
|
945
|
-
this.viewNames = [];
|
|
946
|
-
}
|
|
947
|
-
ngOnInit() {
|
|
948
|
-
this.props.set(cloneDeep(this.loader.entity.properties));
|
|
949
|
-
this.columns.set(cloneDeep(this.selectedView.columns));
|
|
950
|
-
this.conditions.set(cloneDeep(this.selectedView.conditions));
|
|
951
|
-
this.sorts.set(cloneDeep(this.selectedView.sorts));
|
|
952
|
-
this.loader.views$.pipe(this.subscriber.takeUntilDestroy).subscribe((views) => {
|
|
953
|
-
this.viewNames = views.map((v) => v.name);
|
|
954
|
-
});
|
|
955
|
-
}
|
|
956
|
-
//****************** Columns ******************//
|
|
957
|
-
updateColumnItem(event, colName) {
|
|
958
|
-
if (event.isUserInteraction) {
|
|
959
|
-
this.columns.update((prevCols) => prevCols.map((col) => (col.name === colName ? { ...col, visible: event.value } : col)));
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
//****************** Sorts ******************//
|
|
963
|
-
updateSortItem(item) {
|
|
964
|
-
this.sorts.update((prevSorts) => prevSorts.map((sort) => (sort.name === item.name ? { ...sort, dir: sort.dir == 'asc' ? 'desc' : 'asc' } : sort)));
|
|
965
|
-
}
|
|
966
|
-
addSortItem() {
|
|
967
|
-
const sortNames = this.sorts().map((p) => p.name);
|
|
968
|
-
console.log(this.props(), sortNames);
|
|
969
|
-
const name = this.props().find((c) => !sortNames.includes(c.name))?.name || this.props()[0].name;
|
|
970
|
-
this.sorts.update((prevSorts) => [...prevSorts, { name, dir: 'asc' }]);
|
|
971
|
-
}
|
|
972
|
-
removeSortItem(item) {
|
|
973
|
-
this.sorts.update((prevSorts) => prevSorts.filter((sort) => item.name != sort.name));
|
|
974
|
-
}
|
|
975
|
-
//****************** Conditions ******************//
|
|
976
|
-
getSchema(name) {
|
|
977
|
-
return this.props().find((c) => c.name == name)?.schema ?? '';
|
|
978
|
-
}
|
|
979
|
-
getOperators(name) {
|
|
980
|
-
const schemaName = this.props().find((c) => c.name == name)?.schema ?? '';
|
|
981
|
-
return this.schemaRegistry.resolve(schemaName)?.filterOptions?.operators ?? [];
|
|
982
|
-
}
|
|
983
|
-
getDefaultOperator(name) {
|
|
984
|
-
const schemaName = this.props().find((c) => c.name == name)?.schema ?? '';
|
|
985
|
-
return this.schemaRegistry.resolve(schemaName)?.filterOptions?.default ?? EQ_OPER;
|
|
986
|
-
}
|
|
987
|
-
getOperatorTitle(schemaName, oprName) {
|
|
988
|
-
return this.getOperators(schemaName).find((c) => c.name == oprName)?.title || '';
|
|
989
|
-
}
|
|
990
|
-
resetSelectedFieldNames() {
|
|
991
|
-
this.selectedConditionNames = this.conditions().map((c) => c.name);
|
|
992
|
-
}
|
|
993
|
-
addCondition() {
|
|
994
|
-
const conditions = this.selectedConditionNames.map((c) => {
|
|
995
|
-
const opr = this.getDefaultOperator(c);
|
|
996
|
-
return {
|
|
997
|
-
name: c,
|
|
998
|
-
operator: opr.name,
|
|
999
|
-
};
|
|
1000
|
-
});
|
|
1001
|
-
this.conditions.set(conditions);
|
|
1002
|
-
}
|
|
1003
|
-
removeCondition(item) {
|
|
1004
|
-
this.conditions.update((prevConditions) => prevConditions.filter((con) => con.name != item.name));
|
|
1005
|
-
}
|
|
1006
|
-
//****************** Common ******************//
|
|
1007
|
-
drop(type, event) {
|
|
1008
|
-
switch (type) {
|
|
1009
|
-
case 'columns':
|
|
1010
|
-
this.columns.update((prevCols) => {
|
|
1011
|
-
const columns = prevCols;
|
|
1012
|
-
moveItemInArray(columns, event.previousIndex, event.currentIndex);
|
|
1013
|
-
return columns;
|
|
1014
|
-
});
|
|
1015
|
-
break;
|
|
1016
|
-
case 'sorts':
|
|
1017
|
-
this.sorts.update((prevSorts) => {
|
|
1018
|
-
const sorts = prevSorts;
|
|
1019
|
-
moveItemInArray(sorts, event.previousIndex, event.currentIndex);
|
|
1020
|
-
return sorts;
|
|
1021
|
-
});
|
|
1022
|
-
break;
|
|
1023
|
-
case 'conditions':
|
|
1024
|
-
this.conditions.update((prevConditions) => {
|
|
1025
|
-
const conditions = prevConditions;
|
|
1026
|
-
moveItemInArray(conditions, event.previousIndex, event.currentIndex);
|
|
1027
|
-
return conditions;
|
|
1028
|
-
});
|
|
1029
|
-
break;
|
|
1030
|
-
default:
|
|
1031
|
-
break;
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
changeViewNameToggle() {
|
|
1035
|
-
this.showNameInput.update((prev) => !prev);
|
|
1036
|
-
}
|
|
1037
|
-
generateViewName(title) {
|
|
1038
|
-
return title.replace(/\s+/g, '-').toLowerCase();
|
|
1039
|
-
}
|
|
1040
|
-
handleApplyClick() {
|
|
1041
|
-
const updatedView = {
|
|
1042
|
-
...this.selectedView,
|
|
1043
|
-
name: this.generateViewName(this.selectedView.title),
|
|
1044
|
-
conditions: this.conditions(),
|
|
1045
|
-
columns: this.columns(),
|
|
1046
|
-
sorts: this.sorts(),
|
|
1047
|
-
};
|
|
1048
|
-
if (this.viewNames.includes(updatedView.name) && this.mode == 'create') {
|
|
1049
|
-
this.toastService.show({
|
|
1050
|
-
title: 'Invalid Title',
|
|
1051
|
-
content: 'The title you have chosen already exists. Please choose a different title for your custom view.',
|
|
1052
|
-
color: 'danger',
|
|
1053
|
-
location: 'bottom-center',
|
|
1054
|
-
closeButton: true,
|
|
1055
|
-
timeOut: 3000,
|
|
1056
|
-
});
|
|
1057
|
-
}
|
|
1058
|
-
else {
|
|
1059
|
-
this.close({ save: true, updatedView });
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
handleResetClick() {
|
|
1063
|
-
this.conditions.set(cloneDeep(this.selectedView.conditions));
|
|
1064
|
-
this.columns.set(cloneDeep(this.selectedView.columns));
|
|
1065
|
-
this.sorts.set(cloneDeep(this.selectedView.sorts));
|
|
1066
|
-
}
|
|
1067
|
-
handleDiscardClick() {
|
|
1068
|
-
this.close({ save: false });
|
|
1069
|
-
}
|
|
1070
|
-
handleCancelClick() {
|
|
1071
|
-
this.close({ save: false });
|
|
1072
|
-
}
|
|
1073
|
-
handleDeleteClick() {
|
|
1074
|
-
this.dialogService
|
|
1075
|
-
.confirm('Warning', 'Are you sure want to delete this view?', 'danger', 'horizontal')
|
|
1076
|
-
.then((data) => {
|
|
1077
|
-
if (data.result) {
|
|
1078
|
-
this.close({ delete: true, viewName: this.selectedView.name });
|
|
1079
|
-
}
|
|
1080
|
-
});
|
|
1081
|
-
}
|
|
1082
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateCustomViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1083
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityCreateCustomViewComponent, isStandalone: false, selector: "ng-component", inputs: { loader: "loader", mode: "mode", selectedView: "selectedView" }, providers: [
|
|
1084
|
-
{
|
|
1085
|
-
provide: AXUnsubscriber,
|
|
1086
|
-
},
|
|
1087
|
-
], usesInheritance: true, ngImport: i0, template: "<ax-header class=\"ax-p-4 ax-flex ax-justify-between ax-border-b\">\n <div class=\"ax-flex ax-items-center\">\n @if (showNameInput() && mode==='create') {\n <div class=\"ax-w-60\">\n <ax-text-box class=\"ax-sm\" [(ngModel)]=\"selectedView.title\">\n @if(showNameInput()){\n <ax-suffix>\n <ax-button (onClick)=\"changeViewNameToggle()\" look=\"default\">\n <ax-icon class=\"fa-sodild fas fa-check ax-text-sm\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n }\n </ax-text-box>\n </div>\n }@else {\n <span class=\"ax-text-lg ax-font-semibold\">{{ selectedView.title }}</span>\n } @if (mode===\"create\") {\n <ax-button class=\"ax-xs\" (onClick)=\"changeViewNameToggle()\" color=\"default\">\n @if(!showNameInput() ){\n <ax-icon class=\"fa-regular fa-pen ax-text-sm ax-text-neutral-600\"> </ax-icon>\n }\n </ax-button>\n }\n </div>\n <ax-close-button></ax-close-button>\n</ax-header>\n<div class=\"ax-p-4\">\n <ax-tabs [content]=\"contents\" look=\"with-line\">\n <ax-tab-item [text]=\"('entity.columns' | translate | async) ?? 'Columns'\">\n <ax-suffix>\n <ax-badge [text]=\"visibleColumns().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div class=\"ax-flex ax-flex-col ax-gap-4 ax-p-4 ax-select-none ax-h-[400px]\" cdkDropList (cdkDropListDropped)=\"drop('columns', $event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-overflow-auto ax-pe-2\">\n <ng-container *ngFor=\"let item of columns()\">\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title }}</p>\n </div>\n <ax-switch class=\"ax-sm\" [(ngModel)]=\"item.visible\" (onValueChanged)=\"updateColumnItem($event, item.name)\"></ax-switch>\n </div>\n </ng-container>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n <ax-tab-item text=\"Conditions\">\n <ax-suffix>\n <ax-badge [text]=\"conditions().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div\n class=\"ax-flex ax-flex-col ax-justify-start ax-gap-4 ax-py-4 ax-select-none ax-h-[400px]\"\n [class.ax-justify-center]=\"!conditions().length\"\n >\n @if(!conditions().length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">No Filters Selected</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">Please select field(s) that you want to filter</span>\n </div>\n } @else {\n <div class=\"ax-sorted-list ax-px-4 ax-py-1 ax-overflow-auto\">\n <div cdkDropList (cdkDropListDropped)=\"drop('conditions', $event)\" class=\"ax-flex ax-flex-col ax-gap-2\">\n @for(item of conditions(); track item.name ){\n <div cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-ms-4 ax-flex ax-items-start ax-gap-2\">\n <ax-label>{{ loader.getProp(item.name)?.title }}</ax-label>\n @if(getOperatorTitle(item.name,item.operator)){\n <ax-badge class=\"ax-text-xs\" color=\"primary\" [look]=\"'twotone'\" [text]=\"getOperatorTitle(item.name, item.operator)\"></ax-badge>\n }\n </div>\n <div class=\"ax-flex ax-group ax-items-center ax-gap-2\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <div class=\"ax-w-full\">\n <axp-widget-filter-renderer\n [schema]=\"getSchema(item.name)\"\n [prop]=\"loader.getProp(item.name)\"\n [(value)]=\"item.value\"\n [(operator)]=\"item.operator\"\n >\n </axp-widget-filter-renderer>\n </div>\n <ax-button look=\"blank\" color=\"danger\" class=\"ax-sm\" (onClick)=\"removeCondition(item)\">\n <ax-icon class=\"fa-solid fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n }\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if(conditions().length){\n <ax-button color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"blank\" class=\"ax-sm\"></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"outline\" class=\"ax-md ax-w-56\"></ax-button>\n </div>\n }\n <ax-popover\n #conditionsPopover\n [target]=\"addField\"\n [placement]=\"conditions().length ? 'bottom-start' : 'bottom'\"\n [offsetY]=\"8\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\"\n (onOpened)=\"resetSelectedFieldNames()\"\n >\n <div class=\"ax-bg-surface ax-border ax-border-default ax-rounded-md ax-shadow-md ax-w-full ax-min-w-[250px]\">\n <div class=\"ax-border-b-[1px] ax-pb-2 ax-mb-2 ax-p-3\">\n <ax-title class=\"ax-font-bold\">Fields</ax-title>\n </div>\n <div class=\"ax-max-h-48 ax-overflow-auto\">\n <ax-selection-list\n [valueField]=\"'name'\"\n [textField]=\"'title'\"\n [(ngModel)]=\"selectedConditionNames\"\n [direction]=\"'vertical'\"\n [items]=\"props()\"\n [multiple]=\"true\"\n ></ax-selection-list>\n </div>\n <div class=\"ax-flex ax-justify-end ax-border-t-[1px] ax-p-3\">\n <ax-button (onClick)=\"addCondition(); conditionsPopover.close()\" class=\"ax-sm\" text=\"Confirm\" color=\"primary\"> </ax-button>\n </div>\n </div>\n </ax-popover>\n </div>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n <ax-tab-item text=\"Sorting\">\n <ax-suffix>\n <ax-badge [text]=\"sorts().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div\n class=\"ax-flex ax-p-4 ax-flex-col ax-justify-start ax-gap-4 ax-select-none ax-overflow-auto ax-h-[400px]\"\n [class.ax-justify-center]=\"!sorts().length\"\n >\n @if(!sorts().length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">{{ 'entity.no-sort' | translate | async }}</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">{{ 'entity.ask-sort' | translate | async }}</span>\n </div>\n }@else {\n <div\n cdkDropList\n (cdkDropListDropped)=\"drop('sorts', $event)\"\n class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-py-1 ax-overflow-auto\"\n >\n <ng-container *ngFor=\"let item of sorts()\">\n <div class=\"ax-flex ax-gap-2 ax-items-center\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <ax-select-box [dataSource]=\"props()\" valueField=\"name\" textField=\"title\" [(ngModel)]=\"item.name\"> </ax-select-box>\n <ax-button [color]=\"'default'\" class=\"ax-sm\" (click)=\"updateSortItem(item)\">\n <ax-icon [class.ax-text-primary]=\"item.dir == 'asc'\" class=\"fa-solid fa-arrow-up-long ax-text-neutral-400\"></ax-icon>\n <ax-icon [class.ax-text-primary]=\"item.dir == 'desc'\" class=\"fa-solid fa-arrow-down-long ax-text-neutral-400\"></ax-icon>\n </ax-button>\n\n <ax-button look=\"blank\" (onClick)=\"removeSortItem(item)\">\n <ax-icon class=\"fa-solid fa-trash-can ax-text-danger-500\"></ax-icon>\n </ax-button>\n </div>\n </ng-container>\n </div>\n }\n\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if(sorts().length){\n <ax-button\n (onClick)=\"addSortItem()\"\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"blank\"\n class=\"ax-sm\"\n ></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button\n (onClick)=\"addSortItem()\"\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"outline\"\n class=\"ax-md ax-w-56\"\n ></ax-button>\n </div>\n }\n </div>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n </ax-tabs>\n <ng-template [axTabContent] #contents=\"axTabContent\"> </ng-template>\n</div>\n<ax-footer class=\"!ax-justify-end\">\n @if (mode===\"edit\") {\n <ax-dropdown-button [text]=\"'discard' | translate | async\" (onClick)=\"handleDiscardClick()\">\n <ax-button-item-list>\n <ax-button-item [text]=\"('reset' | translate | async) ?? ' '\" (onClick)=\"handleResetClick()\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-rotate-left fa-flip-horizontal\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-button-item class=\"ax-text-danger\" text=\"Delete\" (onClick)=\"handleDeleteClick()\">\n <ax-prefix> <ax-icon icon=\"fas fa-trash fa-flip-horizontal\"></ax-icon> </ax-prefix\n ></ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n } @else {\n <ax-button [text]=\"'cancel' | translate | async\" look=\"outline\" (onClick)=\"handleCancelClick()\"></ax-button>\n }\n <ax-button [text]=\"mode === 'create' ? ('save' | translate | async) : ('save-changes' | translate | async)\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i5.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "component", type: i6$1.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i7.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "component", type: i8$1.AXSwitchComponent, selector: "ax-switch", inputs: ["disabled", "readonly", "color", "tabIndex", "value", "name", "isLoading"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "component", type: i9.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i9.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "directive", type: i9.AXTabContentDirective, selector: "[axTabContent]", inputs: ["axTabContent"], exportAs: ["axTabContent"] }, { kind: "component", type: i10$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: i11$1.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: i7$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "component", type: i13.AXSelectionListComponent, selector: "ax-selection-list", inputs: ["id", "name", "disabled", "readonly", "tabIndex", "size", "value", "valueField", "textField", "disabledField", "readonlyField", "multiple", "direction", "customTemplate", "showControl", "items", "look"], outputs: ["onValueChanged", "onBlur", "onFocus"] }, { kind: "component", type: i14.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "directive", type: i15.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i15.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i15.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i10.AXPWidgetFilterRendererComponent, selector: "axp-widget-filter-renderer", inputs: ["value", "operator", "prop", "schema"], outputs: ["valueChange", "operatorChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1088
|
-
}
|
|
1089
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateCustomViewComponent, decorators: [{
|
|
1090
|
-
type: Component,
|
|
1091
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1092
|
-
{
|
|
1093
|
-
provide: AXUnsubscriber,
|
|
1094
|
-
},
|
|
1095
|
-
], standalone: false, template: "<ax-header class=\"ax-p-4 ax-flex ax-justify-between ax-border-b\">\n <div class=\"ax-flex ax-items-center\">\n @if (showNameInput() && mode==='create') {\n <div class=\"ax-w-60\">\n <ax-text-box class=\"ax-sm\" [(ngModel)]=\"selectedView.title\">\n @if(showNameInput()){\n <ax-suffix>\n <ax-button (onClick)=\"changeViewNameToggle()\" look=\"default\">\n <ax-icon class=\"fa-sodild fas fa-check ax-text-sm\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n }\n </ax-text-box>\n </div>\n }@else {\n <span class=\"ax-text-lg ax-font-semibold\">{{ selectedView.title }}</span>\n } @if (mode===\"create\") {\n <ax-button class=\"ax-xs\" (onClick)=\"changeViewNameToggle()\" color=\"default\">\n @if(!showNameInput() ){\n <ax-icon class=\"fa-regular fa-pen ax-text-sm ax-text-neutral-600\"> </ax-icon>\n }\n </ax-button>\n }\n </div>\n <ax-close-button></ax-close-button>\n</ax-header>\n<div class=\"ax-p-4\">\n <ax-tabs [content]=\"contents\" look=\"with-line\">\n <ax-tab-item [text]=\"('entity.columns' | translate | async) ?? 'Columns'\">\n <ax-suffix>\n <ax-badge [text]=\"visibleColumns().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div class=\"ax-flex ax-flex-col ax-gap-4 ax-p-4 ax-select-none ax-h-[400px]\" cdkDropList (cdkDropListDropped)=\"drop('columns', $event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-overflow-auto ax-pe-2\">\n <ng-container *ngFor=\"let item of columns()\">\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title }}</p>\n </div>\n <ax-switch class=\"ax-sm\" [(ngModel)]=\"item.visible\" (onValueChanged)=\"updateColumnItem($event, item.name)\"></ax-switch>\n </div>\n </ng-container>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n <ax-tab-item text=\"Conditions\">\n <ax-suffix>\n <ax-badge [text]=\"conditions().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div\n class=\"ax-flex ax-flex-col ax-justify-start ax-gap-4 ax-py-4 ax-select-none ax-h-[400px]\"\n [class.ax-justify-center]=\"!conditions().length\"\n >\n @if(!conditions().length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">No Filters Selected</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">Please select field(s) that you want to filter</span>\n </div>\n } @else {\n <div class=\"ax-sorted-list ax-px-4 ax-py-1 ax-overflow-auto\">\n <div cdkDropList (cdkDropListDropped)=\"drop('conditions', $event)\" class=\"ax-flex ax-flex-col ax-gap-2\">\n @for(item of conditions(); track item.name ){\n <div cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-ms-4 ax-flex ax-items-start ax-gap-2\">\n <ax-label>{{ loader.getProp(item.name)?.title }}</ax-label>\n @if(getOperatorTitle(item.name,item.operator)){\n <ax-badge class=\"ax-text-xs\" color=\"primary\" [look]=\"'twotone'\" [text]=\"getOperatorTitle(item.name, item.operator)\"></ax-badge>\n }\n </div>\n <div class=\"ax-flex ax-group ax-items-center ax-gap-2\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <div class=\"ax-w-full\">\n <axp-widget-filter-renderer\n [schema]=\"getSchema(item.name)\"\n [prop]=\"loader.getProp(item.name)\"\n [(value)]=\"item.value\"\n [(operator)]=\"item.operator\"\n >\n </axp-widget-filter-renderer>\n </div>\n <ax-button look=\"blank\" color=\"danger\" class=\"ax-sm\" (onClick)=\"removeCondition(item)\">\n <ax-icon class=\"fa-solid fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n }\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if(conditions().length){\n <ax-button color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"blank\" class=\"ax-sm\"></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"outline\" class=\"ax-md ax-w-56\"></ax-button>\n </div>\n }\n <ax-popover\n #conditionsPopover\n [target]=\"addField\"\n [placement]=\"conditions().length ? 'bottom-start' : 'bottom'\"\n [offsetY]=\"8\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\"\n (onOpened)=\"resetSelectedFieldNames()\"\n >\n <div class=\"ax-bg-surface ax-border ax-border-default ax-rounded-md ax-shadow-md ax-w-full ax-min-w-[250px]\">\n <div class=\"ax-border-b-[1px] ax-pb-2 ax-mb-2 ax-p-3\">\n <ax-title class=\"ax-font-bold\">Fields</ax-title>\n </div>\n <div class=\"ax-max-h-48 ax-overflow-auto\">\n <ax-selection-list\n [valueField]=\"'name'\"\n [textField]=\"'title'\"\n [(ngModel)]=\"selectedConditionNames\"\n [direction]=\"'vertical'\"\n [items]=\"props()\"\n [multiple]=\"true\"\n ></ax-selection-list>\n </div>\n <div class=\"ax-flex ax-justify-end ax-border-t-[1px] ax-p-3\">\n <ax-button (onClick)=\"addCondition(); conditionsPopover.close()\" class=\"ax-sm\" text=\"Confirm\" color=\"primary\"> </ax-button>\n </div>\n </div>\n </ax-popover>\n </div>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n <ax-tab-item text=\"Sorting\">\n <ax-suffix>\n <ax-badge [text]=\"sorts().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div\n class=\"ax-flex ax-p-4 ax-flex-col ax-justify-start ax-gap-4 ax-select-none ax-overflow-auto ax-h-[400px]\"\n [class.ax-justify-center]=\"!sorts().length\"\n >\n @if(!sorts().length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">{{ 'entity.no-sort' | translate | async }}</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">{{ 'entity.ask-sort' | translate | async }}</span>\n </div>\n }@else {\n <div\n cdkDropList\n (cdkDropListDropped)=\"drop('sorts', $event)\"\n class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-py-1 ax-overflow-auto\"\n >\n <ng-container *ngFor=\"let item of sorts()\">\n <div class=\"ax-flex ax-gap-2 ax-items-center\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <ax-select-box [dataSource]=\"props()\" valueField=\"name\" textField=\"title\" [(ngModel)]=\"item.name\"> </ax-select-box>\n <ax-button [color]=\"'default'\" class=\"ax-sm\" (click)=\"updateSortItem(item)\">\n <ax-icon [class.ax-text-primary]=\"item.dir == 'asc'\" class=\"fa-solid fa-arrow-up-long ax-text-neutral-400\"></ax-icon>\n <ax-icon [class.ax-text-primary]=\"item.dir == 'desc'\" class=\"fa-solid fa-arrow-down-long ax-text-neutral-400\"></ax-icon>\n </ax-button>\n\n <ax-button look=\"blank\" (onClick)=\"removeSortItem(item)\">\n <ax-icon class=\"fa-solid fa-trash-can ax-text-danger-500\"></ax-icon>\n </ax-button>\n </div>\n </ng-container>\n </div>\n }\n\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if(sorts().length){\n <ax-button\n (onClick)=\"addSortItem()\"\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"blank\"\n class=\"ax-sm\"\n ></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button\n (onClick)=\"addSortItem()\"\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"outline\"\n class=\"ax-md ax-w-56\"\n ></ax-button>\n </div>\n }\n </div>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n </ax-tabs>\n <ng-template [axTabContent] #contents=\"axTabContent\"> </ng-template>\n</div>\n<ax-footer class=\"!ax-justify-end\">\n @if (mode===\"edit\") {\n <ax-dropdown-button [text]=\"'discard' | translate | async\" (onClick)=\"handleDiscardClick()\">\n <ax-button-item-list>\n <ax-button-item [text]=\"('reset' | translate | async) ?? ' '\" (onClick)=\"handleResetClick()\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-rotate-left fa-flip-horizontal\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-button-item class=\"ax-text-danger\" text=\"Delete\" (onClick)=\"handleDeleteClick()\">\n <ax-prefix> <ax-icon icon=\"fas fa-trash fa-flip-horizontal\"></ax-icon> </ax-prefix\n ></ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n } @else {\n <ax-button [text]=\"'cancel' | translate | async\" look=\"outline\" (onClick)=\"handleCancelClick()\"></ax-button>\n }\n <ax-button [text]=\"mode === 'create' ? ('save' | translate | async) : ('save-changes' | translate | async)\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n</ax-footer>\n" }]
|
|
1096
|
-
}], propDecorators: { loader: [{
|
|
1097
|
-
type: Input
|
|
1098
|
-
}], mode: [{
|
|
1099
|
-
type: Input
|
|
1100
|
-
}], selectedView: [{
|
|
1101
|
-
type: Input
|
|
1102
|
-
}] } });
|
|
1103
|
-
|
|
1104
|
-
class AXPListViewOptionsColumnsComponent {
|
|
1105
|
-
constructor() {
|
|
1106
|
-
this.columns$ = of([]);
|
|
1107
|
-
this.onClosed = new EventEmitter();
|
|
1108
|
-
}
|
|
1109
|
-
ngOnInit() {
|
|
1110
|
-
this.columns$ = this.loader.displayColumns$;
|
|
1111
|
-
}
|
|
1112
|
-
handleVisibilityChange(e, name) {
|
|
1113
|
-
if (e.isUserInteraction) {
|
|
1114
|
-
this.loader.setColumnVisibility(name, e.value);
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
drop(event) {
|
|
1118
|
-
this.columns$.pipe(first()).subscribe((columns) => {
|
|
1119
|
-
moveItemInArray(columns, event.previousIndex, event.currentIndex);
|
|
1120
|
-
});
|
|
1121
|
-
}
|
|
1122
|
-
handleClose() {
|
|
1123
|
-
this.onClosed.emit();
|
|
1124
|
-
}
|
|
1125
|
-
handleResetClick() {
|
|
1126
|
-
this.loader.resetColumns();
|
|
1127
|
-
}
|
|
1128
|
-
handleApplyClick() {
|
|
1129
|
-
this.columns$.pipe(first()).subscribe((data) => {
|
|
1130
|
-
this.loader.updateColumns(data);
|
|
1131
|
-
});
|
|
1132
|
-
this.onClosed.emit();
|
|
1133
|
-
}
|
|
1134
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionsColumnsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1135
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPListViewOptionsColumnsComponent, isStandalone: false, selector: "axp-list-view-option-columns", inputs: { loader: "loader" }, outputs: { onClosed: "onClosed" }, ngImport: i0, template: "<ax-header class=\"ax-flex ax-items-center\">\n <h2 class=\"ax-text-xl ax-font-bold\">{{ 'entity.columns' | translate | async }}</h2>\n <ax-button (onClick)=\"handleClose()\" [look]=\"'blank'\">\n <ax-icon class=\"fa-solid fa-close ax-text-neutral-400 ax-text-xl\"> </ax-icon>\n </ax-button>\n</ax-header>\n<div class=\"ax-flex ax-flex-col ax-gap-4 ax-p-4 ax-select-none\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-max-h-[calc(100vh-280px)] ax-overflow-auto\">\n <ng-container *ngFor=\"let item of columns$ | async\">\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title }}</p>\n </div>\n <ax-switch class=\"ax-sm\" [ngModel]=\"item.visible\" (onValueChanged)=\"handleVisibilityChange($event, item.name)\"></ax-switch>\n </div>\n </ng-container>\n </div>\n</div>\n<ax-footer class=\"!ax-justify-start ax-absolute ax-bottom-0 ax-w-full\">\n <ax-button [text]=\"'apply' | translate | async\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n <ax-button [text]=\"'reset' | translate | async\" color=\"ghost\" (onClick)=\"handleResetClick()\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i8$1.AXSwitchComponent, selector: "ax-switch", inputs: ["disabled", "readonly", "color", "tabIndex", "value", "name", "isLoading"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "directive", type: i15.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i15.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i15.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }] }); }
|
|
1136
|
-
}
|
|
1137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionsColumnsComponent, decorators: [{
|
|
1138
|
-
type: Component,
|
|
1139
|
-
args: [{ selector: 'axp-list-view-option-columns', standalone: false, template: "<ax-header class=\"ax-flex ax-items-center\">\n <h2 class=\"ax-text-xl ax-font-bold\">{{ 'entity.columns' | translate | async }}</h2>\n <ax-button (onClick)=\"handleClose()\" [look]=\"'blank'\">\n <ax-icon class=\"fa-solid fa-close ax-text-neutral-400 ax-text-xl\"> </ax-icon>\n </ax-button>\n</ax-header>\n<div class=\"ax-flex ax-flex-col ax-gap-4 ax-p-4 ax-select-none\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-max-h-[calc(100vh-280px)] ax-overflow-auto\">\n <ng-container *ngFor=\"let item of columns$ | async\">\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title }}</p>\n </div>\n <ax-switch class=\"ax-sm\" [ngModel]=\"item.visible\" (onValueChanged)=\"handleVisibilityChange($event, item.name)\"></ax-switch>\n </div>\n </ng-container>\n </div>\n</div>\n<ax-footer class=\"!ax-justify-start ax-absolute ax-bottom-0 ax-w-full\">\n <ax-button [text]=\"'apply' | translate | async\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n <ax-button [text]=\"'reset' | translate | async\" color=\"ghost\" (onClick)=\"handleResetClick()\"></ax-button>\n</ax-footer>\n" }]
|
|
1140
|
-
}], propDecorators: { loader: [{
|
|
1141
|
-
type: Input
|
|
1142
|
-
}], onClosed: [{
|
|
1143
|
-
type: Output
|
|
1144
|
-
}] } });
|
|
1145
|
-
|
|
1146
|
-
class AXPListViewOptionConditionsComponent {
|
|
1147
|
-
constructor() {
|
|
1148
|
-
this.onClosed = new EventEmitter();
|
|
1149
|
-
this.schemaRegistery = inject(AXPSchemaRegistryService);
|
|
1150
|
-
this.popopService = inject(AXPopupService);
|
|
1151
|
-
this.isSM = false;
|
|
1152
|
-
this.props$ = of([]);
|
|
1153
|
-
this.props = [];
|
|
1154
|
-
this.conditions$ = of([]);
|
|
1155
|
-
this.selectedFieldNames = [];
|
|
1156
|
-
}
|
|
1157
|
-
onNameChange(item) {
|
|
1158
|
-
console.log('onName changed!', item);
|
|
1159
|
-
}
|
|
1160
|
-
ngOnInit() {
|
|
1161
|
-
this.props$ = this.loader.properties$.pipe(map((sorts) => sorts.filter((s) => s.canFilter != false)));
|
|
1162
|
-
this.conditions$ = this.loader.conditions$;
|
|
1163
|
-
this.conditions$.pipe(first()).subscribe((initialConditions) => {
|
|
1164
|
-
this.selectedFieldNames = initialConditions.map((i) => i.name);
|
|
1165
|
-
});
|
|
1166
|
-
this.props$.pipe(first()).subscribe((data) => {
|
|
1167
|
-
this.props = data;
|
|
1168
|
-
});
|
|
1169
|
-
}
|
|
1170
|
-
getOperators(name) {
|
|
1171
|
-
const schemaName = this.props.find((c) => c.name == name)?.schema ?? '';
|
|
1172
|
-
return this.schemaRegistery.resolve(schemaName)?.filterOptions?.operators ?? [];
|
|
1173
|
-
}
|
|
1174
|
-
getDefaultOperator(name) {
|
|
1175
|
-
const schemaName = this.props.find((c) => c.name == name)?.schema ?? '';
|
|
1176
|
-
return this.schemaRegistery.resolve(schemaName)?.filterOptions?.default ?? EQ_OPER;
|
|
1177
|
-
}
|
|
1178
|
-
getOperatorTitle(schemaName, oprName) {
|
|
1179
|
-
return this.getOperators(schemaName).find((c) => c.name == oprName)?.title || '';
|
|
1180
|
-
}
|
|
1181
|
-
getSchema(name) {
|
|
1182
|
-
return this.props.find((c) => c.name == name)?.schema ?? '';
|
|
1183
|
-
}
|
|
1184
|
-
drop(event) {
|
|
1185
|
-
this.conditions$.pipe(first()).subscribe((conditions) => {
|
|
1186
|
-
console.log('conditions: ', conditions);
|
|
1187
|
-
moveItemInArray(conditions, event.previousIndex, event.currentIndex);
|
|
1188
|
-
});
|
|
1189
|
-
}
|
|
1190
|
-
handleClose() {
|
|
1191
|
-
this.onClosed.emit();
|
|
1192
|
-
}
|
|
1193
|
-
handleRemoveCondition(item) {
|
|
1194
|
-
this.selectedFieldNames = this.selectedFieldNames.filter((i) => i !== item.name);
|
|
1195
|
-
this.loader.removeCondition(item);
|
|
1196
|
-
}
|
|
1197
|
-
resetSelectedFieldNames() {
|
|
1198
|
-
this.conditions$.pipe(first()).subscribe((initialConditions) => {
|
|
1199
|
-
this.selectedFieldNames = initialConditions.map((i) => i.name);
|
|
1200
|
-
});
|
|
1201
|
-
}
|
|
1202
|
-
handleResetClick() {
|
|
1203
|
-
this.loader.resetConditions();
|
|
1204
|
-
}
|
|
1205
|
-
onConfirmFields() {
|
|
1206
|
-
const fileds = this.selectedFieldNames.map((c) => {
|
|
1207
|
-
const opr = this.getDefaultOperator(c);
|
|
1208
|
-
return {
|
|
1209
|
-
name: c,
|
|
1210
|
-
opr: opr.name,
|
|
1211
|
-
};
|
|
1212
|
-
});
|
|
1213
|
-
this.loader.addCondition(fileds);
|
|
1214
|
-
}
|
|
1215
|
-
handleApplyClick() {
|
|
1216
|
-
this.conditions$.pipe(first()).subscribe((data) => {
|
|
1217
|
-
this.loader.updateConditions(data);
|
|
1218
|
-
});
|
|
1219
|
-
this.onClosed.emit();
|
|
1220
|
-
}
|
|
1221
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionConditionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1222
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPListViewOptionConditionsComponent, isStandalone: false, selector: "axp-list-view-option-conditions", inputs: { loader: "loader" }, outputs: { onClosed: "onClosed" }, ngImport: i0, template: "<ax-header class=\"ax-flex ax-items-center\">\n <h2 class=\"ax-text-xl ax-font-bold\">Filters</h2>\n <ax-button (onClick)=\"handleClose()\" [look]=\"'blank'\">\n <ax-icon class=\"fa-solid fa-close ax-text-neutral-400 ax-text-xl\"> </ax-icon>\n </ax-button>\n</ax-header>\n<div\n class=\"ax-flex ax-flex-col ax-justify-center ax-gap-4 ax-py-4 ax-select-none\"\n [class.ax-h-[calc(100vh-310px)]]=\"!(conditions$ | async)?.length\"\n>\n @if(!(conditions$ | async)?.length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">No Filters Selected</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">Please select field(s) that you want to filter</span>\n </div>\n } @else {\n <div class=\"ax-sorted-list ax-max-h-[calc(100vh-310px)] ax-px-4 ax-py-1 ax-overflow-auto\">\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\" class=\"ax-flex ax-flex-col ax-gap-2\">\n @for(item of conditions$ | async; track item.name ){\n <div cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-ms-4 ax-flex ax-items-start ax-gap-2\">\n <ax-label>{{ loader.getProp(item.name)?.title }}</ax-label>\n @if(getOperatorTitle(item.name,item.operator)){\n <ax-badge\n class=\"ax-text-xs\"\n color=\"primary\"\n [look]=\"'twotone'\"\n [text]=\"getOperatorTitle(item.name, item.operator)\"\n ></ax-badge>\n }\n </div>\n <div class=\"ax-flex ax-group ax-items-center ax-gap-2\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <div class=\"ax-w-full\">\n <!-- <ax-text-box [(ngModel)]=\"item.value\"></ax-text-box> -->\n <axp-widget-filter-renderer\n [schema]=\"getSchema(item.name)\"\n [prop]=\"loader.getProp(item.name)\"\n [(value)]=\"item.value\"\n [(operator)]=\"item.operator\"\n >\n </axp-widget-filter-renderer>\n </div>\n <ax-button look=\"blank\" color=\"danger\" class=\"ax-sm\" (onClick)=\"handleRemoveCondition(item)\">\n <ax-icon class=\"fa-solid fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n }\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if((conditions$ | async)?.length){\n <ax-button\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"blank\"\n class=\"ax-sm ax-mx-2\"\n ></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"outline\"\n class=\"ax-md ax-mx-2 ax-w-56\"\n ></ax-button>\n </div>\n }\n </div>\n <ax-popover\n #fieldsPopover\n [target]=\"addField\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\"\n (onOpened)=\"resetSelectedFieldNames()\"\n [offsetX]=\"15\"\n >\n <div class=\"ax-bg-surface ax-border ax-border-default ax-rounded-md ax-shadow-md ax-w-full ax-min-w-[250px]\">\n <div class=\"ax-border-b-[1px] ax-pb-2 ax-mb-2 ax-p-3\">\n <ax-title class=\"ax-font-bold\">Fields</ax-title>\n </div>\n <div class=\"ax-max-h-72 2xl:ax-max-h-80 ax-overflow-auto\">\n <ax-selection-list\n [valueField]=\"'name'\"\n [textField]=\"'title'\"\n [(ngModel)]=\"selectedFieldNames\"\n [direction]=\"'vertical'\"\n [items]=\"props\"\n [multiple]=\"true\"\n ></ax-selection-list>\n </div>\n <div class=\"ax-flex ax-justify-end ax-border-t-[1px] ax-p-3\">\n <ax-button (onClick)=\"onConfirmFields(); fieldsPopover.close()\" class=\"ax-sm\" text=\"Confirm\" color=\"primary\">\n </ax-button>\n </div>\n </div>\n </ax-popover>\n </div>\n</div>\n<ax-footer class=\"!ax-justify-start ax-absolute ax-bottom-0 ax-w-full\">\n <ax-button [text]=\"'apply' | translate | async\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n <ax-button [text]=\"'reset' | translate | async\" color=\"ghost\" (onClick)=\"handleResetClick()\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i5.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "component", type: i6$1.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i7.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "component", type: i7$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "component", type: i13.AXSelectionListComponent, selector: "ax-selection-list", inputs: ["id", "name", "disabled", "readonly", "tabIndex", "size", "value", "valueField", "textField", "disabledField", "readonlyField", "multiple", "direction", "customTemplate", "showControl", "items", "look"], outputs: ["onValueChanged", "onBlur", "onFocus"] }, { kind: "directive", type: i15.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i15.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i15.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i10.AXPWidgetFilterRendererComponent, selector: "axp-widget-filter-renderer", inputs: ["value", "operator", "prop", "schema"], outputs: ["valueChange", "operatorChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1223
|
-
}
|
|
1224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionConditionsComponent, decorators: [{
|
|
1225
|
-
type: Component,
|
|
1226
|
-
args: [{ selector: 'axp-list-view-option-conditions', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "<ax-header class=\"ax-flex ax-items-center\">\n <h2 class=\"ax-text-xl ax-font-bold\">Filters</h2>\n <ax-button (onClick)=\"handleClose()\" [look]=\"'blank'\">\n <ax-icon class=\"fa-solid fa-close ax-text-neutral-400 ax-text-xl\"> </ax-icon>\n </ax-button>\n</ax-header>\n<div\n class=\"ax-flex ax-flex-col ax-justify-center ax-gap-4 ax-py-4 ax-select-none\"\n [class.ax-h-[calc(100vh-310px)]]=\"!(conditions$ | async)?.length\"\n>\n @if(!(conditions$ | async)?.length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">No Filters Selected</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">Please select field(s) that you want to filter</span>\n </div>\n } @else {\n <div class=\"ax-sorted-list ax-max-h-[calc(100vh-310px)] ax-px-4 ax-py-1 ax-overflow-auto\">\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\" class=\"ax-flex ax-flex-col ax-gap-2\">\n @for(item of conditions$ | async; track item.name ){\n <div cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-ms-4 ax-flex ax-items-start ax-gap-2\">\n <ax-label>{{ loader.getProp(item.name)?.title }}</ax-label>\n @if(getOperatorTitle(item.name,item.operator)){\n <ax-badge\n class=\"ax-text-xs\"\n color=\"primary\"\n [look]=\"'twotone'\"\n [text]=\"getOperatorTitle(item.name, item.operator)\"\n ></ax-badge>\n }\n </div>\n <div class=\"ax-flex ax-group ax-items-center ax-gap-2\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <div class=\"ax-w-full\">\n <!-- <ax-text-box [(ngModel)]=\"item.value\"></ax-text-box> -->\n <axp-widget-filter-renderer\n [schema]=\"getSchema(item.name)\"\n [prop]=\"loader.getProp(item.name)\"\n [(value)]=\"item.value\"\n [(operator)]=\"item.operator\"\n >\n </axp-widget-filter-renderer>\n </div>\n <ax-button look=\"blank\" color=\"danger\" class=\"ax-sm\" (onClick)=\"handleRemoveCondition(item)\">\n <ax-icon class=\"fa-solid fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n }\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if((conditions$ | async)?.length){\n <ax-button\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"blank\"\n class=\"ax-sm ax-mx-2\"\n ></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"outline\"\n class=\"ax-md ax-mx-2 ax-w-56\"\n ></ax-button>\n </div>\n }\n </div>\n <ax-popover\n #fieldsPopover\n [target]=\"addField\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\"\n (onOpened)=\"resetSelectedFieldNames()\"\n [offsetX]=\"15\"\n >\n <div class=\"ax-bg-surface ax-border ax-border-default ax-rounded-md ax-shadow-md ax-w-full ax-min-w-[250px]\">\n <div class=\"ax-border-b-[1px] ax-pb-2 ax-mb-2 ax-p-3\">\n <ax-title class=\"ax-font-bold\">Fields</ax-title>\n </div>\n <div class=\"ax-max-h-72 2xl:ax-max-h-80 ax-overflow-auto\">\n <ax-selection-list\n [valueField]=\"'name'\"\n [textField]=\"'title'\"\n [(ngModel)]=\"selectedFieldNames\"\n [direction]=\"'vertical'\"\n [items]=\"props\"\n [multiple]=\"true\"\n ></ax-selection-list>\n </div>\n <div class=\"ax-flex ax-justify-end ax-border-t-[1px] ax-p-3\">\n <ax-button (onClick)=\"onConfirmFields(); fieldsPopover.close()\" class=\"ax-sm\" text=\"Confirm\" color=\"primary\">\n </ax-button>\n </div>\n </div>\n </ax-popover>\n </div>\n</div>\n<ax-footer class=\"!ax-justify-start ax-absolute ax-bottom-0 ax-w-full\">\n <ax-button [text]=\"'apply' | translate | async\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n <ax-button [text]=\"'reset' | translate | async\" color=\"ghost\" (onClick)=\"handleResetClick()\"></ax-button>\n</ax-footer>\n" }]
|
|
1227
|
-
}], ctorParameters: () => [], propDecorators: { onClosed: [{
|
|
1228
|
-
type: Output
|
|
1229
|
-
}], loader: [{
|
|
1230
|
-
type: Input
|
|
1231
|
-
}] } });
|
|
1232
|
-
|
|
1233
|
-
class AXPListViewOptionFilterOperatorComponent {
|
|
1234
|
-
constructor() {
|
|
1235
|
-
this.visible = false;
|
|
1236
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
1237
|
-
this._items = [];
|
|
1238
|
-
this.valueChange = new EventEmitter();
|
|
1239
|
-
}
|
|
1240
|
-
get items() {
|
|
1241
|
-
return this._items;
|
|
1242
|
-
}
|
|
1243
|
-
set items(v) {
|
|
1244
|
-
this.visible = false;
|
|
1245
|
-
this._items = v;
|
|
1246
|
-
setTimeout(() => {
|
|
1247
|
-
this.visible = true;
|
|
1248
|
-
this.cdr.markForCheck();
|
|
1249
|
-
setTimeout(() => {
|
|
1250
|
-
if (this.selectBox) {
|
|
1251
|
-
//this.selectBox.defaultValue = this.items[0]?.name;
|
|
1252
|
-
}
|
|
1253
|
-
});
|
|
1254
|
-
});
|
|
1255
|
-
}
|
|
1256
|
-
get value() {
|
|
1257
|
-
return this._value;
|
|
1258
|
-
}
|
|
1259
|
-
set value(v) {
|
|
1260
|
-
this._value = v;
|
|
1261
|
-
this.valueChange.emit(v);
|
|
1262
|
-
}
|
|
1263
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionFilterOperatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1264
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPListViewOptionFilterOperatorComponent, isStandalone: false, selector: "axp-list-view-option-filter-operator", inputs: { items: "items", value: "value" }, outputs: { valueChange: "valueChange" }, host: { styleAttribute: "display: contents;" }, viewQueries: [{ propertyName: "selectBox", first: true, predicate: AXSelectBoxComponent, descendants: true }], ngImport: i0, template: `
|
|
1265
|
-
<ax-select-box
|
|
1266
|
-
valueField="name"
|
|
1267
|
-
[dataSource]="items"
|
|
1268
|
-
textField="title"
|
|
1269
|
-
[(ngModel)]="value"
|
|
1270
|
-
*ngIf="visible"
|
|
1271
|
-
>
|
|
1272
|
-
</ax-select-box>
|
|
1273
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i10$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1274
|
-
}
|
|
1275
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionFilterOperatorComponent, decorators: [{
|
|
1276
|
-
type: Component,
|
|
1277
|
-
args: [{
|
|
1278
|
-
selector: 'axp-list-view-option-filter-operator',
|
|
1279
|
-
template: `
|
|
1280
|
-
<ax-select-box
|
|
1281
|
-
valueField="name"
|
|
1282
|
-
[dataSource]="items"
|
|
1283
|
-
textField="title"
|
|
1284
|
-
[(ngModel)]="value"
|
|
1285
|
-
*ngIf="visible"
|
|
1286
|
-
>
|
|
1287
|
-
</ax-select-box>
|
|
1288
|
-
`,
|
|
1289
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1290
|
-
host: { style: 'display: contents;' },
|
|
1291
|
-
standalone: false
|
|
1292
|
-
}]
|
|
1293
|
-
}], propDecorators: { selectBox: [{
|
|
1294
|
-
type: ViewChild,
|
|
1295
|
-
args: [AXSelectBoxComponent]
|
|
1296
|
-
}], items: [{
|
|
1297
|
-
type: Input
|
|
1298
|
-
}], valueChange: [{
|
|
1299
|
-
type: Output
|
|
1300
|
-
}], value: [{
|
|
1301
|
-
type: Input
|
|
1302
|
-
}] } });
|
|
1303
|
-
|
|
1304
|
-
class AXPListViewOptionSortingComponent {
|
|
1305
|
-
constructor() {
|
|
1306
|
-
this.isSM = false;
|
|
1307
|
-
this.onClosed = new EventEmitter();
|
|
1308
|
-
this.props$ = of([]);
|
|
1309
|
-
this.sorts$ = of([]);
|
|
1310
|
-
}
|
|
1311
|
-
ngOnInit() {
|
|
1312
|
-
this.props$ = this.loader.properties$.pipe(map((sorts) => sorts.filter((s) => s.canSort != false)));
|
|
1313
|
-
this.loader.sorts$.subscribe((data) => { });
|
|
1314
|
-
this.sorts$ = this.loader.sorts$;
|
|
1315
|
-
}
|
|
1316
|
-
drop(event) {
|
|
1317
|
-
this.sorts$.pipe(first()).subscribe((sorts) => {
|
|
1318
|
-
moveItemInArray(sorts, event.previousIndex, event.currentIndex);
|
|
1319
|
-
});
|
|
1320
|
-
}
|
|
1321
|
-
changeItemSort(item) {
|
|
1322
|
-
item.dir = item.dir == 'asc' ? 'desc' : 'asc';
|
|
1323
|
-
}
|
|
1324
|
-
handleClose() {
|
|
1325
|
-
this.onClosed.emit();
|
|
1326
|
-
}
|
|
1327
|
-
handleResetClick() {
|
|
1328
|
-
this.loader.resetSort();
|
|
1329
|
-
}
|
|
1330
|
-
handleApplyClick() {
|
|
1331
|
-
this.sorts$.pipe(first()).subscribe((data) => {
|
|
1332
|
-
this.loader.updateSort(data);
|
|
1333
|
-
});
|
|
1334
|
-
this.onClosed.emit();
|
|
1335
|
-
}
|
|
1336
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionSortingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1337
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPListViewOptionSortingComponent, isStandalone: false, selector: "axp-list-view-option-sorting", inputs: { loader: "loader" }, outputs: { onClosed: "onClosed" }, ngImport: i0, template: "<ax-header class=\"ax-flex ax-items-center\">\n <h2 class=\"ax-text-xl ax-font-bold\">{{'entity.sort' | translate | async}}</h2>\n <ax-button (onClick)=\"handleClose()\" [look]=\"'blank'\">\n <ax-icon class=\"fa-solid fa-close ax-text-neutral-400 ax-text-xl\"> </ax-icon>\n </ax-button>\n</ax-header>\n<div class=\"ax-flex ax-p-4 ax-flex-col ax-justify-center ax-gap-4 ax-select-none\" [class.ax-h-[calc(100vh-310px)]]=\"!(sorts$ | async)?.length\">\n @if(!(sorts$ | async)?.length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">{{ 'entity.no-sort' | translate | async }}</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">{{ 'entity.ask-sort' | translate | async }}</span>\n </div>\n }\n <div\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-py-1 ax-max-h-[calc(100vh-310px)] ax-overflow-auto\"\n >\n <ng-container *ngFor=\"let item of sorts$ | async\">\n <div class=\"ax-flex ax-gap-2 ax-items-center\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <ax-select-box [dataSource]=\"(props$ | async) ?? []\" valueField=\"name\" textField=\"title\" [(ngModel)]=\"item.name\"> </ax-select-box>\n <ax-button [color]=\"'default'\" class=\"ax-sm\" (click)=\"changeItemSort(item)\">\n <ax-icon [class.ax-text-primary]=\"item.dir == 'asc'\" class=\"fa-solid fa-arrow-up-long ax-text-neutral-400\"></ax-icon>\n <ax-icon [class.ax-text-primary]=\"item.dir == 'desc'\" class=\"fa-solid fa-arrow-down-long ax-text-neutral-400\"></ax-icon>\n </ax-button>\n\n <ax-button look=\"blank\" (onClick)=\"loader.removeSort(item)\">\n <ax-icon class=\"fa-solid fa-trash-can ax-text-danger-500\"></ax-icon>\n </ax-button>\n </div>\n </ng-container>\n </div>\n\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if((sorts$ | async)?.length){\n <ax-button (onClick)=\"loader.addSort()\" color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"blank\" class=\"ax-sm\"></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button (onClick)=\"loader.addSort()\" color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"outline\" class=\"ax-md ax-w-56\"></ax-button>\n </div>\n }\n </div>\n </div>\n</div>\n<ax-footer class=\"!ax-justify-start ax-absolute ax-bottom-0 ax-w-full\">\n <ax-button [text]=\"'apply' | translate | async\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n <ax-button [text]=\"'reset' | translate | async\" color=\"ghost\" (onClick)=\"handleResetClick()\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i7.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "component", type: i10$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "directive", type: i15.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i15.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i15.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }] }); }
|
|
1338
|
-
}
|
|
1339
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionSortingComponent, decorators: [{
|
|
1340
|
-
type: Component,
|
|
1341
|
-
args: [{ selector: 'axp-list-view-option-sorting', standalone: false, template: "<ax-header class=\"ax-flex ax-items-center\">\n <h2 class=\"ax-text-xl ax-font-bold\">{{'entity.sort' | translate | async}}</h2>\n <ax-button (onClick)=\"handleClose()\" [look]=\"'blank'\">\n <ax-icon class=\"fa-solid fa-close ax-text-neutral-400 ax-text-xl\"> </ax-icon>\n </ax-button>\n</ax-header>\n<div class=\"ax-flex ax-p-4 ax-flex-col ax-justify-center ax-gap-4 ax-select-none\" [class.ax-h-[calc(100vh-310px)]]=\"!(sorts$ | async)?.length\">\n @if(!(sorts$ | async)?.length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">{{ 'entity.no-sort' | translate | async }}</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">{{ 'entity.ask-sort' | translate | async }}</span>\n </div>\n }\n <div\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-py-1 ax-max-h-[calc(100vh-310px)] ax-overflow-auto\"\n >\n <ng-container *ngFor=\"let item of sorts$ | async\">\n <div class=\"ax-flex ax-gap-2 ax-items-center\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <ax-select-box [dataSource]=\"(props$ | async) ?? []\" valueField=\"name\" textField=\"title\" [(ngModel)]=\"item.name\"> </ax-select-box>\n <ax-button [color]=\"'default'\" class=\"ax-sm\" (click)=\"changeItemSort(item)\">\n <ax-icon [class.ax-text-primary]=\"item.dir == 'asc'\" class=\"fa-solid fa-arrow-up-long ax-text-neutral-400\"></ax-icon>\n <ax-icon [class.ax-text-primary]=\"item.dir == 'desc'\" class=\"fa-solid fa-arrow-down-long ax-text-neutral-400\"></ax-icon>\n </ax-button>\n\n <ax-button look=\"blank\" (onClick)=\"loader.removeSort(item)\">\n <ax-icon class=\"fa-solid fa-trash-can ax-text-danger-500\"></ax-icon>\n </ax-button>\n </div>\n </ng-container>\n </div>\n\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if((sorts$ | async)?.length){\n <ax-button (onClick)=\"loader.addSort()\" color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"blank\" class=\"ax-sm\"></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button (onClick)=\"loader.addSort()\" color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"outline\" class=\"ax-md ax-w-56\"></ax-button>\n </div>\n }\n </div>\n </div>\n</div>\n<ax-footer class=\"!ax-justify-start ax-absolute ax-bottom-0 ax-w-full\">\n <ax-button [text]=\"'apply' | translate | async\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n <ax-button [text]=\"'reset' | translate | async\" color=\"ghost\" (onClick)=\"handleResetClick()\"></ax-button>\n</ax-footer>\n" }]
|
|
1342
|
-
}], propDecorators: { onClosed: [{
|
|
1343
|
-
type: Output
|
|
1344
|
-
}], loader: [{
|
|
1345
|
-
type: Input
|
|
1346
|
-
}] } });
|
|
1347
|
-
|
|
1348
|
-
const AXPImportEntityEvent = createWorkFlowEvent('[Entity] Imported!');
|
|
1349
|
-
class AXPEntityImportPopupAction extends AXPWorkflowAction {
|
|
1350
|
-
constructor() {
|
|
1351
|
-
super(...arguments);
|
|
1352
|
-
this.entityRegistery = inject(AXPEntityRegistryService);
|
|
1353
|
-
this.popupService = inject(AXPopupService);
|
|
1354
|
-
this.platform = inject(AXPlatform);
|
|
1355
|
-
}
|
|
1356
|
-
async execute(context) {
|
|
1357
|
-
const { module, entity: entityName } = context.getVariable('payload');
|
|
1358
|
-
const entity = await this.entityRegistery.resolve(module, entityName);
|
|
1359
|
-
const com = await import('./acorex-platform-layouts-entity-import-view.component-BIHTWoXR.mjs');
|
|
1360
|
-
const result = await this.popupService.open(com.AXPEntityImportViewComponent, {
|
|
1361
|
-
title: `Import ${entity.title}`,
|
|
1362
|
-
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
|
|
1363
|
-
data: {
|
|
1364
|
-
entity,
|
|
1365
|
-
},
|
|
1366
|
-
});
|
|
1367
|
-
if (result.data?.save) {
|
|
1368
|
-
context.setOutput('popupResult', true);
|
|
1369
|
-
context.setVariable('redirect', result.data.redirect);
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityImportPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1373
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityImportPopupAction }); }
|
|
1374
|
-
}
|
|
1375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityImportPopupAction, decorators: [{
|
|
1376
|
-
type: Injectable
|
|
1377
|
-
}] });
|
|
1378
|
-
class AXPEntityImportSubmittedAction extends AXPWorkflowAction {
|
|
1379
|
-
async execute(context) {
|
|
1380
|
-
const { module, entity: entity } = context.getVariable('payload');
|
|
1381
|
-
this.dispatch(AXPImportEntityEvent({ entity, module }));
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
const AXPImportEntityWorkflow = {
|
|
1385
|
-
startStepId: 'createPopup',
|
|
1386
|
-
steps: {
|
|
1387
|
-
createPopup: {
|
|
1388
|
-
id: 'createPopup',
|
|
1389
|
-
action: 'AXPEntityImportPopupAction',
|
|
1390
|
-
nextSteps: [
|
|
1391
|
-
{
|
|
1392
|
-
conditions: [{ type: 'SINGLE', expression: 'context.getOutput("popupResult") == true' }],
|
|
1393
|
-
nextStepId: 'successToast',
|
|
1394
|
-
},
|
|
1395
|
-
],
|
|
1396
|
-
},
|
|
1397
|
-
successToast: {
|
|
1398
|
-
id: 'successToast',
|
|
1399
|
-
action: 'AXPToastAction',
|
|
1400
|
-
input: {
|
|
1401
|
-
color: 'success',
|
|
1402
|
-
title: 'Entity Imported',
|
|
1403
|
-
content: 'Your file has been uploaded successfully',
|
|
1404
|
-
},
|
|
1405
|
-
nextSteps: [
|
|
1406
|
-
{
|
|
1407
|
-
conditions: [],
|
|
1408
|
-
nextStepId: 'importSubmitted',
|
|
1409
|
-
},
|
|
1410
|
-
],
|
|
1411
|
-
},
|
|
1412
|
-
importSubmitted: {
|
|
1413
|
-
id: 'importSubmitted',
|
|
1414
|
-
action: 'AXPEntityImportSubmittedAction',
|
|
1415
|
-
},
|
|
1416
|
-
},
|
|
1417
|
-
};
|
|
1418
|
-
|
|
1419
|
-
class AXPEntityListViewComponent {
|
|
1420
|
-
constructor(actionSheetService, unsubscriber, platform, cdr) {
|
|
1421
|
-
this.actionSheetService = actionSheetService;
|
|
1422
|
-
this.unsubscriber = unsubscriber;
|
|
1423
|
-
this.platform = platform;
|
|
1424
|
-
this.cdr = cdr;
|
|
1425
|
-
this.workflow = inject(AXPWorkflowService);
|
|
1426
|
-
this.layout = inject(AXPLayoutThemeService);
|
|
1427
|
-
this.route = inject(ActivatedRoute);
|
|
1428
|
-
this.loader = this.route.snapshot.data['loader'];
|
|
1429
|
-
this.title = '';
|
|
1430
|
-
this.searchValue = '';
|
|
1431
|
-
this.searchBoxPlaceholder = '';
|
|
1432
|
-
this.searchBoxTitle = '';
|
|
1433
|
-
this.searchBoxCollapsed = true;
|
|
1434
|
-
this.publicViews$ = this.loader.publicViews$;
|
|
1435
|
-
this.customViews$ = this.loader.customViews$;
|
|
1436
|
-
this.hasCustomViews$ = this.loader.hasCustomViews$;
|
|
1437
|
-
this.view$ = this.loader.view$;
|
|
1438
|
-
//
|
|
1439
|
-
this.conditions$ = this.loader.conditions$;
|
|
1440
|
-
this.conditionsCount$ = this.loader.conditionsCount$;
|
|
1441
|
-
//
|
|
1442
|
-
this.columns$ = this.loader.displayColumns$;
|
|
1443
|
-
this.columnsCount$ = this.loader.displayColumnsCount$;
|
|
1444
|
-
//
|
|
1445
|
-
this.sort$ = this.loader.sorts$;
|
|
1446
|
-
this.sortCount$ = this.loader.sortsCount$;
|
|
1447
|
-
//
|
|
1448
|
-
this.dataSource = this.loader.dataSource;
|
|
1449
|
-
//
|
|
1450
|
-
this.actions = this.loader.entity.actions;
|
|
1451
|
-
//
|
|
1452
|
-
this.canDelete = this.loader.entity.editOptions?.delete ?? true;
|
|
1453
|
-
this.canCreate = this.loader.entity.editOptions?.create ?? true;
|
|
1454
|
-
this.canUpdate = this.loader.entity.editOptions?.update ?? true;
|
|
1455
|
-
this.canImport = this.loader.entity.editOptions?.import ?? false;
|
|
1456
|
-
this.popupService = inject(AXPopupService);
|
|
1457
|
-
this.dropdownRowItems = [
|
|
1458
|
-
{
|
|
1459
|
-
text: 'Details',
|
|
1460
|
-
icon: 'fa-solid fa-eye',
|
|
1461
|
-
name: 'edit',
|
|
1462
|
-
divided: true,
|
|
1463
|
-
},
|
|
1464
|
-
{
|
|
1465
|
-
text: 'Delete',
|
|
1466
|
-
icon: 'fa-solid fa-trash-can',
|
|
1467
|
-
name: 'delete',
|
|
1468
|
-
color: 'danger',
|
|
1469
|
-
disabled: !this.canDelete,
|
|
1470
|
-
},
|
|
1471
|
-
];
|
|
1472
|
-
this.inlineRowItems = [
|
|
1473
|
-
{
|
|
1474
|
-
text: 'View',
|
|
1475
|
-
icon: 'fa-solid fa-eye',
|
|
1476
|
-
name: 'view',
|
|
1477
|
-
divided: true,
|
|
1478
|
-
},
|
|
1479
|
-
];
|
|
1480
|
-
this.getSingleAction = (name) => {
|
|
1481
|
-
return this.actions?.[name];
|
|
1482
|
-
};
|
|
1483
|
-
this.getDropdownRowItems = (rowData) => {
|
|
1484
|
-
return Promise.resolve(this.dropdownRowItems);
|
|
1485
|
-
};
|
|
1486
|
-
this.getInlineRowItems = (rowData) => {
|
|
1487
|
-
return this.inlineRowItems;
|
|
1488
|
-
};
|
|
1489
|
-
//TODO: namespace, module name issues
|
|
1490
|
-
// this.title = this.manuLoader.currentMenuItem()?.text ?? this.loader.entity.formats?.list ?? this.loader.entity.formats?.default ?? 'Title';
|
|
1491
|
-
this.title =
|
|
1492
|
-
this.loader.entity.formats?.list ?? this.loader.entity.title ?? this.loader.entity.formats?.default ?? 'Title';
|
|
1493
|
-
//
|
|
1494
|
-
this.workflow.events$
|
|
1495
|
-
.pipe(ofType$1(AXPEntityDeletedEvent, AXPEntityCreateEvent, AXPImportEntityEvent), this.unsubscriber.takeUntilDestroy)
|
|
1496
|
-
.subscribe((event) => {
|
|
1497
|
-
if (event.payload.entity == this.loader.entity.name && event.payload.module == this.loader.entity.module) {
|
|
1498
|
-
this.grid.selectedRows = [];
|
|
1499
|
-
this.grid?.refresh();
|
|
1500
|
-
}
|
|
1501
|
-
});
|
|
1502
|
-
//
|
|
1503
|
-
this.dataSource.onLoadingChanged.pipe(this.unsubscriber.takeUntilDestroy).subscribe((value) => {
|
|
1504
|
-
this.layout.setNavigationLoading(value);
|
|
1505
|
-
});
|
|
1506
|
-
this._getInlineConditionTitles();
|
|
1507
|
-
}
|
|
1508
|
-
ngAfterViewInit() {
|
|
1509
|
-
this.loader.setDefaultView();
|
|
1510
|
-
}
|
|
1511
|
-
_getInlineConditionTitles() {
|
|
1512
|
-
const titles = this.loader.getInlineFilterTitles();
|
|
1513
|
-
this.searchBoxTitle = titles.join(', ');
|
|
1514
|
-
if (titles.length > 2)
|
|
1515
|
-
this.searchBoxPlaceholder = titles.slice(0, 2).join(', ') + ' ...';
|
|
1516
|
-
else
|
|
1517
|
-
this.searchBoxPlaceholder = titles.join(', ');
|
|
1518
|
-
}
|
|
1519
|
-
_handleViewsPopover() {
|
|
1520
|
-
this.actionSheetService.open({ content: this.viewsTemplate });
|
|
1521
|
-
}
|
|
1522
|
-
toggleSearchBox() {
|
|
1523
|
-
this.searchBoxCollapsed = !this.searchBoxCollapsed;
|
|
1524
|
-
}
|
|
1525
|
-
handleRowDbClick(e) {
|
|
1526
|
-
const d = {
|
|
1527
|
-
component: e.component,
|
|
1528
|
-
name: this.dropdownRowItems[0].name,
|
|
1529
|
-
data: e.data,
|
|
1530
|
-
};
|
|
1531
|
-
this.handleRowCommandClick(d);
|
|
1532
|
-
}
|
|
1533
|
-
async handleRowCommandClick(e) {
|
|
1534
|
-
switch (e.name) {
|
|
1535
|
-
case 'view': {
|
|
1536
|
-
await this.workflow.execute('show-quick-view', {
|
|
1537
|
-
payload: {
|
|
1538
|
-
module: this.loader.entity.module,
|
|
1539
|
-
entity: this.loader.entity.name,
|
|
1540
|
-
data: e.data,
|
|
1541
|
-
},
|
|
1542
|
-
});
|
|
1543
|
-
break;
|
|
1544
|
-
}
|
|
1545
|
-
case 'edit': {
|
|
1546
|
-
await this.workflow.execute('show-details', {
|
|
1547
|
-
payload: {
|
|
1548
|
-
module: this.loader.entity.module,
|
|
1549
|
-
entity: this.loader.entity.name,
|
|
1550
|
-
},
|
|
1551
|
-
id: e.data.id,
|
|
1552
|
-
});
|
|
1553
|
-
break;
|
|
1554
|
-
}
|
|
1555
|
-
case 'delete': {
|
|
1556
|
-
await this.workflow.execute('delete-entity', {
|
|
1557
|
-
module: this.loader.entity.module,
|
|
1558
|
-
entity: this.loader.entity.name,
|
|
1559
|
-
ids: [e.data.id],
|
|
1560
|
-
});
|
|
1561
|
-
break;
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
handleCreateClick() {
|
|
1566
|
-
this.workflow.execute('create-entity', {
|
|
1567
|
-
payload: {
|
|
1568
|
-
module: this.loader.entity.module,
|
|
1569
|
-
entity: this.loader.entity.name,
|
|
1570
|
-
},
|
|
1571
|
-
});
|
|
1572
|
-
}
|
|
1573
|
-
handleImportClick() {
|
|
1574
|
-
this.workflow.execute('import-entity', {
|
|
1575
|
-
payload: {
|
|
1576
|
-
module: this.loader.entity.module,
|
|
1577
|
-
entity: this.loader.entity.name,
|
|
1578
|
-
},
|
|
1579
|
-
});
|
|
1580
|
-
}
|
|
1581
|
-
handleCommandClick(command) {
|
|
1582
|
-
switch (command) {
|
|
1583
|
-
case 'delete':
|
|
1584
|
-
this.workflow.execute('delete-entity', {
|
|
1585
|
-
module: this.loader.entity.module,
|
|
1586
|
-
entity: this.loader.entity.name,
|
|
1587
|
-
ids: this.grid.selectedRows.map((c) => c['id']),
|
|
1588
|
-
});
|
|
1589
|
-
break;
|
|
1590
|
-
default:
|
|
1591
|
-
break;
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
clearSelectedItems() {
|
|
1595
|
-
this.grid.selectedRows = [];
|
|
1596
|
-
}
|
|
1597
|
-
closeDrawer(name, collapsed) {
|
|
1598
|
-
if (collapsed != false) {
|
|
1599
|
-
switch (name) {
|
|
1600
|
-
case 'conditions':
|
|
1601
|
-
this.loader.resetConditions();
|
|
1602
|
-
break;
|
|
1603
|
-
case 'columns':
|
|
1604
|
-
this.loader.resetColumns();
|
|
1605
|
-
break;
|
|
1606
|
-
case 'sorts':
|
|
1607
|
-
this.loader.resetSort();
|
|
1608
|
-
break;
|
|
1609
|
-
default:
|
|
1610
|
-
break;
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
handleChangeSearchValue(e) {
|
|
1615
|
-
if (e.isUserInteraction) {
|
|
1616
|
-
this.loader.handleInlineSearch(e.value);
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
async addCustomViewPopup() {
|
|
1620
|
-
const newView = {
|
|
1621
|
-
name: 'custom-view',
|
|
1622
|
-
title: 'Custom View',
|
|
1623
|
-
fixed: false,
|
|
1624
|
-
sorts: [],
|
|
1625
|
-
columns: convertPropertiesToColumns(...this.loader.entity.properties),
|
|
1626
|
-
conditions: [],
|
|
1627
|
-
};
|
|
1628
|
-
const popup = await this.popupService.open(AXPEntityCreateCustomViewComponent, {
|
|
1629
|
-
title: 'Create Custom View',
|
|
1630
|
-
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
|
|
1631
|
-
closeOnBackdropClick: true,
|
|
1632
|
-
draggable: false,
|
|
1633
|
-
data: {
|
|
1634
|
-
loader: this.loader,
|
|
1635
|
-
selectedView: newView,
|
|
1636
|
-
mode: 'create',
|
|
1637
|
-
},
|
|
1638
|
-
});
|
|
1639
|
-
if (popup.data?.save == true) {
|
|
1640
|
-
console.log('updatedView: ', popup.data.updatedView);
|
|
1641
|
-
this.loader.createView(popup.data.updatedView);
|
|
1642
|
-
}
|
|
1643
|
-
}
|
|
1644
|
-
async updateViewPopup(e, selectedView) {
|
|
1645
|
-
// (e.nativeEvent as UIEvent).stopPropagation();
|
|
1646
|
-
const popup = await this.popupService.open(AXPEntityCreateCustomViewComponent, {
|
|
1647
|
-
title: 'Modify Custom View',
|
|
1648
|
-
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
|
|
1649
|
-
closeOnBackdropClick: true,
|
|
1650
|
-
draggable: false,
|
|
1651
|
-
data: {
|
|
1652
|
-
loader: this.loader,
|
|
1653
|
-
selectedView,
|
|
1654
|
-
mode: 'edit',
|
|
1655
|
-
},
|
|
1656
|
-
});
|
|
1657
|
-
if (popup.data?.delete == true) {
|
|
1658
|
-
this.loader.deleteView(popup.data.viewName);
|
|
1659
|
-
}
|
|
1660
|
-
if (popup.data?.save == true) {
|
|
1661
|
-
console.log('updatedView: ', popup.data.updatedView);
|
|
1662
|
-
this.loader.updateView(popup.data.updatedView);
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
ngOnDestroy() {
|
|
1666
|
-
this.dataSource.reset();
|
|
1667
|
-
}
|
|
1668
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityListViewComponent, deps: [{ token: i1$3.AXActionSheetService }, { token: i2.AXUnsubscriber }, { token: i3.AXPlatform }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1669
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityListViewComponent, isStandalone: false, selector: "ng-component", providers: [AXUnsubscriber], viewQueries: [{ propertyName: "viewsTemplate", first: true, predicate: ["viewsTemplate"], descendants: true }, { propertyName: "grid", first: true, predicate: ["grid"], descendants: true }, { propertyName: "entityViewDrawer", first: true, predicate: ["entityViewDrawer"], descendants: true }], ngImport: i0, template: "<ax-drawer-container>\n <!-- <ax-drawer #drawer location=\"start\" [collapsed]=\"true\" [mode]=\"platform.is('SM') ? 'overlay' : 'push'\">\n <ax-content class=\"ax-w-64 ax-border-e\">\n <div class=\"ax-p-6 ax-py-4 ax-gap-6 ax-flex ax-flex-col\">\n <p class=\"ax-text-2xl ax-font-bold\">Folders</p>\n <ax-side-menu>\n <ng-container *ngFor=\"let node of menuItems\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n </ax-side-menu>\n <ng-template #sideMenu let-item>\n <ax-side-menu-item [text]=\"item.text\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-folder ax-text-warning-500\"></ax-icon>\n </ax-prefix>\n <ng-container *ngIf=\"item.children\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ng-container>\n </ax-side-menu-item>\n </ng-template>\n </div>\n </ax-content>\n </ax-drawer> -->\n <ax-content class=\"ax-flex ax-flex-col ax-overflow-hidden\">\n <div\n class=\"ax-flex ax-flex-col ax-gap-0 md:ax-gap-4 ax-px-4 ax-py-3 md:ax-py-4 md:ax-px-6 ax-bg-surface ax-border-b md:ax-border-0 md:ax-bg-default\">\n @if(platform.is('MD') && this.grid){\n <div class=\"ax-flex ax-justify-between ax-mb-4\">\n @if(this.grid.selectedRows.length===0){\n <div class=\"ax-text-xl ax-font-bold\">{{ title }}</div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canCreate) {\n <ax-button color=\"primary\" class=\"ax-sm\" (onClick)=\"handleCreateClick()\">\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-gap-3\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canDelete) {\n <ax-button color=\"danger\" class=\"ax-sm\" (onClick)=\"handleCommandClick('delete')\">\n <ax-icon class=\"fa-solid fa-trash\"> </ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n </ax-button>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" [text]=\"(view$ | async)?.title\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-eye ax-text-neutral-400\"> </ax-icon>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{ 'entity.public-view' | translate | async }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\" [selected]=\"(view$ | async) == v\"\n (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item *ngFor=\"let v of customViews$ | async\" [text]=\"v.title\" [selected]=\"(view$ | async) == v\"\n (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item (onClick)=\"addCustomViewPopup()\" text=\"Add Custom View\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <div class=\"ax-flex ax-gap-2\">\n @if(searchBoxTitle){\n <ax-button (onClick)=\"toggleSearchBox()\" [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-search ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n }\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"columnsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-sliders ax-text-neutral-400\"> </ax-icon>\n @if ((conditionsCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars-sort ax-text-neutral-400\"> </ax-icon>\n @if ((sortCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n </div>\n </div>\n <div [class.collapsed-search-box]=\"searchBoxCollapsed\" class=\"ax-transition-all ax-mt-4\">\n <ax-search-box [title]=\"searchBoxTitle\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-3\">\n <div class=\"ax-text-xl md:ax-text-2xl ax-font-bold ax-mb-2\">{{ title }}</div>\n @if(this.grid.selectedRows.length==0){\n <div class=\"ax-flex ax-gap-3\">\n @if(canCreate) {\n <ax-button [text]=\"'create-new' | translate | async\" color=\"primary\" (onClick)=\"handleCreateClick()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @let redirectAction = getSingleAction('redirect'); @if(redirectAction) {\n <ax-button [text]=\"redirectAction.title | translate | async\" color=\"primary\"\n (onClick)=\"redirectAction.execute()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @if(canImport){\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleImportClick()\" text=\"Import\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-import\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <!-- <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item> -->\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n </div>\n }@else {\n <div class=\"ax-flex ax-gap-3\">\n @if(canDelete) {\n <ax-button text=\"Delete Items\" color=\"danger\" (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix>\n <i class=\"fa-solid fa-trash\"></i>\n </ax-prefix>\n </ax-button>\n }\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n }\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <!----------------------- View Mode --------------------->\n @if(this.grid.selectedRows.length==0) {\n <div class=\"ax-flex ax-w-full ax-justify-between ax-gap-3\">\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"(view$ | async)?.title\" #views color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-eye\"></i>\n </ax-prefix>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list class=\"ax-bg-surface\">\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{\n 'entity.public-view' | translate | async\n }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item class=\"ax-pe-4 ax-flex ax-justify-between\" *ngFor=\"let v of customViews$ | async\"\n [text]=\"v.title\" [selected]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\">\n <ax-suffix>\n <ax-button (onClick)=\"updateViewPopup($event, v)\" class=\"ax-xs\" look=\"none\">\n <ax-icon class=\"far fa-edit\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n </ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item text=\"Add Custom View\" (onClick)=\"addCustomViewPopup()\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n @if(searchBoxTitle){\n <div class=\"ax-w-72\">\n <ax-search-box [title]=\"searchBoxTitle\" [(ngModel)]=\"searchValue\"\n (onValueChanged)=\"handleChangeSearchValue($event)\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"'entity.columns' | translate | async\" color=\"ghost\" #columns\n (onClick)=\"columnsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ columnsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button text=\"Filters\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\" #conditions>\n <ax-prefix>\n <i class=\"fa-solid fa-sliders\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ conditionsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button [text]=\"'entity.sort' | translate | async\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars-sort\"></i>\n </ax-prefix>\n <ax-suffix *ngIf=\"(sortCount$ | async)! > 0\">\n <ax-badge text=\"{{ sortCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n\n } @else{\n <!----------------------- Selection Mode --------------------->\n <div>\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-h-10\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"ax-flex-1 ax-px-6 ax-py-4 ax-flex ax-overflow-auto\">\n <ax-data-table #grid [showFooter]=\"false\" class=\"ax-flex-1\" [dataSource]=\"dataSource\" [paging]=\"true\"\n [fetchDataMode]=\"'manual'\" (onRowDbClick)=\"handleRowDbClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\">\n <!-- <ax-index-column *ngIf=\"!platform.is('SM')\" [width]=\"'85px'\"></ax-index-column> -->\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n @for(col of (columns$ | async);track col.name) {\n <axp-widget-column-renderer *ngIf=\"col.visible\" [schema]=\"col.schema\" [dataField]=\"col.name\"\n [caption]=\"col.title\" [options]=\"col.options\" [displayFormat]=\"col.displayFormat\" [width]=\"'180px'\"\n [allowSorting]=\"false\">\n </axp-widget-column-renderer>\n }\n <ax-dropdown-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n <ax-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getInlineRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n </ax-data-table>\n </div>\n </ax-content>\n <ax-drawer (collapsedChange)=\"closeDrawer('columns', $event)\" #columnsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-columns [loader]=\"loader\" (onClosed)=\"columnsDrawer.close()\"></axp-list-view-option-columns>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('conditions', $event)\" #conditionsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[25vw] ax-border-e\">\n <axp-list-view-option-conditions [loader]=\"loader\"\n (onClosed)=\"conditionsDrawer.close()\"></axp-list-view-option-conditions>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('sorts', $event)\" #sortsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-sorting (onClosed)=\"sortsDrawer.close()\" [loader]=\"loader\"></axp-list-view-option-sorting>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$2.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "parentField", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged"] }, { kind: "component", type: i6$2.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed"] }, { kind: "component", type: i6$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i6$2.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i5.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "component", type: i6.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i11.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "closeOthers", "collapsed"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i11.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "component", type: i12.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "delayTime"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: i10.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["width", "caption", "headerTemplate", "allowSorting", "fixed", "footerTemplate", "cellTemplate", "options", "dataField", "displayFormat", "schema"] }, { kind: "directive", type: i14$1.AXPFeatureDirective, selector: "[feature]", inputs: ["feature", "featureElse"] }, { kind: "component", type: AXPListViewOptionsColumnsComponent, selector: "axp-list-view-option-columns", inputs: ["loader"], outputs: ["onClosed"] }, { kind: "component", type: AXPListViewOptionConditionsComponent, selector: "axp-list-view-option-conditions", inputs: ["loader"], outputs: ["onClosed"] }, { kind: "component", type: AXPListViewOptionSortingComponent, selector: "axp-list-view-option-sorting", inputs: ["loader"], outputs: ["onClosed"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1670
|
-
}
|
|
1671
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityListViewComponent, decorators: [{
|
|
1672
|
-
type: Component,
|
|
1673
|
-
args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [AXUnsubscriber], standalone: false, template: "<ax-drawer-container>\n <!-- <ax-drawer #drawer location=\"start\" [collapsed]=\"true\" [mode]=\"platform.is('SM') ? 'overlay' : 'push'\">\n <ax-content class=\"ax-w-64 ax-border-e\">\n <div class=\"ax-p-6 ax-py-4 ax-gap-6 ax-flex ax-flex-col\">\n <p class=\"ax-text-2xl ax-font-bold\">Folders</p>\n <ax-side-menu>\n <ng-container *ngFor=\"let node of menuItems\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n </ax-side-menu>\n <ng-template #sideMenu let-item>\n <ax-side-menu-item [text]=\"item.text\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-folder ax-text-warning-500\"></ax-icon>\n </ax-prefix>\n <ng-container *ngIf=\"item.children\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ng-container>\n </ax-side-menu-item>\n </ng-template>\n </div>\n </ax-content>\n </ax-drawer> -->\n <ax-content class=\"ax-flex ax-flex-col ax-overflow-hidden\">\n <div\n class=\"ax-flex ax-flex-col ax-gap-0 md:ax-gap-4 ax-px-4 ax-py-3 md:ax-py-4 md:ax-px-6 ax-bg-surface ax-border-b md:ax-border-0 md:ax-bg-default\">\n @if(platform.is('MD') && this.grid){\n <div class=\"ax-flex ax-justify-between ax-mb-4\">\n @if(this.grid.selectedRows.length===0){\n <div class=\"ax-text-xl ax-font-bold\">{{ title }}</div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canCreate) {\n <ax-button color=\"primary\" class=\"ax-sm\" (onClick)=\"handleCreateClick()\">\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-gap-3\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canDelete) {\n <ax-button color=\"danger\" class=\"ax-sm\" (onClick)=\"handleCommandClick('delete')\">\n <ax-icon class=\"fa-solid fa-trash\"> </ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n </ax-button>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" [text]=\"(view$ | async)?.title\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-eye ax-text-neutral-400\"> </ax-icon>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{ 'entity.public-view' | translate | async }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\" [selected]=\"(view$ | async) == v\"\n (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item *ngFor=\"let v of customViews$ | async\" [text]=\"v.title\" [selected]=\"(view$ | async) == v\"\n (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item (onClick)=\"addCustomViewPopup()\" text=\"Add Custom View\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <div class=\"ax-flex ax-gap-2\">\n @if(searchBoxTitle){\n <ax-button (onClick)=\"toggleSearchBox()\" [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-search ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n }\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"columnsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-sliders ax-text-neutral-400\"> </ax-icon>\n @if ((conditionsCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars-sort ax-text-neutral-400\"> </ax-icon>\n @if ((sortCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n </div>\n </div>\n <div [class.collapsed-search-box]=\"searchBoxCollapsed\" class=\"ax-transition-all ax-mt-4\">\n <ax-search-box [title]=\"searchBoxTitle\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-3\">\n <div class=\"ax-text-xl md:ax-text-2xl ax-font-bold ax-mb-2\">{{ title }}</div>\n @if(this.grid.selectedRows.length==0){\n <div class=\"ax-flex ax-gap-3\">\n @if(canCreate) {\n <ax-button [text]=\"'create-new' | translate | async\" color=\"primary\" (onClick)=\"handleCreateClick()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @let redirectAction = getSingleAction('redirect'); @if(redirectAction) {\n <ax-button [text]=\"redirectAction.title | translate | async\" color=\"primary\"\n (onClick)=\"redirectAction.execute()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @if(canImport){\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleImportClick()\" text=\"Import\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-import\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <!-- <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item> -->\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n </div>\n }@else {\n <div class=\"ax-flex ax-gap-3\">\n @if(canDelete) {\n <ax-button text=\"Delete Items\" color=\"danger\" (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix>\n <i class=\"fa-solid fa-trash\"></i>\n </ax-prefix>\n </ax-button>\n }\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n }\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <!----------------------- View Mode --------------------->\n @if(this.grid.selectedRows.length==0) {\n <div class=\"ax-flex ax-w-full ax-justify-between ax-gap-3\">\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"(view$ | async)?.title\" #views color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-eye\"></i>\n </ax-prefix>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list class=\"ax-bg-surface\">\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{\n 'entity.public-view' | translate | async\n }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item class=\"ax-pe-4 ax-flex ax-justify-between\" *ngFor=\"let v of customViews$ | async\"\n [text]=\"v.title\" [selected]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\">\n <ax-suffix>\n <ax-button (onClick)=\"updateViewPopup($event, v)\" class=\"ax-xs\" look=\"none\">\n <ax-icon class=\"far fa-edit\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n </ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item text=\"Add Custom View\" (onClick)=\"addCustomViewPopup()\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n @if(searchBoxTitle){\n <div class=\"ax-w-72\">\n <ax-search-box [title]=\"searchBoxTitle\" [(ngModel)]=\"searchValue\"\n (onValueChanged)=\"handleChangeSearchValue($event)\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"'entity.columns' | translate | async\" color=\"ghost\" #columns\n (onClick)=\"columnsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ columnsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button text=\"Filters\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\" #conditions>\n <ax-prefix>\n <i class=\"fa-solid fa-sliders\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ conditionsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button [text]=\"'entity.sort' | translate | async\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars-sort\"></i>\n </ax-prefix>\n <ax-suffix *ngIf=\"(sortCount$ | async)! > 0\">\n <ax-badge text=\"{{ sortCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n\n } @else{\n <!----------------------- Selection Mode --------------------->\n <div>\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-h-10\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"ax-flex-1 ax-px-6 ax-py-4 ax-flex ax-overflow-auto\">\n <ax-data-table #grid [showFooter]=\"false\" class=\"ax-flex-1\" [dataSource]=\"dataSource\" [paging]=\"true\"\n [fetchDataMode]=\"'manual'\" (onRowDbClick)=\"handleRowDbClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\">\n <!-- <ax-index-column *ngIf=\"!platform.is('SM')\" [width]=\"'85px'\"></ax-index-column> -->\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n @for(col of (columns$ | async);track col.name) {\n <axp-widget-column-renderer *ngIf=\"col.visible\" [schema]=\"col.schema\" [dataField]=\"col.name\"\n [caption]=\"col.title\" [options]=\"col.options\" [displayFormat]=\"col.displayFormat\" [width]=\"'180px'\"\n [allowSorting]=\"false\">\n </axp-widget-column-renderer>\n }\n <ax-dropdown-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n <ax-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getInlineRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n </ax-data-table>\n </div>\n </ax-content>\n <ax-drawer (collapsedChange)=\"closeDrawer('columns', $event)\" #columnsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-columns [loader]=\"loader\" (onClosed)=\"columnsDrawer.close()\"></axp-list-view-option-columns>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('conditions', $event)\" #conditionsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[25vw] ax-border-e\">\n <axp-list-view-option-conditions [loader]=\"loader\"\n (onClosed)=\"conditionsDrawer.close()\"></axp-list-view-option-conditions>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('sorts', $event)\" #sortsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-sorting (onClosed)=\"sortsDrawer.close()\" [loader]=\"loader\"></axp-list-view-option-sorting>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}\n"] }]
|
|
1674
|
-
}], ctorParameters: () => [{ type: i1$3.AXActionSheetService }, { type: i2.AXUnsubscriber }, { type: i3.AXPlatform }, { type: i0.ChangeDetectorRef }], propDecorators: { viewsTemplate: [{
|
|
1675
|
-
type: ViewChild,
|
|
1676
|
-
args: ['viewsTemplate']
|
|
1677
|
-
}], grid: [{
|
|
1678
|
-
type: ViewChild,
|
|
1679
|
-
args: ['grid']
|
|
1680
|
-
}], entityViewDrawer: [{
|
|
1681
|
-
type: ViewChild,
|
|
1682
|
-
args: ['entityViewDrawer']
|
|
1683
|
-
}] } });
|
|
1684
|
-
|
|
1685
|
-
class AXPListViewModule {
|
|
1686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1687
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewModule, declarations: [AXPEntityListViewComponent,
|
|
1688
|
-
AXPEntityCreateCustomViewComponent,
|
|
1689
|
-
AXPListViewOptionsColumnsComponent,
|
|
1690
|
-
AXPListViewOptionConditionsComponent,
|
|
1691
|
-
AXPListViewOptionFilterOperatorComponent,
|
|
1692
|
-
AXPListViewOptionSortingComponent], imports: [CommonModule,
|
|
1693
|
-
FormsModule,
|
|
1694
|
-
AXCommonModule,
|
|
1695
|
-
AXDataTableModule,
|
|
1696
|
-
AXButtonModule,
|
|
1697
|
-
AXDecoratorModule,
|
|
1698
|
-
AXBadgeModule,
|
|
1699
|
-
AXDropdownModule,
|
|
1700
|
-
AXPopoverModule,
|
|
1701
|
-
AXImageModule,
|
|
1702
|
-
AXSwitchModule,
|
|
1703
|
-
AXDrawerModule,
|
|
1704
|
-
AXLoadingModule,
|
|
1705
|
-
AXTabsModule,
|
|
1706
|
-
AXSelectBoxModule,
|
|
1707
|
-
AXFormModule,
|
|
1708
|
-
AXListModule,
|
|
1709
|
-
AXTextBoxModule,
|
|
1710
|
-
AXSearchBoxModule,
|
|
1711
|
-
AXLabelModule,
|
|
1712
|
-
AXCollapseModule,
|
|
1713
|
-
AXActionSheetModule,
|
|
1714
|
-
AXSelectionListModule,
|
|
1715
|
-
AXImageModule,
|
|
1716
|
-
AXDialogModule,
|
|
1717
|
-
AXDropdownButtonModule,
|
|
1718
|
-
//
|
|
1719
|
-
CdkDropList,
|
|
1720
|
-
CdkDrag,
|
|
1721
|
-
CdkDragPlaceholder,
|
|
1722
|
-
CdkDragHandle,
|
|
1723
|
-
PortalModule,
|
|
1724
|
-
AXPSchemaModule,
|
|
1725
|
-
AXPCommonWidgetModule,
|
|
1726
|
-
AXPAuthModule,
|
|
1727
|
-
AXTranslationModule] }); }
|
|
1728
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewModule, imports: [CommonModule,
|
|
1729
|
-
FormsModule,
|
|
1730
|
-
AXCommonModule,
|
|
1731
|
-
AXDataTableModule,
|
|
1732
|
-
AXButtonModule,
|
|
1733
|
-
AXDecoratorModule,
|
|
1734
|
-
AXBadgeModule,
|
|
1735
|
-
AXDropdownModule,
|
|
1736
|
-
AXPopoverModule,
|
|
1737
|
-
AXImageModule,
|
|
1738
|
-
AXSwitchModule,
|
|
1739
|
-
AXDrawerModule,
|
|
1740
|
-
AXLoadingModule,
|
|
1741
|
-
AXTabsModule,
|
|
1742
|
-
AXSelectBoxModule,
|
|
1743
|
-
AXFormModule,
|
|
1744
|
-
AXListModule,
|
|
1745
|
-
AXTextBoxModule,
|
|
1746
|
-
AXSearchBoxModule,
|
|
1747
|
-
AXLabelModule,
|
|
1748
|
-
AXCollapseModule,
|
|
1749
|
-
AXActionSheetModule,
|
|
1750
|
-
AXSelectionListModule,
|
|
1751
|
-
AXImageModule,
|
|
1752
|
-
AXDialogModule,
|
|
1753
|
-
AXDropdownButtonModule,
|
|
1754
|
-
PortalModule,
|
|
1755
|
-
AXPSchemaModule,
|
|
1756
|
-
AXPCommonWidgetModule,
|
|
1757
|
-
AXPAuthModule,
|
|
1758
|
-
AXTranslationModule] }); }
|
|
1759
|
-
}
|
|
1760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewModule, decorators: [{
|
|
1761
|
-
type: NgModule,
|
|
1762
|
-
args: [{
|
|
1763
|
-
imports: [
|
|
1764
|
-
CommonModule,
|
|
1765
|
-
FormsModule,
|
|
1766
|
-
AXCommonModule,
|
|
1767
|
-
AXDataTableModule,
|
|
1768
|
-
AXButtonModule,
|
|
1769
|
-
AXDecoratorModule,
|
|
1770
|
-
AXBadgeModule,
|
|
1771
|
-
AXDropdownModule,
|
|
1772
|
-
AXPopoverModule,
|
|
1773
|
-
AXImageModule,
|
|
1774
|
-
AXSwitchModule,
|
|
1775
|
-
AXDrawerModule,
|
|
1776
|
-
AXLoadingModule,
|
|
1777
|
-
AXTabsModule,
|
|
1778
|
-
AXSelectBoxModule,
|
|
1779
|
-
AXFormModule,
|
|
1780
|
-
AXListModule,
|
|
1781
|
-
AXTextBoxModule,
|
|
1782
|
-
AXSearchBoxModule,
|
|
1783
|
-
AXLabelModule,
|
|
1784
|
-
AXCollapseModule,
|
|
1785
|
-
AXActionSheetModule,
|
|
1786
|
-
AXSelectionListModule,
|
|
1787
|
-
AXImageModule,
|
|
1788
|
-
AXDialogModule,
|
|
1789
|
-
AXDropdownButtonModule,
|
|
1790
|
-
//
|
|
1791
|
-
CdkDropList,
|
|
1792
|
-
CdkDrag,
|
|
1793
|
-
CdkDragPlaceholder,
|
|
1794
|
-
CdkDragHandle,
|
|
1795
|
-
PortalModule,
|
|
1796
|
-
AXPSchemaModule,
|
|
1797
|
-
AXPCommonWidgetModule,
|
|
1798
|
-
AXPAuthModule,
|
|
1799
|
-
AXTranslationModule,
|
|
1800
|
-
],
|
|
1801
|
-
declarations: [
|
|
1802
|
-
AXPEntityListViewComponent,
|
|
1803
|
-
AXPEntityCreateCustomViewComponent,
|
|
1804
|
-
AXPListViewOptionsColumnsComponent,
|
|
1805
|
-
AXPListViewOptionConditionsComponent,
|
|
1806
|
-
AXPListViewOptionFilterOperatorComponent,
|
|
1807
|
-
AXPListViewOptionSortingComponent,
|
|
1808
|
-
],
|
|
1809
|
-
providers: [],
|
|
1810
|
-
}]
|
|
1811
|
-
}] });
|
|
1812
|
-
|
|
1813
|
-
class AXPListViewLoaderDefault {
|
|
1814
|
-
constructor(config, schemaService, filterOperatorMiddleware) {
|
|
1815
|
-
this.config = config;
|
|
1816
|
-
this.schemaService = schemaService;
|
|
1817
|
-
this.filterOperatorMiddleware = filterOperatorMiddleware;
|
|
1818
|
-
this._dataSource = new AXDataSource(this.entity.dataSource);
|
|
1819
|
-
this._inlineFilterItems = [];
|
|
1820
|
-
this._props$ = new BehaviorSubject(this.props);
|
|
1821
|
-
this.getProp = (name) => this.entity.properties.find((c) => c.name == name);
|
|
1822
|
-
//****************** Views ******************//
|
|
1823
|
-
this._currentView = 'default';
|
|
1824
|
-
this._views$ = new BehaviorSubject(this.views);
|
|
1825
|
-
//****************** Columns ******************//
|
|
1826
|
-
this._currentDisplayColumns$ = new BehaviorSubject([]);
|
|
1827
|
-
this._columns$ = new BehaviorSubject(this.columns);
|
|
1828
|
-
//****************** Sort ******************//
|
|
1829
|
-
this._currentSorts$ = new BehaviorSubject([]);
|
|
1830
|
-
//****************** Conditions ******************//
|
|
1831
|
-
this._currentConditions$ = new BehaviorSubject([]);
|
|
1832
|
-
this._inlineFilterItems = this.entity.properties
|
|
1833
|
-
.filter((property) => property.canInlineFilter)
|
|
1834
|
-
.map((item) => {
|
|
1835
|
-
const schema = this.schemaService.resolve(item.schema);
|
|
1836
|
-
return { name: item.name, dataType: schema?.dataType, title: item.title };
|
|
1837
|
-
});
|
|
1838
|
-
}
|
|
1839
|
-
get entity() {
|
|
1840
|
-
if (!this._config) {
|
|
1841
|
-
this._config = cloneDeep(this.config);
|
|
1842
|
-
}
|
|
1843
|
-
return this._config;
|
|
1844
|
-
}
|
|
1845
|
-
get dataSource() {
|
|
1846
|
-
return this._dataSource;
|
|
1847
|
-
}
|
|
1848
|
-
//****************** Properties ******************//
|
|
1849
|
-
get props() {
|
|
1850
|
-
return this.entity.properties;
|
|
1851
|
-
}
|
|
1852
|
-
get properties$() {
|
|
1853
|
-
return this._props$;
|
|
1854
|
-
}
|
|
1855
|
-
get views() {
|
|
1856
|
-
return this.entity.views.list?.views;
|
|
1857
|
-
}
|
|
1858
|
-
get views$() {
|
|
1859
|
-
return this._views$;
|
|
1860
|
-
}
|
|
1861
|
-
get view$() {
|
|
1862
|
-
return this.views$.pipe(switchMap((views) => {
|
|
1863
|
-
const view = views.find((c) => c.name === this._currentView);
|
|
1864
|
-
if (view) {
|
|
1865
|
-
return of(view);
|
|
1866
|
-
}
|
|
1867
|
-
else if (this.views.length > 0) {
|
|
1868
|
-
return of(this.views[0]);
|
|
1869
|
-
}
|
|
1870
|
-
else {
|
|
1871
|
-
return of(AXPEntityListViewConfigEmpty);
|
|
1872
|
-
}
|
|
1873
|
-
}));
|
|
1874
|
-
}
|
|
1875
|
-
get publicViews$() {
|
|
1876
|
-
return this.views$.pipe(map((c) => c.filter((v) => v.fixed)));
|
|
1877
|
-
}
|
|
1878
|
-
get customViews$() {
|
|
1879
|
-
return this.views$.pipe(map((c) => c.filter((v) => !v.fixed)));
|
|
1880
|
-
}
|
|
1881
|
-
get hasCustomViews$() {
|
|
1882
|
-
return this.customViews$.pipe(map((c) => c.length > 0));
|
|
1883
|
-
}
|
|
1884
|
-
setDefaultView() {
|
|
1885
|
-
this.setView(this.views[0].name);
|
|
1886
|
-
}
|
|
1887
|
-
setView(name) {
|
|
1888
|
-
let propNames = [];
|
|
1889
|
-
this.properties$.pipe(first()).subscribe((properties) => {
|
|
1890
|
-
propNames = properties.map((p) => p.name);
|
|
1891
|
-
});
|
|
1892
|
-
this._currentView = name;
|
|
1893
|
-
const updatedView = this._views$.value.find((c) => c.name === this._currentView) || AXPEntityListViewConfigEmpty;
|
|
1894
|
-
const currentViews = this._views$.value;
|
|
1895
|
-
const updatedViews = currentViews.map((view) => {
|
|
1896
|
-
if (view.name === updatedView.name) {
|
|
1897
|
-
return updatedView;
|
|
1898
|
-
}
|
|
1899
|
-
else {
|
|
1900
|
-
return view;
|
|
1901
|
-
}
|
|
1902
|
-
});
|
|
1903
|
-
this._currentConditions$.next(cloneDeep(updatedView.conditions.filter((c) => propNames.includes(c.name))));
|
|
1904
|
-
this._currentSorts$.next(cloneDeep(updatedView.sorts.filter((s) => propNames.includes(s.name))));
|
|
1905
|
-
// this._columns$.next(updatedView.columns);
|
|
1906
|
-
this._currentDisplayColumns$.next(cloneDeep(updatedView.columns.filter((c) => propNames.includes(c.name))));
|
|
1907
|
-
this._views$.next(updatedViews);
|
|
1908
|
-
//apply conditions and sorts:
|
|
1909
|
-
this.dataSource.filter(this.filterOperatorMiddleware.transformFilter({
|
|
1910
|
-
field: null,
|
|
1911
|
-
logic: 'and',
|
|
1912
|
-
operator: null,
|
|
1913
|
-
filters: updatedView.conditions.map((c) => ({
|
|
1914
|
-
field: c.name,
|
|
1915
|
-
value: c.value,
|
|
1916
|
-
operator: { type: c.operator },
|
|
1917
|
-
})),
|
|
1918
|
-
}));
|
|
1919
|
-
const convertedSortItems = updatedView.sorts.map((s) => ({
|
|
1920
|
-
field: s.name,
|
|
1921
|
-
dir: s.dir,
|
|
1922
|
-
}));
|
|
1923
|
-
this.dataSource.sort(...convertedSortItems);
|
|
1924
|
-
this.dataSource.refresh();
|
|
1925
|
-
}
|
|
1926
|
-
createView(newView) {
|
|
1927
|
-
const currentViews = this._views$.getValue();
|
|
1928
|
-
currentViews.push(newView);
|
|
1929
|
-
this._views$.next(currentViews);
|
|
1930
|
-
this.setView(newView.name);
|
|
1931
|
-
}
|
|
1932
|
-
updateView(updatedView) {
|
|
1933
|
-
const currentViews = this._views$.getValue().map((view) => (view.name === updatedView.name ? updatedView : view));
|
|
1934
|
-
this._views$.next(currentViews);
|
|
1935
|
-
this.setView(updatedView.name);
|
|
1936
|
-
}
|
|
1937
|
-
deleteView(viewName) {
|
|
1938
|
-
const currentViews = this._views$.getValue().filter((view) => view.name !== viewName);
|
|
1939
|
-
this._views$.next(currentViews);
|
|
1940
|
-
this.setView(this.views[0].name);
|
|
1941
|
-
}
|
|
1942
|
-
get columns() {
|
|
1943
|
-
return this.entity.properties.map((p) => ({
|
|
1944
|
-
name: p.name,
|
|
1945
|
-
title: p.title,
|
|
1946
|
-
schema: p.schema,
|
|
1947
|
-
}));
|
|
1948
|
-
}
|
|
1949
|
-
get columns$() {
|
|
1950
|
-
return this._columns$.pipe(defaultIfEmpty([]));
|
|
1951
|
-
}
|
|
1952
|
-
get displayColumns$() {
|
|
1953
|
-
return this._currentDisplayColumns$.pipe(defaultIfEmpty([]));
|
|
1954
|
-
}
|
|
1955
|
-
get displayColumnsCount$() {
|
|
1956
|
-
return this.view$.pipe(map((view) => {
|
|
1957
|
-
return view.columns.filter((column) => column.visible).length;
|
|
1958
|
-
}));
|
|
1959
|
-
}
|
|
1960
|
-
updateColumns(items) {
|
|
1961
|
-
this.view$.pipe(first()).subscribe((view) => {
|
|
1962
|
-
view.columns = cloneDeep(items);
|
|
1963
|
-
this._views$.next(this._views$.value.map((v) => (v.name === this._currentView ? view : v)));
|
|
1964
|
-
});
|
|
1965
|
-
}
|
|
1966
|
-
resetColumns() {
|
|
1967
|
-
this.view$.pipe(first()).subscribe((view) => {
|
|
1968
|
-
this._currentDisplayColumns$.next(cloneDeep(view.columns));
|
|
1969
|
-
});
|
|
1970
|
-
}
|
|
1971
|
-
setColumnVisibility(name, visible) {
|
|
1972
|
-
const updatedColumns = this._currentDisplayColumns$.getValue().map((column) => {
|
|
1973
|
-
if (column.name === name) {
|
|
1974
|
-
return { ...column, visible };
|
|
1975
|
-
}
|
|
1976
|
-
else {
|
|
1977
|
-
return column;
|
|
1978
|
-
}
|
|
1979
|
-
});
|
|
1980
|
-
this._currentDisplayColumns$.next(updatedColumns);
|
|
1981
|
-
}
|
|
1982
|
-
get sorts$() {
|
|
1983
|
-
return this._currentSorts$.pipe(defaultIfEmpty([]));
|
|
1984
|
-
}
|
|
1985
|
-
get sortsCount$() {
|
|
1986
|
-
return this.view$.pipe(map((c) => c.sorts.length));
|
|
1987
|
-
}
|
|
1988
|
-
addSort() {
|
|
1989
|
-
this.view$.pipe(first()).subscribe((view) => {
|
|
1990
|
-
const currentSorts = this._currentSorts$.getValue();
|
|
1991
|
-
const name = view.columns.find((c) => !currentSorts.some((s) => s.name == c.name))?.name ?? '';
|
|
1992
|
-
if (name) {
|
|
1993
|
-
const sorts = [...currentSorts, { name, dir: 'asc' }];
|
|
1994
|
-
this._currentSorts$.next(sorts);
|
|
1995
|
-
}
|
|
1996
|
-
});
|
|
1997
|
-
}
|
|
1998
|
-
removeSort(item) {
|
|
1999
|
-
const currentSorts = this._currentSorts$.getValue();
|
|
2000
|
-
const sorts = currentSorts.filter((c) => c != item);
|
|
2001
|
-
this._currentSorts$.next(sorts);
|
|
2002
|
-
}
|
|
2003
|
-
resetSort() {
|
|
2004
|
-
this.view$.pipe(first()).subscribe((view) => {
|
|
2005
|
-
this._currentSorts$.next(cloneDeep(view.sorts));
|
|
2006
|
-
});
|
|
2007
|
-
}
|
|
2008
|
-
updateSort(items) {
|
|
2009
|
-
this.view$.pipe(first()).subscribe((view) => {
|
|
2010
|
-
view.sorts = cloneDeep(items);
|
|
2011
|
-
this._views$.next(this._views$.value.map((v) => (v.name === this._currentView ? view : v)));
|
|
2012
|
-
const convertedSortItems = items.map((s) => ({
|
|
2013
|
-
field: s.name,
|
|
2014
|
-
dir: s.dir,
|
|
2015
|
-
}));
|
|
2016
|
-
this.dataSource.sort(...convertedSortItems);
|
|
2017
|
-
this.dataSource.refresh();
|
|
2018
|
-
});
|
|
2019
|
-
}
|
|
2020
|
-
get conditions$() {
|
|
2021
|
-
return this._currentConditions$.pipe(defaultIfEmpty([]));
|
|
2022
|
-
}
|
|
2023
|
-
get conditionsCount$() {
|
|
2024
|
-
return this._currentConditions$.pipe(map((c) => c.length));
|
|
2025
|
-
}
|
|
2026
|
-
getInlineFilterTitles() {
|
|
2027
|
-
return this._inlineFilterItems.map((item) => item.title);
|
|
2028
|
-
}
|
|
2029
|
-
addCondition(selectedFields) {
|
|
2030
|
-
const prevConditions = this._currentConditions$.getValue();
|
|
2031
|
-
const conditionsMap = new Map(prevConditions.map((item) => [item.name, item]));
|
|
2032
|
-
const newFields = selectedFields.map((field) => conditionsMap.get(field.name) || { name: field.name, operator: field.opr });
|
|
2033
|
-
this._currentConditions$.next(newFields);
|
|
2034
|
-
}
|
|
2035
|
-
removeCondition(item) {
|
|
2036
|
-
const currentConditions = this._currentConditions$.getValue();
|
|
2037
|
-
const conditions = currentConditions.filter((c) => c != item);
|
|
2038
|
-
this._currentConditions$.next(conditions);
|
|
2039
|
-
}
|
|
2040
|
-
updateConditions(items) {
|
|
2041
|
-
this.view$.pipe(first()).subscribe((view) => {
|
|
2042
|
-
view.conditions = cloneDeep(items);
|
|
2043
|
-
this._views$.next(this._views$.value.map((v) => (v.name === this._currentView ? view : v)));
|
|
2044
|
-
});
|
|
2045
|
-
this.applyAllConditions();
|
|
2046
|
-
}
|
|
2047
|
-
handleInlineSearch(value) {
|
|
2048
|
-
const inlineConditions = [];
|
|
2049
|
-
this._inlineFilterItems?.forEach((property) => {
|
|
2050
|
-
if (property?.dataType == 'string' || property?.dataType == 'number') {
|
|
2051
|
-
inlineConditions.push({
|
|
2052
|
-
name: property.name,
|
|
2053
|
-
value: property.dataType == 'number' ? parseFloat(value) : value,
|
|
2054
|
-
operator: property.dataType == 'string' ? 'equal' : 'equal',
|
|
2055
|
-
});
|
|
2056
|
-
}
|
|
2057
|
-
});
|
|
2058
|
-
this.view$.pipe(first()).subscribe((view) => {
|
|
2059
|
-
view.inlineConditions = cloneDeep(inlineConditions);
|
|
2060
|
-
});
|
|
2061
|
-
this.applyAllConditions();
|
|
2062
|
-
}
|
|
2063
|
-
applyAllConditions() {
|
|
2064
|
-
const inlineConditions = {
|
|
2065
|
-
field: null,
|
|
2066
|
-
operator: null,
|
|
2067
|
-
logic: 'or',
|
|
2068
|
-
filters: [],
|
|
2069
|
-
};
|
|
2070
|
-
const mainConditions = {
|
|
2071
|
-
field: null,
|
|
2072
|
-
operator: null,
|
|
2073
|
-
logic: 'and',
|
|
2074
|
-
filters: [],
|
|
2075
|
-
};
|
|
2076
|
-
this.view$.pipe(first()).subscribe((view) => {
|
|
2077
|
-
if (view.inlineConditions && view.inlineConditions.length) {
|
|
2078
|
-
view.inlineConditions?.forEach((c) => {
|
|
2079
|
-
if (c.value) {
|
|
2080
|
-
inlineConditions.filters?.push({
|
|
2081
|
-
field: c.name,
|
|
2082
|
-
operator: { type: c.operator },
|
|
2083
|
-
value: c.value,
|
|
2084
|
-
});
|
|
2085
|
-
}
|
|
2086
|
-
});
|
|
2087
|
-
}
|
|
2088
|
-
if (view.conditions.length) {
|
|
2089
|
-
view.conditions.forEach((c) => {
|
|
2090
|
-
mainConditions.filters?.push({
|
|
2091
|
-
field: c.name,
|
|
2092
|
-
operator: { type: c.operator },
|
|
2093
|
-
value: c.value,
|
|
2094
|
-
});
|
|
2095
|
-
});
|
|
2096
|
-
}
|
|
2097
|
-
this.dataSource.filter(this.filterOperatorMiddleware.transformFilter({
|
|
2098
|
-
field: null,
|
|
2099
|
-
logic: 'and',
|
|
2100
|
-
operator: null,
|
|
2101
|
-
filters: [mainConditions, inlineConditions],
|
|
2102
|
-
}));
|
|
2103
|
-
this.dataSource.refresh();
|
|
2104
|
-
this._views$.next(this._views$.value.map((v) => (v.name === this._currentView ? view : v)));
|
|
2105
|
-
});
|
|
2106
|
-
}
|
|
2107
|
-
resetConditions() {
|
|
2108
|
-
let propNames = [];
|
|
2109
|
-
this.properties$.pipe(first()).subscribe((properties) => {
|
|
2110
|
-
propNames = properties.map((p) => p.name);
|
|
2111
|
-
});
|
|
2112
|
-
this.view$.pipe(first()).subscribe((view) => {
|
|
2113
|
-
this._currentConditions$.next(cloneDeep(view.conditions.filter((c) => propNames.includes(c.name))));
|
|
2114
|
-
});
|
|
2115
|
-
}
|
|
2116
|
-
}
|
|
2117
|
-
const AXP_LISTVIEW_LOADER = new InjectionToken('AXP_LISTVIEW_LOADER');
|
|
2118
|
-
class AXPListViewLoaderFactory {
|
|
2119
|
-
constructor() {
|
|
2120
|
-
this.cache = new Map();
|
|
2121
|
-
this.entityService = inject(AXPEntityRegistryService);
|
|
2122
|
-
this.schemaService = inject(AXPSchemaRegistryService);
|
|
2123
|
-
this.layout = inject(AXPLayoutThemeService);
|
|
2124
|
-
this.filterOperatorMiddleware = inject(AXPFilterOperatorMiddlewareService);
|
|
2125
|
-
}
|
|
2126
|
-
async create(moduleName, entityName) {
|
|
2127
|
-
this.layout.setNavigationLoading(true);
|
|
2128
|
-
const config = await this.entityService.resolve(moduleName, entityName);
|
|
2129
|
-
let result = this.cache.get(config.name);
|
|
2130
|
-
if (result) {
|
|
2131
|
-
this.layout.setNavigationLoading(false);
|
|
2132
|
-
return result;
|
|
2133
|
-
}
|
|
2134
|
-
result = new AXPListViewLoaderDefault(config, this.schemaService, this.filterOperatorMiddleware);
|
|
2135
|
-
this.cache.set(config.name, result);
|
|
2136
|
-
this.layout.setNavigationLoading(false);
|
|
2137
|
-
return result;
|
|
2138
|
-
}
|
|
2139
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewLoaderFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2140
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewLoaderFactory, providedIn: 'root' }); }
|
|
2141
|
-
}
|
|
2142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewLoaderFactory, decorators: [{
|
|
2143
|
-
type: Injectable,
|
|
2144
|
-
args: [{ providedIn: 'root' }]
|
|
2145
|
-
}] });
|
|
2146
|
-
|
|
2147
|
-
class AXPEntityQuickViewComponent extends AXBasePageComponent {
|
|
2148
|
-
/**
|
|
2149
|
-
*
|
|
2150
|
-
*/
|
|
2151
|
-
constructor(actions$) {
|
|
2152
|
-
super();
|
|
2153
|
-
this.actions$ = actions$;
|
|
2154
|
-
this.workflow = inject(AXPWorkflowService);
|
|
2155
|
-
this.canDelete = false;
|
|
2156
|
-
this.canCreate = false;
|
|
2157
|
-
this.canUpdate = false;
|
|
2158
|
-
}
|
|
2159
|
-
ngOnInit() {
|
|
2160
|
-
super.ngOnInit();
|
|
2161
|
-
//
|
|
2162
|
-
if (this.entity.views.quickView) {
|
|
2163
|
-
this.root = this.entity.views.quickView?.root;
|
|
2164
|
-
this.canDelete = this.entity.editOptions?.delete ?? true;
|
|
2165
|
-
this.canCreate = this.entity.editOptions?.create ?? true;
|
|
2166
|
-
this.canUpdate = this.entity.editOptions?.update ?? true;
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
getProperties(names) {
|
|
2170
|
-
return this.entity.properties.filter((c) => names.includes(c.name));
|
|
2171
|
-
}
|
|
2172
|
-
handleCloseClick() {
|
|
2173
|
-
this.close();
|
|
2174
|
-
}
|
|
2175
|
-
handleCommandClick(command) {
|
|
2176
|
-
switch (command) {
|
|
2177
|
-
case 'delete':
|
|
2178
|
-
this.workflow.execute('delete-entity', {
|
|
2179
|
-
module: this.entity.module,
|
|
2180
|
-
entity: this.entity.name,
|
|
2181
|
-
ids: [this.data.id],
|
|
2182
|
-
});
|
|
2183
|
-
this.close();
|
|
2184
|
-
break;
|
|
2185
|
-
case 'details':
|
|
2186
|
-
this.workflow.execute('show-details', {
|
|
2187
|
-
payload: {
|
|
2188
|
-
module: this.entity.module,
|
|
2189
|
-
entity: this.entity.name,
|
|
2190
|
-
},
|
|
2191
|
-
id: this.data.id,
|
|
2192
|
-
});
|
|
2193
|
-
this.close();
|
|
2194
|
-
break;
|
|
2195
|
-
default:
|
|
2196
|
-
break;
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityQuickViewComponent, deps: [{ token: i1.Actions }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2200
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityQuickViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-gap-6 ax-p-4\">\n <div class=\"ax-flex ax-flex-col ax-gap-2\" *ngIf=\"root.properties?.length\">\n <div *ngFor=\"let p of getProperties(root.properties)\"\n class=\"ax-flex ax-p-4 odd:ax-bg-on-surface odd:ax-border-t odd:ax-border-b\">\n <div class=\"ax-min-w-[10rem] ax-text-gray-500\">\n <span>{{ p.title }}</span>\n </div>\n <div class=\"ax-min-w-[30rem]\">\n <axp-widget-renderer [schema]=\"p.schema\" [context]=\"data\" [prop]=\"p\"></axp-widget-renderer>\n </div>\n </div>\n </div>\n <div *ngFor=\"let s of root.sections\"\n class=\"ax-flex ax-flex-col ax-pb-3 last-of-type:ax-border-none last-of-type:ax-pb-3\">\n <div class=\"ax-pb-4\">\n <span class=\"ax-font-bold\">{{ s.title }}</span>\n </div>\n <div class=\"ax-flex ax-flex-col\">\n <div *ngFor=\"let p of getProperties(s.properties)\"\n class=\"ax-flex ax-flex-col md:ax-flex-row ax-p-3 odd:ax-bg-on-surface odd:ax-border-t odd:ax-border-b\">\n @if (s.options?.showPropTitle!=false) {\n <div class=\"ax-min-w-[10rem] ax-text-neutral-500 dark:ax-text-neutral-300 ax-mb-2 md:ax-mb-0\">\n <span>{{ p.title }}</span>\n </div>\n }\n <div class=\"md:ax-min-w-[30rem]\">\n <axp-widget-renderer [schema]=\"p.schema\" [context]=\"data\" [prop]=\"p\" [mode]=\"'view'\"></axp-widget-renderer>\n </div>\n </div>\n </div>\n </div>\n</div>\n<ax-footer>\n <ax-prefix> </ax-prefix>\n <ax-suffix>\n <ax-dropdown-button text=\"Close\" (onClick)=\"handleCloseClick()\">\n <ax-button-item-list>\n <ax-button-item text=\"View Details\" (onClick)=\"handleCommandClick('details')\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-info-circle\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if(canDelete)\n {\n <ax-button-item class=\"ax-text-danger\" text=\"Delete\" (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix> <ax-icon icon=\"fas fa-trash fa-flip-horizontal\"></ax-icon> </ax-prefix></ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-button>\n </ax-suffix>\n</ax-footer>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: AXPSchemaModule }, { kind: "component", type: i10.AXPWidgetRendererComponent, selector: "axp-widget-renderer", inputs: ["context", "prop", "mode", "schema"] }, { kind: "ngmodule", type: AXPCommonWidgetModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "component", type: i14.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2201
|
-
}
|
|
2202
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityQuickViewComponent, decorators: [{
|
|
2203
|
-
type: Component,
|
|
2204
|
-
args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXPSchemaModule, AXPCommonWidgetModule, AXDecoratorModule, AXButtonModule, AXDropdownModule, AXDropdownButtonModule], template: "<div class=\"ax-flex ax-flex-col ax-gap-6 ax-p-4\">\n <div class=\"ax-flex ax-flex-col ax-gap-2\" *ngIf=\"root.properties?.length\">\n <div *ngFor=\"let p of getProperties(root.properties)\"\n class=\"ax-flex ax-p-4 odd:ax-bg-on-surface odd:ax-border-t odd:ax-border-b\">\n <div class=\"ax-min-w-[10rem] ax-text-gray-500\">\n <span>{{ p.title }}</span>\n </div>\n <div class=\"ax-min-w-[30rem]\">\n <axp-widget-renderer [schema]=\"p.schema\" [context]=\"data\" [prop]=\"p\"></axp-widget-renderer>\n </div>\n </div>\n </div>\n <div *ngFor=\"let s of root.sections\"\n class=\"ax-flex ax-flex-col ax-pb-3 last-of-type:ax-border-none last-of-type:ax-pb-3\">\n <div class=\"ax-pb-4\">\n <span class=\"ax-font-bold\">{{ s.title }}</span>\n </div>\n <div class=\"ax-flex ax-flex-col\">\n <div *ngFor=\"let p of getProperties(s.properties)\"\n class=\"ax-flex ax-flex-col md:ax-flex-row ax-p-3 odd:ax-bg-on-surface odd:ax-border-t odd:ax-border-b\">\n @if (s.options?.showPropTitle!=false) {\n <div class=\"ax-min-w-[10rem] ax-text-neutral-500 dark:ax-text-neutral-300 ax-mb-2 md:ax-mb-0\">\n <span>{{ p.title }}</span>\n </div>\n }\n <div class=\"md:ax-min-w-[30rem]\">\n <axp-widget-renderer [schema]=\"p.schema\" [context]=\"data\" [prop]=\"p\" [mode]=\"'view'\"></axp-widget-renderer>\n </div>\n </div>\n </div>\n </div>\n</div>\n<ax-footer>\n <ax-prefix> </ax-prefix>\n <ax-suffix>\n <ax-dropdown-button text=\"Close\" (onClick)=\"handleCloseClick()\">\n <ax-button-item-list>\n <ax-button-item text=\"View Details\" (onClick)=\"handleCommandClick('details')\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-info-circle\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if(canDelete)\n {\n <ax-button-item class=\"ax-text-danger\" text=\"Delete\" (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix> <ax-icon icon=\"fas fa-trash fa-flip-horizontal\"></ax-icon> </ax-prefix></ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-button>\n </ax-suffix>\n</ax-footer>" }]
|
|
2205
|
-
}], ctorParameters: () => [{ type: i1.Actions }] });
|
|
2206
|
-
|
|
2207
|
-
var entityQuickView_component = /*#__PURE__*/Object.freeze({
|
|
2208
|
-
__proto__: null,
|
|
2209
|
-
AXPEntityQuickViewComponent: AXPEntityQuickViewComponent
|
|
2210
|
-
});
|
|
2211
|
-
|
|
2212
|
-
class AXPCustomReuseStrategy {
|
|
2213
|
-
shouldDetach(route) {
|
|
2214
|
-
return false;
|
|
2215
|
-
}
|
|
2216
|
-
store(route, detachedTree) { }
|
|
2217
|
-
shouldAttach(route) {
|
|
2218
|
-
return false;
|
|
2219
|
-
}
|
|
2220
|
-
retrieve(route) {
|
|
2221
|
-
return null;
|
|
2222
|
-
}
|
|
2223
|
-
shouldReuseRoute(future, curr) {
|
|
2224
|
-
if (future.component === AXPEntityListViewComponent || future.component === AXPEntityDetailsViewComponent) {
|
|
2225
|
-
return false;
|
|
2226
|
-
}
|
|
2227
|
-
return future.routeConfig === curr.routeConfig;
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
class AXPEntityModifySectionPopupAction extends AXPWorkflowAction {
|
|
2232
|
-
constructor() {
|
|
2233
|
-
super(...arguments);
|
|
2234
|
-
this.popupService = inject(AXPopupService);
|
|
2235
|
-
this.platform = inject(AXPlatform);
|
|
2236
|
-
this.entityRegistery = inject(AXPEntityRegistryService);
|
|
2237
|
-
this.entityCreateFactory = inject(AXPEntityModifyViewLoaderFactory);
|
|
2238
|
-
}
|
|
2239
|
-
async execute(context) {
|
|
2240
|
-
const payload = context.getVariable('payload');
|
|
2241
|
-
const { module, entity: entityName, section, id } = payload;
|
|
2242
|
-
const entity = await this.entityRegistery.resolve(module, entityName);
|
|
2243
|
-
const loader = await this.entityCreateFactory.create(module, entityName, id, section);
|
|
2244
|
-
const com = await import('./acorex-platform-layouts-entity-modify-view.component-Cb2Yvtav.mjs');
|
|
2245
|
-
const popup = await this.popupService.open(com.AXPEntityModifyViewComponent, {
|
|
2246
|
-
title: `Modify ${payload.section.title}`,
|
|
2247
|
-
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
|
|
2248
|
-
data: {
|
|
2249
|
-
context: loader.data,
|
|
2250
|
-
loader: loader,
|
|
2251
|
-
properties: payload.section.properties,
|
|
2252
|
-
entity,
|
|
2253
|
-
},
|
|
2254
|
-
});
|
|
2255
|
-
context.setOutput('popupResult', false);
|
|
2256
|
-
if (popup.data?.result == true) {
|
|
2257
|
-
context.setOutput('popupResult', true);
|
|
2258
|
-
context.setVariable('updatedData', cloneDeep(popup.data.context));
|
|
2259
|
-
}
|
|
2260
|
-
}
|
|
2261
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2262
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifySectionPopupAction }); }
|
|
2263
|
-
}
|
|
2264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, decorators: [{
|
|
2265
|
-
type: Injectable
|
|
2266
|
-
}] });
|
|
2267
|
-
const AXPModifyEntitySectionWorkflow = {
|
|
2268
|
-
startStepId: 'modifyPopup',
|
|
2269
|
-
steps: {
|
|
2270
|
-
modifyPopup: {
|
|
2271
|
-
id: 'modifyPopup',
|
|
2272
|
-
action: 'AXPEntityModifySectionPopupAction',
|
|
2273
|
-
nextSteps: [
|
|
2274
|
-
{
|
|
2275
|
-
conditions: [{ type: 'SINGLE', expression: 'context.getOutput("popupResult") == true' }],
|
|
2276
|
-
nextStepId: 'successToast',
|
|
2277
|
-
},
|
|
2278
|
-
],
|
|
2279
|
-
},
|
|
2280
|
-
successToast: {
|
|
2281
|
-
id: 'successToast',
|
|
2282
|
-
action: 'AXPToastAction',
|
|
2283
|
-
input: {
|
|
2284
|
-
color: 'success',
|
|
2285
|
-
title: 'Entity Modified',
|
|
2286
|
-
content: 'Record has been successfully updated.',
|
|
2287
|
-
},
|
|
2288
|
-
nextSteps: [
|
|
2289
|
-
{
|
|
2290
|
-
conditions: [],
|
|
2291
|
-
nextStepId: 'modifyConfirmed',
|
|
2292
|
-
},
|
|
2293
|
-
],
|
|
2294
|
-
},
|
|
2295
|
-
modifyConfirmed: {
|
|
2296
|
-
id: 'modifyConfirmed',
|
|
2297
|
-
action: 'AXPEntityModifyConfirmedAction',
|
|
2298
|
-
nextSteps: [
|
|
2299
|
-
{
|
|
2300
|
-
conditions: [],
|
|
2301
|
-
nextStepId: '',
|
|
2302
|
-
},
|
|
2303
|
-
],
|
|
2304
|
-
},
|
|
2305
|
-
},
|
|
2306
|
-
};
|
|
2307
|
-
|
|
2308
|
-
class AXPAdminLayoutModule {
|
|
2309
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAdminLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2310
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPAdminLayoutModule, imports: [AXDrawerModule,
|
|
2311
|
-
CommonModule,
|
|
2312
|
-
AXDecoratorModule,
|
|
2313
|
-
AXPListViewModule, i1$4.AXPWorkflowModule] }); }
|
|
2314
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAdminLayoutModule, providers: [{ provide: RouteReuseStrategy, useClass: AXPCustomReuseStrategy }], imports: [AXDrawerModule,
|
|
2315
|
-
CommonModule,
|
|
2316
|
-
AXDecoratorModule,
|
|
2317
|
-
AXPListViewModule,
|
|
2318
|
-
AXPWorkflowModule.forChild({
|
|
2319
|
-
actions: {
|
|
2320
|
-
AXPEntityPerformDeleteAction,
|
|
2321
|
-
AXPEntityModifyPopupAction,
|
|
2322
|
-
AXPEntityModifySectionPopupAction,
|
|
2323
|
-
AXPEntityModifyConfirmedAction,
|
|
2324
|
-
AXPEntityCreatePopupAction,
|
|
2325
|
-
AXPEntityCreateSubmittedAction,
|
|
2326
|
-
AXPEntityImportPopupAction,
|
|
2327
|
-
AXPEntityImportSubmittedAction,
|
|
2328
|
-
},
|
|
2329
|
-
workflows: {
|
|
2330
|
-
'delete-entity': AXPDeleteEntityWorkflow,
|
|
2331
|
-
'modify-entity': AXPModifyEntityWorkflow,
|
|
2332
|
-
'modify-entity-section': AXPModifyEntitySectionWorkflow,
|
|
2333
|
-
'create-entity': AXPCreateEntityWorkflow,
|
|
2334
|
-
'import-entity': AXPImportEntityWorkflow,
|
|
2335
|
-
'show-details': AXPShowDetailsViewWorkflow,
|
|
2336
|
-
'show-quick-view': AXPShowQuickViewWorkflow,
|
|
2337
|
-
'show-list-view': AXPShowListViewWorkflow,
|
|
2338
|
-
},
|
|
2339
|
-
functions: {
|
|
2340
|
-
test: AXPMyCustomFunc,
|
|
2341
|
-
},
|
|
2342
|
-
})] }); }
|
|
2343
|
-
}
|
|
2344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAdminLayoutModule, decorators: [{
|
|
2345
|
-
type: NgModule,
|
|
2346
|
-
args: [{
|
|
2347
|
-
imports: [
|
|
2348
|
-
AXDrawerModule,
|
|
2349
|
-
CommonModule,
|
|
2350
|
-
AXDecoratorModule,
|
|
2351
|
-
AXPListViewModule,
|
|
2352
|
-
AXPWorkflowModule.forChild({
|
|
2353
|
-
actions: {
|
|
2354
|
-
AXPEntityPerformDeleteAction,
|
|
2355
|
-
AXPEntityModifyPopupAction,
|
|
2356
|
-
AXPEntityModifySectionPopupAction,
|
|
2357
|
-
AXPEntityModifyConfirmedAction,
|
|
2358
|
-
AXPEntityCreatePopupAction,
|
|
2359
|
-
AXPEntityCreateSubmittedAction,
|
|
2360
|
-
AXPEntityImportPopupAction,
|
|
2361
|
-
AXPEntityImportSubmittedAction,
|
|
2362
|
-
},
|
|
2363
|
-
workflows: {
|
|
2364
|
-
'delete-entity': AXPDeleteEntityWorkflow,
|
|
2365
|
-
'modify-entity': AXPModifyEntityWorkflow,
|
|
2366
|
-
'modify-entity-section': AXPModifyEntitySectionWorkflow,
|
|
2367
|
-
'create-entity': AXPCreateEntityWorkflow,
|
|
2368
|
-
'import-entity': AXPImportEntityWorkflow,
|
|
2369
|
-
'show-details': AXPShowDetailsViewWorkflow,
|
|
2370
|
-
'show-quick-view': AXPShowQuickViewWorkflow,
|
|
2371
|
-
'show-list-view': AXPShowListViewWorkflow,
|
|
2372
|
-
},
|
|
2373
|
-
functions: {
|
|
2374
|
-
test: AXPMyCustomFunc,
|
|
2375
|
-
},
|
|
2376
|
-
}),
|
|
2377
|
-
],
|
|
2378
|
-
exports: [],
|
|
2379
|
-
declarations: [],
|
|
2380
|
-
providers: [{ provide: RouteReuseStrategy, useClass: AXPCustomReuseStrategy }],
|
|
2381
|
-
}]
|
|
2382
|
-
}] });
|
|
2383
|
-
|
|
2384
|
-
const AXPListViewLoaderResolver = (route, state, service = inject(AXPListViewLoaderFactory)) => {
|
|
2385
|
-
const appName = route.parent?.paramMap.get('app');
|
|
2386
|
-
const moduleName = route.parent?.paramMap.get('module');
|
|
2387
|
-
const entityName = route.paramMap.get('entity');
|
|
2388
|
-
return service.create(moduleName, entityName);
|
|
2389
|
-
};
|
|
2390
|
-
const AXPEntityDetailViewLoaderResolver = (route, state, service = inject(AXPEntityDetailViewLoaderFactory)) => {
|
|
2391
|
-
const appName = route.parent?.paramMap.get('app');
|
|
2392
|
-
const moduleName = route.parent?.paramMap.get('module');
|
|
2393
|
-
const entityName = route.paramMap.get('entity');
|
|
2394
|
-
const id = route.paramMap.get('id');
|
|
2395
|
-
return service.create(moduleName, entityName, id);
|
|
2396
|
-
};
|
|
2397
|
-
|
|
2398
|
-
const AX_ADMIN_ROUTES = [
|
|
2399
|
-
{
|
|
2400
|
-
path: ':app',
|
|
2401
|
-
canActivate: [AXPAuthGuard],
|
|
2402
|
-
children: [
|
|
2403
|
-
{
|
|
2404
|
-
path: ':module',
|
|
2405
|
-
children: [
|
|
2406
|
-
{
|
|
2407
|
-
path: 'e/:entity/:id/view/:section',
|
|
2408
|
-
resolve: { loader: AXPEntityDetailViewLoaderResolver },
|
|
2409
|
-
component: AXPEntityDetailsViewComponent,
|
|
2410
|
-
},
|
|
2411
|
-
{
|
|
2412
|
-
path: 'e/:entity/:id/view',
|
|
2413
|
-
resolve: { loader: AXPEntityDetailViewLoaderResolver },
|
|
2414
|
-
component: AXPEntityDetailsViewComponent,
|
|
2415
|
-
},
|
|
2416
|
-
{
|
|
2417
|
-
path: 'e/:entity',
|
|
2418
|
-
redirectTo: ':entity/list',
|
|
2419
|
-
pathMatch: 'full',
|
|
2420
|
-
},
|
|
2421
|
-
{
|
|
2422
|
-
path: 'e/:entity/list',
|
|
2423
|
-
component: AXPEntityListViewComponent,
|
|
2424
|
-
resolve: {
|
|
2425
|
-
loader: AXPListViewLoaderResolver,
|
|
2426
|
-
},
|
|
2427
|
-
// canActivate: [AXPPermissionGuard],
|
|
2428
|
-
// data: {
|
|
2429
|
-
// requiredPermission: "dynamic"
|
|
2430
|
-
// }
|
|
2431
|
-
},
|
|
2432
|
-
// {
|
|
2433
|
-
// path: 'ee/:entity/:id/view',
|
|
2434
|
-
// resolve: { vm: AXPEntityDetailViewModelResolver },
|
|
2435
|
-
// component: AXPDefaultThemeEntityDetailsViewComponent,
|
|
2436
|
-
// },
|
|
2437
|
-
],
|
|
2438
|
-
},
|
|
2439
|
-
],
|
|
2440
|
-
},
|
|
2441
|
-
];
|
|
2442
|
-
|
|
2443
|
-
class AXPLayoutModule {
|
|
2444
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2445
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutModule, imports: [i10.AXPCommonModule, i1$4.AXPWorkflowModule], exports: [RouterModule] }); }
|
|
2446
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutModule, imports: [AXPCommonModule.forChild({ errorHandlers: [AXMWorkflowErrorHandler] }),
|
|
2447
|
-
AXPWorkflowModule.forChild({
|
|
2448
|
-
actions: {
|
|
2449
|
-
AXPWorkflowNavigateAction,
|
|
2450
|
-
AXPDialogConfirmAction,
|
|
2451
|
-
AXPToastAction,
|
|
2452
|
-
AXPShowDetailViewAction,
|
|
2453
|
-
AXPShowListViewAction,
|
|
2454
|
-
AXPShowQuickViewAction,
|
|
2455
|
-
},
|
|
2456
|
-
}), RouterModule] }); }
|
|
2457
|
-
}
|
|
2458
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutModule, decorators: [{
|
|
2459
|
-
type: NgModule,
|
|
2460
|
-
args: [{
|
|
2461
|
-
imports: [
|
|
2462
|
-
AXPCommonModule.forChild({ errorHandlers: [AXMWorkflowErrorHandler] }),
|
|
2463
|
-
AXPWorkflowModule.forChild({
|
|
2464
|
-
actions: {
|
|
2465
|
-
AXPWorkflowNavigateAction,
|
|
2466
|
-
AXPDialogConfirmAction,
|
|
2467
|
-
AXPToastAction,
|
|
2468
|
-
AXPShowDetailViewAction,
|
|
2469
|
-
AXPShowListViewAction,
|
|
2470
|
-
AXPShowQuickViewAction,
|
|
2471
|
-
},
|
|
2472
|
-
}),
|
|
2473
|
-
],
|
|
2474
|
-
exports: [RouterModule],
|
|
2475
|
-
}]
|
|
2476
|
-
}] });
|
|
2477
|
-
|
|
2478
|
-
/**
|
|
2479
|
-
* Generated bundle index. Do not edit.
|
|
2480
|
-
*/
|
|
2481
|
-
|
|
2482
|
-
export { AXPAdminLayoutModule, AXPCreateEntityWorkflow, AXPCustomReuseStrategy, AXPDeleteEntityWorkflow, AXPEntityCreateCustomViewComponent, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityDeletedEvent, AXPEntityDetailLoaderDefault, AXPEntityDetailViewLoaderFactory, AXPEntityDetailViewLoaderResolver, AXPEntityDetailsViewComponent, AXPEntityListViewComponent, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifyPopupAction, AXPEntityPerformDeleteAction, AXPEntityQuickViewComponent, AXPLayoutModule, AXPListViewLoaderDefault, AXPListViewLoaderFactory, AXPListViewLoaderResolver, AXPListViewModule, AXPListViewOptionConditionsComponent, AXPListViewOptionFilterOperatorComponent, AXPListViewOptionSortingComponent, AXPListViewOptionsColumnsComponent, AXPModifyEntityWorkflow, AXPMyCustomFunc, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPShowQuickViewAction, AXPShowQuickViewWorkflow, AXP_LISTVIEW_LOADER, AX_ADMIN_ROUTES };
|
|
2483
|
-
//# sourceMappingURL=acorex-platform-layouts.mjs.map
|