@acorex/platform 18.1.5 → 18.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/index.d.ts +3 -3
- package/common/lib/app/application.types.d.ts +1 -1
- package/common/lib/common.module.d.ts +3 -6
- package/common/lib/data/data-provider.types.d.ts +1 -0
- package/common/lib/data/data.types.d.ts +14 -0
- package/common/lib/data/dexie-storage.service.d.ts +6 -20
- package/common/lib/data/entity-data-seeder.d.ts +12 -0
- package/common/lib/data/entity-storage-service.d.ts +59 -15
- package/common/lib/data/index.d.ts +2 -1
- package/common/lib/layout/menu/index.d.ts +2 -0
- package/common/lib/layout/menu/menu.provider.d.ts +15 -0
- package/common/lib/layout/menu/menu.service.d.ts +12 -0
- package/common/lib/layout/menu/menu.types.d.ts +8 -1
- package/common/lib/schema/widgets/dateTime/dateTime-widget-filter.component.d.ts +2 -0
- package/common/lib/schema/widgets/lookup/lookup-widget-edit.component.d.ts +1 -0
- package/common/lib/settings/settings.service.d.ts +3 -3
- package/common/lib/store/common.actions.d.ts +1 -8
- package/common/lib/store/common.effects.d.ts +3 -6
- package/common/lib/workflows/common.workflow.d.ts +2 -0
- package/core/utils/data-conditioner.d.ts +2 -5
- package/esm2022/common/index.mjs +4 -4
- package/esm2022/common/lib/app/app-startup.service.mjs +3 -3
- package/esm2022/common/lib/app/application.types.mjs +1 -1
- package/esm2022/common/lib/common.module.mjs +38 -31
- package/esm2022/common/lib/data/data-provider.types.mjs +1 -1
- package/esm2022/common/lib/data/data.types.mjs +2 -0
- package/esm2022/common/lib/data/dexie-storage.service.mjs +98 -84
- package/esm2022/common/lib/data/entity-data-seeder.mjs +25 -0
- package/esm2022/common/lib/data/entity-storage-service.mjs +59 -1
- package/esm2022/common/lib/data/index.mjs +3 -2
- package/esm2022/common/lib/layout/menu/index.mjs +3 -1
- package/esm2022/common/lib/layout/menu/menu.provider.mjs +60 -0
- package/esm2022/common/lib/layout/menu/menu.service.mjs +73 -0
- package/esm2022/common/lib/layout/menu/menu.types.mjs +1 -1
- package/esm2022/common/lib/layout/theme/store/admin-layout.reducers.mjs +24 -19
- package/esm2022/common/lib/schema/widgets/avatar/avatar-widget-edit.component.mjs +8 -2
- package/esm2022/common/lib/schema/widgets/common-widget-filter/boolean-widget-filter.component.mjs +2 -2
- package/esm2022/common/lib/schema/widgets/common-widget-filter/number-widget-filter.component.mjs +2 -2
- package/esm2022/common/lib/schema/widgets/common-widget-filter/string-widget-filter.component.mjs +2 -2
- package/esm2022/common/lib/schema/widgets/dateTime/dateTime-widget-filter.component.mjs +27 -5
- package/esm2022/common/lib/schema/widgets/gallery/gallery-widget-edit.component.mjs +3 -3
- package/esm2022/common/lib/schema/widgets/gallery/gallery-widget-view.component.mjs +3 -3
- package/esm2022/common/lib/schema/widgets/lookup/lookup-widget-edit.component.mjs +2 -2
- package/esm2022/common/lib/schema/widgets/lookup/lookup-widget-filter.component.mjs +3 -3
- package/esm2022/common/lib/settings/settings.service.mjs +10 -7
- package/esm2022/common/lib/store/common.actions.mjs +2 -4
- package/esm2022/common/lib/store/common.effects.mjs +8 -9
- package/esm2022/common/lib/workflows/common.workflow.mjs +7 -4
- package/esm2022/core/utils/data-conditioner.mjs +3 -3
- package/esm2022/layout/builder/lib/builder/builder.service.mjs +19 -16
- package/esm2022/layout/builder/lib/builder/widget-catalog.mjs +2 -1
- package/esm2022/layout/builder/lib/builder/widget-container.component.mjs +5 -8
- package/esm2022/layout/builder/lib/builder/widget-renderer.component.directive.mjs +39 -22
- package/esm2022/layout/builder/lib/builder/widget.types.mjs +12 -8
- package/esm2022/layout/designer/index.mjs +3 -1
- package/esm2022/layout/designer/lib/designer/components/board/board.component.mjs +7 -3
- package/esm2022/layout/designer/lib/designer/components/header-menu/header-menu.component.mjs +66 -5
- package/esm2022/layout/designer/lib/designer/components/size-mode/view-size-toolbar.component.mjs +54 -0
- package/esm2022/layout/designer/lib/designer/components/widget-picker/widget-picker.component.mjs +24 -15
- package/esm2022/layout/designer/lib/designer/designer.component.mjs +17 -56
- package/esm2022/layout/designer/lib/designer/shared/designer.service.mjs +27 -5
- package/esm2022/layout/designer/lib/designer/shared/widget-designer-renderer.directive.mjs +1 -1
- package/esm2022/layout/designer/lib/preview/preview-frame.component.mjs +75 -0
- package/esm2022/layout/designer/lib/preview/preview-viewer.component.mjs +58 -0
- package/esm2022/layout/designer/lib/preview/preview.component.mjs +67 -9
- package/esm2022/layout/entity/lib/entity-detail-list.viewmodel.mjs +48 -36
- package/esm2022/layout/entity/lib/entity-master-list.viewmodel.mjs +3 -3
- package/esm2022/layout/entity/lib/entity-master-single.viewmodel.mjs +1 -2
- package/esm2022/layout/entity/lib/entity-registery.service.mjs +5 -5
- package/esm2022/layout/entity/lib/entity.config.mjs +28 -2
- package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.mjs +5 -5
- package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.viewmodel.mjs +2 -2
- package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-view.component.mjs +4 -4
- package/esm2022/layout/entity/lib/widgets/widget-selector/widget-selector-widget.config.mjs +2 -1
- package/esm2022/layout/entity/lib/workflows/create-entity.workflow.mjs +3 -3
- package/esm2022/layout/entity/lib/workflows/delete-entity.workflow.mjs +18 -9
- package/esm2022/layout/entity/lib/workflows/modify-section.workflow.mjs +7 -5
- package/esm2022/layouts/lib/admin/entity-layout/entity-details-view/entity-details-view.component.mjs +3 -3
- package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/components/entity-custom-view/entity-custom-view.component.mjs +1 -1
- package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-conditions/list-view-option-conditions.component.mjs +1 -1
- package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/entity-list-view.component.mjs +3 -3
- package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/list-view.config.mjs +9 -5
- package/esm2022/layouts/lib/admin/entity-layout/workflows/delete-entity.workflow.mjs +2 -2
- package/esm2022/layouts/lib/admin/entity-layout/workflows/modify-entity.workflow.mjs +5 -3
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.mjs +10 -7
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-create-view/entity-master-create-view.component.mjs +2 -2
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.mjs +13 -9
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-modify-view/entity-master-modify-view.component.mjs +3 -3
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.mjs +14 -10
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-single-view/overview/entity-single-overview.component.mjs +1 -1
- package/esm2022/themes/default/lib/layouts/root-layout/components/menu/root-menu.component.mjs +39 -0
- package/esm2022/themes/default/lib/layouts/root-layout/index.mjs +2 -1
- package/esm2022/themes/default/lib/layouts/root-layout/root-layout.component.mjs +13 -31
- package/esm2022/themes/default/lib/layouts/root-layout/root-layout.module.mjs +9 -6
- package/esm2022/themes/shared/index.mjs +1 -5
- package/esm2022/themes/shared/lib/components/theme-slot.component.mjs +87 -88
- package/esm2022/themes/shared/lib/services/theme.service.mjs +20 -13
- package/esm2022/themes/shared/lib/shared.module.mjs +5 -9
- package/esm2022/widgets/lib/properties/editors.props.mjs +2 -2
- package/esm2022/widgets/lib/widgets/advance/gallery/gallery-widget-edit.component.mjs +3 -3
- package/esm2022/widgets/lib/widgets/advance/gallery/gallery-widget-view.component.mjs +3 -3
- package/esm2022/widgets/lib/widgets/advance/qrcode/qrcode-widget-view.component.mjs +4 -4
- package/esm2022/widgets/lib/widgets/editors/color/color-box-widget-column.component.mjs +26 -5
- package/esm2022/widgets/lib/widgets/editors/color/color-box-widget-view.component.mjs +26 -5
- package/esm2022/widgets/lib/widgets/editors/contact/contact-widget-column.component.mjs +18 -4
- package/esm2022/widgets/lib/widgets/editors/contact/contact-widget-edit.component.mjs +7 -10
- package/esm2022/widgets/lib/widgets/editors/contact/contact-widget.config.mjs +2 -6
- package/esm2022/widgets/lib/widgets/editors/date-time/date-time-box-widget-column.component.mjs +27 -9
- package/esm2022/widgets/lib/widgets/editors/date-time/date-time-box-widget-edit.component.mjs +19 -8
- package/esm2022/widgets/lib/widgets/editors/date-time/date-time-box-widget-view.component.mjs +10 -2
- package/esm2022/widgets/lib/widgets/editors/large-text/large-text-widget-edit.component.mjs +1 -1
- package/esm2022/widgets/lib/widgets/editors/large-text/large-text-widget-view.component.mjs +1 -1
- package/esm2022/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.mjs +18 -20
- package/esm2022/widgets/lib/widgets/editors/select/select-box-widget-edit.component.mjs +3 -2
- package/esm2022/widgets/lib/widgets/editors/select/select-box-widget-view.component.mjs +15 -19
- package/esm2022/widgets/lib/widgets/editors/select/select-box-widget.config.mjs +4 -2
- package/esm2022/widgets/lib/widgets/index.mjs +2 -1
- package/esm2022/widgets/lib/widgets/layout/block/block-widget-view.component.mjs +36 -15
- package/esm2022/widgets/lib/widgets/layout/grid/grid-widget-designer.component.mjs +2 -2
- package/esm2022/widgets/lib/widgets/layout/repeater/repeater-widget-edit.component.mjs +42 -10
- package/esm2022/widgets/lib/widgets/layout/template/index.mjs +5 -0
- package/esm2022/widgets/lib/widgets/layout/template/template-widget-designer.component.mjs +70 -0
- package/esm2022/widgets/lib/widgets/layout/template/template-widget-edit.component.mjs +55 -0
- package/esm2022/widgets/lib/widgets/layout/template/template-widget-view.component.mjs +42 -0
- package/esm2022/widgets/lib/widgets/layout/template/template-widget.config.mjs +30 -0
- package/esm2022/widgets/lib/widgets/layout/template/template.provider.mjs +41 -0
- package/esm2022/widgets/lib/widgets.module.mjs +4 -1
- package/fesm2022/{acorex-platform-common-avatar-widget-edit.component-CSSz-dqg.mjs → acorex-platform-common-avatar-widget-edit.component-D4k52w2k.mjs} +16 -7
- package/fesm2022/acorex-platform-common-avatar-widget-edit.component-D4k52w2k.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-avatar-widget-view.component-WofmamJK.mjs → acorex-platform-common-avatar-widget-view.component-Bbg1imZG.mjs} +9 -6
- package/fesm2022/acorex-platform-common-avatar-widget-view.component-Bbg1imZG.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-boolean-widget-filter.component-ByoMpVAs.mjs → acorex-platform-common-boolean-widget-filter.component-CRFI7vNR.mjs} +9 -7
- package/fesm2022/acorex-platform-common-boolean-widget-filter.component-CRFI7vNR.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-checkbox-widget-column.component-BAK1Wlh_.mjs → acorex-platform-common-checkbox-widget-column.component-BCUcZiP_.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-checkbox-widget-column.component-BAK1Wlh_.mjs.map → acorex-platform-common-checkbox-widget-column.component-BCUcZiP_.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-checkbox-widget-edit.component-C1PgHZsE.mjs → acorex-platform-common-checkbox-widget-edit.component-GgWLpxV0.mjs} +9 -6
- package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-GgWLpxV0.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-checkbox-widget-view.component-B4BG4mCQ.mjs → acorex-platform-common-checkbox-widget-view.component-KuRnDGoQ.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-checkbox-widget-view.component-B4BG4mCQ.mjs.map → acorex-platform-common-checkbox-widget-view.component-KuRnDGoQ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-dateTime-widget-column.component-BnW8m1wn.mjs → acorex-platform-common-dateTime-widget-column.component-DaXNK6e2.mjs} +9 -6
- package/fesm2022/acorex-platform-common-dateTime-widget-column.component-DaXNK6e2.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-dateTime-widget-edit.component-DCYX2iyT.mjs → acorex-platform-common-dateTime-widget-edit.component-XOReyHZ-.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-dateTime-widget-edit.component-DCYX2iyT.mjs.map → acorex-platform-common-dateTime-widget-edit.component-XOReyHZ-.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-dateTime-widget-filter.component-Dbxz84tm.mjs → acorex-platform-common-dateTime-widget-filter.component-3PJx2C6G.mjs} +34 -10
- package/fesm2022/acorex-platform-common-dateTime-widget-filter.component-3PJx2C6G.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-dateTime-widget-view.component-Bg1h8xAj.mjs → acorex-platform-common-dateTime-widget-view.component-BWTedYCf.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-dateTime-widget-view.component-Bg1h8xAj.mjs.map → acorex-platform-common-dateTime-widget-view.component-BWTedYCf.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-email-widget-column.component-BqRR2jW9.mjs → acorex-platform-common-email-widget-column.component-MySWR3RG.mjs} +9 -6
- package/fesm2022/acorex-platform-common-email-widget-column.component-MySWR3RG.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-email-widget-edit.component-C7oCyByG.mjs → acorex-platform-common-email-widget-edit.component-DzqW3Ay6.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-email-widget-edit.component-C7oCyByG.mjs.map → acorex-platform-common-email-widget-edit.component-DzqW3Ay6.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-email-widget-view.component-hfVZnW_L.mjs → acorex-platform-common-email-widget-view.component-ikN6SIj0.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-email-widget-view.component-hfVZnW_L.mjs.map → acorex-platform-common-email-widget-view.component-ikN6SIj0.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-file-widget-column.component-Dt2mR6hJ.mjs → acorex-platform-common-file-widget-column.component-GtbElxmS.mjs} +8 -5
- package/fesm2022/acorex-platform-common-file-widget-column.component-GtbElxmS.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-file-widget-edit.component-DQol3UN8.mjs → acorex-platform-common-file-widget-edit.component-CPSsJviw.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-file-widget-edit.component-DQol3UN8.mjs.map → acorex-platform-common-file-widget-edit.component-CPSsJviw.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-file-widget-filter.component-CGd1mY-z.mjs → acorex-platform-common-file-widget-filter.component-D-_WnxlE.mjs} +9 -6
- package/fesm2022/acorex-platform-common-file-widget-filter.component-D-_WnxlE.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-file-widget-view.component-lKWnGSSb.mjs → acorex-platform-common-file-widget-view.component-BU8iWCVR.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-file-widget-view.component-lKWnGSSb.mjs.map → acorex-platform-common-file-widget-view.component-BU8iWCVR.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-gallery-widget-edit.component-DgjY3ZWk.mjs → acorex-platform-common-gallery-widget-edit.component-DMu9OW45.mjs} +10 -7
- package/fesm2022/{acorex-platform-common-gallery-widget-edit.component-DgjY3ZWk.mjs.map → acorex-platform-common-gallery-widget-edit.component-DMu9OW45.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-gallery-widget-filter.component-CUw4kxTW.mjs → acorex-platform-common-gallery-widget-filter.component-BNYgn0eK.mjs} +9 -6
- package/fesm2022/acorex-platform-common-gallery-widget-filter.component-BNYgn0eK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-gallery-widget-view.component-DK52JTds.mjs → acorex-platform-common-gallery-widget-view.component-D52gjNcJ.mjs} +10 -7
- package/fesm2022/{acorex-platform-common-gallery-widget-view.component-DK52JTds.mjs.map → acorex-platform-common-gallery-widget-view.component-D52gjNcJ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-largetext-widget-edit.component-7bbHUOnp.mjs → acorex-platform-common-largetext-widget-edit.component-B7Hq-1ny.mjs} +9 -6
- package/fesm2022/acorex-platform-common-largetext-widget-edit.component-B7Hq-1ny.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-lookup-widget-column.component-PGf5qjC4.mjs → acorex-platform-common-lookup-widget-column.component-2ccF27nN.mjs} +9 -6
- package/fesm2022/acorex-platform-common-lookup-widget-column.component-2ccF27nN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-lookup-widget-edit.component-CGZf6rH2.mjs → acorex-platform-common-lookup-widget-edit.component-Cn3yALld.mjs} +10 -7
- package/fesm2022/acorex-platform-common-lookup-widget-edit.component-Cn3yALld.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-lookup-widget-filter.component-CUBdIuu9.mjs → acorex-platform-common-lookup-widget-filter.component-NY-w7EgD.mjs} +10 -8
- package/fesm2022/acorex-platform-common-lookup-widget-filter.component-NY-w7EgD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-lookup-widget-view.component-dmGctRc9.mjs → acorex-platform-common-lookup-widget-view.component-DjbS0xsx.mjs} +9 -6
- package/fesm2022/acorex-platform-common-lookup-widget-view.component-DjbS0xsx.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-map-widget-edit.component-Cyi6AF9u.mjs → acorex-platform-common-map-widget-edit.component-CHyEencO.mjs} +9 -6
- package/fesm2022/acorex-platform-common-map-widget-edit.component-CHyEencO.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-map-widget-view.component-Cbl1KClC.mjs → acorex-platform-common-map-widget-view.component-BMK6QTKt.mjs} +9 -6
- package/fesm2022/acorex-platform-common-map-widget-view.component-BMK6QTKt.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-messenger-widget-column.component-BGiTw0jL.mjs → acorex-platform-common-messenger-widget-column.component-iVdgR19k.mjs} +9 -6
- package/fesm2022/acorex-platform-common-messenger-widget-column.component-iVdgR19k.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-messenger-widget-edit.component-BBSmai_5.mjs → acorex-platform-common-messenger-widget-edit.component-BicSI2_5.mjs} +9 -6
- package/fesm2022/acorex-platform-common-messenger-widget-edit.component-BicSI2_5.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-messenger-widget-view.component-C15KdEZ6.mjs → acorex-platform-common-messenger-widget-view.component-DlSSOqrz.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-messenger-widget-view.component-C15KdEZ6.mjs.map → acorex-platform-common-messenger-widget-view.component-DlSSOqrz.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-number-widget-edit.component-CGmS-gd7.mjs → acorex-platform-common-number-widget-edit.component-DlLjt4OQ.mjs} +9 -6
- package/fesm2022/acorex-platform-common-number-widget-edit.component-DlLjt4OQ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-number-widget-filter.component-8RC01k_0.mjs → acorex-platform-common-number-widget-filter.component-DPZQomNX.mjs} +10 -7
- package/fesm2022/acorex-platform-common-number-widget-filter.component-DPZQomNX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-number-widget-view.component-DGPcZ-yE.mjs → acorex-platform-common-number-widget-view.component-BW1ftaLk.mjs} +9 -6
- package/fesm2022/acorex-platform-common-number-widget-view.component-BW1ftaLk.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-password-widget-column.component-O3L2DvZq.mjs → acorex-platform-common-password-widget-column.component-BZEavb7p.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-password-widget-column.component-O3L2DvZq.mjs.map → acorex-platform-common-password-widget-column.component-BZEavb7p.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-password-widget-edit.component-DZz6rAL3.mjs → acorex-platform-common-password-widget-edit.component-De5r-L4i.mjs} +9 -6
- package/fesm2022/acorex-platform-common-password-widget-edit.component-De5r-L4i.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-password-widget-view.component-OxinnOs8.mjs → acorex-platform-common-password-widget-view.component-Dw4xxdOT.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-password-widget-view.component-OxinnOs8.mjs.map → acorex-platform-common-password-widget-view.component-Dw4xxdOT.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-phone-widget-column.component-D9AXNMVq.mjs → acorex-platform-common-phone-widget-column.component-BTbtfPty.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-phone-widget-column.component-D9AXNMVq.mjs.map → acorex-platform-common-phone-widget-column.component-BTbtfPty.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-phone-widget-edit.component-CKvODAMQ.mjs → acorex-platform-common-phone-widget-edit.component-Ay4y8j_t.mjs} +8 -6
- package/fesm2022/{acorex-platform-common-phone-widget-edit.component-CKvODAMQ.mjs.map → acorex-platform-common-phone-widget-edit.component-Ay4y8j_t.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-phone-widget-view.component-Cx-SrpUs.mjs → acorex-platform-common-phone-widget-view.component-D4WqjjBP.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-phone-widget-view.component-Cx-SrpUs.mjs.map → acorex-platform-common-phone-widget-view.component-D4WqjjBP.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-rich-text-widget-column.component-C7IqYbqM.mjs → acorex-platform-common-rich-text-widget-column.component-B5rev2NB.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-rich-text-widget-column.component-C7IqYbqM.mjs.map → acorex-platform-common-rich-text-widget-column.component-B5rev2NB.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-rich-text-widget-edit.component-DtEcLWte.mjs → acorex-platform-common-rich-text-widget-edit.component-BHBRQKhj.mjs} +9 -6
- package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-BHBRQKhj.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-rich-text-widget-view.component-DI4I6wII.mjs → acorex-platform-common-rich-text-widget-view.component-0bIoY7Ws.mjs} +9 -6
- package/fesm2022/acorex-platform-common-rich-text-widget-view.component-0bIoY7Ws.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-selection-list-widget-column.component-CHDTopqW.mjs → acorex-platform-common-selection-list-widget-column.component-CzJWP4YT.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-selection-list-widget-column.component-CHDTopqW.mjs.map → acorex-platform-common-selection-list-widget-column.component-CzJWP4YT.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-selection-list-widget-edit.component-Ds7Pc22g.mjs → acorex-platform-common-selection-list-widget-edit.component-DhYa6y65.mjs} +9 -6
- package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-DhYa6y65.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-selection-list-widget-filter.component-D7h2tUqB.mjs → acorex-platform-common-selection-list-widget-filter.component-B344MeXJ.mjs} +8 -6
- package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-B344MeXJ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-selection-list-widget-view.component-DGuotR-q.mjs → acorex-platform-common-selection-list-widget-view.component-Czk5DzgK.mjs} +9 -6
- package/fesm2022/acorex-platform-common-selection-list-widget-view.component-Czk5DzgK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-signature-pad-widget-edit.component-DPr0hCtB.mjs → acorex-platform-common-signature-pad-widget-edit.component-YSGjL25D.mjs} +8 -5
- package/fesm2022/{acorex-platform-common-signature-pad-widget-edit.component-DPr0hCtB.mjs.map → acorex-platform-common-signature-pad-widget-edit.component-YSGjL25D.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-signature-pad-widget-view.component-CdqZ17tU.mjs → acorex-platform-common-signature-pad-widget-view.component-D64btt99.mjs} +9 -6
- package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-D64btt99.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-string-widget-filter.component-Ctde9CDD.mjs → acorex-platform-common-string-widget-filter.component-5wb1x5Fa.mjs} +10 -7
- package/fesm2022/acorex-platform-common-string-widget-filter.component-5wb1x5Fa.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-text-widget-column.component-BHd_WWKq.mjs → acorex-platform-common-text-widget-column.component-U-V3HD2V.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-text-widget-column.component-BHd_WWKq.mjs.map → acorex-platform-common-text-widget-column.component-U-V3HD2V.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-text-widget-edit.component-BwfelIOW.mjs → acorex-platform-common-text-widget-edit.component-BCs13zUr.mjs} +9 -6
- package/fesm2022/acorex-platform-common-text-widget-edit.component-BCs13zUr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-text-widget-view.component-SHWXqKZS.mjs → acorex-platform-common-text-widget-view.component-V1RkKuNZ.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-text-widget-view.component-SHWXqKZS.mjs.map → acorex-platform-common-text-widget-view.component-V1RkKuNZ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-toggle-widget-column.component-Dc_Ahdvn.mjs → acorex-platform-common-toggle-widget-column.component-FqKLeAhY.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-toggle-widget-column.component-Dc_Ahdvn.mjs.map → acorex-platform-common-toggle-widget-column.component-FqKLeAhY.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-common-toggle-widget-edit.component-BnPyXdAA.mjs → acorex-platform-common-toggle-widget-edit.component-DKSnFdTQ.mjs} +9 -6
- package/fesm2022/acorex-platform-common-toggle-widget-edit.component-DKSnFdTQ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-common-toggle-widget-view.component-D14GMwWe.mjs → acorex-platform-common-toggle-widget-view.component-BOYPRUCt.mjs} +9 -6
- package/fesm2022/{acorex-platform-common-toggle-widget-view.component-D14GMwWe.mjs.map → acorex-platform-common-toggle-widget-view.component-BOYPRUCt.mjs.map} +1 -1
- package/fesm2022/acorex-platform-common.mjs +2300 -2094
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +2 -2
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +67 -45
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +365 -67
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +103 -57
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layouts.mjs +16 -11
- package/fesm2022/acorex-platform-layouts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-Q8eTfAVx.mjs → acorex-platform-themes-default-entity-master-create-view.component-BJ7inoTB.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BJ7inoTB.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CNXG0nP4.mjs → acorex-platform-themes-default-entity-master-list-view.component-BGKWaCth.mjs} +22 -18
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BGKWaCth.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-BijYXMme.mjs → acorex-platform-themes-default-entity-master-modify-view.component-B3phYOIw.mjs} +5 -5
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-B3phYOIw.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-Bnrabotu.mjs → acorex-platform-themes-default-entity-master-single-view.component-BO_lAQc_.mjs} +20 -15
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BO_lAQc_.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +75 -57
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +111 -570
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-DzGg-uFi.mjs → acorex-platform-widgets-checkbox-widget-designer.component-e9O9qFIf.mjs} +4 -4
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-DzGg-uFi.mjs.map → acorex-platform-widgets-checkbox-widget-designer.component-e9O9qFIf.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-DIvi0BtT.mjs → acorex-platform-widgets-color-box-widget-designer.component-Brsun0id.mjs} +4 -4
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-Brsun0id.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-template-widget-edit.component-gvAh-gH1.mjs +96 -0
- package/fesm2022/acorex-platform-widgets-template-widget-edit.component-gvAh-gH1.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +478 -169
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/builder.service.d.ts +2 -0
- package/layout/builder/lib/builder/widget-container.component.d.ts +2 -2
- package/layout/builder/lib/builder/widget-renderer.component.directive.d.ts +1 -1
- package/layout/builder/lib/builder/widget.types.d.ts +5 -2
- package/layout/designer/index.d.ts +2 -0
- package/layout/designer/lib/designer/components/board/board.component.d.ts +1 -0
- package/layout/designer/lib/designer/components/header-menu/header-menu.component.d.ts +1 -0
- package/layout/designer/lib/designer/components/size-mode/view-size-toolbar.component.d.ts +6 -0
- package/layout/designer/lib/designer/components/widget-picker/widget-picker.component.d.ts +1 -1
- package/layout/designer/lib/designer/designer.component.d.ts +1 -1
- package/layout/designer/lib/designer/shared/designer.service.d.ts +6 -1
- package/layout/designer/lib/preview/preview-frame.component.d.ts +8 -0
- package/layout/designer/lib/preview/preview-viewer.component.d.ts +14 -0
- package/layout/designer/lib/preview/preview.component.d.ts +17 -3
- package/layout/entity/lib/entity-detail-list.viewmodel.d.ts +4 -4
- package/layout/entity/lib/entity-master-create.viewmodel.d.ts +1 -1
- package/layout/entity/lib/entity-master-single.viewmodel.d.ts +1 -5
- package/layout/entity/lib/entity-master-update.viewmodel.d.ts +1 -1
- package/layout/entity/lib/entity-registery.service.d.ts +1 -1
- package/layout/entity/lib/entity.config.d.ts +7 -0
- package/layout/entity/lib/entity.viewmodel.d.ts +1 -1
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +2 -1
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-view.component.d.ts +2 -1
- package/layout/entity/lib/workflows/delete-entity.workflow.d.ts +1 -0
- package/layout/entity/lib/workflows/modify-section.workflow.d.ts +1 -0
- package/layouts/lib/admin/entity-layout/workflows/modify-entity.workflow.d.ts +1 -0
- package/package.json +7 -7
- package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +1 -1
- package/themes/default/lib/layouts/root-layout/components/menu/root-menu.component.d.ts +22 -0
- package/themes/default/lib/layouts/root-layout/index.d.ts +1 -0
- package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +0 -4
- package/themes/default/lib/layouts/root-layout/root-layout.module.d.ts +17 -16
- package/themes/shared/index.d.ts +0 -4
- package/themes/shared/lib/components/theme-slot.component.d.ts +1 -1
- package/themes/shared/lib/services/theme.service.d.ts +1 -1
- package/themes/shared/lib/shared.module.d.ts +0 -1
- package/widgets/lib/widgets/advance/qrcode/qrcode-widget-view.component.d.ts +1 -1
- package/widgets/lib/widgets/editors/color/color-box-widget-column.component.d.ts +3 -0
- package/widgets/lib/widgets/editors/color/color-box-widget-view.component.d.ts +3 -0
- package/widgets/lib/widgets/editors/contact/contact-widget-column.component.d.ts +2 -0
- package/widgets/lib/widgets/editors/contact/contact-widget-edit.component.d.ts +1 -1
- package/widgets/lib/widgets/editors/contact/contact-widget-view.component.d.ts +1 -1
- package/widgets/lib/widgets/editors/date-time/date-time-box-widget-column.component.d.ts +4 -1
- package/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.d.ts +5 -5
- package/widgets/lib/widgets/index.d.ts +1 -0
- package/widgets/lib/widgets/layout/block/block-widget-view.component.d.ts +4 -2
- package/widgets/lib/widgets/layout/repeater/repeater-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/layout/template/index.d.ts +4 -0
- package/widgets/lib/widgets/layout/template/template-widget-designer.component.d.ts +11 -0
- package/widgets/lib/widgets/layout/template/template-widget-edit.component.d.ts +10 -0
- package/widgets/lib/widgets/layout/template/template-widget-view.component.d.ts +10 -0
- package/widgets/lib/widgets/layout/template/template-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/layout/template/template.provider.d.ts +21 -0
- package/common/lib/data/entity-data-provider.d.ts +0 -14
- package/esm2022/common/lib/data/entity-data-provider.mjs +0 -26
- package/esm2022/themes/shared/lib/comments/comment-list-view.component.mjs +0 -421
- package/esm2022/themes/shared/lib/comments/comment-lookup-popup.component.mjs +0 -56
- package/esm2022/themes/shared/lib/comments/comments.service.mjs +0 -3
- package/esm2022/themes/shared/lib/comments/comments.type.mjs +0 -2
- package/fesm2022/acorex-platform-common-avatar-widget-edit.component-CSSz-dqg.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-avatar-widget-view.component-WofmamJK.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-boolean-widget-filter.component-ByoMpVAs.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-C1PgHZsE.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-dateTime-widget-column.component-BnW8m1wn.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-dateTime-widget-filter.component-Dbxz84tm.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-email-widget-column.component-BqRR2jW9.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-file-widget-column.component-Dt2mR6hJ.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-file-widget-filter.component-CGd1mY-z.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-gallery-widget-filter.component-CUw4kxTW.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-largetext-widget-edit.component-7bbHUOnp.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-column.component-PGf5qjC4.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-edit.component-CGZf6rH2.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-filter.component-CUBdIuu9.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-lookup-widget-view.component-dmGctRc9.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-map-widget-edit.component-Cyi6AF9u.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-map-widget-view.component-Cbl1KClC.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-messenger-widget-column.component-BGiTw0jL.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-messenger-widget-edit.component-BBSmai_5.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-number-widget-edit.component-CGmS-gd7.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-number-widget-filter.component-8RC01k_0.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-number-widget-view.component-DGPcZ-yE.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-password-widget-edit.component-DZz6rAL3.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-DtEcLWte.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-rich-text-widget-view.component-DI4I6wII.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-Ds7Pc22g.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-D7h2tUqB.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-selection-list-widget-view.component-DGuotR-q.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-CdqZ17tU.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-string-widget-filter.component-Ctde9CDD.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-text-widget-edit.component-BwfelIOW.mjs.map +0 -1
- package/fesm2022/acorex-platform-common-toggle-widget-edit.component-BnPyXdAA.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-designer-preview.component-CaRHf4x_.mjs +0 -23
- package/fesm2022/acorex-platform-layout-designer-preview.component-CaRHf4x_.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Q8eTfAVx.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CNXG0nP4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BijYXMme.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Bnrabotu.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-DIvi0BtT.mjs.map +0 -1
- package/themes/shared/lib/comments/comment-list-view.component.d.ts +0 -61
- package/themes/shared/lib/comments/comment-lookup-popup.component.d.ts +0 -10
- package/themes/shared/lib/comments/comments.service.d.ts +0 -8
- package/themes/shared/lib/comments/comments.type.d.ts +0 -70
|
@@ -112,7 +112,7 @@ function applyCondition(item, condition) {
|
|
|
112
112
|
result = includes(valueToCompare, conditionValue);
|
|
113
113
|
}
|
|
114
114
|
else if (Array.isArray(valueToCompare)) {
|
|
115
|
-
result = includes(valueToCompare.map(val => val.toString().toLowerCase()), conditionValue);
|
|
115
|
+
result = includes(valueToCompare.map((val) => val.toString().toLowerCase()), conditionValue);
|
|
116
116
|
}
|
|
117
117
|
else {
|
|
118
118
|
result = false;
|
|
@@ -125,7 +125,7 @@ function applyCondition(item, condition) {
|
|
|
125
125
|
result = !includes(valueToCompare, conditionValue);
|
|
126
126
|
}
|
|
127
127
|
else if (Array.isArray(valueToCompare)) {
|
|
128
|
-
result = !includes(valueToCompare.map(val => val.toString().toLowerCase()), conditionValue);
|
|
128
|
+
result = !includes(valueToCompare.map((val) => val.toString().toLowerCase()), conditionValue);
|
|
129
129
|
}
|
|
130
130
|
else {
|
|
131
131
|
result = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-core.mjs","sources":["../../../../libs/platform/core/src/lib/types.ts","../../../../libs/platform/core/src/utils/countdown-timer.ts","../../../../libs/platform/core/src/utils/data-conditioner.ts","../../../../libs/platform/core/src/utils/html-utils.ts","../../../../libs/platform/core/src/acorex-platform-core.ts"],"sourcesContent":["export type AXPPartialNested<T> = {\n [K in keyof T]?: T[K] extends object ? AXPPartialNested<T[K]> : T[K];\n};\n\nexport type AXPMetaData = Record<string, any>;\n\nexport type AXPOptionsData = Record<string, any>;\n\nexport type AXPValidationRule = { rule: string; message?: string; options?: any; disabled?: boolean };\n\nexport type AXPValidationRules = AXPValidationRule[];\n\n\nexport function getNestedKeys(obj: any, prefix: string = ''): string[] {\n let keys: string[] = [];\n for (const key in obj) {\n if (typeof obj[key] === 'object' && obj[key] !== null && !Array.isArray(obj[key])) {\n keys = [...keys, ...getNestedKeys(obj[key], prefix + key + '.')];\n } else {\n keys.push(prefix + key);\n }\n }\n return keys;\n}","import { AXCalendarService } from '@acorex/core/date-time';\nimport { inject, Pipe, PipeTransform, signal } from '@angular/core';\nimport { interval, Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\n\n@Pipe({\n name: 'countdown',\n pure: false,\n standalone: true,\n})\nexport class AXPCountdownPipe implements PipeTransform {\n private calendarService = inject(AXCalendarService);\n\n private countdownSignal = signal(this.setupTimer());\n\n private targetDate: number = 0;\n private prevValue = 0;\n\n transform(value: number): Observable<string> {\n if (this.prevValue != value) {\n this.prevValue = value;\n const expireTime = this.calendarService.calendar.add(new Date(), 'second', value).date;\n this.updateTargetDate(expireTime.toISOString());\n }\n return this.countdownSignal();\n }\n\n private setupTimer() {\n return interval(1000).pipe(\n startWith(0),\n map(() => {\n const diff = this.targetDate - new Date().getTime();\n if (diff < 0) {\n return \"Time's up!\";\n }\n\n const times = [86400, 3600, 60, 1].map((seconds) => Math.floor((diff / 1000 / seconds) % (seconds === 1 ? 60 : 24)));\n const labels = ['d', 'h', 'm', 's'];\n return times\n .map((t, i) => (t > 0 || i === 3 ? `${t}${labels[i]}` : ''))\n .join(' ')\n .trim();\n })\n );\n }\n\n private updateTargetDate(value: string) {\n this.targetDate = new Date(value).getTime();\n }\n}\n","import { AXDataSourceFilterOption } from '@acorex/components/common';\nimport { endsWith, get, gt, gte, includes, isEmpty, isEqual, isNil, lt, lte, orderBy, startsWith } from 'lodash-es';\n\nconst loggingEnabled = false; // Set to true to enable logging, false to disable\n\nfunction applyCondition(item: any, condition: any) {\n const rawValue = condition.field ? get(item, condition.field) : null;\n const itemValue = typeof rawValue === 'string' ? rawValue.toLowerCase() : rawValue;\n const conditionValue = typeof condition.value === 'string' ? condition.value.toLowerCase() : condition.value;\n\n // Conditional Logging for debugging\n if (loggingEnabled) {\n console.log('Condition:', condition);\n console.log('Item Value:', itemValue);\n console.log('Condition Value:', conditionValue);\n }\n\n let result: boolean;\n const valueToCompare = isNil(condition.field) || condition.field === '' ? conditionValue : itemValue;\n\n switch (condition.operator.type) {\n case 'equal':\n result = isEqual(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Equal check result:', result);\n break;\n case 'notEqual':\n result = !isEqual(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Not equal check result:', result);\n break;\n case 'greaterThan':\n result = gt(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Greater than check result:', result);\n break;\n case 'lessThan':\n result = lt(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Less than check result:', result);\n break;\n case 'greaterThanOrEqual':\n result = gte(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Greater than or equal check result:', result);\n break;\n case 'lessThanOrEqual':\n result = lte(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Less than or equal check result:', result);\n break;\n case 'contains':\n if (typeof valueToCompare === 'string') {\n result = includes(valueToCompare, conditionValue);\n } else if (Array.isArray(valueToCompare)) {\n result = includes(valueToCompare.map(val => val.toString().toLowerCase()), conditionValue);\n } else {\n result = false;\n }\n if (loggingEnabled) console.log('Contains check result:', result);\n break;\n case 'notContains':\n if (typeof valueToCompare === 'string') {\n result = !includes(valueToCompare, conditionValue);\n } else if (Array.isArray(valueToCompare)) {\n result = !includes(valueToCompare.map(val => val.toString().toLowerCase()), conditionValue);\n } else {\n result = false;\n }\n if (loggingEnabled) console.log('Not contains check result:', result);\n break;\n case 'startsWith':\n result = typeof valueToCompare === 'string' && startsWith(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Starts with check result:', result);\n break;\n case 'endsWith':\n result = typeof valueToCompare === 'string' && endsWith(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Ends with check result:', result);\n break;\n case 'isEmpty':\n result = isEmpty(valueToCompare);\n if (loggingEnabled) console.log('Is empty check result:', result);\n break;\n case 'isNull':\n result = isNil(valueToCompare);\n if (loggingEnabled) console.log('Is null check result:', result);\n break;\n case 'isNotEmpty':\n result = !isEmpty(valueToCompare);\n if (loggingEnabled) console.log('Is not empty check result:', result);\n break;\n case 'between':\n result = !isNil(valueToCompare) && valueToCompare >= condition.value.from && valueToCompare <= condition.value.to;\n if (loggingEnabled) console.log('Between check result:', result);\n break;\n default:\n result = true;\n if (loggingEnabled) console.log('Default case, returning true');\n }\n\n return result;\n}\n\n\n\n\nexport function applyFilterArray(\n dataArray: any[],\n filters?: AXDataSourceFilterOption[],\n logic: 'and' | 'or' = 'and'\n): any[] {\n if (filters && filters.length) {\n return dataArray.filter((item) => {\n if (logic === 'and') {\n return filters.every((f) => {\n return f.filters ? applyFilterArray([item], f.filters, f.logic).length > 0 : applyCondition(item, f);\n });\n } else {\n // logic === 'or'\n return filters.some((f) => {\n return f.filters ? applyFilterArray([item], f.filters, f.logic).length > 0 : applyCondition(item, f);\n });\n }\n });\n } else {\n return dataArray;\n }\n}\n\n\nexport function applySortArray(dataArray: any, sorts: { field: string; dir: 'asc' | 'desc' }[]) {\n if (sorts && sorts.length > 0) {\n const sortFields = sorts.map((s) => s.field);\n const sortOrders = sorts.map((s) => s.dir);\n return orderBy(dataArray, sortFields, sortOrders);\n } else return dataArray;\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPHtmlUtils {\n private sanitizer = inject(DomSanitizer);\n getTextFromHTML(html: string | undefined | null): string {\n if (!html) return '';\n const tempElement = document.createElement('div');\n tempElement.innerHTML = html;\n return tempElement.innerText || tempElement.textContent || '';\n }\n getSafeHTMLfromHTML(html: string | undefined | null): SafeHtml | null {\n if (!html) return null;\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;SAagB,aAAa,CAAC,GAAQ,EAAE,SAAiB,EAAE,EAAA;IACvD,IAAI,IAAI,GAAa,EAAE;AACvB,IAAA,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;QACnB,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;YAC/E,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;;aAC7D;AACH,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;;;AAG/B,IAAA,OAAO,IAAI;AACf;;MCba,gBAAgB,CAAA;AAL7B,IAAA,WAAA,GAAA;AAMU,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAE3C,IAAe,CAAA,eAAA,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;QAE3C,IAAU,CAAA,UAAA,GAAW,CAAC;QACtB,IAAS,CAAA,SAAA,GAAG,CAAC;AAiCtB;AA/BC,IAAA,SAAS,CAAC,KAAa,EAAA;AACrB,QAAA,IAAI,IAAI,CAAC,SAAS,IAAI,KAAK,EAAE;AAC3B,YAAA,IAAI,CAAC,SAAS,GAAG,KAAK;YACtB,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,IAAI;YACtF,IAAI,CAAC,gBAAgB,CAAC,UAAU,CA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uB,CAAC,IAAI,CAAC;;8GAV1C,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;;2FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACHlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-core.mjs","sources":["../../../../libs/platform/core/src/lib/types.ts","../../../../libs/platform/core/src/utils/countdown-timer.ts","../../../../libs/platform/core/src/utils/data-conditioner.ts","../../../../libs/platform/core/src/utils/html-utils.ts","../../../../libs/platform/core/src/acorex-platform-core.ts"],"sourcesContent":["export type AXPPartialNested<T> = {\n [K in keyof T]?: T[K] extends object ? AXPPartialNested<T[K]> : T[K];\n};\n\nexport type AXPMetaData = Record<string, any>;\n\nexport type AXPOptionsData = Record<string, any>;\n\nexport type AXPValidationRule = { rule: string; message?: string; options?: any; disabled?: boolean };\n\nexport type AXPValidationRules = AXPValidationRule[];\n\n\nexport function getNestedKeys(obj: any, prefix: string = ''): string[] {\n let keys: string[] = [];\n for (const key in obj) {\n if (typeof obj[key] === 'object' && obj[key] !== null && !Array.isArray(obj[key])) {\n keys = [...keys, ...getNestedKeys(obj[key], prefix + key + '.')];\n } else {\n keys.push(prefix + key);\n }\n }\n return keys;\n}","import { AXCalendarService } from '@acorex/core/date-time';\nimport { inject, Pipe, PipeTransform, signal } from '@angular/core';\nimport { interval, Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\n\n@Pipe({\n name: 'countdown',\n pure: false,\n standalone: true,\n})\nexport class AXPCountdownPipe implements PipeTransform {\n private calendarService = inject(AXCalendarService);\n\n private countdownSignal = signal(this.setupTimer());\n\n private targetDate: number = 0;\n private prevValue = 0;\n\n transform(value: number): Observable<string> {\n if (this.prevValue != value) {\n this.prevValue = value;\n const expireTime = this.calendarService.calendar.add(new Date(), 'second', value).date;\n this.updateTargetDate(expireTime.toISOString());\n }\n return this.countdownSignal();\n }\n\n private setupTimer() {\n return interval(1000).pipe(\n startWith(0),\n map(() => {\n const diff = this.targetDate - new Date().getTime();\n if (diff < 0) {\n return \"Time's up!\";\n }\n\n const times = [86400, 3600, 60, 1].map((seconds) => Math.floor((diff / 1000 / seconds) % (seconds === 1 ? 60 : 24)));\n const labels = ['d', 'h', 'm', 's'];\n return times\n .map((t, i) => (t > 0 || i === 3 ? `${t}${labels[i]}` : ''))\n .join(' ')\n .trim();\n })\n );\n }\n\n private updateTargetDate(value: string) {\n this.targetDate = new Date(value).getTime();\n }\n}\n","import { AXDataSourceFilterOption, AXDataSourceSortOption } from '@acorex/components/common';\nimport { endsWith, get, gt, gte, includes, isEmpty, isEqual, isNil, lt, lte, orderBy, startsWith } from 'lodash-es';\n\nconst loggingEnabled = false; // Set to true to enable logging, false to disable\n\nfunction applyCondition(item: any, condition: any) {\n const rawValue = condition.field ? get(item, condition.field) : null;\n const itemValue = typeof rawValue === 'string' ? rawValue.toLowerCase() : rawValue;\n const conditionValue = typeof condition.value === 'string' ? condition.value.toLowerCase() : condition.value;\n\n // Conditional Logging for debugging\n if (loggingEnabled) {\n console.log('Condition:', condition);\n console.log('Item Value:', itemValue);\n console.log('Condition Value:', conditionValue);\n }\n\n let result: boolean;\n const valueToCompare = isNil(condition.field) || condition.field === '' ? conditionValue : itemValue;\n\n switch (condition.operator.type) {\n case 'equal':\n result = isEqual(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Equal check result:', result);\n break;\n case 'notEqual':\n result = !isEqual(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Not equal check result:', result);\n break;\n case 'greaterThan':\n result = gt(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Greater than check result:', result);\n break;\n case 'lessThan':\n result = lt(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Less than check result:', result);\n break;\n case 'greaterThanOrEqual':\n result = gte(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Greater than or equal check result:', result);\n break;\n case 'lessThanOrEqual':\n result = lte(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Less than or equal check result:', result);\n break;\n case 'contains':\n if (typeof valueToCompare === 'string') {\n result = includes(valueToCompare, conditionValue);\n } else if (Array.isArray(valueToCompare)) {\n result = includes(\n valueToCompare.map((val) => val.toString().toLowerCase()),\n conditionValue\n );\n } else {\n result = false;\n }\n if (loggingEnabled) console.log('Contains check result:', result);\n break;\n case 'notContains':\n if (typeof valueToCompare === 'string') {\n result = !includes(valueToCompare, conditionValue);\n } else if (Array.isArray(valueToCompare)) {\n result = !includes(\n valueToCompare.map((val) => val.toString().toLowerCase()),\n conditionValue\n );\n } else {\n result = false;\n }\n if (loggingEnabled) console.log('Not contains check result:', result);\n break;\n case 'startsWith':\n result = typeof valueToCompare === 'string' && startsWith(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Starts with check result:', result);\n break;\n case 'endsWith':\n result = typeof valueToCompare === 'string' && endsWith(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Ends with check result:', result);\n break;\n case 'isEmpty':\n result = isEmpty(valueToCompare);\n if (loggingEnabled) console.log('Is empty check result:', result);\n break;\n case 'isNull':\n result = isNil(valueToCompare);\n if (loggingEnabled) console.log('Is null check result:', result);\n break;\n case 'isNotEmpty':\n result = !isEmpty(valueToCompare);\n if (loggingEnabled) console.log('Is not empty check result:', result);\n break;\n case 'between':\n result = !isNil(valueToCompare) && valueToCompare >= condition.value.from && valueToCompare <= condition.value.to;\n if (loggingEnabled) console.log('Between check result:', result);\n break;\n default:\n result = true;\n if (loggingEnabled) console.log('Default case, returning true');\n }\n\n return result;\n}\n\nexport function applyFilterArray(\n dataArray: any[],\n filters?: AXDataSourceFilterOption[],\n logic: 'and' | 'or' = 'and'\n): any[] {\n if (filters && filters.length) {\n return dataArray.filter((item) => {\n if (logic === 'and') {\n return filters.every((f) => {\n return f.filters ? applyFilterArray([item], f.filters, f.logic).length > 0 : applyCondition(item, f);\n });\n } else {\n // logic === 'or'\n return filters.some((f) => {\n return f.filters ? applyFilterArray([item], f.filters, f.logic).length > 0 : applyCondition(item, f);\n });\n }\n });\n } else {\n return dataArray;\n }\n}\n\nexport function applySortArray(dataArray: any, sorts: AXDataSourceSortOption[]) {\n if (sorts && sorts.length > 0) {\n const sortFields = sorts.map((s) => s.field);\n const sortOrders = sorts.map((s) => s.dir);\n return orderBy(dataArray, sortFields, sortOrders);\n } else return dataArray;\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPHtmlUtils {\n private sanitizer = inject(DomSanitizer);\n getTextFromHTML(html: string | undefined | null): string {\n if (!html) return '';\n const tempElement = document.createElement('div');\n tempElement.innerHTML = html;\n return tempElement.innerText || tempElement.textContent || '';\n }\n getSafeHTMLfromHTML(html: string | undefined | null): SafeHtml | null {\n if (!html) return null;\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;SAagB,aAAa,CAAC,GAAQ,EAAE,SAAiB,EAAE,EAAA;IACvD,IAAI,IAAI,GAAa,EAAE;AACvB,IAAA,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;QACnB,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;YAC/E,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,GA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utBuilderService {
|
|
|
22
22
|
this.variables$ = signal({});
|
|
23
23
|
this.functions$ = signal({});
|
|
24
24
|
this.onChanged = new Subject();
|
|
25
|
+
this.onRefresh = new Subject();
|
|
25
26
|
this.debouncers = {};
|
|
26
27
|
this.debouncerSubscriptions = {};
|
|
27
28
|
this.widgets = new Map();
|
|
28
29
|
this.context = this.context$.asReadonly();
|
|
29
30
|
}
|
|
30
|
-
;
|
|
31
31
|
get variables() {
|
|
32
32
|
return this.variables$();
|
|
33
33
|
}
|
|
@@ -36,6 +36,12 @@ class AXPLayoutBuilderService {
|
|
|
36
36
|
}
|
|
37
37
|
initial(value) {
|
|
38
38
|
this.context$.set(value);
|
|
39
|
+
this.refresh();
|
|
40
|
+
}
|
|
41
|
+
refresh() {
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
this.onRefresh.next();
|
|
44
|
+
}, 0);
|
|
39
45
|
}
|
|
40
46
|
setVariables(...args) {
|
|
41
47
|
if (args.length == 0)
|
|
@@ -43,7 +49,7 @@ class AXPLayoutBuilderService {
|
|
|
43
49
|
else if (args.length == 1)
|
|
44
50
|
this.variables$.set(args[0]);
|
|
45
51
|
else if (args.length == 2) {
|
|
46
|
-
this.variables$.update(v => set(v, args[0], args[1]));
|
|
52
|
+
this.variables$.update((v) => set(v, args[0], args[1]));
|
|
47
53
|
}
|
|
48
54
|
}
|
|
49
55
|
setFunctions(...args) {
|
|
@@ -52,7 +58,7 @@ class AXPLayoutBuilderService {
|
|
|
52
58
|
else if (args.length == 1)
|
|
53
59
|
this.functions$.set(args[0]);
|
|
54
60
|
else if (args.length == 2) {
|
|
55
|
-
this.functions$.update(v => set(v, args[0], args[1]));
|
|
61
|
+
this.functions$.update((v) => set(v, args[0], args[1]));
|
|
56
62
|
}
|
|
57
63
|
}
|
|
58
64
|
setValue(path, value, init = false) {
|
|
@@ -63,19 +69,16 @@ class AXPLayoutBuilderService {
|
|
|
63
69
|
// Create a new Subject for debouncing if it doesn't exist
|
|
64
70
|
this.debouncers[path] = new Subject();
|
|
65
71
|
// Subscribe to the subject with debounceTime
|
|
66
|
-
this.debouncerSubscriptions[path] =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
this.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
data: this.context(),
|
|
75
|
-
path,
|
|
76
|
-
init
|
|
77
|
-
});
|
|
72
|
+
this.debouncerSubscriptions[path] = this.debouncers[path].pipe(debounceTime(150)).subscribe(({ value, init }) => {
|
|
73
|
+
// Only emit onChanged event after debounce time
|
|
74
|
+
this.onChanged.next({
|
|
75
|
+
oldValue: oldValue,
|
|
76
|
+
newValue: value,
|
|
77
|
+
data: this.context(),
|
|
78
|
+
path,
|
|
79
|
+
init,
|
|
78
80
|
});
|
|
81
|
+
});
|
|
79
82
|
}
|
|
80
83
|
// Update context immediately
|
|
81
84
|
this.context$.update((ctx) => set(clone(ctx), path, value));
|
|
@@ -174,6 +177,7 @@ const AXPWidgetsCatalog = {
|
|
|
174
177
|
gridItem: 'grid-item-layout',
|
|
175
178
|
gridRow: 'grid-row-layout',
|
|
176
179
|
widgetSelector: 'widget-selector',
|
|
180
|
+
template: 'template',
|
|
177
181
|
};
|
|
178
182
|
|
|
179
183
|
function cloneProperty(property, values) {
|
|
@@ -246,7 +250,7 @@ class AXPWidgetComponent extends AXPLayoutElement {
|
|
|
246
250
|
this.host = inject(ElementRef).nativeElement;
|
|
247
251
|
this.config = this.token.config;
|
|
248
252
|
this.name = this.token.node.name;
|
|
249
|
-
this.path = this.token.node.path
|
|
253
|
+
this.path = this.token.node.path;
|
|
250
254
|
this.defaultValue = this.token.node.defaultValue;
|
|
251
255
|
this._children = signal(this.token.node.children ?? []);
|
|
252
256
|
this.children = this._children.asReadonly();
|
|
@@ -255,11 +259,13 @@ class AXPWidgetComponent extends AXPLayoutElement {
|
|
|
255
259
|
this.contextService = inject(AXPLayoutBuilderService);
|
|
256
260
|
this.onReady = new Subject();
|
|
257
261
|
this.isRendered = false;
|
|
262
|
+
this._isValueWidget = false;
|
|
263
|
+
this.isValueWidget = () => this._isValueWidget;
|
|
258
264
|
this.fullPath = signal(null);
|
|
259
265
|
this.nextRender = afterNextRender(() => {
|
|
260
266
|
//
|
|
261
267
|
if (!this.isRendered) {
|
|
262
|
-
|
|
268
|
+
this.detectFullPath();
|
|
263
269
|
//
|
|
264
270
|
this.onReady.next();
|
|
265
271
|
//
|
|
@@ -277,7 +283,8 @@ class AXPWidgetComponent extends AXPLayoutElement {
|
|
|
277
283
|
this.initRender();
|
|
278
284
|
}
|
|
279
285
|
initRender() {
|
|
280
|
-
|
|
286
|
+
this._isValueWidget = this.config.properties?.some((c) => c.name == 'path') ?? false;
|
|
287
|
+
if (this.isValueWidget()) {
|
|
281
288
|
this.detectFullPath();
|
|
282
289
|
if (this.defaultValue != null) {
|
|
283
290
|
this.setValue(this.defaultValue, true);
|
|
@@ -293,6 +300,7 @@ class AXPWidgetComponent extends AXPLayoutElement {
|
|
|
293
300
|
}
|
|
294
301
|
}
|
|
295
302
|
setOptions(values) {
|
|
303
|
+
console.log(this.config.name, this.mode, values);
|
|
296
304
|
this._options.set({ ...this.options(), ...values });
|
|
297
305
|
}
|
|
298
306
|
call(name, ...args) {
|
|
@@ -312,14 +320,14 @@ class AXPWidgetComponent extends AXPLayoutElement {
|
|
|
312
320
|
let parent = this;
|
|
313
321
|
//
|
|
314
322
|
while (parent) {
|
|
315
|
-
const path = parent.path
|
|
323
|
+
const path = parent.path ?? (parent.isValueWidget() && parent.index == null ? parent.name : null);
|
|
316
324
|
const id = parent.name;
|
|
317
325
|
//
|
|
318
326
|
if (path) {
|
|
319
327
|
sections.push(path);
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
328
|
+
}
|
|
329
|
+
if (parent.index != null) {
|
|
330
|
+
sections.push(`[${parent.index}]`);
|
|
323
331
|
}
|
|
324
332
|
if (id) {
|
|
325
333
|
ids.push(id);
|
|
@@ -695,10 +703,7 @@ class AXPWidgetContainerComponent {
|
|
|
695
703
|
this.builderService.setFunctions(v);
|
|
696
704
|
}
|
|
697
705
|
ngOnInit() {
|
|
698
|
-
this.builderService
|
|
699
|
-
.onChanged
|
|
700
|
-
.pipe(this.unsubscriber.takeUntilDestroy)
|
|
701
|
-
.subscribe(e => {
|
|
706
|
+
this.builderService.onChanged.pipe(this.unsubscriber.takeUntilDestroy).subscribe((e) => {
|
|
702
707
|
this.context.set(e.data);
|
|
703
708
|
this.onChanged.emit(e);
|
|
704
709
|
});
|
|
@@ -848,9 +853,7 @@ class AXPWidgetRendererDirective {
|
|
|
848
853
|
this.expressionCache = new Map();
|
|
849
854
|
this.expressionEvaluators = new Map();
|
|
850
855
|
this.scope = null;
|
|
851
|
-
this.builderService.onChanged
|
|
852
|
-
.pipe(this.unsubscriber.takeUntilDestroy)
|
|
853
|
-
.subscribe(async (e) => {
|
|
856
|
+
this.builderService.onChanged.pipe(this.unsubscriber.takeUntilDestroy).subscribe(async (e) => {
|
|
854
857
|
if ((await this.updateOptionsBasedOnContext()) > 0) {
|
|
855
858
|
this.applyOptions();
|
|
856
859
|
}
|
|
@@ -858,22 +861,31 @@ class AXPWidgetRendererDirective {
|
|
|
858
861
|
await this.updateValueBasedOnFormula();
|
|
859
862
|
}
|
|
860
863
|
});
|
|
864
|
+
this.builderService.onRefresh.pipe(this.unsubscriber.takeUntilDestroy).subscribe(async () => {
|
|
865
|
+
if ((await this.updateOptionsBasedOnContext()) > 0) {
|
|
866
|
+
this.applyOptions();
|
|
867
|
+
}
|
|
868
|
+
});
|
|
861
869
|
}
|
|
870
|
+
// async ngOnInit() {
|
|
871
|
+
// await this.rerenderComponent();
|
|
872
|
+
// }
|
|
873
|
+
// async ngAfterViewInit() {
|
|
874
|
+
// await this.rerenderComponent();
|
|
875
|
+
// }
|
|
862
876
|
// Detect input changes
|
|
863
|
-
|
|
877
|
+
ngOnChanges(changes) {
|
|
864
878
|
if (changes['mode'] || changes['node']) {
|
|
865
879
|
// Check if either 'mode' or 'node' has changed
|
|
866
|
-
|
|
880
|
+
this.rerenderComponent();
|
|
867
881
|
}
|
|
868
882
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
if (this.componentRef) {
|
|
872
|
-
this.componentRef.destroy();
|
|
873
|
-
}
|
|
874
|
-
this.viewContainerRef.clear();
|
|
883
|
+
rerenderComponent() {
|
|
884
|
+
this.isLoading.set(false);
|
|
875
885
|
// Call loadComponent to create and render the component
|
|
876
|
-
|
|
886
|
+
setTimeout(async () => {
|
|
887
|
+
await this.loadComponent();
|
|
888
|
+
});
|
|
877
889
|
}
|
|
878
890
|
ngOnDestroy() {
|
|
879
891
|
if (this.componentRef) {
|
|
@@ -881,10 +893,16 @@ class AXPWidgetRendererDirective {
|
|
|
881
893
|
}
|
|
882
894
|
}
|
|
883
895
|
async loadComponent() {
|
|
884
|
-
if (this.isLoading())
|
|
896
|
+
if (this.isLoading()) {
|
|
885
897
|
return;
|
|
898
|
+
}
|
|
886
899
|
this.isLoading.set(true);
|
|
900
|
+
// Destroy the existing component if it exists
|
|
901
|
+
if (this.componentRef) {
|
|
902
|
+
this.componentRef.destroy();
|
|
903
|
+
}
|
|
887
904
|
this.viewContainerRef.clear();
|
|
905
|
+
//
|
|
888
906
|
const widget = this.widgetRegistery.resolve(this.node().type);
|
|
889
907
|
//
|
|
890
908
|
const props = widget?.components[this.mode()]?.properties
|
|
@@ -940,15 +958,18 @@ class AXPWidgetRendererDirective {
|
|
|
940
958
|
return false;
|
|
941
959
|
}
|
|
942
960
|
preprocessAndInitialOptions(obj, pathPrefix = '') {
|
|
943
|
-
if (!obj)
|
|
961
|
+
if (!obj) {
|
|
944
962
|
return;
|
|
963
|
+
}
|
|
945
964
|
Object.entries(obj).forEach(([key, value]) => {
|
|
946
965
|
const currentPath = pathPrefix ? `${pathPrefix}.${key}` : key;
|
|
947
966
|
if (typeof value === 'string' && value.includes('{{')) {
|
|
948
967
|
// Cache dynamic expression for later evaluation
|
|
949
968
|
this.expressionEvaluators.set(currentPath, () => this.evaluateExpression(value));
|
|
950
969
|
}
|
|
951
|
-
else if (typeof value === 'object' &&
|
|
970
|
+
else if (typeof value === 'object' &&
|
|
971
|
+
value !== null &&
|
|
972
|
+
(value.constructor === Object || Array.isArray(value))) {
|
|
952
973
|
// Recursively handle nested objects
|
|
953
974
|
this.preprocessAndInitialOptions(value, currentPath);
|
|
954
975
|
}
|
|
@@ -961,11 +982,12 @@ class AXPWidgetRendererDirective {
|
|
|
961
982
|
});
|
|
962
983
|
}
|
|
963
984
|
async updateOptionsBasedOnContext() {
|
|
964
|
-
const
|
|
965
|
-
for (let [path, evaluator] of this.expressionEvaluators) {
|
|
985
|
+
const updatePromises = Array.from(this.expressionEvaluators).map(async ([path, evaluator]) => {
|
|
966
986
|
const newValue = await evaluator();
|
|
967
|
-
|
|
968
|
-
}
|
|
987
|
+
return { path, newValue };
|
|
988
|
+
});
|
|
989
|
+
// Wait for all evaluators to complete
|
|
990
|
+
const updates = await Promise.all(updatePromises);
|
|
969
991
|
// Apply updates to mergedOptions
|
|
970
992
|
if (updates.length > 0) {
|
|
971
993
|
this.mergedOptions.update((o) => {
|