@acorex/platform 19.1.6 → 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 +14 -5
- package/fesm2022/acorex-platform-layout-entity.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-CtpkzjOm.mjs → acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs} +12 -12
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CtpkzjOm.mjs.map → acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs.map} +1 -1
- 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 +28 -15
- 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 +74 -85
- package/fesm2022/acorex-platform-widgets.mjs.map +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 +12 -8
- 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/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/layout/block/block-widget-designer.component.d.ts +0 -1
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +6 -4
- package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +6 -5
- 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-CJZJzh1K.mjs +0 -69
- package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CJZJzh1K.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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-common-dateTime-widget-filter.component-CTV2a3c0.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/dateTime/dateTime-widget-filter.component.ts"],"sourcesContent":["import { AXValueChangedEvent } from '@acorex/components/common';\nimport { AXDateTimeBoxModule } from '@acorex/components/datetime-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\nimport { AXCalendarService } from '@acorex/core/date-time';\nimport { AXFormatModule } from '@acorex/core/format';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, WritableSignal, effect, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXPWidgetFilterBase } from '../../widget/widget-base';\n\n@Component({\n selector: 'axp-datetime-widget-filter',\n template: `\n <div class=\"ax-flex-1\">\n <ax-select-box\n [ngModel]=\"selectedItem()\"\n [placeholder]=\"('select' | translate | async) ?? 'Select...'\"\n (onValueChanged)=\"changeSelectedItem($event)\"\n [dataSource]=\"dataSource\"\n >\n </ax-select-box>\n @if(selectedItem()==\"Between\"){\n <div class=\"ax-flex ax-gap-2 ax-mt-2\">\n <ax-datetime-box\n placeholder=\"From\"\n [ngModel]=\"value.from\"\n (ngModelChange)=\"handleChangeValue($event, 'from')\"\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-5 xl:ax-col-end-4 2xl:ax-col-end-3\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-datetime-box>\n <ax-datetime-box\n placeholder=\"To\"\n [ngModel]=\"value.to\"\n (ngModelChange)=\"handleChangeValue($event, 'to')\"\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-5 xl:ax-col-end-4 2xl:ax-col-end-3\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-datetime-box>\n </div>\n } @if(selectedItem()==\"Greater Than\" || selectedItem()==\"Less Than\"){\n <div class=\"ax-mt-2\">\n <ax-datetime-box\n [ngModel]=\"value\"\n (ngModelChange)=\"handleChangeValue($event, 'self')\"\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-5 xl:ax-col-end-4 2xl:ax-col-end-3\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-datetime-box>\n </div>\n }\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FormsModule,\n AXFormatModule,\n AXTranslationModule,\n AXDateTimeBoxModule,\n AXDecoratorModule,\n AXSelectBoxModule,\n ],\n outputs: ['valueChange', 'operatorChange'],\n inputs: ['value', 'operator']\n})\nexport class AXPDateTimeWidgetFilterComponent extends AXPWidgetFilterBase {\n protected selectedItem: WritableSignal<string> = signal('');\n dataSource: string[] = [];\n filterFieldFrom: string = '';\n filterFieldTo: string = '';\n\n private calendarService = inject(AXCalendarService);\n private changeValueEffect = effect(() => {\n this.getSelectedItemValue(this.selectedItem());\n });\n\n protected handleChangeValue(val: Date, type: 'from' | 'to' | 'self') {\n switch (type) {\n case 'self':\n this.value = val.toISOString();\n break;\n case 'to':\n this.value.to = val.toISOString();\n break;\n case 'from':\n this.value.from = val.toISOString();\n break;\n default:\n break;\n }\n console.log(this.value);\n }\n\n ngOnInit(): void {\n if (this.operator == 'greaterThan' || this.operator == 'lessThan') {\n this.selectedItem.set(this.convertToTitleCase(this.operator));\n } else {\n this.selectedItem.set(this.convertToTitleCase(this.value));\n }\n this.dataSource = [\n 'Today',\n 'This Week',\n 'This Month',\n 'Yesterday',\n 'Last Week',\n 'Last Month',\n 'Tomorrow',\n 'Next Week',\n 'Next Month',\n 'Between',\n 'Greater Than',\n 'Less Than',\n ];\n }\n\n protected changeSelectedItem(e: AXValueChangedEvent) {\n if (e.isUserInteraction) {\n this.selectedItem.set(e.value);\n }\n }\n\n protected getSelectedItemValue(itemTitle: string): void {\n this.operator = 'between';\n const currentDate = this.calendarService.now().date;\n const calendar = this.calendarService.calendar;\n switch (itemTitle) {\n case 'Today':\n this.value = {\n from: calendar.startOf(currentDate, 'day').date.toISOString(),\n to: calendar.endOf(currentDate, 'day').date.toISOString(),\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'This Week':\n this.value = {\n from: calendar.startOf(currentDate, 'week').date.toISOString(),\n to: calendar.endOf(currentDate, 'week').date.toISOString(),\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'This Month':\n this.value = {\n from: calendar.startOf(currentDate, 'month').date.toISOString(),\n to: calendar.endOf(currentDate, 'month').date.toISOString(),\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'Yesterday':\n const yesterDay = calendar.add(currentDate, 'day', -1);\n this.value = {\n from: yesterDay.startOf('day').date.toISOString(),\n to: yesterDay.endOf('day').date.toISOString(),\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'Last Week':\n const lastWeek = calendar.add(currentDate, 'week', -1);\n this.value = {\n from: lastWeek.startOf('week').date.toISOString(),\n to: lastWeek.endOf('week').date.toISOString(),\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'Last Month':\n const lastMonth = calendar.add(currentDate, 'month', -1);\n this.value = {\n from: lastMonth.startOf('month').date.toISOString(),\n to: lastMonth.endOf('month').date.toISOString(),\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'Tomorrow':\n const tomorrow = calendar.add(currentDate, 'day', 1);\n this.value = {\n from: tomorrow.startOf('day').date.toISOString(),\n to: tomorrow.endOf('day').date.toISOString(),\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'Next Week':\n const nextWeek = calendar.add(currentDate, 'week', 1);\n this.value = {\n from: nextWeek.startOf('week').date.toISOString(),\n to: nextWeek.endOf('week').date.toISOString(),\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'Next Month':\n const nextMonth = calendar.add(currentDate, 'month', -1);\n this.value = {\n from: nextMonth.startOf('month').date.toISOString(),\n to: nextMonth.endOf('month').date.toISOString(),\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'Between':\n this.value = {\n from: '',\n to: '',\n filterFieldFrom: this.filterFieldFrom || this.schema.name,\n filterFieldTo: this.filterFieldTo || this.schema.name,\n };\n break;\n case 'Greater Than':\n this.operator = 'greaterThan';\n break;\n case 'Less Than':\n this.operator = 'lessThan';\n break;\n default:\n break;\n }\n }\n protected convertToTitleCase(str: string) {\n return str\n ?.replace(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;;;;AAwCX,EAAA,CAAA;oBACC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,cAAc;wBACd,mBAAmB;wBACnB,mBAAmB;wBACnB,iBAAiB;wBACjB,iBAAiB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,gBAAgB,CAAC;AAC1C,oBAAA,MAAM,EAAE,CAAC,OAAO,EAAE,UAAU;AAC/B,iBAAA;;;;;"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { AXDateTimeModule } from '@acorex/core/date-time';
|
|
2
|
-
import { AXFormatModule } from '@acorex/core/format';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
5
|
-
import { AXPWidgetBase } from './acorex-platform-common.mjs';
|
|
6
|
-
|
|
7
|
-
class AXPDateTimeWidgetViewComponent extends AXPWidgetBase {
|
|
8
|
-
render() {
|
|
9
|
-
const rawValue = this.rawValue;
|
|
10
|
-
if (rawValue == null) {
|
|
11
|
-
this.convertedValue = null;
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (this.isArray(rawValue)) {
|
|
15
|
-
// if (this.multiple) {
|
|
16
|
-
console.log(rawValue);
|
|
17
|
-
this.convertedValue = rawValue.map((item) => this.formatValue(new Date(item)));
|
|
18
|
-
// } else {
|
|
19
|
-
// this.convertedValue = this.formatValue(rawValue[0]);
|
|
20
|
-
// }
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.convertedValue = this.formatValue(new Date(rawValue));
|
|
24
|
-
}
|
|
25
|
-
// const value = new Date(rawValue);
|
|
26
|
-
// this.formatValue(value);
|
|
27
|
-
}
|
|
28
|
-
formatValue(value) {
|
|
29
|
-
if (this.formats?.default) {
|
|
30
|
-
return this.formatService.format(new Date(value), 'datetime', { format: this.formats.default });
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
return value.toISOString();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
isArray(val) {
|
|
37
|
-
return Array.isArray(val);
|
|
38
|
-
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDateTimeWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
40
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPDateTimeWidgetViewComponent, isStandalone: true, selector: "ng-component", inputs: { context: "context", value: "value", multiple: "multiple" }, usesInheritance: true, ngImport: i0, template: `
|
|
41
|
-
@if(multiple && isArray(convertedValue)){
|
|
42
|
-
<div class="ax-flex ax-flex-col ax-gap-1">
|
|
43
|
-
@for(value of convertedValue; track $index){
|
|
44
|
-
<span>{{ value }}</span>
|
|
45
|
-
}
|
|
46
|
-
</div>
|
|
47
|
-
}@else{
|
|
48
|
-
<span>{{ convertedValue }}</span>
|
|
49
|
-
}
|
|
50
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXDateTimeModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDateTimeWidgetViewComponent, decorators: [{
|
|
53
|
-
type: Component,
|
|
54
|
-
args: [{
|
|
55
|
-
template: `
|
|
56
|
-
@if(multiple && isArray(convertedValue)){
|
|
57
|
-
<div class="ax-flex ax-flex-col ax-gap-1">
|
|
58
|
-
@for(value of convertedValue; track $index){
|
|
59
|
-
<span>{{ value }}</span>
|
|
60
|
-
}
|
|
61
|
-
</div>
|
|
62
|
-
}@else{
|
|
63
|
-
<span>{{ convertedValue }}</span>
|
|
64
|
-
}
|
|
65
|
-
`,
|
|
66
|
-
imports: [AXFormatModule, AXDateTimeModule],
|
|
67
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
68
|
-
inputs: ['context', 'value', 'multiple']
|
|
69
|
-
}]
|
|
70
|
-
}] });
|
|
71
|
-
|
|
72
|
-
export { AXPDateTimeWidgetViewComponent };
|
|
73
|
-
//# sourceMappingURL=acorex-platform-common-dateTime-widget-view.component-C7hmUXLz.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-common-dateTime-widget-view.component-C7hmUXLz.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/dateTime/dateTime-widget-view.component.ts"],"sourcesContent":["import { AXDateTimeModule } from '@acorex/core/date-time';\nimport { AXFormatModule } from '@acorex/core/format';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { AXPWidgetBase } from '../../widget/widget-base';\n\n@Component({\n template: `\n @if(multiple && isArray(convertedValue)){\n <div class=\"ax-flex ax-flex-col ax-gap-1\">\n @for(value of convertedValue; track $index){\n <span>{{ value }}</span>\n }\n </div>\n }@else{\n <span>{{ convertedValue }}</span>\n }\n `,\n imports: [AXFormatModule, AXDateTimeModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['context', 'value', 'multiple']\n})\nexport class AXPDateTimeWidgetViewComponent extends AXPWidgetBase {\n // protected convertedValue!: string | null;\n protected convertedValue!: any;\n protected multiple!: boolean;\n\n override render() {\n const rawValue = this.rawValue;\n if (rawValue == null) {\n this.convertedValue = null;\n return;\n }\n if (this.isArray(rawValue)) {\n // if (this.multiple) {\n console.log(rawValue);\n this.convertedValue = rawValue.map((item: Date) => this.formatValue(new Date(item)));\n // } else {\n // this.convertedValue = this.formatValue(rawValue[0]);\n // }\n } else {\n this.convertedValue = this.formatValue(new Date(rawValue));\n }\n\n // const value = new Date(rawValue);\n // this.formatValue(value);\n }\n\n protected formatValue(value: Date) {\n if (this.formats?.default) {\n return this.formatService.format(new Date(value), 'datetime', { format: this.formats.default });\n } else {\n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,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,EAf7B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;;;;;GAUX,EACW,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,cAAc,8BAAE,gBAAgB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIjC,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAhB1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE;;;;;;;;;;AAUX,EAAA,CAAA;AACC,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,MAAM,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU;AAC1C,iBAAA;;;;;"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { AXTooltipModule } from '@acorex/components/tooltip';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
4
|
-
import { AXPWidgetBase } from './acorex-platform-common.mjs';
|
|
5
|
-
|
|
6
|
-
class AXPEmailWidgetColumnComponent extends AXPWidgetBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.list = [];
|
|
10
|
-
this.text = '';
|
|
11
|
-
}
|
|
12
|
-
dot3(text) {
|
|
13
|
-
if (this.multiple)
|
|
14
|
-
return text.split('\n')[0] + '...';
|
|
15
|
-
else
|
|
16
|
-
return text.split('\n')[0];
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
if (this.rawValue) {
|
|
20
|
-
const rawValue = this.rawValue;
|
|
21
|
-
this.list = Array.isArray(rawValue) ? rawValue.map((c) => this.extractItem(c)) : [this.extractItem(rawValue)];
|
|
22
|
-
this.text = this.list.map((item) => item.value).join('\n');
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
extractItem(item) {
|
|
26
|
-
return typeof item == 'object'
|
|
27
|
-
? {
|
|
28
|
-
value: item.value ?? '-',
|
|
29
|
-
type: item.type ?? 'primary',
|
|
30
|
-
label: item.label,
|
|
31
|
-
}
|
|
32
|
-
: {
|
|
33
|
-
value: item,
|
|
34
|
-
type: 'primary',
|
|
35
|
-
label: null,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEmailWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEmailWidgetColumnComponent, isStandalone: true, selector: "axp-email-widget-column", inputs: { context: "context", multiple: "multiple", width: "width", hasLabel: "hasLabel", allowResizing: "allowResizing" }, usesInheritance: true, ngImport: i0, template: `<div>
|
|
40
|
-
@if(multiple && list.length>1){
|
|
41
|
-
<div [title]="text">{{ dot3(text) }}</div>
|
|
42
|
-
}@else {
|
|
43
|
-
<div>
|
|
44
|
-
@if(list && list.length){
|
|
45
|
-
{{ list[0].value }}
|
|
46
|
-
}@else { - }
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXTooltipModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEmailWidgetColumnComponent, decorators: [{
|
|
53
|
-
type: Component,
|
|
54
|
-
args: [{
|
|
55
|
-
selector: 'axp-email-widget-column',
|
|
56
|
-
template: `<div>
|
|
57
|
-
@if(multiple && list.length>1){
|
|
58
|
-
<div [title]="text">{{ dot3(text) }}</div>
|
|
59
|
-
}@else {
|
|
60
|
-
<div>
|
|
61
|
-
@if(list && list.length){
|
|
62
|
-
{{ list[0].value }}
|
|
63
|
-
}@else { - }
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
</div>`,
|
|
68
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
69
|
-
imports: [AXTooltipModule],
|
|
70
|
-
inputs: ['context', 'multiple', 'width', 'hasLabel', 'allowResizing']
|
|
71
|
-
}]
|
|
72
|
-
}] });
|
|
73
|
-
|
|
74
|
-
export { AXPEmailWidgetColumnComponent };
|
|
75
|
-
//# sourceMappingURL=acorex-platform-common-email-widget-column.component-BPoSZTqM.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-common-email-widget-column.component-BPoSZTqM.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/email/email-widget-column.component.ts"],"sourcesContent":["import { AXTooltipModule } from '@acorex/components/tooltip';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { AXPWidgetBase } from '../../widget/widget-base';\n@Component({\n selector: 'axp-email-widget-column',\n template: `<div>\n @if(multiple && list.length>1){\n <div [title]=\"text\">{{ dot3(text) }}</div>\n }@else {\n <div>\n @if(list && list.length){\n {{ list[0].value }}\n }@else { - }\n </div>\n\n }\n </div>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXTooltipModule],\n inputs: ['context', 'multiple', 'width', 'hasLabel', 'allowResizing']\n})\nexport class AXPEmailWidgetColumnComponent extends AXPWidgetBase {\n protected list: { value: string; label: string }[] = [];\n protected text: string = '';\n protected multiple!: boolean;\n protected hasLabel!: boolean;\n\n protected dot3(text: string) {\n if (this.multiple) return text.split('\\n')[0] + '...';\n else return text.split('\\n')[0];\n }\n\n protected override render(): void {\n if (this.rawValue) {\n const rawValue = this.rawValue;\n this.list = Array.isArray(rawValue) ? rawValue.map((c) => this.extractItem(c)) : [this.extractItem(rawValue)];\n this.text = this.list.map((item) => item.value).join('\\n');\n }\n }\n\n private extractItem(item: any): any {\n return typeof item == 'object'\n ? {\n value: item.value ?? '-',\n type: item.type ?? 'primary',\n label: item.label,\n }\n : {\n value: item,\n type: 'primary',\n label: null,\n };\n }\n}\n"],"names":[],"mappings":";;;;;AAqBM,MAAO,6BAA8B,SAAQ,aAAa,CAAA;AAlBhE,IAAA,WAAA,GAAA;;QAmBY,IAAI,CAAA,IAAA,GAAuC,EAAE;QAC7C,IAAI,CAAA,IAAA,GAAW,EAAE;AA8B5B;AA1BW,IAAA,IAAI,CAAC,IAAY,EAAA;QACzB,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;;YAChD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;IAGd,MAAM,GAAA;AACvB,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ;AAC9B,YAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YAC7G,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC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A,QAAQ,EAAE,CAAA;;;;;;;;;;;AAWL,QAAA,CAAA;oBACL,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe;AACvE,iBAAA;;;;;"}
|
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
import * as i2 from '@acorex/components/button';
|
|
2
|
-
import { AXButtonModule } from '@acorex/components/button';
|
|
3
|
-
import * as i5 from '@acorex/components/decorators';
|
|
4
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
|
-
import * as i3 from '@acorex/components/form';
|
|
6
|
-
import { AXFormModule } from '@acorex/components/form';
|
|
7
|
-
import * as i6 from '@acorex/components/select-box';
|
|
8
|
-
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
9
|
-
import * as i4 from '@acorex/components/text-box';
|
|
10
|
-
import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
11
|
-
import { AXPlatform } from '@acorex/core/platform';
|
|
12
|
-
import * as i1 from '@angular/common';
|
|
13
|
-
import { CommonModule } from '@angular/common';
|
|
14
|
-
import * as i0 from '@angular/core';
|
|
15
|
-
import { inject, signal, effect, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
16
|
-
import * as i2$1 from '@angular/forms';
|
|
17
|
-
import { FormsModule } from '@angular/forms';
|
|
18
|
-
import { AXPWidgetEditBase, AXPDataGenerator } from './acorex-platform-common.mjs';
|
|
19
|
-
|
|
20
|
-
class AXPEmailWidgetEditComponent extends AXPWidgetEditBase {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
this.platform = inject(AXPlatform);
|
|
24
|
-
this.convertedValue = signal([]);
|
|
25
|
-
this.changeValueEffect = effect(() => {
|
|
26
|
-
if (this.multiple) {
|
|
27
|
-
if (this.hasLabel)
|
|
28
|
-
this.value = this.convertedValue().map((i) => ({ value: i.value, label: i.label }));
|
|
29
|
-
else
|
|
30
|
-
this.value = this.convertedValue().map((i) => i.value);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
if (this.hasLabel)
|
|
34
|
-
this.value = this.convertedValue().map((i) => ({ value: i.value, label: i.label }))[0];
|
|
35
|
-
else
|
|
36
|
-
this.value = this.convertedValue().map((i) => i.value)[0];
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
handleEmailChange(e, id) {
|
|
41
|
-
if (e.isUserInteraction) {
|
|
42
|
-
this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { ...i, value: e.value } : i)));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
handleLabelChange(e, id) {
|
|
46
|
-
if (e.isUserInteraction) {
|
|
47
|
-
this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { ...i, label: e.value } : i)));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
handleAddItem() {
|
|
51
|
-
// this.value.push({ label: 'Primary', value: undefined });
|
|
52
|
-
this.convertedValue.update((prev) => [
|
|
53
|
-
...prev,
|
|
54
|
-
{ label: this.hasLabel ? 'Primary' : '', value: '', id: AXPDataGenerator.uuid() },
|
|
55
|
-
]);
|
|
56
|
-
}
|
|
57
|
-
handleRemoveItem(item) {
|
|
58
|
-
this.convertedValue.update((prev) => prev.filter((c) => c != item));
|
|
59
|
-
}
|
|
60
|
-
ngOnInit() {
|
|
61
|
-
// Initialize with an empty array if there's no value or it's empty
|
|
62
|
-
if (!this.value || this.value.length === 0) {
|
|
63
|
-
this.initializeEmptyValue();
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
// Process the input based on `multiple` and `hasLabel`
|
|
67
|
-
if (this.multiple) {
|
|
68
|
-
this.handleMultipleValue();
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
this.handleSingleValue();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
initializeEmptyValue() {
|
|
75
|
-
this.convertedValue.set([{ value: '', label: '', id: AXPDataGenerator.uuid() }]);
|
|
76
|
-
}
|
|
77
|
-
handleMultipleValue() {
|
|
78
|
-
const newValue = this.value.map((item) => ({
|
|
79
|
-
value: this.hasLabel ? item.value : item,
|
|
80
|
-
label: this.hasLabel ? item.label : null,
|
|
81
|
-
id: AXPDataGenerator.uuid(),
|
|
82
|
-
}));
|
|
83
|
-
this.convertedValue.set(newValue);
|
|
84
|
-
}
|
|
85
|
-
handleSingleValue() {
|
|
86
|
-
const newValue = [
|
|
87
|
-
{
|
|
88
|
-
value: this.hasLabel ? this.value.value : this.value,
|
|
89
|
-
label: this.hasLabel ? this.value.label : null,
|
|
90
|
-
id: AXPDataGenerator.uuid(),
|
|
91
|
-
},
|
|
92
|
-
];
|
|
93
|
-
this.convertedValue.set(newValue);
|
|
94
|
-
}
|
|
95
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEmailWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
96
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEmailWidgetEditComponent, isStandalone: true, selector: "ng-component", inputs: { multiple: "multiple", hasLabel: "hasLabel" }, usesInheritance: true, ngImport: i0, template: `
|
|
97
|
-
<div class="ax-grid ax-grid-cols-12 ax-gap-4">
|
|
98
|
-
<ng-container *ngIf="multiple">
|
|
99
|
-
@for(item of convertedValue();track item?.value) {
|
|
100
|
-
<ax-text-box
|
|
101
|
-
[(ngModel)]="item.value"
|
|
102
|
-
(onValueChanged)="handleEmailChange($event, item.id)"
|
|
103
|
-
type="email"
|
|
104
|
-
class="ax-col-start-1 ax-col-end-13 lg:ax-col-end-8"
|
|
105
|
-
[class.lg:!ax-col-end-12]="!hasLabel"
|
|
106
|
-
>
|
|
107
|
-
</ax-text-box>
|
|
108
|
-
@if(hasLabel){
|
|
109
|
-
<ax-select-box
|
|
110
|
-
[dataSource]="['Primary', 'Secondary']"
|
|
111
|
-
[(ngModel)]="item.label"
|
|
112
|
-
(onValueChanged)="handleLabelChange($event, item.id)"
|
|
113
|
-
class="ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-12"
|
|
114
|
-
>
|
|
115
|
-
</ax-select-box>
|
|
116
|
-
}
|
|
117
|
-
<ax-button
|
|
118
|
-
look="twotone"
|
|
119
|
-
color="danger"
|
|
120
|
-
(onClick)="handleRemoveItem(item)"
|
|
121
|
-
class="ax-col-start-11 ax-col-end-13 lg:ax-col-start-12 lg:ax-col-end-13 ax-justify-self-end"
|
|
122
|
-
>
|
|
123
|
-
<ax-icon icon="fa-regular fa-xmark"></ax-icon>
|
|
124
|
-
</ax-button>
|
|
125
|
-
}
|
|
126
|
-
</ng-container>
|
|
127
|
-
<ng-container *ngIf="!multiple">
|
|
128
|
-
<div class="ax-col-start-1 ax-col-end-13 lg:ax-col-end-8" [class.lg:!ax-col-end-13]="!hasLabel">
|
|
129
|
-
<ax-text-box
|
|
130
|
-
[(ngModel)]="convertedValue()[0].value"
|
|
131
|
-
(onValueChanged)="handleEmailChange($event, convertedValue()[0].id)"
|
|
132
|
-
type="email"
|
|
133
|
-
>
|
|
134
|
-
@for(vl of validations;track $index) {
|
|
135
|
-
<ax-validation-rule [rule]="vl.rule" [options]="vl.options"></ax-validation-rule>
|
|
136
|
-
}
|
|
137
|
-
</ax-text-box>
|
|
138
|
-
</div>
|
|
139
|
-
@if(hasLabel){
|
|
140
|
-
<ax-select-box
|
|
141
|
-
[dataSource]="['Primary', 'Secondary']"
|
|
142
|
-
[(ngModel)]="convertedValue()[0].label"
|
|
143
|
-
(onValueChanged)="handleLabelChange($event, convertedValue()[0].id)"
|
|
144
|
-
class="ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-13"
|
|
145
|
-
>
|
|
146
|
-
</ax-select-box>
|
|
147
|
-
}
|
|
148
|
-
</ng-container>
|
|
149
|
-
|
|
150
|
-
<ax-button
|
|
151
|
-
*ngIf="multiple"
|
|
152
|
-
[text]="convertedValue().length == 0 ? 'Add New' : 'Add Another'"
|
|
153
|
-
look="twotone"
|
|
154
|
-
(onClick)="handleAddItem()"
|
|
155
|
-
class="ax-col-start-8 lg:ax-col-start-10 2xl:ax-col-start-10 ax-col-end-13"
|
|
156
|
-
>
|
|
157
|
-
<ax-prefix>
|
|
158
|
-
<ax-icon class="fa-solid fa-add"></ax-icon>
|
|
159
|
-
</ax-prefix>
|
|
160
|
-
</ax-button>
|
|
161
|
-
</div>
|
|
162
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.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: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i4.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: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i5.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i5.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i6.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: "ngmodule", type: AXFormModule }, { kind: "directive", type: i3.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
163
|
-
}
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEmailWidgetEditComponent, decorators: [{
|
|
165
|
-
type: Component,
|
|
166
|
-
args: [{
|
|
167
|
-
template: `
|
|
168
|
-
<div class="ax-grid ax-grid-cols-12 ax-gap-4">
|
|
169
|
-
<ng-container *ngIf="multiple">
|
|
170
|
-
@for(item of convertedValue();track item?.value) {
|
|
171
|
-
<ax-text-box
|
|
172
|
-
[(ngModel)]="item.value"
|
|
173
|
-
(onValueChanged)="handleEmailChange($event, item.id)"
|
|
174
|
-
type="email"
|
|
175
|
-
class="ax-col-start-1 ax-col-end-13 lg:ax-col-end-8"
|
|
176
|
-
[class.lg:!ax-col-end-12]="!hasLabel"
|
|
177
|
-
>
|
|
178
|
-
</ax-text-box>
|
|
179
|
-
@if(hasLabel){
|
|
180
|
-
<ax-select-box
|
|
181
|
-
[dataSource]="['Primary', 'Secondary']"
|
|
182
|
-
[(ngModel)]="item.label"
|
|
183
|
-
(onValueChanged)="handleLabelChange($event, item.id)"
|
|
184
|
-
class="ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-12"
|
|
185
|
-
>
|
|
186
|
-
</ax-select-box>
|
|
187
|
-
}
|
|
188
|
-
<ax-button
|
|
189
|
-
look="twotone"
|
|
190
|
-
color="danger"
|
|
191
|
-
(onClick)="handleRemoveItem(item)"
|
|
192
|
-
class="ax-col-start-11 ax-col-end-13 lg:ax-col-start-12 lg:ax-col-end-13 ax-justify-self-end"
|
|
193
|
-
>
|
|
194
|
-
<ax-icon icon="fa-regular fa-xmark"></ax-icon>
|
|
195
|
-
</ax-button>
|
|
196
|
-
}
|
|
197
|
-
</ng-container>
|
|
198
|
-
<ng-container *ngIf="!multiple">
|
|
199
|
-
<div class="ax-col-start-1 ax-col-end-13 lg:ax-col-end-8" [class.lg:!ax-col-end-13]="!hasLabel">
|
|
200
|
-
<ax-text-box
|
|
201
|
-
[(ngModel)]="convertedValue()[0].value"
|
|
202
|
-
(onValueChanged)="handleEmailChange($event, convertedValue()[0].id)"
|
|
203
|
-
type="email"
|
|
204
|
-
>
|
|
205
|
-
@for(vl of validations;track $index) {
|
|
206
|
-
<ax-validation-rule [rule]="vl.rule" [options]="vl.options"></ax-validation-rule>
|
|
207
|
-
}
|
|
208
|
-
</ax-text-box>
|
|
209
|
-
</div>
|
|
210
|
-
@if(hasLabel){
|
|
211
|
-
<ax-select-box
|
|
212
|
-
[dataSource]="['Primary', 'Secondary']"
|
|
213
|
-
[(ngModel)]="convertedValue()[0].label"
|
|
214
|
-
(onValueChanged)="handleLabelChange($event, convertedValue()[0].id)"
|
|
215
|
-
class="ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-13"
|
|
216
|
-
>
|
|
217
|
-
</ax-select-box>
|
|
218
|
-
}
|
|
219
|
-
</ng-container>
|
|
220
|
-
|
|
221
|
-
<ax-button
|
|
222
|
-
*ngIf="multiple"
|
|
223
|
-
[text]="convertedValue().length == 0 ? 'Add New' : 'Add Another'"
|
|
224
|
-
look="twotone"
|
|
225
|
-
(onClick)="handleAddItem()"
|
|
226
|
-
class="ax-col-start-8 lg:ax-col-start-10 2xl:ax-col-start-10 ax-col-end-13"
|
|
227
|
-
>
|
|
228
|
-
<ax-prefix>
|
|
229
|
-
<ax-icon class="fa-solid fa-add"></ax-icon>
|
|
230
|
-
</ax-prefix>
|
|
231
|
-
</ax-button>
|
|
232
|
-
</div>
|
|
233
|
-
`,
|
|
234
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
235
|
-
imports: [
|
|
236
|
-
CommonModule,
|
|
237
|
-
AXButtonModule,
|
|
238
|
-
FormsModule,
|
|
239
|
-
AXTextBoxModule,
|
|
240
|
-
AXDecoratorModule,
|
|
241
|
-
AXSelectBoxModule,
|
|
242
|
-
AXFormModule,
|
|
243
|
-
],
|
|
244
|
-
inputs: ['multiple', 'hasLabel']
|
|
245
|
-
}]
|
|
246
|
-
}] });
|
|
247
|
-
|
|
248
|
-
export { AXPEmailWidgetEditComponent };
|
|
249
|
-
//# sourceMappingURL=acorex-platform-common-email-widget-edit.component-aLPGOG3r.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-common-email-widget-edit.component-aLPGOG3r.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/email/email-widget-edit.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXValueChangedEvent } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, WritableSignal, effect, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXPWidgetEditBase } from '../../widget/widget-base';\nimport { AXPDataGenerator } from '../../../utils';\n\n@Component({\n template: `\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4\">\n <ng-container *ngIf=\"multiple\">\n @for(item of convertedValue();track item?.value) {\n <ax-text-box\n [(ngModel)]=\"item.value\"\n (onValueChanged)=\"handleEmailChange($event, item.id)\"\n type=\"email\"\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-8\"\n [class.lg:!ax-col-end-12]=\"!hasLabel\"\n >\n </ax-text-box>\n @if(hasLabel){\n <ax-select-box\n [dataSource]=\"['Primary', 'Secondary']\"\n [(ngModel)]=\"item.label\"\n (onValueChanged)=\"handleLabelChange($event, item.id)\"\n class=\"ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-12\"\n >\n </ax-select-box>\n }\n <ax-button\n look=\"twotone\"\n color=\"danger\"\n (onClick)=\"handleRemoveItem(item)\"\n class=\"ax-col-start-11 ax-col-end-13 lg:ax-col-start-12 lg:ax-col-end-13 ax-justify-self-end\"\n >\n <ax-icon icon=\"fa-regular fa-xmark\"></ax-icon>\n </ax-button>\n }\n </ng-container>\n <ng-container *ngIf=\"!multiple\">\n <div class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-8\" [class.lg:!ax-col-end-13]=\"!hasLabel\">\n <ax-text-box\n [(ngModel)]=\"convertedValue()[0].value\"\n (onValueChanged)=\"handleEmailChange($event, convertedValue()[0].id)\"\n type=\"email\"\n >\n @for(vl of validations;track $index) {\n <ax-validation-rule [rule]=\"vl.rule\" [options]=\"vl.options\"></ax-validation-rule>\n }\n </ax-text-box>\n </div>\n @if(hasLabel){\n <ax-select-box\n [dataSource]=\"['Primary', 'Secondary']\"\n [(ngModel)]=\"convertedValue()[0].label\"\n (onValueChanged)=\"handleLabelChange($event, convertedValue()[0].id)\"\n class=\"ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-13\"\n >\n </ax-select-box>\n }\n </ng-container>\n\n <ax-button\n *ngIf=\"multiple\"\n [text]=\"convertedValue().length == 0 ? 'Add New' : 'Add Another'\"\n look=\"twotone\"\n (onClick)=\"handleAddItem()\"\n class=\"ax-col-start-8 lg:ax-col-start-10 2xl:ax-col-start-10 ax-col-end-13\"\n >\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n AXButtonModule,\n FormsModule,\n AXTextBoxModule,\n AXDecoratorModule,\n AXSelectBoxModule,\n AXFormModule,\n ],\n inputs: ['multiple', 'hasLabel']\n})\nexport class AXPEmailWidgetEditComponent extends AXPWidgetEditBase<any> {\n\n protected platform = inject(AXPlatform);\n protected multiple!: boolean;\n protected hasLabel!: boolean;\n protected convertedValue: WritableSignal<{ value: string; label?: string; id: string }[]> = signal([]);\n\n private changeValueEffect = effect(() => {\n if (this.multiple) {\n if (this.hasLabel) this.value = this.convertedValue().map((i) => ({ value: i.value, label: i.label }));\n else this.value = this.convertedValue().map((i) => i.value);\n } else {\n if (this.hasLabel) this.value = this.convertedValue().map((i) => ({ value: i.value, label: i.label }))[0];\n else this.value = this.convertedValue().map((i) => i.value)[0];\n }\n });\n\n protected handleEmailChange(e: AXValueChangedEvent, id: string) {\n if (e.isUserInteraction) {\n this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { ...i, value: e.value } : i)));\n }\n }\n protected handleLabelChange(e: AXValueChangedEvent, id: string) {\n if (e.isUserInteraction) {\n this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { ...i, label: e.value } : i)));\n }\n }\n\n protected handleAddItem() {\n // this.value.push({ label: 'Primary', value: undefined });\n this.convertedValue.update((prev) => [\n ...prev,\n { label: this.hasLabel ? 'Primary' : '', value: '', id: AXPDataGenerator.uuid() },\n ]);\n }\n\n protected handleRemoveItem(item: any) {\n this.convertedValue.update((prev) => prev.filter((c) => c != item));\n }\n\n ngOnInit(): void {\n // Initialize with an empty array if there's no value or it's empty\n if (!this.value || this.value.length === 0) {\n this.initializeEmptyValue();\n return;\n }\n\n // Process the input based on `multiple` and `hasLabel`\n if (this.multiple) {\n this.handleMultipleValue();\n } else {\n this.handleSingleValue();\n }\n }\n\n private initializeEmptyValue(): void {\n this.convertedValue.set([{ value: '', label: '', id: AXPDataGenerator.uuid() }]);\n }\n\n private handleMultipleValue(): void {\n const newValue = this.value.map((item: any) => ({\n value: this.hasLabel ? item.value : item,\n label: this.hasLabel ? item.label : null,\n id: AXPDataGenerator.uuid(),\n }));\n this.convertedValue.set(newValue);\n }\n\n private handleSingleValue(): void {\n const newValue = [\n {\n value: this.hasLabel ? this.value.value : this.value,\n label: this.hasLabel ? this.value.label : null,\n id: AXPDataGenerator.uuid(),\n },\n ];\n this.convertedValue.set(newValue);\n }\n}\n"],"names":["i3","i7"],"mappings":";;;;;;;;;;;;;;;;;;;AA6FM,MAAO,2BAA4B,SAAQ,iBAAsB,CAAA;AAhFvE,IAAA,WAAA,GAAA;;AAkFY,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAG7B,QAAA,IAAA,CAAA,cAAc,GAAoE,MAAM,CAAC,EAAE,CAAC;AAE9F,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,MAAK;AACtC,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,IAAI,IAAI,CAAC,QAAQ;AAAE,oBAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;;AACjG,oBAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;;iBACtD;gBACL,IAAI,I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AAA,CAAA;AACP,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEX,EAAA,CAAA;oBACC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,cAAc;wBACd,WAAW;wBACX,eAAe;wBACf,iBAAiB;wBACjB,iBAAiB;wBACjB,YAAY;AACf,qBAAA;AACD,oBAAA,MAAM,EAAE,CAAC,UAAU,EAAE,UAAU;AAClC,iBAAA;;;;;"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import * as i1$1 from '@acorex/components/badge';
|
|
2
|
-
import { AXBadgeModule } from '@acorex/components/badge';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i0 from '@angular/core';
|
|
6
|
-
import { inject, Component } from '@angular/core';
|
|
7
|
-
import { AXPWidgetBase, AXPClipBoardService } from './acorex-platform-common.mjs';
|
|
8
|
-
|
|
9
|
-
class AXPEmailWidgetViewComponent extends AXPWidgetBase {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.clipboard = inject(AXPClipBoardService);
|
|
13
|
-
this.list = [];
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
const rawValue = this.rawValue;
|
|
17
|
-
if (rawValue == null)
|
|
18
|
-
return;
|
|
19
|
-
this.list = Array.isArray(rawValue) ? rawValue.map((c) => this.extractItem(c)) : [this.extractItem(rawValue)];
|
|
20
|
-
}
|
|
21
|
-
extractItem(item) {
|
|
22
|
-
return typeof item == 'object'
|
|
23
|
-
? {
|
|
24
|
-
value: item.value ?? '-',
|
|
25
|
-
label: item.label ?? 'Primary',
|
|
26
|
-
}
|
|
27
|
-
: {
|
|
28
|
-
value: item,
|
|
29
|
-
label: 'Primary',
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEmailWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEmailWidgetViewComponent, isStandalone: true, selector: "ng-component", inputs: { context: "context", value: "value", multiple: "multiple", hasLabel: "hasLabel" }, usesInheritance: true, ngImport: i0, template: `
|
|
34
|
-
<div class="ax-grid ax-grid-cols-12 ax-gap-2 ">
|
|
35
|
-
<ng-container *ngIf="multiple">
|
|
36
|
-
@for(item of list;track item?.value) {
|
|
37
|
-
<ng-template [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ data: item }"></ng-template>
|
|
38
|
-
}
|
|
39
|
-
</ng-container>
|
|
40
|
-
<ng-container *ngIf="!multiple">
|
|
41
|
-
<ng-template [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ data: list[0] }"></ng-template>
|
|
42
|
-
</ng-container>
|
|
43
|
-
<ng-template #itemTemplate let-item="data">
|
|
44
|
-
<ng-container *ngIf="item">
|
|
45
|
-
<div class="ax-col-start-1 ax-col-end-10 lg:ax-col-end-7">
|
|
46
|
-
<div class="ax-flex ax-flex-1 ax-gap-1 lg:ax-gap-3 ax-group ax-items-center ax-w-max">
|
|
47
|
-
<div class="ax-w-6 ax-h-6 ax-flex ax-items-center ax-justify-center">
|
|
48
|
-
<i class="fa-solid ax-text-neutral-400 fa-envelope"></i>
|
|
49
|
-
</div>
|
|
50
|
-
<a class="group-hover:!ax-text-primary-500" href="tel:{{ item.value }}">{{ item.value }}</a>
|
|
51
|
-
<span
|
|
52
|
-
class="ax-text-neutral-400 ax-cursor-pointer ax-invisible group-hover:ax-visible hover:!ax-text-primary-500"
|
|
53
|
-
(click)="clipboard.copy('Email', item.value)"
|
|
54
|
-
>
|
|
55
|
-
<i class="fa-solid fa-copy "></i>
|
|
56
|
-
</span>
|
|
57
|
-
@if(hasLabel){
|
|
58
|
-
<ax-badge color="primary" [look]="'twotone'" [text]="item.label"></ax-badge>
|
|
59
|
-
}
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</ng-container>
|
|
63
|
-
</ng-template>
|
|
64
|
-
</div>
|
|
65
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }] }); }
|
|
66
|
-
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEmailWidgetViewComponent, decorators: [{
|
|
68
|
-
type: Component,
|
|
69
|
-
args: [{
|
|
70
|
-
template: `
|
|
71
|
-
<div class="ax-grid ax-grid-cols-12 ax-gap-2 ">
|
|
72
|
-
<ng-container *ngIf="multiple">
|
|
73
|
-
@for(item of list;track item?.value) {
|
|
74
|
-
<ng-template [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ data: item }"></ng-template>
|
|
75
|
-
}
|
|
76
|
-
</ng-container>
|
|
77
|
-
<ng-container *ngIf="!multiple">
|
|
78
|
-
<ng-template [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ data: list[0] }"></ng-template>
|
|
79
|
-
</ng-container>
|
|
80
|
-
<ng-template #itemTemplate let-item="data">
|
|
81
|
-
<ng-container *ngIf="item">
|
|
82
|
-
<div class="ax-col-start-1 ax-col-end-10 lg:ax-col-end-7">
|
|
83
|
-
<div class="ax-flex ax-flex-1 ax-gap-1 lg:ax-gap-3 ax-group ax-items-center ax-w-max">
|
|
84
|
-
<div class="ax-w-6 ax-h-6 ax-flex ax-items-center ax-justify-center">
|
|
85
|
-
<i class="fa-solid ax-text-neutral-400 fa-envelope"></i>
|
|
86
|
-
</div>
|
|
87
|
-
<a class="group-hover:!ax-text-primary-500" href="tel:{{ item.value }}">{{ item.value }}</a>
|
|
88
|
-
<span
|
|
89
|
-
class="ax-text-neutral-400 ax-cursor-pointer ax-invisible group-hover:ax-visible hover:!ax-text-primary-500"
|
|
90
|
-
(click)="clipboard.copy('Email', item.value)"
|
|
91
|
-
>
|
|
92
|
-
<i class="fa-solid fa-copy "></i>
|
|
93
|
-
</span>
|
|
94
|
-
@if(hasLabel){
|
|
95
|
-
<ax-badge color="primary" [look]="'twotone'" [text]="item.label"></ax-badge>
|
|
96
|
-
}
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
</ng-container>
|
|
100
|
-
</ng-template>
|
|
101
|
-
</div>
|
|
102
|
-
`,
|
|
103
|
-
imports: [CommonModule, AXBadgeModule],
|
|
104
|
-
inputs: ['context', 'value', 'multiple', 'hasLabel']
|
|
105
|
-
}]
|
|
106
|
-
}] });
|
|
107
|
-
|
|
108
|
-
export { AXPEmailWidgetViewComponent };
|
|
109
|
-
//# sourceMappingURL=acorex-platform-common-email-widget-view.component-dMByK5bc.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-common-email-widget-view.component-dMByK5bc.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/email/email-widget-view.component.ts"],"sourcesContent":["import { AXBadgeModule } from '@acorex/components/badge';\nimport { CommonModule } from '@angular/common';\nimport { Component, inject } from '@angular/core';\nimport { AXPWidgetBase } from '../../widget/widget-base';\nimport { AXPClipBoardService } from '../../../utils';\n\n@Component({\n template: `\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-2 \">\n <ng-container *ngIf=\"multiple\">\n @for(item of list;track item?.value) {\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: item }\"></ng-template>\n }\n </ng-container>\n <ng-container *ngIf=\"!multiple\">\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: list[0] }\"></ng-template>\n </ng-container>\n <ng-template #itemTemplate let-item=\"data\">\n <ng-container *ngIf=\"item\">\n <div class=\"ax-col-start-1 ax-col-end-10 lg:ax-col-end-7\">\n <div class=\"ax-flex ax-flex-1 ax-gap-1 lg:ax-gap-3 ax-group ax-items-center ax-w-max\">\n <div class=\"ax-w-6 ax-h-6 ax-flex ax-items-center ax-justify-center\">\n <i class=\"fa-solid ax-text-neutral-400 fa-envelope\"></i>\n </div>\n <a class=\"group-hover:!ax-text-primary-500\" href=\"tel:{{ item.value }}\">{{ item.value }}</a>\n <span\n class=\"ax-text-neutral-400 ax-cursor-pointer ax-invisible group-hover:ax-visible hover:!ax-text-primary-500\"\n (click)=\"clipboard.copy('Email', item.value)\"\n >\n <i class=\"fa-solid fa-copy \"></i>\n </span>\n @if(hasLabel){\n <ax-badge color=\"primary\" [look]=\"'twotone'\" [text]=\"item.label\"></ax-badge>\n }\n </div>\n </div>\n </ng-container>\n </ng-template>\n </div>\n `,\n imports: [CommonModule, AXBadgeModule],\n inputs: ['context', 'value', 'multiple', 'hasLabel']\n})\nexport class AXPEmailWidgetViewComponent extends AXPWidgetBase {\n protected clipboard = inject(AXPClipBoardService);\n protected multiple!: boolean;\n protected hasLabel!: boolean;\n\n protected list: { value: string; label: string }[] = [];\n\n override render() {\n const rawValue = this.rawValue;\n if (rawValue == null) return;\n this.list = Array.isArray(rawValue) ? rawValue.map((c) => this.extractItem(c)) : [this.extractItem(rawValue)];\n }\n\n private extractItem(item: any): any {\n return typeof item == 'object'\n ? {\n value: item.value ?? '-',\n label: item.label ?? 'Primary',\n }\n : {\n value: item,\n label: 'Primary',\n };\n }\n}\n"],"names":["i2"],"mappings":";;;;;;;;AA2CM,MAAO,2BAA4B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