@acorex/platform 19.3.0-next.1 → 19.3.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/lib/settings/settings.types.d.ts +1 -1
- package/common/lib/workflows/navigate.workflow.d.ts +1 -1
- package/core/lib/directives/grid-layout.directive.d.ts +15 -0
- package/core/lib/directives/index.d.ts +1 -0
- package/core/lib/expression-evaluator/expression-evaluator.service.d.ts +1 -2
- package/core/lib/types/core.types.d.ts +1 -0
- package/core/lib/types/index.d.ts +1 -0
- package/core/lib/types/interactive.types.d.ts +1 -0
- package/core/lib/types/layout.types.d.ts +27 -0
- package/core/lib/types/validation.types.d.ts +30 -1
- package/fesm2022/acorex-platform-common.mjs +3 -3
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +75 -9
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +436 -401
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +10 -10
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +96 -67
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-3gmbdeJ_.mjs → acorex-platform-themes-default-entity-master-create-view.component-CnqS3y7P.mjs} +5 -5
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-3gmbdeJ_.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-CnqS3y7P.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-nvrF63CN.mjs → acorex-platform-themes-default-entity-master-list-view.component-BqMlSX6b.mjs} +127 -40
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BqMlSX6b.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-8DdICjNs.mjs → acorex-platform-themes-default-entity-master-modify-view.component-DzHZdi2R.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DzHZdi2R.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-DadBeY1I.mjs → acorex-platform-themes-default-entity-master-single-view.component-BBJ7Aapd.mjs} +15 -8
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BBJ7Aapd.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-search-popup.component-BADEuoeJ.mjs → acorex-platform-themes-default-search-popup.component-ChJiJ12h.mjs} +8 -8
- package/fesm2022/{acorex-platform-themes-default-search-popup.component-BADEuoeJ.mjs.map → acorex-platform-themes-default-search-popup.component-ChJiJ12h.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-setting-page.component-Cj73brIK.mjs → acorex-platform-themes-default-setting-page.component-BxGzaKws.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-setting-page.component-Cj73brIK.mjs.map → acorex-platform-themes-default-setting-page.component-BxGzaKws.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-setting-view.component-rrAq6hg2.mjs → acorex-platform-themes-default-setting-view.component-CjmlI9Jb.mjs} +5 -5
- package/fesm2022/{acorex-platform-themes-default-setting-view.component-rrAq6hg2.mjs.map → acorex-platform-themes-default-setting-view.component-CjmlI9Jb.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +210 -28
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +8 -6
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-DVhi_mBH.mjs → acorex-platform-widgets-button-widget-designer.component-DSO0iNB_.mjs} +3 -3
- package/fesm2022/acorex-platform-widgets-button-widget-designer.component-DSO0iNB_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-CrdfTgeq.mjs → acorex-platform-widgets-checkbox-widget-designer.component-DDIkt5nB.mjs} +3 -3
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-DDIkt5nB.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-view.component-DfSoF52n.mjs → acorex-platform-widgets-checkbox-widget-view.component-CqHkVcv-.mjs} +3 -3
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-CqHkVcv-.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-BM1G-WaN.mjs → acorex-platform-widgets-color-box-widget-designer.component-l_Of5uKT.mjs} +3 -3
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-l_Of5uKT.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-contact-widget-filter.component-B1cKV-TM.mjs → acorex-platform-widgets-contact-widget-filter.component-KvKD5byB.mjs} +3 -3
- package/fesm2022/acorex-platform-widgets-contact-widget-filter.component-KvKD5byB.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-DtwyOnuO.mjs → acorex-platform-widgets-page-widget-designer.component-BIvAjvW3.mjs} +5 -5
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-BIvAjvW3.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-u2RCVYRB.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-CybYV1Kf.mjs} +2 -2
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-u2RCVYRB.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-CybYV1Kf.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-C3H0Zldz.mjs → acorex-platform-widgets-text-block-widget-designer.component-DPy2UR_J.mjs} +3 -3
- package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-DPy2UR_J.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +1323 -1511
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/index.d.ts +2 -0
- package/layout/builder/lib/builder/view.types.d.ts +94 -0
- package/layout/builder/lib/builder/widget-base.component.d.ts +112 -0
- package/layout/builder/lib/builder/widget-map.d.ts +1 -0
- package/layout/builder/lib/builder/widget-renderer.directive.d.ts +12 -3
- package/layout/builder/lib/builder/widget.types.d.ts +9 -101
- package/layout/designer/lib/designer/shared/designer.service.d.ts +2 -2
- package/layout/designer/lib/designer/shared/widget-designer-renderer.directive.d.ts +2 -2
- package/layout/entity/lib/entity-master-list.viewmodel.d.ts +4 -2
- package/layout/entity/lib/entity-master-single.viewmodel.d.ts +4 -2
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +4 -4
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-view.component.d.ts +2 -2
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget.config.d.ts +7 -0
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-column.component.d.ts +2 -2
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-edit.component.d.ts +2 -2
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-filter.component.d.ts +2 -2
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-print.component.d.ts +2 -2
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-view.component.d.ts +2 -2
- package/layout/entity/lib/widgets/widget-selector/widget-selector-widget-edit.component.d.ts +2 -2
- package/layout/entity/lib/widgets/widget-selector/widget-selector-widget-view.component.d.ts +2 -2
- package/package.json +1 -1
- package/themes/default/index.d.ts +1 -0
- package/themes/default/lib/layouts/entity-layouts/entity-category/entity-category.component.d.ts +8 -3
- package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +2 -1
- package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +2 -1
- package/themes/default/lib/layouts/entity-layouts/entity-master-toolbar-view/views/entity-view-toolbar.component.d.ts +4 -1
- package/themes/default/lib/layouts/view-layouts/index.d.ts +1 -0
- package/themes/default/lib/layouts/view-layouts/layout-detail-view/layout-detail-view.component.d.ts +19 -0
- package/themes/shared/lib/components/layout-elements/layout-side.component.d.ts +1 -1
- package/themes/shared/lib/widgets/font-size-chooser/font-size-chooser-widget.component.d.ts +2 -2
- package/themes/shared/lib/widgets/font-style-chooser/font-style-chooser-widget.component.d.ts +2 -2
- package/themes/shared/lib/widgets/menu-orientation-chooser/menu-orientation-chooser-widget.component.d.ts +2 -2
- package/themes/shared/lib/widgets/theme-mode-chooser/theme-mode-chooser-widget.component.d.ts +2 -2
- package/themes/shared/lib/widgets/theme-palette-chooser/theme-palette-chooser-widget.component.d.ts +2 -2
- package/widgets/lib/properties/layout.props.d.ts +0 -6
- package/widgets/lib/widgets/actions/button/button-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/actions/button/button-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/avatar/avatar-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/avatar/avatar-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/avatar/avatar-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/avatar/avatar-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/cron-job/cron-job-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/cron-job/cron-job-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/cron-job/cron-job-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/cron-job/cron-job-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/cron-job/cron-job-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/file/file-box-widget-column.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/file/file-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/file/file-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/file/file-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/gallery/gallery-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/gallery/gallery-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/gallery/gallery-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/map/map-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/map/map-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/qrcode/qrcode-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/signature/signature-pad-widget-column.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/signature/signature-pad-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/signature/signature-pad-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/signature/signature-pad-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/advance/signature/signature-pad-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.component.d.ts +13 -24
- package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +2 -7
- package/widgets/lib/widgets/charts/chart.type.d.ts +1 -5
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar-widget.component.d.ts +2 -2
- package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.component.d.ts +25 -21
- package/widgets/lib/widgets/charts/donut-chart/donut-chart.type.d.ts +52 -23
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget.component.d.ts +21 -7
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart.type.d.ts +1 -8
- package/widgets/lib/widgets/charts/shared/chart-base.component.d.ts +4 -4
- package/widgets/lib/widgets/charts/shared/components/chart-tooltip/chart-tooltip.component.d.ts +28 -0
- package/widgets/lib/widgets/charts/shared/components/chart-tooltip/index.d.ts +1 -0
- package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget.component.d.ts +8 -4
- package/widgets/lib/widgets/charts/weather/weather-widget.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/checkbox/checkbox-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/checkbox/checkbox-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/checkbox/checkbox-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/checkbox/checkbox-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/editors/color/color-box-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/color/color-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/color/color-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/color/color-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/color/color-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/color/color-box-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/editors/contact/contact-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/contact/contact-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/contact/contact-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/contact/contact-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/contact/contact-widget.config.d.ts +9 -0
- package/widgets/lib/widgets/editors/date-time/date-time-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/date-time/date-time-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/date-time/date-time-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/date-time/date-time-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/date-time/date-time-box-widget.config.d.ts +8 -0
- package/widgets/lib/widgets/editors/email/email-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/email/email-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/email/email-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/email/email-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/email/email-box-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/editors/large-text/large-text-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/large-text/large-text-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/large-text/large-text-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/large-text/large-text-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/large-text/large-text-widget.config.d.ts +5 -0
- package/widgets/lib/widgets/editors/link/link-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/link/link-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/link/link-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/link/link-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/link/link-widget.config.d.ts +6 -0
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget.config.d.ts +2 -0
- package/widgets/lib/widgets/editors/number/number-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/number/number-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/number/number-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/number/number-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/number/number-box-widget.config.d.ts +10 -0
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget.config.d.ts +10 -0
- package/widgets/lib/widgets/editors/password/password-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/password/password-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/password/password-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/password/password-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/password/password-box-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/editors/phone/phone-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/phone/phone-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/phone/phone-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/phone/phone-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/phone/phone-box-widget.config.d.ts +4 -0
- package/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/rich-text/rich-text-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/rich-text/rich-text-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/rich-text/rich-text-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/rich-text/rich-text-widget.config.d.ts +5 -0
- package/widgets/lib/widgets/editors/select/select-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/select/select-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/select/select-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/select/select-box-widget.config.d.ts +11 -0
- package/widgets/lib/widgets/editors/selection-list/selection-list-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/selection-list/selection-list-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/selection-list/selection-list-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/selection-list/selection-list-widget.config.d.ts +8 -0
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-column.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget.config.d.ts +2 -0
- package/widgets/lib/widgets/editors/tabular-data/table-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/editors/tabular-data/tabular-data-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/template-box/template-box-widget-column.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/template-box/template-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/template-box/template-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/template-box/template-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/template-box/template-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/template-box/template-box-widget.config.d.ts +5 -0
- package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/text/text-box-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/text/text-box-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/text/text-box-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/text/text-box-widget.config.d.ts +8 -0
- package/widgets/lib/widgets/editors/toggle/toggle-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/toggle/toggle-widget-filter.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/toggle/toggle-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/toggle/toggle-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/editors/toggle/toggle-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/filters/date-time-filter/date-time-filter-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/filters/number-filter/number-filter-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/filters/string-filter/string-filter-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget.config.d.ts +2 -0
- package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget.config.d.ts +2 -0
- package/widgets/lib/widgets/layout/block/block-widget-designer.component.d.ts +2 -7
- package/widgets/lib/widgets/layout/block/block-widget-view.component.d.ts +4 -7
- package/widgets/lib/widgets/layout/block/block-widget.config.d.ts +17 -0
- package/widgets/lib/widgets/layout/document/document-widget.config.d.ts +2 -0
- package/widgets/lib/widgets/layout/form-field/form-field-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/form-field/form-field-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/form-field/form-field-widget.config.d.ts +3 -0
- package/widgets/lib/widgets/layout/grid/grid-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/grid/grid-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/grid/grid-widget.config.d.ts +3 -0
- package/widgets/lib/widgets/layout/grid-item/grid-item-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/grid-item/grid-item-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/grid-item/grid-item-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/grid-item/grid-item-widget.config.d.ts +18 -0
- package/widgets/lib/widgets/layout/grid-row/grid-row-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/grid-row/grid-row-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/grid-row/grid-row-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/grid-row/grid-row-widget.config.d.ts +4 -0
- package/widgets/lib/widgets/layout/page/page-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/page/page-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/page/page-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/layout/panel/index.d.ts +3 -0
- package/widgets/lib/widgets/layout/panel/panel-widget-designer.component.d.ts +15 -0
- package/widgets/lib/widgets/layout/panel/panel-widget-view.component.d.ts +15 -0
- package/widgets/lib/widgets/layout/panel/panel-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/layout/repeater/repeater-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/repeater/repeater-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/repeater/repeater-widget-print.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/repeater/repeater-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/repeater/repeater-widget.config.d.ts +5 -0
- package/widgets/lib/widgets/layout/text-block/text-block-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/text-block/text-block-widget-view.component.d.ts +2 -2
- package/widgets/lib/widgets/layout/text-block/text-block-widget.config.d.ts +3 -0
- package/widgets/lib/widgets/property-editors/advanced-grid-options/advanced-grid-options-widget-editor.component.d.ts +2 -2
- package/widgets/lib/widgets/property-editors/border/border-widget-editor.component.d.ts +2 -2
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +7 -6
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.type.d.ts +3 -9
- package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget-editor.component.d.ts +2 -2
- package/widgets/lib/widgets/property-editors/spacing/spacing-widget-editor.component.d.ts +2 -2
- package/widgets/lib/widgets/validations/between-validation/between-validation-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/validations/callback-validation/callback-validation-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/validations/equal-validation/equal-validation-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/validations/greater-than-validation/greater-than-validation-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/validations/less-than-validation/less-than-validation-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/validations/max-length-validation/max-length-validation-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/validations/min-length-validation/min-length-validation-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/validations/regular-expression-validation/regular-expression-validation-widget-edit.component.d.ts +2 -2
- package/widgets/lib/widgets/validations/required-validation/required-validation-widget-edit.component.d.ts +2 -2
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-nvrF63CN.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-8DdICjNs.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DadBeY1I.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-button-widget-designer.component-DVhi_mBH.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-CrdfTgeq.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-DfSoF52n.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-BM1G-WaN.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-contact-widget-filter.component-B1cKV-TM.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DtwyOnuO.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-C3H0Zldz.mjs.map +0 -1
|
@@ -4,15 +4,15 @@ import { PortalModule } from '@angular/cdk/portal';
|
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { signal, computed, Injectable, InjectionToken, inject,
|
|
7
|
+
import { signal, computed, Injectable, InjectionToken, inject, Injector, ChangeDetectorRef, ViewChild, Input, ChangeDetectionStrategy, Component, EventEmitter, effect, Output, input, output, ViewContainerRef, Directive, Optional, Inject, NgModule, ElementRef } from '@angular/core';
|
|
8
8
|
import { AXDataTableColumnComponent, AXBaseDataTable } from '@acorex/components/data-table';
|
|
9
|
-
import { set, merge, cloneDeep, get, isEqual,
|
|
10
|
-
import { Subject,
|
|
11
|
-
import {
|
|
9
|
+
import { set, merge, cloneDeep, isNil, get, isEqual, sum, isEmpty, isString, isUndefined } from 'lodash-es';
|
|
10
|
+
import { Subject, filter, BehaviorSubject } from 'rxjs';
|
|
11
|
+
import { getSmart, setSmart } from '@acorex/platform/core';
|
|
12
12
|
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
|
13
|
-
import { setSmart, getSmart } from '@acorex/platform/core';
|
|
14
13
|
import { AXTranslationService } from '@acorex/core/translation';
|
|
15
14
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
15
|
+
import { convertArrayToDataSource, AXDataSource } from '@acorex/components/common';
|
|
16
16
|
|
|
17
17
|
var AXPPageStatus;
|
|
18
18
|
(function (AXPPageStatus) {
|
|
@@ -160,126 +160,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
160
160
|
}]
|
|
161
161
|
}] });
|
|
162
162
|
|
|
163
|
-
class AXPLayoutContextChangeEvent {
|
|
164
|
-
}
|
|
165
|
-
const AXPLayoutBuilderContextStore = signalStore(
|
|
166
|
-
// Initial State
|
|
167
|
-
withState(() => ({
|
|
168
|
-
data: {}, // Shared context data
|
|
169
|
-
state: 'initiated', // Current state
|
|
170
|
-
initialSnapshot: {}, // Snapshot of the first initialized state
|
|
171
|
-
previousSnapshot: {}, // Snapshot of the previous state
|
|
172
|
-
lastChange: {
|
|
173
|
-
state: 'initiated',
|
|
174
|
-
}, // Last change event
|
|
175
|
-
})),
|
|
176
|
-
// Computed Signals
|
|
177
|
-
withComputed(({ data, state, lastChange, initialSnapshot, previousSnapshot }) => ({
|
|
178
|
-
isChanged: computed(() => state() === 'changed'),
|
|
179
|
-
isReset: computed(() => state() === 'restored'),
|
|
180
|
-
isInitiated: computed(() => state() === 'initiated'),
|
|
181
|
-
isEmpty: computed(() => Object.keys(data()).length === 0),
|
|
182
|
-
snapshot: computed(() => cloneDeep(data())), // Current data snapshot
|
|
183
|
-
initial: computed(() => cloneDeep(initialSnapshot())), // Initial snapshot
|
|
184
|
-
previous: computed(() => cloneDeep(previousSnapshot())), // Previous snapshot
|
|
185
|
-
changeEvent: computed(() => lastChange()), // Reactive last change event
|
|
186
|
-
})),
|
|
187
|
-
// Methods for State Management
|
|
188
|
-
withMethods((store) => ({
|
|
189
|
-
// Update a specific value
|
|
190
|
-
update(path, value) {
|
|
191
|
-
const currentData = cloneDeep(store.data());
|
|
192
|
-
const oldValue = get(currentData, path);
|
|
193
|
-
// Skip if the value hasn't changed
|
|
194
|
-
if (isEqual(oldValue, value)) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
// Update the value and prepare the change event
|
|
198
|
-
const updatedData = setSmart(currentData, path, value);
|
|
199
|
-
const changeEvent = {
|
|
200
|
-
oldValue,
|
|
201
|
-
newValue: value,
|
|
202
|
-
path,
|
|
203
|
-
state: 'changed',
|
|
204
|
-
data: updatedData,
|
|
205
|
-
};
|
|
206
|
-
// Patch the state
|
|
207
|
-
patchState(store, {
|
|
208
|
-
previousSnapshot: store.snapshot(), // Save the previous state
|
|
209
|
-
data: updatedData,
|
|
210
|
-
state: 'changed',
|
|
211
|
-
lastChange: changeEvent,
|
|
212
|
-
});
|
|
213
|
-
},
|
|
214
|
-
// Reset to the initial state
|
|
215
|
-
reset() {
|
|
216
|
-
const initialData = store.initial();
|
|
217
|
-
const changeEvent = {
|
|
218
|
-
oldValue: cloneDeep(store.data()), // Current data becomes old value
|
|
219
|
-
newValue: cloneDeep(initialData), // Reset to the initial state
|
|
220
|
-
path: '',
|
|
221
|
-
state: 'restored',
|
|
222
|
-
data: initialData,
|
|
223
|
-
};
|
|
224
|
-
patchState(store, {
|
|
225
|
-
previousSnapshot: store.snapshot(), // Save the previous state
|
|
226
|
-
data: initialData,
|
|
227
|
-
state: 'restored',
|
|
228
|
-
lastChange: changeEvent,
|
|
229
|
-
});
|
|
230
|
-
},
|
|
231
|
-
// Initialize the state
|
|
232
|
-
set(initialData) {
|
|
233
|
-
const currentData = store.data();
|
|
234
|
-
if (isEqual(currentData, initialData)) {
|
|
235
|
-
return; // Skip if the current state matches the initial state
|
|
236
|
-
}
|
|
237
|
-
const changeEvent = {
|
|
238
|
-
oldValue: null,
|
|
239
|
-
newValue: cloneDeep(initialData),
|
|
240
|
-
path: '',
|
|
241
|
-
state: 'initiated',
|
|
242
|
-
data: initialData,
|
|
243
|
-
};
|
|
244
|
-
patchState(store, {
|
|
245
|
-
initialSnapshot: cloneDeep(initialData), // Save the initial state
|
|
246
|
-
previousSnapshot: store.snapshot(), // Save the current state as the previous
|
|
247
|
-
data: initialData,
|
|
248
|
-
state: 'initiated',
|
|
249
|
-
lastChange: changeEvent,
|
|
250
|
-
});
|
|
251
|
-
},
|
|
252
|
-
// Get a specific value
|
|
253
|
-
getValue(path) {
|
|
254
|
-
return get(store.data(), path);
|
|
255
|
-
},
|
|
256
|
-
})));
|
|
257
|
-
|
|
258
|
-
const AXP_WIDGET_DATASOURCE_PROVIDER = new InjectionToken('AXP_WIDGET_DATASOURCE_PROVIDER');
|
|
259
|
-
class AXPWidgetDataSourceProviderService {
|
|
260
|
-
constructor() {
|
|
261
|
-
this.providers = inject(AXP_WIDGET_DATASOURCE_PROVIDER, { optional: true });
|
|
262
|
-
}
|
|
263
|
-
async items() {
|
|
264
|
-
const items = [];
|
|
265
|
-
if (Array.isArray(this.providers)) {
|
|
266
|
-
for (const provider of this.providers) {
|
|
267
|
-
items.push(...(await provider.items()));
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return items;
|
|
271
|
-
}
|
|
272
|
-
async get(name) {
|
|
273
|
-
return (await this.items()).find((c) => c.name == name);
|
|
274
|
-
}
|
|
275
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
276
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, providedIn: 'root' }); }
|
|
277
|
-
}
|
|
278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, decorators: [{
|
|
279
|
-
type: Injectable,
|
|
280
|
-
args: [{ providedIn: 'root' }]
|
|
281
|
-
}] });
|
|
282
|
-
|
|
283
163
|
const AXPWidgetsCatalog = {
|
|
284
164
|
documentAttachment: 'document-attachment-editor',
|
|
285
165
|
singleFileBox: 'single-file-box-editor',
|
|
@@ -358,6 +238,7 @@ const AXPWidgetsCatalog = {
|
|
|
358
238
|
weather: 'weather',
|
|
359
239
|
metaData: 'meta-data-editor',
|
|
360
240
|
templateEditor: 'template-box-editor',
|
|
241
|
+
panel: 'panel',
|
|
361
242
|
};
|
|
362
243
|
|
|
363
244
|
function cloneProperty(property, values) {
|
|
@@ -441,287 +322,45 @@ function createSelectProperty(ctor) {
|
|
|
441
322
|
}
|
|
442
323
|
const AXP_WIDGET_TOKEN = new InjectionToken('AXP_WIDGET_TOKEN');
|
|
443
324
|
const AXP_WIDGET_COLUMN_TOKEN = new InjectionToken('AXP_WIDGET_COLUMN_TOKEN');
|
|
444
|
-
|
|
325
|
+
|
|
326
|
+
class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
445
327
|
constructor() {
|
|
446
328
|
super(...arguments);
|
|
447
|
-
this.
|
|
448
|
-
this.
|
|
449
|
-
this.
|
|
450
|
-
this.
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
453
|
-
this.defaultValue = this.token.node.defaultValue;
|
|
454
|
-
this._children = signal(this.token.node.children ?? []);
|
|
455
|
-
this.children = this._children.asReadonly();
|
|
456
|
-
this._options = signal(this.token.options ?? {});
|
|
457
|
-
this.options = this._options.asReadonly();
|
|
458
|
-
this.layoutService = inject(AXPLayoutBuilderService);
|
|
459
|
-
this.contextService = inject(AXPLayoutBuilderContextStore);
|
|
460
|
-
this._isValueWidget = false;
|
|
461
|
-
this.isValueWidget = () => this._isValueWidget;
|
|
462
|
-
this._status = signal(AXPWidgetStatus.Rendering);
|
|
463
|
-
this.status = this._status.asReadonly();
|
|
464
|
-
this.onStatusChanged = new BehaviorSubject(this._status());
|
|
465
|
-
this.#statusEffect = effect(() => {
|
|
466
|
-
this.onStatusChanged.next(this.status());
|
|
467
|
-
});
|
|
468
|
-
this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()));
|
|
469
|
-
this.fullPath = signal(null);
|
|
470
|
-
this.getValue = computed(() => {
|
|
471
|
-
return this.fullPath() ? this.extractValue(this.fullPath()) : null;
|
|
472
|
-
}, { equal: isEqual });
|
|
473
|
-
this.validationRules = computed(() => {
|
|
474
|
-
const validationsRaw = this.options()['validations'];
|
|
475
|
-
if (validationsRaw == null) {
|
|
476
|
-
return [];
|
|
477
|
-
}
|
|
478
|
-
return Object.values(this.options()['validations'])
|
|
479
|
-
.filter((c) => c != null)
|
|
480
|
-
.map((c) => ({
|
|
481
|
-
rule: c.rule,
|
|
482
|
-
message: c.message,
|
|
483
|
-
options: c.options,
|
|
484
|
-
}));
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
get id() {
|
|
488
|
-
return this._id;
|
|
489
|
-
}
|
|
490
|
-
#statusEffect;
|
|
491
|
-
outputs() {
|
|
492
|
-
return [];
|
|
329
|
+
this.widgetRegistery = inject(AXPWidgetRegistryService);
|
|
330
|
+
this.grid = inject(AXBaseDataTable);
|
|
331
|
+
this.mergedOptions = signal({});
|
|
332
|
+
this.loadingRow = signal(null);
|
|
333
|
+
this.injector = inject(Injector);
|
|
334
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
493
335
|
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
if (this.isValueWidget()) {
|
|
497
|
-
this.detectFullPath();
|
|
498
|
-
if (!isNil(this.defaultValue) && isNil(this.getValue())) {
|
|
499
|
-
this.setValue(this.defaultValue);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
//
|
|
503
|
-
if (get(this.node, '__meta__.added')) {
|
|
504
|
-
this.onAdded();
|
|
505
|
-
}
|
|
506
|
-
this.setStatus(AXPWidgetStatus.Rendered);
|
|
336
|
+
get node() {
|
|
337
|
+
return this._node;
|
|
507
338
|
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
if (this.node.valueTransforms?.getter) {
|
|
511
|
-
return this.node.valueTransforms?.getter(rawValue);
|
|
512
|
-
}
|
|
513
|
-
return rawValue;
|
|
339
|
+
set node(v) {
|
|
340
|
+
this._node = v;
|
|
514
341
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
value = this.node.valueTransforms?.setter(value);
|
|
518
|
-
}
|
|
519
|
-
const oldValue = this.getValue();
|
|
520
|
-
value = isUndefined(value) ? null : value;
|
|
521
|
-
if (isNil(value) && isNil(oldValue)) {
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
if (isEqual(oldValue, value)) {
|
|
525
|
-
return;
|
|
526
|
-
}
|
|
527
|
-
if (this.fullPath()) {
|
|
528
|
-
this.contextService.update(this.fullPath(), value);
|
|
529
|
-
}
|
|
342
|
+
get renderFooterTemplate() {
|
|
343
|
+
return this.footerTemplate ?? this._contentFooterTemplate;
|
|
530
344
|
}
|
|
531
|
-
|
|
532
|
-
this.
|
|
533
|
-
this.layoutService.updateStatus();
|
|
345
|
+
get renderCellTemplate() {
|
|
346
|
+
return this.cellTemplate ?? this._contentCellTemplate;
|
|
534
347
|
}
|
|
535
|
-
|
|
536
|
-
this.
|
|
348
|
+
async handleExpandRow(row) {
|
|
349
|
+
this.loadingRow.set(row);
|
|
350
|
+
await this.grid.expandRow(row);
|
|
351
|
+
this.loadingRow.set(null);
|
|
352
|
+
// if (row.data?.__meta__?.expanded === undefined) {
|
|
353
|
+
// this.width = `${parseInt(this.width as string) + 24}px`;
|
|
354
|
+
// }
|
|
537
355
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
if (outputs.some((c) => c.name == name)) {
|
|
541
|
-
const opt = get(this, name);
|
|
542
|
-
if (typeof opt == 'function') {
|
|
543
|
-
return opt();
|
|
544
|
-
}
|
|
545
|
-
return opt;
|
|
546
|
-
}
|
|
547
|
-
return null;
|
|
356
|
+
get renderHeaderTemplate() {
|
|
357
|
+
return this.headerTemplate ?? this._contentHeaderTemplate;
|
|
548
358
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
if (fn && typeof fn == 'function') {
|
|
552
|
-
fn.bind(this)(...args);
|
|
553
|
-
}
|
|
359
|
+
get loadingEnabled() {
|
|
360
|
+
return true;
|
|
554
361
|
}
|
|
555
|
-
|
|
556
|
-
this.
|
|
557
|
-
}
|
|
558
|
-
onAdded() { }
|
|
559
|
-
detectFullPath() {
|
|
560
|
-
const sections = [];
|
|
561
|
-
const ids = [];
|
|
562
|
-
//
|
|
563
|
-
let parent = this;
|
|
564
|
-
//
|
|
565
|
-
while (parent) {
|
|
566
|
-
const isValue = parent.isValueWidget() && parent.index == null;
|
|
567
|
-
const path = parent.path ?? (isValue ? parent.name : null);
|
|
568
|
-
const id = parent.name;
|
|
569
|
-
//
|
|
570
|
-
if (path) {
|
|
571
|
-
sections.push(path);
|
|
572
|
-
}
|
|
573
|
-
if (parent.index != null && parent.isValueWidget()) {
|
|
574
|
-
sections.push(`[${parent.index}]`);
|
|
575
|
-
}
|
|
576
|
-
if (id) {
|
|
577
|
-
ids.push(id);
|
|
578
|
-
if (parent.index != null) {
|
|
579
|
-
ids.push(`${parent.index}`);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
parent = parent.parent;
|
|
583
|
-
}
|
|
584
|
-
//
|
|
585
|
-
this.fullPath.set(sections.reverse().join('.'));
|
|
586
|
-
this._id = this.name || this.parent ? ids.reverse().join('_') : null;
|
|
587
|
-
if (this._id) {
|
|
588
|
-
this.layoutService.registerWidget(this._id, this);
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
handleValueChanged(e) {
|
|
592
|
-
if (e.isUserInteraction) {
|
|
593
|
-
this.setValue(e.value);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
597
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetComponent }); }
|
|
598
|
-
}
|
|
599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetComponent, decorators: [{
|
|
600
|
-
type: Injectable
|
|
601
|
-
}] });
|
|
602
|
-
class AXPDataListWidgetComponent extends AXPWidgetComponent {
|
|
603
|
-
constructor() {
|
|
604
|
-
super(...arguments);
|
|
605
|
-
this.dataService = inject(AXPWidgetDataSourceProviderService);
|
|
606
|
-
this.dataSource = signal(convertArrayToDataSource([]));
|
|
607
|
-
this.textField = computed(() => this.options()['textField'] ?? 'title');
|
|
608
|
-
this.valueField = computed(() => this.options()['valueField'] ?? 'id');
|
|
609
|
-
this.selectedItems = signal([]);
|
|
610
|
-
this.rf = effect(async () => {
|
|
611
|
-
const rawValue = this.options()['dataSource'];
|
|
612
|
-
// static datasource class
|
|
613
|
-
if (rawValue instanceof AXDataSource) {
|
|
614
|
-
this.dataSource.set(rawValue);
|
|
615
|
-
}
|
|
616
|
-
// static array datasource
|
|
617
|
-
else if (Array.isArray(rawValue)) {
|
|
618
|
-
const ds = new AXDataSource({
|
|
619
|
-
key: this.valueField(),
|
|
620
|
-
pageSize: 10,
|
|
621
|
-
load: async (e) => {
|
|
622
|
-
const raw = this.options()['dataSource'];
|
|
623
|
-
return {
|
|
624
|
-
items: raw,
|
|
625
|
-
total: raw.length,
|
|
626
|
-
};
|
|
627
|
-
},
|
|
628
|
-
byKey: (key) => {
|
|
629
|
-
const raw = this.options()['dataSource'];
|
|
630
|
-
const item = raw.filter((c) => c[this.valueField()] == key);
|
|
631
|
-
return Promise.resolve(item[0]);
|
|
632
|
-
},
|
|
633
|
-
});
|
|
634
|
-
this.dataSource.set(ds);
|
|
635
|
-
}
|
|
636
|
-
// resolve data source by name
|
|
637
|
-
else if (rawValue && (typeof rawValue == 'string' || typeof rawValue == 'object')) {
|
|
638
|
-
const id = typeof rawValue == 'object' ? rawValue['id'] : rawValue;
|
|
639
|
-
const c = await this.dataService.get(id);
|
|
640
|
-
if (this.mode == 'designer' && c?.samples?.length) {
|
|
641
|
-
this.dataSource.set(convertArrayToDataSource(c.samples, {
|
|
642
|
-
key: this.valueField(),
|
|
643
|
-
pageSize: 500,
|
|
644
|
-
}));
|
|
645
|
-
}
|
|
646
|
-
else {
|
|
647
|
-
const ds = c?.source();
|
|
648
|
-
if (ds && ds instanceof Promise) {
|
|
649
|
-
const d = await ds;
|
|
650
|
-
this.dataSource.set(d);
|
|
651
|
-
}
|
|
652
|
-
else if (ds) {
|
|
653
|
-
this.dataSource.set(ds);
|
|
654
|
-
}
|
|
655
|
-
// empty datasource
|
|
656
|
-
else {
|
|
657
|
-
this.dataSource.set(convertArrayToDataSource([]));
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
// empty datasource
|
|
662
|
-
else {
|
|
663
|
-
this.dataSource.set(convertArrayToDataSource([]));
|
|
664
|
-
}
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
668
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent }); }
|
|
669
|
-
}
|
|
670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
|
|
671
|
-
type: Injectable
|
|
672
|
-
}] });
|
|
673
|
-
class AXPColumnWidgetComponent {
|
|
674
|
-
constructor() {
|
|
675
|
-
this.token = inject(AXP_WIDGET_COLUMN_TOKEN);
|
|
676
|
-
this.path = this.token.path;
|
|
677
|
-
this.options = this.token.options ?? {};
|
|
678
|
-
this.rawValue = null;
|
|
679
|
-
}
|
|
680
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
681
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent }); }
|
|
682
|
-
}
|
|
683
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
|
|
684
|
-
type: Injectable
|
|
685
|
-
}] });
|
|
686
|
-
|
|
687
|
-
class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
688
|
-
constructor() {
|
|
689
|
-
super(...arguments);
|
|
690
|
-
this.widgetRegistery = inject(AXPWidgetRegistryService);
|
|
691
|
-
this.grid = inject(AXBaseDataTable);
|
|
692
|
-
this.mergedOptions = signal({});
|
|
693
|
-
this.loadingRow = signal(null);
|
|
694
|
-
this.injector = inject(Injector);
|
|
695
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
696
|
-
}
|
|
697
|
-
get node() {
|
|
698
|
-
return this._node;
|
|
699
|
-
}
|
|
700
|
-
set node(v) {
|
|
701
|
-
this._node = v;
|
|
702
|
-
}
|
|
703
|
-
get renderFooterTemplate() {
|
|
704
|
-
return this.footerTemplate ?? this._contentFooterTemplate;
|
|
705
|
-
}
|
|
706
|
-
get renderCellTemplate() {
|
|
707
|
-
return this.cellTemplate ?? this._contentCellTemplate;
|
|
708
|
-
}
|
|
709
|
-
async handleExpandRow(row) {
|
|
710
|
-
this.loadingRow.set(row);
|
|
711
|
-
await this.grid.expandRow(row);
|
|
712
|
-
this.loadingRow.set(null);
|
|
713
|
-
// if (row.data?.__meta__?.expanded === undefined) {
|
|
714
|
-
// this.width = `${parseInt(this.width as string) + 24}px`;
|
|
715
|
-
// }
|
|
716
|
-
}
|
|
717
|
-
get renderHeaderTemplate() {
|
|
718
|
-
return this.headerTemplate ?? this._contentHeaderTemplate;
|
|
719
|
-
}
|
|
720
|
-
get loadingEnabled() {
|
|
721
|
-
return true;
|
|
722
|
-
}
|
|
723
|
-
get name() {
|
|
724
|
-
return `col-${this.node.path}`;
|
|
362
|
+
get name() {
|
|
363
|
+
return `col-${this.node.path}`;
|
|
725
364
|
}
|
|
726
365
|
async ngOnInit() {
|
|
727
366
|
const widget = this.widgetRegistery.resolve(this.node.type);
|
|
@@ -859,6 +498,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
859
498
|
args: ['header']
|
|
860
499
|
}] } });
|
|
861
500
|
|
|
501
|
+
class AXPLayoutContextChangeEvent {
|
|
502
|
+
}
|
|
503
|
+
const AXPLayoutBuilderContextStore = signalStore(
|
|
504
|
+
// Initial State
|
|
505
|
+
withState(() => ({
|
|
506
|
+
data: {}, // Shared context data
|
|
507
|
+
state: 'initiated', // Current state
|
|
508
|
+
initialSnapshot: {}, // Snapshot of the first initialized state
|
|
509
|
+
previousSnapshot: {}, // Snapshot of the previous state
|
|
510
|
+
lastChange: {
|
|
511
|
+
state: 'initiated',
|
|
512
|
+
}, // Last change event
|
|
513
|
+
})),
|
|
514
|
+
// Computed Signals
|
|
515
|
+
withComputed(({ data, state, lastChange, initialSnapshot, previousSnapshot }) => ({
|
|
516
|
+
isChanged: computed(() => state() === 'changed'),
|
|
517
|
+
isReset: computed(() => state() === 'restored'),
|
|
518
|
+
isInitiated: computed(() => state() === 'initiated'),
|
|
519
|
+
isEmpty: computed(() => Object.keys(data()).length === 0),
|
|
520
|
+
snapshot: computed(() => cloneDeep(data())), // Current data snapshot
|
|
521
|
+
initial: computed(() => cloneDeep(initialSnapshot())), // Initial snapshot
|
|
522
|
+
previous: computed(() => cloneDeep(previousSnapshot())), // Previous snapshot
|
|
523
|
+
changeEvent: computed(() => lastChange()), // Reactive last change event
|
|
524
|
+
})),
|
|
525
|
+
// Methods for State Management
|
|
526
|
+
withMethods((store) => ({
|
|
527
|
+
// Update a specific value
|
|
528
|
+
update(path, value) {
|
|
529
|
+
const currentData = cloneDeep(store.data());
|
|
530
|
+
const oldValue = get(currentData, path);
|
|
531
|
+
// Skip if the value hasn't changed
|
|
532
|
+
if (isEqual(oldValue, value)) {
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
// Update the value and prepare the change event
|
|
536
|
+
const updatedData = setSmart(currentData, path, value);
|
|
537
|
+
const changeEvent = {
|
|
538
|
+
oldValue,
|
|
539
|
+
newValue: value,
|
|
540
|
+
path,
|
|
541
|
+
state: 'changed',
|
|
542
|
+
data: updatedData,
|
|
543
|
+
};
|
|
544
|
+
// Patch the state
|
|
545
|
+
patchState(store, {
|
|
546
|
+
previousSnapshot: store.snapshot(), // Save the previous state
|
|
547
|
+
data: updatedData,
|
|
548
|
+
state: 'changed',
|
|
549
|
+
lastChange: changeEvent,
|
|
550
|
+
});
|
|
551
|
+
},
|
|
552
|
+
// Reset to the initial state
|
|
553
|
+
reset() {
|
|
554
|
+
const initialData = store.initial();
|
|
555
|
+
const changeEvent = {
|
|
556
|
+
oldValue: cloneDeep(store.data()), // Current data becomes old value
|
|
557
|
+
newValue: cloneDeep(initialData), // Reset to the initial state
|
|
558
|
+
path: '',
|
|
559
|
+
state: 'restored',
|
|
560
|
+
data: initialData,
|
|
561
|
+
};
|
|
562
|
+
patchState(store, {
|
|
563
|
+
previousSnapshot: store.snapshot(), // Save the previous state
|
|
564
|
+
data: initialData,
|
|
565
|
+
state: 'restored',
|
|
566
|
+
lastChange: changeEvent,
|
|
567
|
+
});
|
|
568
|
+
},
|
|
569
|
+
// Initialize the state
|
|
570
|
+
set(initialData) {
|
|
571
|
+
const currentData = store.data();
|
|
572
|
+
if (isEqual(currentData, initialData)) {
|
|
573
|
+
return; // Skip if the current state matches the initial state
|
|
574
|
+
}
|
|
575
|
+
const changeEvent = {
|
|
576
|
+
oldValue: null,
|
|
577
|
+
newValue: cloneDeep(initialData),
|
|
578
|
+
path: '',
|
|
579
|
+
state: 'initiated',
|
|
580
|
+
data: initialData,
|
|
581
|
+
};
|
|
582
|
+
patchState(store, {
|
|
583
|
+
initialSnapshot: cloneDeep(initialData), // Save the initial state
|
|
584
|
+
previousSnapshot: store.snapshot(), // Save the current state as the previous
|
|
585
|
+
data: initialData,
|
|
586
|
+
state: 'initiated',
|
|
587
|
+
lastChange: changeEvent,
|
|
588
|
+
});
|
|
589
|
+
},
|
|
590
|
+
// Get a specific value
|
|
591
|
+
getValue(path) {
|
|
592
|
+
return get(store.data(), path);
|
|
593
|
+
},
|
|
594
|
+
})));
|
|
595
|
+
|
|
862
596
|
class AXPWidgetContainerComponent {
|
|
863
597
|
set context(value) {
|
|
864
598
|
this.contextService.set(value);
|
|
@@ -930,6 +664,8 @@ class AXPWidgetRendererDirective {
|
|
|
930
664
|
this.node = input.required();
|
|
931
665
|
this._options = signal({});
|
|
932
666
|
this.options = this._options.asReadonly();
|
|
667
|
+
this.onOptionsChanged = output();
|
|
668
|
+
this.onValueChanged = output();
|
|
933
669
|
this.mergedOptions = signal({});
|
|
934
670
|
this.injector = inject(Injector);
|
|
935
671
|
this.builderService = inject(AXPLayoutBuilderService);
|
|
@@ -1033,6 +769,12 @@ class AXPWidgetRendererDirective {
|
|
|
1033
769
|
this.instance.index = this.index();
|
|
1034
770
|
this.instance.mode = this.mode();
|
|
1035
771
|
this.instance.setStatus(AXPWidgetStatus.Rendered);
|
|
772
|
+
this.instance?.onOptionsChanged?.pipe(this.unsubscriber.takeUntilDestroy).subscribe((c) => {
|
|
773
|
+
this.onOptionsChanged.emit({ sender: this, widget: c.sender });
|
|
774
|
+
});
|
|
775
|
+
this.instance?.onValueChanged?.pipe(this.unsubscriber.takeUntilDestroy).subscribe((c) => {
|
|
776
|
+
this.onValueChanged.emit({ sender: this, widget: c.sender });
|
|
777
|
+
});
|
|
1036
778
|
await this.updateValueBasedOnFormula();
|
|
1037
779
|
await this.assignTriggers();
|
|
1038
780
|
//
|
|
@@ -1227,7 +969,7 @@ class AXPWidgetRendererDirective {
|
|
|
1227
969
|
}
|
|
1228
970
|
};
|
|
1229
971
|
const actions = Array.isArray(t.action) ? t.action : [t.action];
|
|
1230
|
-
actions.forEach(a => exec(a));
|
|
972
|
+
actions.forEach((a) => exec(a));
|
|
1231
973
|
});
|
|
1232
974
|
});
|
|
1233
975
|
}
|
|
@@ -1265,7 +1007,7 @@ class AXPWidgetRendererDirective {
|
|
|
1265
1007
|
}
|
|
1266
1008
|
}
|
|
1267
1009
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1268
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.3", type: AXPWidgetRendererDirective, isStandalone: false, selector: "[axp-widget-renderer]", inputs: { parentNode: { classPropertyName: "parentNode", publicName: "parentNode", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
1010
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.3", type: AXPWidgetRendererDirective, isStandalone: false, selector: "[axp-widget-renderer]", inputs: { parentNode: { classPropertyName: "parentNode", publicName: "parentNode", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onOptionsChanged: "onOptionsChanged", onValueChanged: "onValueChanged" }, providers: [
|
|
1269
1011
|
{
|
|
1270
1012
|
provide: AXUnsubscriber,
|
|
1271
1013
|
},
|
|
@@ -1345,8 +1087,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1345
1087
|
args: ['AXPLayoutBuilderModuleFactory']
|
|
1346
1088
|
}] }] });
|
|
1347
1089
|
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1090
|
+
const AXP_WIDGET_DATASOURCE_PROVIDER = new InjectionToken('AXP_WIDGET_DATASOURCE_PROVIDER');
|
|
1091
|
+
class AXPWidgetDataSourceProviderService {
|
|
1092
|
+
constructor() {
|
|
1093
|
+
this.providers = inject(AXP_WIDGET_DATASOURCE_PROVIDER, { optional: true });
|
|
1094
|
+
}
|
|
1095
|
+
async items() {
|
|
1096
|
+
const items = [];
|
|
1097
|
+
if (Array.isArray(this.providers)) {
|
|
1098
|
+
for (const provider of this.providers) {
|
|
1099
|
+
items.push(...(await provider.items()));
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
return items;
|
|
1103
|
+
}
|
|
1104
|
+
async get(name) {
|
|
1105
|
+
return (await this.items()).find((c) => c.name == name);
|
|
1106
|
+
}
|
|
1107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1108
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, providedIn: 'root' }); }
|
|
1109
|
+
}
|
|
1110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, decorators: [{
|
|
1111
|
+
type: Injectable,
|
|
1112
|
+
args: [{ providedIn: 'root' }]
|
|
1113
|
+
}] });
|
|
1114
|
+
|
|
1115
|
+
const AXP_WIDGETS_LAYOUT_CATEGORY = {
|
|
1116
|
+
name: 'layout',
|
|
1350
1117
|
order: 1,
|
|
1351
1118
|
title: 'Layout',
|
|
1352
1119
|
};
|
|
@@ -1383,9 +1150,277 @@ var AXPWidgetGroupEnum;
|
|
|
1383
1150
|
AXPWidgetGroupEnum["EntityWidget"] = "entity-widget";
|
|
1384
1151
|
})(AXPWidgetGroupEnum || (AXPWidgetGroupEnum = {}));
|
|
1385
1152
|
|
|
1153
|
+
class AXPBaseWidgetComponent extends AXPLayoutElement {
|
|
1154
|
+
constructor() {
|
|
1155
|
+
super(...arguments);
|
|
1156
|
+
this.token = inject(AXP_WIDGET_TOKEN);
|
|
1157
|
+
this.host = inject(ElementRef).nativeElement;
|
|
1158
|
+
this.layoutService = inject(AXPLayoutBuilderService);
|
|
1159
|
+
this.contextService = inject(AXPLayoutBuilderContextStore);
|
|
1160
|
+
this.config = this.token.config;
|
|
1161
|
+
this.node = this.token.node;
|
|
1162
|
+
this.name = this.token.node.name;
|
|
1163
|
+
this._options = signal(this.token.options ?? {});
|
|
1164
|
+
this.options = this._options.asReadonly();
|
|
1165
|
+
this.onOptionsChanged = new Subject();
|
|
1166
|
+
this._status = signal(AXPWidgetStatus.Rendering);
|
|
1167
|
+
this.status = this._status.asReadonly();
|
|
1168
|
+
this.onStatusChanged = new BehaviorSubject(this._status());
|
|
1169
|
+
this.#statusEffect = effect(() => {
|
|
1170
|
+
this.onStatusChanged.next(this.status());
|
|
1171
|
+
});
|
|
1172
|
+
this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()));
|
|
1173
|
+
this._children = signal(this.token.node.children ?? []);
|
|
1174
|
+
this.children = this._children.asReadonly();
|
|
1175
|
+
}
|
|
1176
|
+
get id() {
|
|
1177
|
+
return this._id;
|
|
1178
|
+
}
|
|
1179
|
+
#statusEffect;
|
|
1180
|
+
outputs() {
|
|
1181
|
+
return [];
|
|
1182
|
+
}
|
|
1183
|
+
ngOnInit() {
|
|
1184
|
+
if (get(this.node, '__meta__.added')) {
|
|
1185
|
+
this.onAdded();
|
|
1186
|
+
}
|
|
1187
|
+
this.setStatus(AXPWidgetStatus.Rendered);
|
|
1188
|
+
}
|
|
1189
|
+
setStatus(status) {
|
|
1190
|
+
this._status.set(status);
|
|
1191
|
+
this.layoutService.updateStatus();
|
|
1192
|
+
}
|
|
1193
|
+
setOptions(values) {
|
|
1194
|
+
this._options.set({ ...this.options(), ...values });
|
|
1195
|
+
this.onOptionsChanged.next({ sender: this });
|
|
1196
|
+
}
|
|
1197
|
+
output(name) {
|
|
1198
|
+
const outputs = this.outputs().map((c) => (typeof c == 'string' ? { name: c, value: c } : c));
|
|
1199
|
+
if (outputs.some((c) => c.name == name)) {
|
|
1200
|
+
const opt = get(this, name);
|
|
1201
|
+
if (typeof opt == 'function') {
|
|
1202
|
+
return opt();
|
|
1203
|
+
}
|
|
1204
|
+
return opt;
|
|
1205
|
+
}
|
|
1206
|
+
return null;
|
|
1207
|
+
}
|
|
1208
|
+
call(name, ...args) {
|
|
1209
|
+
const fn = get(this, name);
|
|
1210
|
+
if (fn && typeof fn == 'function') {
|
|
1211
|
+
fn.bind(this)(...args);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
setChildren(children) {
|
|
1215
|
+
this._children.set([...children]);
|
|
1216
|
+
}
|
|
1217
|
+
onAdded() { }
|
|
1218
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1219
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPBaseWidgetComponent }); }
|
|
1220
|
+
}
|
|
1221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
|
|
1222
|
+
type: Injectable
|
|
1223
|
+
}] });
|
|
1224
|
+
class AXPLayoutWidgetComponent extends AXPBaseWidgetComponent {
|
|
1225
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1226
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutWidgetComponent }); }
|
|
1227
|
+
}
|
|
1228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutWidgetComponent, decorators: [{
|
|
1229
|
+
type: Injectable
|
|
1230
|
+
}] });
|
|
1231
|
+
class AXPValueWidgetComponent extends AXPLayoutWidgetComponent {
|
|
1232
|
+
constructor() {
|
|
1233
|
+
super(...arguments);
|
|
1234
|
+
this.path = this.token.node.path;
|
|
1235
|
+
this.defaultValue = this.token.node.defaultValue;
|
|
1236
|
+
this._isValueWidget = false;
|
|
1237
|
+
this.isValueWidget = () => this._isValueWidget;
|
|
1238
|
+
this.onValueChanged = new Subject();
|
|
1239
|
+
this.fullPath = signal(null);
|
|
1240
|
+
this.getValue = computed(() => {
|
|
1241
|
+
return this.fullPath() ? this.extractValue(this.fullPath()) : null;
|
|
1242
|
+
}, { equal: isEqual });
|
|
1243
|
+
this.validationRules = computed(() => {
|
|
1244
|
+
const validationsRaw = this.options()['validations'];
|
|
1245
|
+
if (validationsRaw == null) {
|
|
1246
|
+
return [];
|
|
1247
|
+
}
|
|
1248
|
+
return Object.values(this.options()['validations'])
|
|
1249
|
+
.filter((c) => c != null)
|
|
1250
|
+
.map((c) => ({
|
|
1251
|
+
rule: c.rule,
|
|
1252
|
+
message: c.message,
|
|
1253
|
+
options: c.options,
|
|
1254
|
+
}));
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
ngOnInit() {
|
|
1258
|
+
this._isValueWidget = this.config.properties?.some((c) => c.name == 'path') ?? false;
|
|
1259
|
+
if (this.isValueWidget()) {
|
|
1260
|
+
this.detectFullPath();
|
|
1261
|
+
if (!isNil(this.defaultValue) && isNil(this.getValue())) {
|
|
1262
|
+
this.setValue(this.defaultValue);
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
//
|
|
1266
|
+
super.ngOnInit();
|
|
1267
|
+
}
|
|
1268
|
+
extractValue(path) {
|
|
1269
|
+
const rawValue = this.contextService.getValue(path);
|
|
1270
|
+
if (this.node.valueTransforms?.getter) {
|
|
1271
|
+
return this.node.valueTransforms?.getter(rawValue);
|
|
1272
|
+
}
|
|
1273
|
+
return rawValue;
|
|
1274
|
+
}
|
|
1275
|
+
setValue(value) {
|
|
1276
|
+
if (this.node.valueTransforms?.setter) {
|
|
1277
|
+
value = this.node.valueTransforms?.setter(value);
|
|
1278
|
+
}
|
|
1279
|
+
const oldValue = this.getValue();
|
|
1280
|
+
value = isUndefined(value) ? null : value;
|
|
1281
|
+
if (isNil(value) && isNil(oldValue)) {
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
if (isEqual(oldValue, value)) {
|
|
1285
|
+
return;
|
|
1286
|
+
}
|
|
1287
|
+
if (this.fullPath()) {
|
|
1288
|
+
this.contextService.update(this.fullPath(), value);
|
|
1289
|
+
this.onValueChanged.next({ sender: this });
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
detectFullPath() {
|
|
1293
|
+
const sections = [];
|
|
1294
|
+
const ids = [];
|
|
1295
|
+
//
|
|
1296
|
+
let parent = this;
|
|
1297
|
+
//
|
|
1298
|
+
while (parent) {
|
|
1299
|
+
const isValueWidget = parent instanceof AXPValueWidgetComponent && parent.isValueWidget() && parent.index == null;
|
|
1300
|
+
const valueParent = parent;
|
|
1301
|
+
const path = valueParent.path ?? (isValueWidget ? valueParent.name : null);
|
|
1302
|
+
const id = valueParent.name;
|
|
1303
|
+
//
|
|
1304
|
+
if (path) {
|
|
1305
|
+
sections.push(path);
|
|
1306
|
+
}
|
|
1307
|
+
if (parent.index != null && isValueWidget) {
|
|
1308
|
+
sections.push(`[${parent.index}]`);
|
|
1309
|
+
}
|
|
1310
|
+
if (id) {
|
|
1311
|
+
ids.push(id);
|
|
1312
|
+
if (parent.index != null) {
|
|
1313
|
+
ids.push(`${parent.index}`);
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
parent = parent.parent;
|
|
1317
|
+
}
|
|
1318
|
+
//
|
|
1319
|
+
this.fullPath.set(sections.reverse().join('.'));
|
|
1320
|
+
this._id = this.name || this.parent ? ids.reverse().join('_') : null;
|
|
1321
|
+
if (this._id) {
|
|
1322
|
+
this.layoutService.registerWidget(this._id, this);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
handleValueChanged(e) {
|
|
1326
|
+
if (e.isUserInteraction) {
|
|
1327
|
+
this.setValue(e.value);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPValueWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1331
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPValueWidgetComponent }); }
|
|
1332
|
+
}
|
|
1333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
|
|
1334
|
+
type: Injectable
|
|
1335
|
+
}] });
|
|
1336
|
+
class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
|
|
1337
|
+
constructor() {
|
|
1338
|
+
super(...arguments);
|
|
1339
|
+
this.dataService = inject(AXPWidgetDataSourceProviderService);
|
|
1340
|
+
this.dataSource = signal(convertArrayToDataSource([]));
|
|
1341
|
+
this.textField = computed(() => this.options()['textField'] ?? 'title');
|
|
1342
|
+
this.valueField = computed(() => this.options()['valueField'] ?? 'id');
|
|
1343
|
+
this.selectedItems = signal([]);
|
|
1344
|
+
this.rf = effect(async () => {
|
|
1345
|
+
const rawValue = this.options()['dataSource'];
|
|
1346
|
+
// static datasource class
|
|
1347
|
+
if (rawValue instanceof AXDataSource) {
|
|
1348
|
+
this.dataSource.set(rawValue);
|
|
1349
|
+
}
|
|
1350
|
+
// static array datasource
|
|
1351
|
+
else if (Array.isArray(rawValue)) {
|
|
1352
|
+
const ds = new AXDataSource({
|
|
1353
|
+
key: this.valueField(),
|
|
1354
|
+
pageSize: 10,
|
|
1355
|
+
load: async (e) => {
|
|
1356
|
+
const raw = this.options()['dataSource'];
|
|
1357
|
+
return {
|
|
1358
|
+
items: raw,
|
|
1359
|
+
total: raw.length,
|
|
1360
|
+
};
|
|
1361
|
+
},
|
|
1362
|
+
byKey: (key) => {
|
|
1363
|
+
const raw = this.options()['dataSource'];
|
|
1364
|
+
const item = raw.filter((c) => c[this.valueField()] == key);
|
|
1365
|
+
return Promise.resolve(item[0]);
|
|
1366
|
+
},
|
|
1367
|
+
});
|
|
1368
|
+
this.dataSource.set(ds);
|
|
1369
|
+
}
|
|
1370
|
+
// resolve data source by name
|
|
1371
|
+
else if (rawValue && (typeof rawValue == 'string' || typeof rawValue == 'object')) {
|
|
1372
|
+
const id = typeof rawValue == 'object' ? rawValue['id'] : rawValue;
|
|
1373
|
+
const c = await this.dataService.get(id);
|
|
1374
|
+
if (this.mode == 'designer' && c?.samples?.length) {
|
|
1375
|
+
this.dataSource.set(convertArrayToDataSource(c.samples, {
|
|
1376
|
+
key: this.valueField(),
|
|
1377
|
+
pageSize: 500,
|
|
1378
|
+
}));
|
|
1379
|
+
}
|
|
1380
|
+
else {
|
|
1381
|
+
const ds = c?.source();
|
|
1382
|
+
if (ds && ds instanceof Promise) {
|
|
1383
|
+
const d = await ds;
|
|
1384
|
+
this.dataSource.set(d);
|
|
1385
|
+
}
|
|
1386
|
+
else if (ds) {
|
|
1387
|
+
this.dataSource.set(ds);
|
|
1388
|
+
}
|
|
1389
|
+
// empty datasource
|
|
1390
|
+
else {
|
|
1391
|
+
this.dataSource.set(convertArrayToDataSource([]));
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
// empty datasource
|
|
1396
|
+
else {
|
|
1397
|
+
this.dataSource.set(convertArrayToDataSource([]));
|
|
1398
|
+
}
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1402
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent }); }
|
|
1403
|
+
}
|
|
1404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
|
|
1405
|
+
type: Injectable
|
|
1406
|
+
}] });
|
|
1407
|
+
class AXPColumnWidgetComponent {
|
|
1408
|
+
constructor() {
|
|
1409
|
+
this.token = inject(AXP_WIDGET_COLUMN_TOKEN);
|
|
1410
|
+
this.path = this.token.path;
|
|
1411
|
+
this.options = this.token.options ?? {};
|
|
1412
|
+
this.rawValue = null;
|
|
1413
|
+
}
|
|
1414
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1415
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent }); }
|
|
1416
|
+
}
|
|
1417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
|
|
1418
|
+
type: Injectable
|
|
1419
|
+
}] });
|
|
1420
|
+
|
|
1386
1421
|
/**
|
|
1387
1422
|
* Generated bundle index. Do not edit.
|
|
1388
1423
|
*/
|
|
1389
1424
|
|
|
1390
|
-
export { AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPLayoutBuilderContextStore, AXPLayoutBuilderModule, AXPLayoutBuilderService, AXPLayoutContextChangeEvent, AXPLayoutElement, AXPPageStatus,
|
|
1425
|
+
export { AXPBaseWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPLayoutBuilderContextStore, AXPLayoutBuilderModule, AXPLayoutBuilderService, AXPLayoutContextChangeEvent, AXPLayoutElement, AXPLayoutWidgetComponent, AXPPageStatus, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetDataSourceProviderService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DATASOURCE_PROVIDER, AXP_WIDGET_TOKEN, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty };
|
|
1391
1426
|
//# sourceMappingURL=acorex-platform-layout-builder.mjs.map
|