@acorex/platform 18.0.14 → 18.0.16
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/core/index.d.ts +1 -0
- package/core/utils/data-conditioner.d.ts +6 -0
- package/esm2022/auth/lib/session.service.mjs +7 -5
- package/esm2022/common/lib/schema/widget/widget-renderer.mjs +3 -3
- package/esm2022/core/index.mjs +2 -1
- package/esm2022/core/utils/data-conditioner.mjs +138 -0
- package/esm2022/layout/builder/lib/builder/widget-catalog.mjs +3 -2
- package/esm2022/layout/builder/lib/builder/widget-registery.service.mjs +2 -2
- package/esm2022/layout/builder/lib/builder/widget-renderer.component.mjs +3 -3
- package/esm2022/layout/builder/lib/builder/widget.types.mjs +17 -10
- package/esm2022/layout/designer/index.mjs +2 -7
- package/esm2022/layout/designer/lib/{helpers → designer/components}/add-widget-button/add-widget-button.component.mjs +2 -2
- package/esm2022/layout/designer/lib/designer/components/board/board.component.mjs +112 -0
- package/esm2022/layout/designer/lib/designer/components/breadcrumbs/breadcrumbs.component.mjs +64 -0
- package/esm2022/layout/designer/lib/designer/components/drawers/data-sources/data-sources.component.mjs +32 -0
- package/esm2022/layout/designer/lib/designer/components/drawers/history/history.component.mjs +30 -0
- package/esm2022/layout/designer/lib/designer/components/drawers/outline/outline.component.mjs +61 -0
- package/esm2022/layout/designer/lib/designer/components/drawers/pages/pages.component.mjs +28 -0
- package/esm2022/layout/designer/lib/designer/components/grid-drawer/grid-drawer.component.mjs +82 -0
- package/esm2022/layout/designer/lib/designer/components/header-menu/header-menu.component.mjs +24 -0
- package/esm2022/layout/designer/lib/{widget-picker → designer/components/widget-picker}/widget-picker.component.mjs +1 -1
- package/esm2022/layout/designer/lib/designer/designer.component.mjs +28 -17
- package/esm2022/layout/designer/lib/designer/index.mjs +8 -0
- package/esm2022/layout/designer/lib/designer/shared/command.mjs +185 -0
- package/esm2022/layout/designer/lib/designer/shared/designer-connector.service.mjs +10 -0
- package/esm2022/layout/designer/lib/designer/shared/designer.service.mjs +488 -0
- package/esm2022/layout/designer/lib/designer/shared/designer.typs.mjs +2 -0
- package/esm2022/layout/designer/lib/designer/shared/drawer-content/drawer-content.component.mjs +16 -0
- package/esm2022/layout/designer/lib/designer/shared/widget-designer-renderer.directive.mjs +224 -0
- package/esm2022/layout/designer/lib/preview/preview.component.mjs +3 -3
- package/esm2022/layout/designer/lib/property-viewer/widget-property-viewer.component.mjs +17 -5
- package/esm2022/layout/entity/lib/entity-master-create.viewmodel.mjs +2 -5
- package/esm2022/layout/entity/lib/entity-master-list.viewmodel.mjs +15 -5
- package/esm2022/layout/entity/lib/entity-registery.service.mjs +3 -3
- package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget.config.mjs +2 -1
- package/esm2022/themes/default/index.mjs +3 -2
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.mjs +29 -20
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-create-view/entity-master-create-view.component.mjs +19 -9
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-single-view/comments/comment-list-view.component.mjs +123 -0
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-single-view/comments/comments.service.mjs +3 -0
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.mjs +22 -23
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-single-view/overview/entity-single-overview.component.mjs +68 -0
- package/esm2022/themes/default/lib/layouts/entity-layouts/index.mjs +2 -0
- package/esm2022/widgets/lib/properties/data-source.props.mjs +21 -0
- package/esm2022/widgets/lib/properties/editors.props.mjs +27 -90
- package/esm2022/widgets/lib/properties/general.props.mjs +124 -0
- package/esm2022/widgets/lib/properties/index.mjs +4 -1
- package/esm2022/widgets/lib/properties/layout.props.mjs +138 -33
- package/esm2022/widgets/lib/properties/table-column.props.mjs +2 -2
- package/esm2022/widgets/lib/widgets/actions/button/button-widget-designer.component.mjs +54 -0
- package/esm2022/widgets/lib/widgets/actions/button/button-widget-view.component.mjs +3 -2
- package/esm2022/widgets/lib/widgets/actions/button/button-widget.config.mjs +3 -2
- package/esm2022/widgets/lib/widgets/advance/file/file-box-widget-edit.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/advance/file/file-box-widget.config.mjs +4 -2
- package/esm2022/widgets/lib/widgets/advance/gallery/gallery-widget-edit.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/advance/gallery/gallery-widget.config.mjs +2 -1
- package/esm2022/widgets/lib/widgets/advance/map/index.mjs +1 -4
- package/esm2022/widgets/lib/widgets/advance/map/map-box-widget-edit.component.mjs +54 -157
- package/esm2022/widgets/lib/widgets/advance/map/map-box-widget-view.component.mjs +40 -53
- package/esm2022/widgets/lib/widgets/advance/map/map-box-widget.config.mjs +100 -11
- package/esm2022/widgets/lib/widgets/advance/qrcode/qrcode-widget-view.component.mjs +23 -14
- package/esm2022/widgets/lib/widgets/advance/qrcode/qrcode-widget.config.mjs +9 -7
- package/esm2022/widgets/lib/widgets/advance/signature/signature-pad-widget-edit.component.mjs +12 -3
- package/esm2022/widgets/lib/widgets/advance/signature/signature-pad-widget.config.mjs +5 -6
- package/esm2022/widgets/lib/widgets/editors/checkbox/checkbox-widget-designer.component.mjs +54 -0
- package/esm2022/widgets/lib/widgets/editors/checkbox/checkbox-widget-edit.component.mjs +21 -21
- package/esm2022/widgets/lib/widgets/editors/checkbox/checkbox-widget-view.component.mjs +4 -1
- package/esm2022/widgets/lib/widgets/editors/checkbox/checkbox-widget.config.mjs +14 -5
- package/esm2022/widgets/lib/widgets/editors/color/color-box-widget-designer.component.mjs +53 -0
- package/esm2022/widgets/lib/widgets/editors/color/color-box-widget-edit.component.mjs +24 -12
- package/esm2022/widgets/lib/widgets/editors/color/color-box-widget.config.mjs +15 -6
- package/esm2022/widgets/lib/widgets/editors/contact/contact-widget-edit.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/editors/contact/contact-widget.config.mjs +2 -1
- package/esm2022/widgets/lib/widgets/editors/date-time/date-time-box-widget-edit.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/editors/date-time/date-time-box-widget.config.mjs +5 -2
- package/esm2022/widgets/lib/widgets/editors/email/email-box-widget-edit.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/editors/email/email-box-widget.config.mjs +4 -2
- package/esm2022/widgets/lib/widgets/editors/large-text/large-text-widget-edit.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/editors/large-text/large-text-widget.config.mjs +4 -2
- package/esm2022/widgets/lib/widgets/editors/link/link-widget-edit.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/editors/link/link-widget.config.mjs +2 -1
- package/esm2022/widgets/lib/widgets/editors/number/number-box-widget-edit.component.mjs +14 -5
- package/esm2022/widgets/lib/widgets/editors/number/number-box-widget.config.mjs +4 -2
- package/esm2022/widgets/lib/widgets/editors/password/password-box-widget-edit.component.mjs +12 -8
- package/esm2022/widgets/lib/widgets/editors/password/password-box-widget.config.mjs +4 -2
- package/esm2022/widgets/lib/widgets/editors/phone/phone-box-widget-edit.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/editors/phone/phone-box-widget.config.mjs +2 -1
- package/esm2022/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.mjs +14 -5
- package/esm2022/widgets/lib/widgets/editors/rich-text/rich-text-widget.config.mjs +4 -2
- package/esm2022/widgets/lib/widgets/editors/select/select-box-widget-edit.component.mjs +25 -4
- package/esm2022/widgets/lib/widgets/editors/select/select-box-widget-view.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/editors/select/select-box-widget.config.mjs +2 -1
- package/esm2022/widgets/lib/widgets/editors/selection-list/index.mjs +2 -1
- package/esm2022/widgets/lib/widgets/editors/selection-list/selection-list-widget-designer.component.mjs +75 -0
- package/esm2022/widgets/lib/widgets/editors/selection-list/selection-list-widget-edit.component.mjs +25 -13
- package/esm2022/widgets/lib/widgets/editors/selection-list/selection-list-widget-view.component.mjs +2 -3
- package/esm2022/widgets/lib/widgets/editors/selection-list/selection-list-widget.config.mjs +16 -3
- package/esm2022/widgets/lib/widgets/editors/text/text-box-widget-edit.component.mjs +13 -4
- package/esm2022/widgets/lib/widgets/editors/text/text-box-widget.config.mjs +4 -2
- package/esm2022/widgets/lib/widgets/editors/toggle/toggle-widget-edit.component.mjs +14 -4
- package/esm2022/widgets/lib/widgets/editors/toggle/toggle-widget.config.mjs +4 -2
- package/esm2022/widgets/lib/widgets/layout/block/block-widget-designer.component.mjs +40 -17
- package/esm2022/widgets/lib/widgets/layout/block/block-widget-view.component.mjs +17 -3
- package/esm2022/widgets/lib/widgets/layout/block/block-widget.config.mjs +9 -4
- package/esm2022/widgets/lib/widgets/layout/document/document-widget.config.mjs +2 -2
- package/esm2022/widgets/lib/widgets/layout/form-field/form-field-widget-designer.component.mjs +19 -9
- package/esm2022/widgets/lib/widgets/layout/form-field/form-field-widget.config.mjs +4 -3
- package/esm2022/widgets/lib/widgets/layout/grid/grid-widget-designer.component.mjs +21 -10
- package/esm2022/widgets/lib/widgets/layout/grid/grid-widget.config.mjs +8 -5
- package/esm2022/widgets/lib/widgets/layout/grid-item/grid-item-widget-designer.component.mjs +49 -41
- package/esm2022/widgets/lib/widgets/layout/grid-item/grid-item-widget.config.mjs +6 -9
- package/esm2022/widgets/lib/widgets/layout/grid-row/grid-row-widget-designer.component.mjs +84 -0
- package/esm2022/widgets/lib/widgets/layout/grid-row/grid-row-widget-print.component.mjs +19 -0
- package/esm2022/widgets/lib/widgets/layout/grid-row/grid-row-widget-view.component.mjs +18 -0
- package/esm2022/widgets/lib/widgets/layout/grid-row/grid-row-widget.config.mjs +28 -0
- package/esm2022/widgets/lib/widgets/layout/grid-row/index.mjs +5 -0
- package/esm2022/widgets/lib/widgets/layout/page/page-widget-designer.component.mjs +8 -9
- package/esm2022/widgets/lib/widgets/layout/page/page-widget-view.component.mjs +1 -2
- package/esm2022/widgets/lib/widgets/layout/page/page-widget.config.mjs +8 -4
- package/esm2022/widgets/lib/widgets/layout/repeater/repeater-widget-designer.component.mjs +6 -6
- package/esm2022/widgets/lib/widgets/layout/repeater/repeater-widget.config.mjs +2 -2
- package/esm2022/widgets/lib/widgets/layout/text-block/text-block-widget-designer.component.mjs +38 -0
- package/esm2022/widgets/lib/widgets/layout/text-block/text-block-widget-view.component.mjs +3 -2
- package/esm2022/widgets/lib/widgets/layout/text-block/text-block-widget.config.mjs +5 -5
- package/esm2022/widgets/lib/widgets.module.mjs +4 -1
- package/fesm2022/acorex-platform-auth.mjs +6 -4
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +1 -1
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +139 -1
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +21 -13
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer-preview.component-CaRHf4x_.mjs +23 -0
- package/fesm2022/acorex-platform-layout-designer-preview.component-CaRHf4x_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-designer-widget-picker.component-DXgcm-fP.mjs → acorex-platform-layout-designer-widget-picker.component-BZryrCyh.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-designer-widget-picker.component-BZryrCyh.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-designer.mjs +496 -345
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +14 -6
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-DKNRxpQk.mjs → acorex-platform-themes-default-entity-master-create-view.component-Q8eTfAVx.mjs} +23 -13
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Q8eTfAVx.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-BDk03AnX.mjs → acorex-platform-themes-default-entity-master-modify-view.component-BijYXMme.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BijYXMme.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +226 -66
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets-button-widget-designer.component-C0S_HJkl.mjs +57 -0
- package/fesm2022/acorex-platform-widgets-button-widget-designer.component-C0S_HJkl.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-DAGbdSTk.mjs +57 -0
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-DAGbdSTk.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-view.component-BCsej7C6.mjs → acorex-platform-widgets-checkbox-widget-view.component-tPk6Gylo.mjs} +4 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-tPk6Gylo.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-Bb3aXCNZ.mjs +56 -0
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-Bb3aXCNZ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-DlfG4EP1.mjs → acorex-platform-widgets-page-widget-designer.component-6BMZ0qRw.mjs} +8 -9
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-6BMZ0qRw.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-Bi9hlpvB.mjs +41 -0
- package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-Bi9hlpvB.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +1391 -777
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/widget.types.d.ts +20 -8
- package/layout/designer/index.d.ts +1 -6
- package/layout/designer/lib/{board → designer/components/board}/board.component.d.ts +3 -1
- package/layout/designer/lib/{breadcrumbs → designer/components/breadcrumbs}/breadcrumbs.component.d.ts +1 -1
- package/layout/designer/lib/designer/components/drawers/data-sources/data-sources.component.d.ts +12 -0
- package/layout/designer/lib/{history → designer/components/drawers/history}/history.component.d.ts +1 -1
- package/layout/designer/lib/{outline → designer/components/drawers/outline}/outline.component.d.ts +1 -1
- package/layout/designer/lib/{pages → designer/components/drawers/pages}/pages.component.d.ts +1 -1
- package/layout/designer/lib/{header-menu → designer/components/header-menu}/header-menu.component.d.ts +1 -1
- package/layout/designer/lib/designer/designer.component.d.ts +1 -1
- package/layout/designer/lib/designer/index.d.ts +7 -0
- package/layout/designer/lib/designer/shared/designer-connector.service.d.ts +11 -0
- package/layout/designer/lib/{designer.service.d.ts → designer/shared/designer.service.d.ts} +9 -12
- package/layout/designer/lib/designer/shared/designer.typs.d.ts +4 -0
- package/layout/designer/lib/designer/shared/drawer-content/drawer-content.component.d.ts +8 -0
- package/layout/designer/lib/{widget-designer-renderer.component.d.ts → designer/shared/widget-designer-renderer.directive.d.ts} +6 -8
- package/layout/designer/lib/property-viewer/widget-property-viewer.component.d.ts +8 -0
- package/layout/entity/lib/entity-registery.service.d.ts +1 -1
- package/package.json +7 -7
- package/themes/default/index.d.ts +2 -1
- package/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.d.ts +7 -2
- package/themes/default/lib/layouts/entity-layouts/entity-master-create-view/entity-master-create-view.component.d.ts +1 -1
- package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/comments/comment-list-view.component.d.ts +33 -0
- package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/comments/comments.service.d.ts +11 -0
- package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +3 -2
- package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/overview/entity-single-overview.component.d.ts +11 -0
- package/themes/default/lib/layouts/entity-layouts/index.d.ts +1 -0
- package/widgets/lib/properties/data-source.props.d.ts +2 -0
- package/widgets/lib/properties/editors.props.d.ts +2 -5
- package/widgets/lib/properties/general.props.d.ts +7 -0
- package/widgets/lib/properties/index.d.ts +3 -0
- package/widgets/lib/properties/layout.props.d.ts +12 -3
- package/widgets/lib/widgets/actions/button/button-widget-designer.component.d.ts +15 -0
- package/widgets/lib/widgets/actions/button/button-widget-view.component.d.ts +1 -1
- package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/advance/gallery/gallery-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/advance/map/index.d.ts +0 -3
- package/widgets/lib/widgets/advance/map/map-box-widget-edit.component.d.ts +10 -32
- package/widgets/lib/widgets/advance/map/map-box-widget-view.component.d.ts +6 -11
- package/widgets/lib/widgets/advance/qrcode/qrcode-widget-view.component.d.ts +5 -4
- package/widgets/lib/widgets/advance/signature/signature-pad-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/checkbox/checkbox-widget-designer.component.d.ts +10 -0
- package/widgets/lib/widgets/editors/checkbox/checkbox-widget-edit.component.d.ts +2 -5
- package/widgets/lib/widgets/editors/checkbox/checkbox-widget-view.component.d.ts +3 -0
- package/widgets/lib/widgets/editors/color/color-box-widget-designer.component.d.ts +11 -0
- package/widgets/lib/widgets/editors/color/color-box-widget-edit.component.d.ts +3 -0
- package/widgets/lib/widgets/editors/contact/contact-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/date-time/date-time-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/email/email-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/large-text/large-text-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/link/link-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/number/number-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/password/password-box-widget-edit.component.d.ts +1 -2
- package/widgets/lib/widgets/editors/phone/phone-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/select/select-box-widget-view.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/selection-list/index.d.ts +1 -0
- package/widgets/lib/widgets/editors/selection-list/selection-list-widget-designer.component.d.ts +16 -0
- package/widgets/lib/widgets/editors/selection-list/selection-list-widget-edit.component.d.ts +4 -2
- package/widgets/lib/widgets/editors/selection-list/selection-list-widget-view.component.d.ts +1 -1
- package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/toggle/toggle-widget-edit.component.d.ts +2 -1
- package/widgets/lib/widgets/layout/block/block-widget-designer.component.d.ts +5 -1
- package/widgets/lib/widgets/layout/block/block-widget-view.component.d.ts +3 -0
- package/widgets/lib/widgets/layout/form-field/form-field-widget-designer.component.d.ts +2 -1
- package/widgets/lib/widgets/layout/grid/grid-widget-designer.component.d.ts +3 -2
- package/widgets/lib/widgets/layout/grid-item/grid-item-widget-designer.component.d.ts +6 -4
- package/widgets/lib/widgets/layout/grid-row/grid-row-widget-designer.component.d.ts +15 -0
- package/widgets/lib/widgets/layout/grid-row/grid-row-widget-print.component.d.ts +6 -0
- package/widgets/lib/widgets/layout/grid-row/grid-row-widget-view.component.d.ts +6 -0
- package/widgets/lib/widgets/layout/grid-row/grid-row-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/layout/grid-row/index.d.ts +4 -0
- package/widgets/lib/widgets/layout/page/page-widget-designer.component.d.ts +3 -2
- package/widgets/lib/widgets/layout/text-block/text-block-widget-designer.component.d.ts +11 -0
- package/widgets/lib/widgets/layout/text-block/text-block-widget-view.component.d.ts +1 -1
- package/esm2022/layout/designer/lib/board/board.component.mjs +0 -92
- package/esm2022/layout/designer/lib/breadcrumbs/breadcrumbs.component.mjs +0 -64
- package/esm2022/layout/designer/lib/command.mjs +0 -185
- package/esm2022/layout/designer/lib/designer.service.mjs +0 -399
- package/esm2022/layout/designer/lib/header-menu/header-menu.component.mjs +0 -24
- package/esm2022/layout/designer/lib/helpers/grid-drawer/grid-drawer.component.mjs +0 -82
- package/esm2022/layout/designer/lib/history/history.component.mjs +0 -28
- package/esm2022/layout/designer/lib/outline/outline.component.mjs +0 -56
- package/esm2022/layout/designer/lib/pages/pages.component.mjs +0 -28
- package/esm2022/layout/designer/lib/widget-designer-renderer.component.mjs +0 -251
- package/esm2022/widgets/lib/widgets/advance/map/map-box-widget-column.component.mjs +0 -19
- package/esm2022/widgets/lib/widgets/advance/map/map-box-widget-filter.component.mjs +0 -20
- package/esm2022/widgets/lib/widgets/advance/map/map-box-widget-print.component.mjs +0 -19
- package/fesm2022/acorex-platform-layout-designer-preview.component-xkvSLydm.mjs +0 -23
- package/fesm2022/acorex-platform-layout-designer-preview.component-xkvSLydm.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-designer-widget-picker.component-DXgcm-fP.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-DKNRxpQk.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BDk03AnX.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-BCsej7C6.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DlfG4EP1.mjs.map +0 -1
- package/widgets/lib/widgets/advance/map/map-box-widget-column.component.d.ts +0 -6
- package/widgets/lib/widgets/advance/map/map-box-widget-filter.component.d.ts +0 -6
- package/widgets/lib/widgets/advance/map/map-box-widget-print.component.d.ts +0 -6
- /package/layout/designer/lib/{helpers → designer/components}/add-widget-button/add-widget-button.component.d.ts +0 -0
- /package/layout/designer/lib/{helpers → designer/components}/grid-drawer/grid-drawer.component.d.ts +0 -0
- /package/layout/designer/lib/{widget-picker → designer/components/widget-picker}/widget-picker.component.d.ts +0 -0
- /package/layout/designer/lib/{command.d.ts → designer/shared/command.d.ts} +0 -0
|
@@ -1,35 +1,113 @@
|
|
|
1
|
-
import * as i3$1 from '@acorex/platform/layout/builder';
|
|
2
|
-
import { AXPWidgetRegistryService, AXPWidgetsCatalog, AXP_WIDGET_TOKEN, AXPContainerWidgetComponent, AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
1
|
import * as i0 from '@angular/core';
|
|
6
|
-
import {
|
|
7
|
-
import * as
|
|
8
|
-
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
9
|
-
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
10
|
-
import * as i2 from '@angular/cdk/portal';
|
|
11
|
-
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
12
|
-
import { merge, cloneDeep, sortBy, set, get, capitalize, unionBy, isArray, isNil, isEmpty } from 'lodash-es';
|
|
13
|
-
import { Subject, first, merge as merge$1 } from 'rxjs';
|
|
14
|
-
import { AXPopupService } from '@acorex/components/popup';
|
|
15
|
-
import * as i2$1 from '@acorex/components/button';
|
|
2
|
+
import { model, output, computed, signal, Component, ChangeDetectionStrategy, HostListener, HostBinding, Injectable, inject, ViewEncapsulation, input, EventEmitter, effect, untracked, Output, Injector, NgZone, ViewContainerRef, Directive, ElementRef, ViewChild } from '@angular/core';
|
|
3
|
+
import * as i2 from '@acorex/components/button';
|
|
16
4
|
import { AXButtonModule } from '@acorex/components/button';
|
|
17
|
-
import * as
|
|
5
|
+
import * as i1 from '@acorex/components/decorators';
|
|
18
6
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
7
|
+
import * as i3 from '@acorex/platform/layout/builder';
|
|
8
|
+
import { AXPWidgetRegistryService, AXPWidgetsCatalog, AXPContainerWidgetComponent, AXPLayoutBuilderModule, AXP_WIDGET_TOKEN } from '@acorex/platform/layout/builder';
|
|
9
|
+
import { AXPopupService } from '@acorex/components/popup';
|
|
10
|
+
import { merge, cloneDeep, sortBy, set, get, capitalize, unionBy, isArray, isNil, isEmpty } from 'lodash-es';
|
|
11
|
+
import { Subject, first, merge as merge$1 } from 'rxjs';
|
|
12
|
+
import { AXFileService } from '@acorex/core/file';
|
|
13
|
+
import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
|
|
19
14
|
import * as i5 from '@acorex/components/button-group';
|
|
20
15
|
import { AXButtonGroupModule } from '@acorex/components/button-group';
|
|
21
|
-
import * as i3$
|
|
16
|
+
import * as i3$1 from '@acorex/components/drawer';
|
|
22
17
|
import { AXDrawerModule } from '@acorex/components/drawer';
|
|
23
18
|
import * as i4 from '@acorex/components/dropdown';
|
|
24
19
|
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
25
|
-
import * as i2$
|
|
20
|
+
import * as i2$2 from '@acorex/components/menu';
|
|
26
21
|
import { AXMenuModule } from '@acorex/components/menu';
|
|
27
|
-
import * as i2$
|
|
22
|
+
import * as i2$1 from '@acorex/components/tabs';
|
|
28
23
|
import { AXTabsModule } from '@acorex/components/tabs';
|
|
29
|
-
import * as i1$
|
|
30
|
-
import {
|
|
31
|
-
import * as i1$
|
|
24
|
+
import * as i1$3 from '@angular/common';
|
|
25
|
+
import { CommonModule } from '@angular/common';
|
|
26
|
+
import * as i1$1 from '@acorex/components/collapse';
|
|
32
27
|
import { AXCollapseModule } from '@acorex/components/collapse';
|
|
28
|
+
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
29
|
+
import * as i1$2 from '@acorex/components/breadcrumbs';
|
|
30
|
+
import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
|
|
31
|
+
|
|
32
|
+
class AXPDesignerGridDrawerComponent {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.rowsCount = model(5, { alias: "rows" });
|
|
35
|
+
this.colsCount = model(12, { alias: "columns" });
|
|
36
|
+
this.onSelect = output();
|
|
37
|
+
this.rows = computed(() => Array.from({ length: this.rowsCount() }).map((v, index) => index + 1));
|
|
38
|
+
this.columns = computed(() => Array.from({ length: this.colsCount() }).map((v, index) => index + 1));
|
|
39
|
+
this.rangeR = signal(0);
|
|
40
|
+
this.rangeC = signal(0);
|
|
41
|
+
}
|
|
42
|
+
handleMouseHover(r, c) {
|
|
43
|
+
this.rangeR.set(r);
|
|
44
|
+
this.rangeC.set(c);
|
|
45
|
+
}
|
|
46
|
+
handleClick(r, c) {
|
|
47
|
+
this.onSelect.emit({ rows: r, cols: c });
|
|
48
|
+
}
|
|
49
|
+
handleMouseLeave(event) {
|
|
50
|
+
this.rangeR.set(0);
|
|
51
|
+
this.rangeC.set(0);
|
|
52
|
+
}
|
|
53
|
+
get __style() {
|
|
54
|
+
return {
|
|
55
|
+
"--cols-width": `${this.colsCount() == 0 ? 0 : (100 / this.colsCount())}%`
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerGridDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
59
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerGridDrawerComponent, isStandalone: true, selector: "axp-designer-grid-drawer", inputs: { rowsCount: { classPropertyName: "rowsCount", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, colsCount: { classPropertyName: "colsCount", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowsCount: "rowsChange", colsCount: "columnsChange", onSelect: "onSelect" }, host: { listeners: { "mouseleave": "handleMouseLeave($event)" }, properties: { "style": "this.__style" } }, ngImport: i0, template: `
|
|
60
|
+
<table class="table-picker" >
|
|
61
|
+
<tbody>
|
|
62
|
+
@for(r of rows();track $index)
|
|
63
|
+
{
|
|
64
|
+
<tr >
|
|
65
|
+
@for(c of columns();track $index)
|
|
66
|
+
{
|
|
67
|
+
<td (mouseenter)="handleMouseHover(r,c)" [class.picked]="c<=rangeC() && r<=rangeR()" (click)="handleClick(r,c)">
|
|
68
|
+
</td>
|
|
69
|
+
}
|
|
70
|
+
</tr>
|
|
71
|
+
}
|
|
72
|
+
<tr>
|
|
73
|
+
<td [attr.colspan]="columns().length" class="ax-text-center">
|
|
74
|
+
<small >{{rangeC()}}*{{rangeR()}}</small>
|
|
75
|
+
</td>
|
|
76
|
+
</tr>
|
|
77
|
+
</tbody>
|
|
78
|
+
</table>
|
|
79
|
+
`, isInline: true, styles: [":host table{width:100%;border-collapse:collapse;--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}:host table td{height:2.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-border-default),var(--tw-border-opacity));width:var(--cols-width)}:host table td:after{content:\"\";display:block}:host table td.picked{border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-border-default),var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-primary-100),var(--tw-bg-opacity))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerGridDrawerComponent, decorators: [{
|
|
82
|
+
type: Component,
|
|
83
|
+
args: [{ selector: 'axp-designer-grid-drawer', template: `
|
|
84
|
+
<table class="table-picker" >
|
|
85
|
+
<tbody>
|
|
86
|
+
@for(r of rows();track $index)
|
|
87
|
+
{
|
|
88
|
+
<tr >
|
|
89
|
+
@for(c of columns();track $index)
|
|
90
|
+
{
|
|
91
|
+
<td (mouseenter)="handleMouseHover(r,c)" [class.picked]="c<=rangeC() && r<=rangeR()" (click)="handleClick(r,c)">
|
|
92
|
+
</td>
|
|
93
|
+
}
|
|
94
|
+
</tr>
|
|
95
|
+
}
|
|
96
|
+
<tr>
|
|
97
|
+
<td [attr.colspan]="columns().length" class="ax-text-center">
|
|
98
|
+
<small >{{rangeC()}}*{{rangeR()}}</small>
|
|
99
|
+
</td>
|
|
100
|
+
</tr>
|
|
101
|
+
</tbody>
|
|
102
|
+
</table>
|
|
103
|
+
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [], styles: [":host table{width:100%;border-collapse:collapse;--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}:host table td{height:2.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-border-default),var(--tw-border-opacity));width:var(--cols-width)}:host table td:after{content:\"\";display:block}:host table td.picked{border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-border-default),var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-primary-100),var(--tw-bg-opacity))}\n"] }]
|
|
104
|
+
}], propDecorators: { handleMouseLeave: [{
|
|
105
|
+
type: HostListener,
|
|
106
|
+
args: ['mouseleave', ['$event']]
|
|
107
|
+
}], __style: [{
|
|
108
|
+
type: HostBinding,
|
|
109
|
+
args: ['style']
|
|
110
|
+
}] } });
|
|
33
111
|
|
|
34
112
|
// AddWidgetCommand
|
|
35
113
|
class AddWidgetCommand {
|
|
@@ -216,6 +294,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
216
294
|
class AXPDesignerService {
|
|
217
295
|
constructor() {
|
|
218
296
|
this.popupService = inject(AXPopupService);
|
|
297
|
+
this.fileService = inject(AXFileService);
|
|
298
|
+
this.loadingService = inject(AXLoadingDialogService);
|
|
219
299
|
this.widgetRegisteryService = inject(AXPWidgetRegistryService);
|
|
220
300
|
this.document = signal(this.createDoc());
|
|
221
301
|
this.currentPageIndex = signal(0);
|
|
@@ -284,7 +364,7 @@ class AXPDesignerService {
|
|
|
284
364
|
return undefined;
|
|
285
365
|
}
|
|
286
366
|
async showPicker(currentNode) {
|
|
287
|
-
const com = await import('./acorex-platform-layout-designer-widget-picker.component-
|
|
367
|
+
const com = await import('./acorex-platform-layout-designer-widget-picker.component-BZryrCyh.mjs').then((c) => c.AXPDesignerWidgetPickerComponent);
|
|
288
368
|
const result = await this.popupService.open(com, {
|
|
289
369
|
title: 'Widget Gallery',
|
|
290
370
|
size: 'md',
|
|
@@ -302,13 +382,19 @@ class AXPDesignerService {
|
|
|
302
382
|
}
|
|
303
383
|
return widgets;
|
|
304
384
|
}
|
|
385
|
+
new() {
|
|
386
|
+
this.commandManager.clear();
|
|
387
|
+
this.document.set(this.createDoc());
|
|
388
|
+
this.currentPage.set(this.document().children?.[0]);
|
|
389
|
+
this.reRenderPage();
|
|
390
|
+
}
|
|
305
391
|
createDoc() {
|
|
306
392
|
const doc = {
|
|
307
393
|
type: AXPWidgetsCatalog.document,
|
|
308
394
|
children: [this.createPage()],
|
|
309
395
|
name: 'document',
|
|
310
396
|
};
|
|
311
|
-
set(doc, '__meta__.id',
|
|
397
|
+
set(doc, '__meta__.id', this.generateUniqueId());
|
|
312
398
|
return doc;
|
|
313
399
|
}
|
|
314
400
|
createPage() {
|
|
@@ -318,7 +404,7 @@ class AXPDesignerService {
|
|
|
318
404
|
children: [],
|
|
319
405
|
name: 'page-layout1',
|
|
320
406
|
};
|
|
321
|
-
set(page, '__meta__.id',
|
|
407
|
+
set(page, '__meta__.id', this.generateUniqueId());
|
|
322
408
|
set(page, '__meta__.config', config);
|
|
323
409
|
return page;
|
|
324
410
|
}
|
|
@@ -345,6 +431,9 @@ class AXPDesignerService {
|
|
|
345
431
|
}
|
|
346
432
|
reRenderPage() {
|
|
347
433
|
this.currentPage.set({ ...this.currentPage() });
|
|
434
|
+
setTimeout(() => {
|
|
435
|
+
this.refresh({ widget: this.currentPage() });
|
|
436
|
+
});
|
|
348
437
|
}
|
|
349
438
|
findWidgetById(root, id) {
|
|
350
439
|
if (get(root, '__meta__.id') === id) {
|
|
@@ -378,7 +467,7 @@ class AXPDesignerService {
|
|
|
378
467
|
let current = node;
|
|
379
468
|
while (current) {
|
|
380
469
|
const config = this.widgetRegisteryService.resolve(current.type);
|
|
381
|
-
if (config && config.container) {
|
|
470
|
+
if (config && config.type == 'container') {
|
|
382
471
|
return current;
|
|
383
472
|
}
|
|
384
473
|
current = this.findParent(get(current, '__meta__.id')); // Use findParent to navigate upwards
|
|
@@ -389,7 +478,7 @@ class AXPDesignerService {
|
|
|
389
478
|
if (node.children) {
|
|
390
479
|
for (const child of node.children) {
|
|
391
480
|
const config = this.widgetRegisteryService.resolve(child.type);
|
|
392
|
-
if (config && config.container) {
|
|
481
|
+
if (config && config.type == 'container') {
|
|
393
482
|
return child;
|
|
394
483
|
}
|
|
395
484
|
const foundContainer = this.findNearestContainer(child, false); // Continue searching downwards
|
|
@@ -410,7 +499,7 @@ class AXPDesignerService {
|
|
|
410
499
|
this.commandManager.executeCommand(new AddWidgetCommand(cloned, currentNode, currentNode));
|
|
411
500
|
//
|
|
412
501
|
cloned.name = this.generateUniqueName(node.type);
|
|
413
|
-
set(cloned, '__meta__.id',
|
|
502
|
+
set(cloned, '__meta__.id', this.generateUniqueId());
|
|
414
503
|
set(cloned, '__meta__.config', config);
|
|
415
504
|
//
|
|
416
505
|
this.reRenderPage();
|
|
@@ -463,10 +552,11 @@ class AXPDesignerService {
|
|
|
463
552
|
clearHistory() {
|
|
464
553
|
this.commandManager.clear();
|
|
465
554
|
}
|
|
466
|
-
|
|
555
|
+
removeMetaProp(obj) {
|
|
556
|
+
const nodeName = '__meta__';
|
|
467
557
|
// Check if the object is an array
|
|
468
558
|
if (Array.isArray(obj)) {
|
|
469
|
-
return obj.map((item) => this.
|
|
559
|
+
return obj.map((item) => this.removeMetaProp(item));
|
|
470
560
|
}
|
|
471
561
|
else if (typeof obj === 'object' && obj !== null) {
|
|
472
562
|
// Create a new object to store the result
|
|
@@ -474,7 +564,7 @@ class AXPDesignerService {
|
|
|
474
564
|
for (let key in obj) {
|
|
475
565
|
// Only add the key if it's not the nodeName we want to remove
|
|
476
566
|
if (key !== nodeName) {
|
|
477
|
-
newObj[key] = this.
|
|
567
|
+
newObj[key] = this.removeMetaProp(obj[key]);
|
|
478
568
|
}
|
|
479
569
|
}
|
|
480
570
|
return newObj;
|
|
@@ -482,6 +572,22 @@ class AXPDesignerService {
|
|
|
482
572
|
// If the value is not an object or array, return it as is
|
|
483
573
|
return obj;
|
|
484
574
|
}
|
|
575
|
+
async addMetaToNodes(node, processedNodes, progressCallback) {
|
|
576
|
+
// Apply your meta logic here
|
|
577
|
+
const config = this.widgetRegisteryService.resolve(node.type);
|
|
578
|
+
//
|
|
579
|
+
set(node, '__meta__.id', this.generateUniqueId());
|
|
580
|
+
set(node, '__meta__.config', config);
|
|
581
|
+
//
|
|
582
|
+
// Increment the processed node count and update the progress dialog
|
|
583
|
+
processedNodes.count++;
|
|
584
|
+
progressCallback(processedNodes.count);
|
|
585
|
+
// Recursively process child nodes using Promise.all
|
|
586
|
+
if (node.children && node.children.length > 0) {
|
|
587
|
+
node.children = await Promise.all(node.children.map(async (child) => await this.addMetaToNodes(child, processedNodes, progressCallback)));
|
|
588
|
+
}
|
|
589
|
+
return node;
|
|
590
|
+
}
|
|
485
591
|
copy(widget = this.selectedNode()) {
|
|
486
592
|
if (!widget)
|
|
487
593
|
return;
|
|
@@ -519,8 +625,15 @@ class AXPDesignerService {
|
|
|
519
625
|
if (!nearestContainer.children) {
|
|
520
626
|
nearestContainer.children = [];
|
|
521
627
|
}
|
|
522
|
-
|
|
523
|
-
|
|
628
|
+
//
|
|
629
|
+
const setNameId = (node) => {
|
|
630
|
+
set(node, 'name', this.generateUniqueName(node.type));
|
|
631
|
+
set(node, '__meta__.id', this.generateUniqueId());
|
|
632
|
+
node.children?.forEach(n => {
|
|
633
|
+
setNameId(n);
|
|
634
|
+
});
|
|
635
|
+
};
|
|
636
|
+
setNameId(newNode);
|
|
524
637
|
//
|
|
525
638
|
this.commandManager.executeCommand(new AddWidgetCommand(newNode, nearestContainer, nearestContainer));
|
|
526
639
|
//
|
|
@@ -530,10 +643,10 @@ class AXPDesignerService {
|
|
|
530
643
|
});
|
|
531
644
|
}
|
|
532
645
|
export() {
|
|
533
|
-
const json = this.
|
|
646
|
+
const json = this.removeMetaProp(this.document());
|
|
534
647
|
return JSON.stringify(json);
|
|
535
648
|
}
|
|
536
|
-
|
|
649
|
+
downloadJson() {
|
|
537
650
|
// Convert the object to a JSON string
|
|
538
651
|
const jsonStr = this.export();
|
|
539
652
|
// Create a blob object from the JSON string
|
|
@@ -552,11 +665,65 @@ class AXPDesignerService {
|
|
|
552
665
|
URL.revokeObjectURL(url);
|
|
553
666
|
document.body.removeChild(a);
|
|
554
667
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
668
|
+
async importJSon() {
|
|
669
|
+
const files = await this.fileService.choose({ multiple: false, accept: 'application/json' });
|
|
670
|
+
if (files && files.length) {
|
|
671
|
+
const file = files[0];
|
|
672
|
+
const content = await file.text();
|
|
673
|
+
const rootNode = JSON.parse(content);
|
|
674
|
+
const totalNode = this.countTotalNodes(rootNode);
|
|
675
|
+
const processedNodes = { count: 0 };
|
|
676
|
+
const button = {
|
|
677
|
+
text: "Cancel",
|
|
678
|
+
autofocus: true,
|
|
679
|
+
color: 'primary',
|
|
680
|
+
onClick: (e) => {
|
|
681
|
+
dialog.close();
|
|
682
|
+
},
|
|
683
|
+
};
|
|
684
|
+
const dialog = this.loadingService.show({
|
|
685
|
+
mode: 'determinate',
|
|
686
|
+
title: "Import Json File",
|
|
687
|
+
progressColor: 'primary',
|
|
688
|
+
text: "Processing json file",
|
|
689
|
+
status: `0 of ${totalNode}`,
|
|
690
|
+
buttons: [
|
|
691
|
+
button
|
|
692
|
+
]
|
|
693
|
+
});
|
|
694
|
+
try {
|
|
695
|
+
const root = await this.addMetaToNodes(rootNode, processedNodes, (count) => {
|
|
696
|
+
dialog.setProgressValue(Math.ceil(count / totalNode * 100));
|
|
697
|
+
dialog.setProgressStatus(`${count} of ${totalNode}`);
|
|
698
|
+
});
|
|
699
|
+
const page = root.children?.[0];
|
|
700
|
+
this.document.set(root);
|
|
701
|
+
this.currentPage.set(page);
|
|
702
|
+
dialog.setProgressColor("success");
|
|
703
|
+
dialog.setProgressText("Json file processed successfully");
|
|
704
|
+
button.text = "Okay";
|
|
705
|
+
button.color = "success";
|
|
706
|
+
dialog.setProgressValue(100);
|
|
707
|
+
setTimeout(() => {
|
|
708
|
+
this.reRenderPage();
|
|
709
|
+
dialog.close();
|
|
710
|
+
}, 1000);
|
|
711
|
+
}
|
|
712
|
+
catch (error) {
|
|
713
|
+
dialog.setProgressColor("danger");
|
|
714
|
+
dialog.setProgressText(error instanceof Error ? error.message : "Cannot process json file");
|
|
715
|
+
button.text = "Close";
|
|
716
|
+
button.color = "danger";
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
countTotalNodes(node) {
|
|
721
|
+
let count = 1; // Count the current node
|
|
722
|
+
if (node.children && node.children.length > 0) {
|
|
723
|
+
count += node.children.reduce((sum, child) => sum + this.countTotalNodes(child), 0);
|
|
724
|
+
}
|
|
725
|
+
return count;
|
|
726
|
+
}
|
|
560
727
|
generateUniqueName(type) {
|
|
561
728
|
// Normalize the type to follow camelCase convention
|
|
562
729
|
const baseName = type.charAt(0).toLowerCase() + type.slice(1);
|
|
@@ -572,11 +739,9 @@ class AXPDesignerService {
|
|
|
572
739
|
}
|
|
573
740
|
return uniqueName;
|
|
574
741
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
* @param names A set to store existing names.
|
|
579
|
-
*/
|
|
742
|
+
generateUniqueId() {
|
|
743
|
+
return Math.random() * Math.pow(10, 18);
|
|
744
|
+
}
|
|
580
745
|
collectAllNames(node, names) {
|
|
581
746
|
if (node.name) {
|
|
582
747
|
names.add(node.name);
|
|
@@ -588,7 +753,7 @@ class AXPDesignerService {
|
|
|
588
753
|
}
|
|
589
754
|
}
|
|
590
755
|
async openPreview() {
|
|
591
|
-
const com = await import('./acorex-platform-layout-designer-preview.component-
|
|
756
|
+
const com = await import('./acorex-platform-layout-designer-preview.component-CaRHf4x_.mjs').then((c) => c.AXPLayoutDesignerPreviewComponent);
|
|
592
757
|
await this.popupService.open(com, {
|
|
593
758
|
header: false,
|
|
594
759
|
size: 'full',
|
|
@@ -605,7 +770,143 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
605
770
|
type: Injectable
|
|
606
771
|
}] });
|
|
607
772
|
|
|
608
|
-
class
|
|
773
|
+
class AXPDesignerAddWidgetButtonComponent {
|
|
774
|
+
constructor() {
|
|
775
|
+
this.designerService = inject(AXPDesignerService);
|
|
776
|
+
this.parent = inject(AXPContainerWidgetComponent);
|
|
777
|
+
}
|
|
778
|
+
async handleClick(e) {
|
|
779
|
+
e.nativeEvent.stopPropagation();
|
|
780
|
+
await this.designerService.showPicker(this.parent.node);
|
|
781
|
+
}
|
|
782
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerAddWidgetButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
783
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPDesignerAddWidgetButtonComponent, isStandalone: true, selector: "axp-designer-add-widget-button", ngImport: i0, template: `
|
|
784
|
+
<div class="ax-container">
|
|
785
|
+
<ax-button [text]="'Add New Element'" (onClick)="handleClick($event)" [look]="'solid'" [color]="'primary'">
|
|
786
|
+
<ax-icon icon="fa-solid fa-plus"></ax-icon>
|
|
787
|
+
</ax-button>
|
|
788
|
+
</div>
|
|
789
|
+
`, isInline: true, styles: ["axp-designer-add-widget-button .ax-container{margin-left:auto;margin-right:auto;display:flex;justify-content:center;padding:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
790
|
+
}
|
|
791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerAddWidgetButtonComponent, decorators: [{
|
|
792
|
+
type: Component,
|
|
793
|
+
args: [{ selector: 'axp-designer-add-widget-button', template: `
|
|
794
|
+
<div class="ax-container">
|
|
795
|
+
<ax-button [text]="'Add New Element'" (onClick)="handleClick($event)" [look]="'solid'" [color]="'primary'">
|
|
796
|
+
<ax-icon icon="fa-solid fa-plus"></ax-icon>
|
|
797
|
+
</ax-button>
|
|
798
|
+
</div>
|
|
799
|
+
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXButtonModule, AXDecoratorModule], encapsulation: ViewEncapsulation.None, styles: ["axp-designer-add-widget-button .ax-container{margin-left:auto;margin-right:auto;display:flex;justify-content:center;padding:.5rem}\n"] }]
|
|
800
|
+
}] });
|
|
801
|
+
|
|
802
|
+
class AXPWidgetPropertyViewerComponent {
|
|
803
|
+
constructor() {
|
|
804
|
+
this.widget = input.required();
|
|
805
|
+
this.widgetRegistryService = inject(AXPWidgetRegistryService);
|
|
806
|
+
this.connector = inject(AXPDesignerConnectorAbstract);
|
|
807
|
+
this.currentTabIndex = signal(0);
|
|
808
|
+
this.config = signal(null);
|
|
809
|
+
this.allPoperties = [];
|
|
810
|
+
this.tabs = signal([]);
|
|
811
|
+
this.groups = computed(() => {
|
|
812
|
+
return this.tabs().length ? this.tabs()[this.currentTabIndex()].groups : [];
|
|
813
|
+
});
|
|
814
|
+
this.groupCollapsedStates = new Map();
|
|
815
|
+
this.onChanged = new EventEmitter();
|
|
816
|
+
this.context = signal({});
|
|
817
|
+
this.initialContext = {};
|
|
818
|
+
this.functions = {
|
|
819
|
+
getDataSourceNames: this.getDataSourceNames.bind(this)
|
|
820
|
+
};
|
|
821
|
+
effect(() => {
|
|
822
|
+
if (!this.widget())
|
|
823
|
+
return;
|
|
824
|
+
const config = this.widgetRegistryService.resolve(this.widget()?.type);
|
|
825
|
+
if (config) {
|
|
826
|
+
this.initialContext = {};
|
|
827
|
+
this.config.set(config);
|
|
828
|
+
this.fillTabs();
|
|
829
|
+
}
|
|
830
|
+
else {
|
|
831
|
+
console.error(`Invalid widget name: ${this.widget()}`);
|
|
832
|
+
}
|
|
833
|
+
}, { allowSignalWrites: true });
|
|
834
|
+
}
|
|
835
|
+
update(values) {
|
|
836
|
+
this.context.set(merge(cloneDeep(this.context()), values));
|
|
837
|
+
}
|
|
838
|
+
fillTabs() {
|
|
839
|
+
const tabs = [
|
|
840
|
+
{
|
|
841
|
+
name: 'general',
|
|
842
|
+
title: 'General',
|
|
843
|
+
groups: [],
|
|
844
|
+
},
|
|
845
|
+
];
|
|
846
|
+
Object.entries(this.config()?.components ?? {}).forEach((c) => {
|
|
847
|
+
if (c[1].component != null && c[1].properties?.length) {
|
|
848
|
+
tabs.push({ name: c[0], title: capitalize(c[0]), groups: [] });
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
///
|
|
852
|
+
this.allPoperties = [];
|
|
853
|
+
///
|
|
854
|
+
tabs.forEach((tab) => {
|
|
855
|
+
const props = tab.name == 'general'
|
|
856
|
+
? this.config()?.properties ?? []
|
|
857
|
+
: ((this.config()?.components)[tab.name]?.properties ?? []).filter((c) => c.visible);
|
|
858
|
+
//
|
|
859
|
+
this.allPoperties.push(...props);
|
|
860
|
+
tab.groups = unionBy(sortBy(props.map((pg) => ({
|
|
861
|
+
isCollapsed: !!this.groupCollapsedStates.get(pg.group.name),
|
|
862
|
+
name: pg.group.name,
|
|
863
|
+
title: pg.group.title,
|
|
864
|
+
props: sortBy(props.filter((p) => p.group.name == pg.group.name), 'title'),
|
|
865
|
+
})), 'title'), 'name');
|
|
866
|
+
});
|
|
867
|
+
this.tabs.set(tabs.filter((c) => c.groups.length));
|
|
868
|
+
//
|
|
869
|
+
this.initialContext = this.allPoperties
|
|
870
|
+
.filter((c) => (!isArray(c.schema.defaultValue) && !isNil(c.schema.defaultValue)) || (isArray(c.schema.defaultValue) && !isEmpty(c.schema.defaultValue)))
|
|
871
|
+
.reduce((acc, c) => {
|
|
872
|
+
set(acc, c.schema.interface.path, c.schema.defaultValue);
|
|
873
|
+
return acc;
|
|
874
|
+
}, {});
|
|
875
|
+
//
|
|
876
|
+
untracked(() => {
|
|
877
|
+
this.context.set(merge(cloneDeep(this.initialContext), this.widget()));
|
|
878
|
+
this.onChanged.emit({ values: this.context(), mode: 'init' });
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
handleContextChange(e) {
|
|
882
|
+
untracked(() => {
|
|
883
|
+
this.context.set(e.data);
|
|
884
|
+
this.onChanged.emit({ values: this.context(), mode: e.init ? 'init' : 'update' });
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
handleTabChange(event) {
|
|
888
|
+
const indx = event.index;
|
|
889
|
+
if (this.currentTabIndex() != indx) {
|
|
890
|
+
this.currentTabIndex.set(indx);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
handleCollapsedChange(group, collapsed) {
|
|
894
|
+
this.groupCollapsedStates.set(group, collapsed);
|
|
895
|
+
}
|
|
896
|
+
getDataSourceNames() {
|
|
897
|
+
return this.connector.getDataSourcesNames();
|
|
898
|
+
}
|
|
899
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPWidgetPropertyViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
900
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPWidgetPropertyViewerComponent, isStandalone: true, selector: "axp-widget-property-viewer", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onChanged: "onChanged" }, ngImport: i0, template: "<axp-widgets-container [context]=\"context()\" (onChanged)=\"handleContextChange($event)\" [functions]=\"functions\">\n <div class=\"ax-flex ax-flex-col\">\n <div class=\"ax-pb-2\">\n <ax-tabs look=\"default\" (onActiveTabChanged)=\"handleTabChange($event)\" [look]=\"'with-line'\">\n @for( tab of tabs();track $index){\n <ax-tab-item [text]=\"tab.title\" [key]=\"$index.toString()\" [active]=\"currentTabIndex() === $index\">\n </ax-tab-item>\n }\n </ax-tabs>\n </div>\n <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-collapse-group class=\"ax-h-fit\" look=\"blank\">\n @for( group of groups();track $index){\n <ax-collapse [caption]=\"group.title\" look=\"solid\" [(isCollapsed)]=\"group.isCollapsed\"\n (isCollapsedChange)=\"handleCollapsedChange(group.name,$event)\">\n <div class=\"ax-flex ax-flex-col ax-divide-y\">\n @for( p of group.props;track $index){\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <span class=\"ax-font-semibold\">{{p.title}}</span>\n @if(p.schema.interface)\n {\n <axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\">\n </axp-widget-renderer>\n }\n </div>\n }\n </div>\n </ax-collapse>\n }\n </ax-collapse-group>\n </div>\n </div>\n</axp-widgets-container>", styles: ["ax-collapse .ax-collapse-header{font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXCollapseModule }, { kind: "component", type: i1$1.AXCollapseComponent, selector: "ax-collapse", inputs: ["disabled", "look", "isCollapsed", "showHeader", "caption", "icon", "isLoading", "headerTemplate"], outputs: ["onClick", "isCollapsedChange"] }, { kind: "component", type: i1$1.AXCollapseGroupComponent, selector: "ax-collapse-group", inputs: ["look", "accordion", "activeIndex"], outputs: ["accordionChange", "activeIndexChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i2$1.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i2$1.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i3.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "variables", "functions"], outputs: ["onChanged", "contextChange"] }, { kind: "component", type: i3.AXPWidgetRendererComponent, selector: "axp-widget-renderer", inputs: ["node", "mode", "parentNode", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
901
|
+
}
|
|
902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPWidgetPropertyViewerComponent, decorators: [{
|
|
903
|
+
type: Component,
|
|
904
|
+
args: [{ selector: 'axp-widget-property-viewer', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, AXCollapseModule, AXTabsModule, AXPLayoutBuilderModule], template: "<axp-widgets-container [context]=\"context()\" (onChanged)=\"handleContextChange($event)\" [functions]=\"functions\">\n <div class=\"ax-flex ax-flex-col\">\n <div class=\"ax-pb-2\">\n <ax-tabs look=\"default\" (onActiveTabChanged)=\"handleTabChange($event)\" [look]=\"'with-line'\">\n @for( tab of tabs();track $index){\n <ax-tab-item [text]=\"tab.title\" [key]=\"$index.toString()\" [active]=\"currentTabIndex() === $index\">\n </ax-tab-item>\n }\n </ax-tabs>\n </div>\n <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-collapse-group class=\"ax-h-fit\" look=\"blank\">\n @for( group of groups();track $index){\n <ax-collapse [caption]=\"group.title\" look=\"solid\" [(isCollapsed)]=\"group.isCollapsed\"\n (isCollapsedChange)=\"handleCollapsedChange(group.name,$event)\">\n <div class=\"ax-flex ax-flex-col ax-divide-y\">\n @for( p of group.props;track $index){\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <span class=\"ax-font-semibold\">{{p.title}}</span>\n @if(p.schema.interface)\n {\n <axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\">\n </axp-widget-renderer>\n }\n </div>\n }\n </div>\n </ax-collapse>\n }\n </ax-collapse-group>\n </div>\n </div>\n</axp-widgets-container>", styles: ["ax-collapse .ax-collapse-header{font-weight:600}\n"] }]
|
|
905
|
+
}], ctorParameters: () => [], propDecorators: { onChanged: [{
|
|
906
|
+
type: Output
|
|
907
|
+
}] } });
|
|
908
|
+
|
|
909
|
+
class AXPWidgetDesignerRendererDirective {
|
|
609
910
|
/**
|
|
610
911
|
* @ignore
|
|
611
912
|
*/
|
|
@@ -617,12 +918,12 @@ class AXPWidgetDesignerRendererComponent {
|
|
|
617
918
|
this.zone = inject(NgZone);
|
|
618
919
|
this.isLoading = signal(true);
|
|
619
920
|
this.service = inject(AXPDesignerService);
|
|
620
|
-
this.
|
|
921
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
621
922
|
this.parentNode = input();
|
|
622
923
|
this.index = input();
|
|
623
924
|
this.mode = input.required();
|
|
624
925
|
this.node = input.required();
|
|
625
|
-
this.hostElement = () => this.
|
|
926
|
+
this.hostElement = () => this.instance?.host;
|
|
626
927
|
this.isCurrentWidget = (w) => get(w, '__meta__.id') == get(this.node(), '__meta__.id');
|
|
627
928
|
this.service.onUpdate.pipe(this.unsubscriber.takeUntilDestroy).subscribe((c) => {
|
|
628
929
|
if (this.isCurrentWidget(c.widget)) {
|
|
@@ -633,10 +934,10 @@ class AXPWidgetDesignerRendererComponent {
|
|
|
633
934
|
this.service.onSelected.pipe(this.unsubscriber.takeUntilDestroy).subscribe((c) => {
|
|
634
935
|
this.zone.runOutsideAngular(() => {
|
|
635
936
|
if (this.isCurrentWidget(c.widget)) {
|
|
636
|
-
this.
|
|
937
|
+
this.select();
|
|
637
938
|
}
|
|
638
939
|
else {
|
|
639
|
-
this.
|
|
940
|
+
this.unselect();
|
|
640
941
|
}
|
|
641
942
|
});
|
|
642
943
|
});
|
|
@@ -661,6 +962,8 @@ class AXPWidgetDesignerRendererComponent {
|
|
|
661
962
|
}, { allowSignalWrites: true });
|
|
662
963
|
}
|
|
663
964
|
async loadComponent() {
|
|
965
|
+
//console.log('loadComponent', this.node().type);
|
|
966
|
+
this.viewContainerRef.clear();
|
|
664
967
|
this.isLoading.set(true);
|
|
665
968
|
this.config = this.widgetRegistery.resolve(this.node().type);
|
|
666
969
|
//
|
|
@@ -689,28 +992,28 @@ class AXPWidgetDesignerRendererComponent {
|
|
|
689
992
|
],
|
|
690
993
|
});
|
|
691
994
|
var com = await this.config?.components[this.mode()]?.component();
|
|
692
|
-
this.
|
|
693
|
-
this.isLoading.set(false);
|
|
694
|
-
}
|
|
695
|
-
async handleAttached(portalOutletRef) {
|
|
696
|
-
portalOutletRef = portalOutletRef;
|
|
697
|
-
this.instance = portalOutletRef.instance;
|
|
995
|
+
this.instance = this.viewContainerRef.createComponent(com, { injector: token }).instance;
|
|
698
996
|
this.instance.parent = this.parentNode();
|
|
699
997
|
this.instance.index = this.index();
|
|
700
998
|
this.instance.mode = this.mode();
|
|
701
999
|
//
|
|
702
1000
|
this.instance.onReady.pipe(first()).subscribe(() => {
|
|
703
|
-
|
|
704
|
-
|
|
1001
|
+
const host = this.hostElement();
|
|
1002
|
+
host.classList.add("axp-widget-host");
|
|
1003
|
+
if (this.mode() == 'designer' && host) {
|
|
1004
|
+
host.addEventListener('mouseover', (e) => {
|
|
705
1005
|
e.stopPropagation();
|
|
1006
|
+
this.addOverlay();
|
|
706
1007
|
this.service.focus({ widget: this.node() });
|
|
707
1008
|
});
|
|
708
|
-
|
|
1009
|
+
host.addEventListener('mouseleave', (e) => {
|
|
709
1010
|
e.stopPropagation();
|
|
1011
|
+
this.removeOverlay();
|
|
710
1012
|
this.service.focus({ widget: null });
|
|
711
1013
|
});
|
|
712
|
-
|
|
1014
|
+
host.addEventListener('click', (e) => {
|
|
713
1015
|
e.stopPropagation();
|
|
1016
|
+
this.select();
|
|
714
1017
|
this.service.select({ widget: this.node() });
|
|
715
1018
|
});
|
|
716
1019
|
this.service.register({
|
|
@@ -722,13 +1025,22 @@ class AXPWidgetDesignerRendererComponent {
|
|
|
722
1025
|
}
|
|
723
1026
|
});
|
|
724
1027
|
}
|
|
1028
|
+
select() {
|
|
1029
|
+
this.hostElement()?.classList.add('axp-state-selected');
|
|
1030
|
+
this.hostElement()?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
|
1031
|
+
}
|
|
1032
|
+
unselect() {
|
|
1033
|
+
this.hostElement()?.classList.remove('axp-state-selected');
|
|
1034
|
+
}
|
|
725
1035
|
addOverlay() {
|
|
726
1036
|
this.zone.runOutsideAngular(() => {
|
|
727
1037
|
if (this.hostElement()) {
|
|
728
1038
|
this.hostElement()?.classList.add('axp-state-hover');
|
|
729
1039
|
//
|
|
730
|
-
if (this.hostElement().querySelector('.axp-widget-overlay') || this.config?.container)
|
|
1040
|
+
if (this.hostElement().querySelector('.axp-widget-overlay') || this.config?.type == 'container') {
|
|
731
1041
|
return;
|
|
1042
|
+
}
|
|
1043
|
+
;
|
|
732
1044
|
this.overlay = document.createElement('div');
|
|
733
1045
|
this.overlay.classList.add('axp-widget-overlay');
|
|
734
1046
|
this.overlay.addEventListener('click', (e) => {
|
|
@@ -746,7 +1058,6 @@ class AXPWidgetDesignerRendererComponent {
|
|
|
746
1058
|
});
|
|
747
1059
|
}
|
|
748
1060
|
removeOverlay() {
|
|
749
|
-
//console.log('remove', this.node().type);
|
|
750
1061
|
this.zone.runOutsideAngular(() => {
|
|
751
1062
|
if (this.hostElement()) {
|
|
752
1063
|
this.hostElement()?.classList.remove('axp-state-hover');
|
|
@@ -774,14 +1085,8 @@ class AXPWidgetDesignerRendererComponent {
|
|
|
774
1085
|
});
|
|
775
1086
|
this.instance?.setOptions(this.mergedOptions());
|
|
776
1087
|
}
|
|
777
|
-
get __class() {
|
|
778
|
-
if (this.instance instanceof AXPContainerWidgetComponent) {
|
|
779
|
-
return this.instance.outerClass();
|
|
780
|
-
}
|
|
781
|
-
return null;
|
|
782
|
-
}
|
|
783
1088
|
async onKeydownHandler(event) {
|
|
784
|
-
if (this.service.selectedNode() && this.isCurrentWidget(this.service.selectedNode())) {
|
|
1089
|
+
if (this.service.selectedNode() && this.isCurrentWidget(this.service.selectedNode()) && event.target == document.body) {
|
|
785
1090
|
// handle delete
|
|
786
1091
|
if (event.key == "Delete") {
|
|
787
1092
|
event.preventDefault();
|
|
@@ -790,55 +1095,30 @@ class AXPWidgetDesignerRendererComponent {
|
|
|
790
1095
|
}
|
|
791
1096
|
//
|
|
792
1097
|
// handle delete
|
|
793
|
-
if (this.config?.container && event.key == "Insert") {
|
|
1098
|
+
if (this.config?.type == 'container' && event.key == "Insert") {
|
|
794
1099
|
this.service.showPicker(this.node());
|
|
795
1100
|
}
|
|
796
1101
|
}
|
|
797
1102
|
}
|
|
798
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
|
799
|
-
static { this.ɵ
|
|
1103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPWidgetDesignerRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1104
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.0", type: AXPWidgetDesignerRendererDirective, isStandalone: true, selector: "[axp-widget-designer-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 } }, host: { listeners: { "document:keydown": "onKeydownHandler($event)" } }, providers: [
|
|
800
1105
|
{
|
|
801
1106
|
provide: AXUnsubscriber,
|
|
802
1107
|
},
|
|
803
|
-
], ngImport: i0
|
|
804
|
-
@if(mergedOptions().isVisible!=false) { @if(isLoading()){
|
|
805
|
-
<ax-skeleton [animated]="true" class="ax-w-full lg:ax-w-[50%] ax-h-8 ax-rounded"></ax-skeleton>
|
|
806
|
-
} @else {
|
|
807
|
-
<ng-container *ngTemplateOutlet="tt"></ng-container>
|
|
808
|
-
} }
|
|
809
|
-
<ng-template #tt>
|
|
810
|
-
<ng-template [cdkPortalOutlet]="portal" (attached)="handleAttached($event)"></ng-template>
|
|
811
|
-
</ng-template>
|
|
812
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i3.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1108
|
+
], ngImport: i0 }); }
|
|
813
1109
|
}
|
|
814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
|
815
|
-
type:
|
|
1110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPWidgetDesignerRendererDirective, decorators: [{
|
|
1111
|
+
type: Directive,
|
|
816
1112
|
args: [{
|
|
817
|
-
selector: 'axp-widget-designer-renderer',
|
|
818
|
-
template: `
|
|
819
|
-
@if(mergedOptions().isVisible!=false) { @if(isLoading()){
|
|
820
|
-
<ax-skeleton [animated]="true" class="ax-w-full lg:ax-w-[50%] ax-h-8 ax-rounded"></ax-skeleton>
|
|
821
|
-
} @else {
|
|
822
|
-
<ng-container *ngTemplateOutlet="tt"></ng-container>
|
|
823
|
-
} }
|
|
824
|
-
<ng-template #tt>
|
|
825
|
-
<ng-template [cdkPortalOutlet]="portal" (attached)="handleAttached($event)"></ng-template>
|
|
826
|
-
</ng-template>
|
|
827
|
-
`,
|
|
828
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1113
|
+
selector: '[axp-widget-designer-renderer]',
|
|
829
1114
|
standalone: true,
|
|
830
|
-
imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule],
|
|
831
1115
|
providers: [
|
|
832
1116
|
{
|
|
833
1117
|
provide: AXUnsubscriber,
|
|
834
1118
|
},
|
|
835
1119
|
],
|
|
836
|
-
host: { class: 'axp-widget-host' },
|
|
837
1120
|
}]
|
|
838
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
839
|
-
type: HostBinding,
|
|
840
|
-
args: ['class']
|
|
841
|
-
}], onKeydownHandler: [{
|
|
1121
|
+
}], ctorParameters: () => [], propDecorators: { onKeydownHandler: [{
|
|
842
1122
|
type: HostListener,
|
|
843
1123
|
args: ['document:keydown', ['$event']]
|
|
844
1124
|
}] } });
|
|
@@ -915,125 +1195,36 @@ class AXPDesignerBoardComponent {
|
|
|
915
1195
|
removeCustomClass() {
|
|
916
1196
|
this.elementRef.nativeElement.querySelectorAll('style').forEach(s => s.remove());
|
|
917
1197
|
}
|
|
918
|
-
|
|
919
|
-
|
|
1198
|
+
get __style() {
|
|
1199
|
+
const cls = {};
|
|
1200
|
+
cls[`width`] = this.width();
|
|
1201
|
+
return cls;
|
|
1202
|
+
}
|
|
1203
|
+
get __class() {
|
|
1204
|
+
const cls = {};
|
|
1205
|
+
cls[`axp-designer-board`] = true;
|
|
1206
|
+
cls[`axp-state-design`] = true;
|
|
1207
|
+
cls['ax-h-full'] = true;
|
|
1208
|
+
cls['ax-overflow-auto'] = true;
|
|
1209
|
+
cls[`axp-preview-${this.service.size()}`] = true;
|
|
1210
|
+
return cls;
|
|
1211
|
+
}
|
|
1212
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerBoardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1213
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPDesignerBoardComponent, isStandalone: true, selector: "axp-designer-board", host: { properties: { "style": "this.__style", "class": "this.__class" } }, ngImport: i0, template: "<axp-widgets-container [(context)]=\"context\">\n <ng-container axp-widget-designer-renderer [node]=\"service.currentPage()\" [mode]=\"service.mode()\"></ng-container>\n</axp-widgets-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i3.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "variables", "functions"], outputs: ["onChanged", "contextChange"] }, { kind: "directive", type: AXPWidgetDesignerRendererDirective, selector: "[axp-widget-designer-renderer]", inputs: ["parentNode", "index", "mode", "node"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
920
1214
|
}
|
|
921
1215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerBoardComponent, decorators: [{
|
|
922
1216
|
type: Component,
|
|
923
1217
|
args: [{ selector: 'axp-designer-board', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
924
1218
|
CommonModule,
|
|
925
1219
|
AXPLayoutBuilderModule,
|
|
926
|
-
|
|
927
|
-
], template: "<
|
|
928
|
-
}]
|
|
929
|
-
|
|
930
|
-
class AXPDesignerAddWidgetButtonComponent {
|
|
931
|
-
constructor() {
|
|
932
|
-
this.designerService = inject(AXPDesignerService);
|
|
933
|
-
this.parent = inject(AXPContainerWidgetComponent);
|
|
934
|
-
}
|
|
935
|
-
async handleClick(e) {
|
|
936
|
-
e.nativeEvent.stopPropagation();
|
|
937
|
-
await this.designerService.showPicker(this.parent.node);
|
|
938
|
-
}
|
|
939
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerAddWidgetButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
940
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPDesignerAddWidgetButtonComponent, isStandalone: true, selector: "axp-designer-add-widget-button", ngImport: i0, template: `
|
|
941
|
-
<div class="ax-container">
|
|
942
|
-
<ax-button [text]="'Add New Element'" (onClick)="handleClick($event)" [look]="'solid'" [color]="'primary'">
|
|
943
|
-
<ax-icon icon="fa-solid fa-plus"></ax-icon>
|
|
944
|
-
</ax-button>
|
|
945
|
-
</div>
|
|
946
|
-
`, isInline: true, styles: ["axp-designer-add-widget-button .ax-container{margin-left:auto;margin-right:auto;display:flex;justify-content:center;padding:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
947
|
-
}
|
|
948
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerAddWidgetButtonComponent, decorators: [{
|
|
949
|
-
type: Component,
|
|
950
|
-
args: [{ selector: 'axp-designer-add-widget-button', template: `
|
|
951
|
-
<div class="ax-container">
|
|
952
|
-
<ax-button [text]="'Add New Element'" (onClick)="handleClick($event)" [look]="'solid'" [color]="'primary'">
|
|
953
|
-
<ax-icon icon="fa-solid fa-plus"></ax-icon>
|
|
954
|
-
</ax-button>
|
|
955
|
-
</div>
|
|
956
|
-
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXButtonModule, AXDecoratorModule], encapsulation: ViewEncapsulation.None, styles: ["axp-designer-add-widget-button .ax-container{margin-left:auto;margin-right:auto;display:flex;justify-content:center;padding:.5rem}\n"] }]
|
|
957
|
-
}] });
|
|
958
|
-
|
|
959
|
-
class AXPDesignerGridDrawerComponent {
|
|
960
|
-
constructor() {
|
|
961
|
-
this.rowsCount = model(5, { alias: "rows" });
|
|
962
|
-
this.colsCount = model(12, { alias: "columns" });
|
|
963
|
-
this.onSelect = output();
|
|
964
|
-
this.rows = computed(() => Array.from({ length: this.rowsCount() }).map((v, index) => index + 1));
|
|
965
|
-
this.columns = computed(() => Array.from({ length: this.colsCount() }).map((v, index) => index + 1));
|
|
966
|
-
this.rangeR = signal(0);
|
|
967
|
-
this.rangeC = signal(0);
|
|
968
|
-
}
|
|
969
|
-
handleMouseHover(r, c) {
|
|
970
|
-
this.rangeR.set(r);
|
|
971
|
-
this.rangeC.set(c);
|
|
972
|
-
}
|
|
973
|
-
handleClick(r, c) {
|
|
974
|
-
this.onSelect.emit({ rows: r, cols: c });
|
|
975
|
-
}
|
|
976
|
-
handleMouseLeave(event) {
|
|
977
|
-
this.rangeR.set(0);
|
|
978
|
-
this.rangeC.set(0);
|
|
979
|
-
}
|
|
980
|
-
get __style() {
|
|
981
|
-
return {
|
|
982
|
-
"--cols-width": `${this.colsCount() == 0 ? 0 : (100 / this.colsCount())}%`
|
|
983
|
-
};
|
|
984
|
-
}
|
|
985
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerGridDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
986
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerGridDrawerComponent, isStandalone: true, selector: "axp-designer-grid-drawer", inputs: { rowsCount: { classPropertyName: "rowsCount", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, colsCount: { classPropertyName: "colsCount", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowsCount: "rowsChange", colsCount: "columnsChange", onSelect: "onSelect" }, host: { listeners: { "mouseleave": "handleMouseLeave($event)" }, properties: { "style": "this.__style" } }, ngImport: i0, template: `
|
|
987
|
-
<table class="table-picker" >
|
|
988
|
-
<tbody>
|
|
989
|
-
@for(r of rows();track $index)
|
|
990
|
-
{
|
|
991
|
-
<tr >
|
|
992
|
-
@for(c of columns();track $index)
|
|
993
|
-
{
|
|
994
|
-
<td (mouseenter)="handleMouseHover(r,c)" [class.picked]="c<=rangeC() && r<=rangeR()" (click)="handleClick(r,c)">
|
|
995
|
-
</td>
|
|
996
|
-
}
|
|
997
|
-
</tr>
|
|
998
|
-
}
|
|
999
|
-
<tr>
|
|
1000
|
-
<td [attr.colspan]="columns().length" class="ax-text-center">
|
|
1001
|
-
<small >{{rangeC()}}*{{rangeR()}}</small>
|
|
1002
|
-
</td>
|
|
1003
|
-
</tr>
|
|
1004
|
-
</tbody>
|
|
1005
|
-
</table>
|
|
1006
|
-
`, isInline: true, styles: [":host table{width:100%;border-collapse:collapse;--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}:host table td{height:2.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-border-default),var(--tw-border-opacity));width:var(--cols-width)}:host table td:after{content:\"\";display:block}:host table td.picked{border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-border-default),var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-primary-100),var(--tw-bg-opacity))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1007
|
-
}
|
|
1008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerGridDrawerComponent, decorators: [{
|
|
1009
|
-
type: Component,
|
|
1010
|
-
args: [{ selector: 'axp-designer-grid-drawer', template: `
|
|
1011
|
-
<table class="table-picker" >
|
|
1012
|
-
<tbody>
|
|
1013
|
-
@for(r of rows();track $index)
|
|
1014
|
-
{
|
|
1015
|
-
<tr >
|
|
1016
|
-
@for(c of columns();track $index)
|
|
1017
|
-
{
|
|
1018
|
-
<td (mouseenter)="handleMouseHover(r,c)" [class.picked]="c<=rangeC() && r<=rangeR()" (click)="handleClick(r,c)">
|
|
1019
|
-
</td>
|
|
1020
|
-
}
|
|
1021
|
-
</tr>
|
|
1022
|
-
}
|
|
1023
|
-
<tr>
|
|
1024
|
-
<td [attr.colspan]="columns().length" class="ax-text-center">
|
|
1025
|
-
<small >{{rangeC()}}*{{rangeR()}}</small>
|
|
1026
|
-
</td>
|
|
1027
|
-
</tr>
|
|
1028
|
-
</tbody>
|
|
1029
|
-
</table>
|
|
1030
|
-
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [], styles: [":host table{width:100%;border-collapse:collapse;--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}:host table td{height:2.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-border-default),var(--tw-border-opacity));width:var(--cols-width)}:host table td:after{content:\"\";display:block}:host table td.picked{border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-border-default),var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-primary-100),var(--tw-bg-opacity))}\n"] }]
|
|
1031
|
-
}], propDecorators: { handleMouseLeave: [{
|
|
1032
|
-
type: HostListener,
|
|
1033
|
-
args: ['mouseleave', ['$event']]
|
|
1034
|
-
}], __style: [{
|
|
1220
|
+
AXPWidgetDesignerRendererDirective
|
|
1221
|
+
], template: "<axp-widgets-container [(context)]=\"context\">\n <ng-container axp-widget-designer-renderer [node]=\"service.currentPage()\" [mode]=\"service.mode()\"></ng-container>\n</axp-widgets-container>" }]
|
|
1222
|
+
}], propDecorators: { __style: [{
|
|
1035
1223
|
type: HostBinding,
|
|
1036
1224
|
args: ['style']
|
|
1225
|
+
}], __class: [{
|
|
1226
|
+
type: HostBinding,
|
|
1227
|
+
args: ['class']
|
|
1037
1228
|
}] } });
|
|
1038
1229
|
|
|
1039
1230
|
class AXPDesignerBreadcrumbsComponent {
|
|
@@ -1061,7 +1252,7 @@ class AXPDesignerBreadcrumbsComponent {
|
|
|
1061
1252
|
<i class="ax-icon ax-icon-chevron-right"></i>
|
|
1062
1253
|
</ng-template>
|
|
1063
1254
|
</ax-breadcrumbs>
|
|
1064
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "component", type: i1$
|
|
1255
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "component", type: i1$2.AXBreadCrumbsComponent, selector: "ax-breadcrumbs" }, { kind: "component", type: i1$2.AXBreadCrumbsItemComponent, selector: "ax-breadcrumbs-item", inputs: ["disabled", "active"] }, { kind: "ngmodule", type: AXDecoratorModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1065
1256
|
}
|
|
1066
1257
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerBreadcrumbsComponent, decorators: [{
|
|
1067
1258
|
type: Component,
|
|
@@ -1091,20 +1282,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1091
1282
|
}]
|
|
1092
1283
|
}] });
|
|
1093
1284
|
|
|
1094
|
-
class
|
|
1285
|
+
class AXPLayoutDesignerDrawerContentComponent {
|
|
1286
|
+
constructor() { }
|
|
1287
|
+
ngOnInit() { }
|
|
1288
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLayoutDesignerDrawerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1289
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPLayoutDesignerDrawerContentComponent, isStandalone: true, selector: "axp-designer-drawer-content", ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-border-e ax-w-72 ax-h-full\">\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-p-2 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center ax-font-semibold\">\n <ng-content select=\"ax-title\"></ng-content>\n </div>\n <div class=\"ax-flex ax-gap-1 ax-items-center\">\n <ng-content select=\"ax-content[header]\">\n </ng-content>\n <ax-close-button></ax-close-button>\n </div>\n </div>\n <div class=\"ax-flex-1 ax-h-full ax-overflow-auto\">\n <ng-content select=\"ax-content[body]\">\n\n </ng-content>\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }] }); }
|
|
1290
|
+
}
|
|
1291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLayoutDesignerDrawerContentComponent, decorators: [{
|
|
1292
|
+
type: Component,
|
|
1293
|
+
args: [{ standalone: true, imports: [CommonModule, AXDecoratorModule], selector: 'axp-designer-drawer-content', template: "<div class=\"ax-flex ax-flex-col ax-border-e ax-w-72 ax-h-full\">\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-p-2 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center ax-font-semibold\">\n <ng-content select=\"ax-title\"></ng-content>\n </div>\n <div class=\"ax-flex ax-gap-1 ax-items-center\">\n <ng-content select=\"ax-content[header]\">\n </ng-content>\n <ax-close-button></ax-close-button>\n </div>\n </div>\n <div class=\"ax-flex-1 ax-h-full ax-overflow-auto\">\n <ng-content select=\"ax-content[body]\">\n\n </ng-content>\n </div>\n</div>" }]
|
|
1294
|
+
}], ctorParameters: () => [] });
|
|
1295
|
+
|
|
1296
|
+
class AXPDesignerConnectorAbstract {
|
|
1297
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerConnectorAbstract, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1298
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerConnectorAbstract }); }
|
|
1299
|
+
}
|
|
1300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerConnectorAbstract, decorators: [{
|
|
1301
|
+
type: Injectable
|
|
1302
|
+
}] });
|
|
1303
|
+
|
|
1304
|
+
class AXPDesignerDataSourcesComponent {
|
|
1095
1305
|
constructor() {
|
|
1096
1306
|
this.service = inject(AXPDesignerService);
|
|
1307
|
+
this.connector = inject(AXPDesignerConnectorAbstract);
|
|
1308
|
+
this.list = signal([]);
|
|
1097
1309
|
}
|
|
1098
|
-
|
|
1099
|
-
|
|
1310
|
+
async ngOnInit() {
|
|
1311
|
+
this.list.set(await this.connector.getDataSourcesNames());
|
|
1312
|
+
}
|
|
1313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerDataSourcesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1314
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerDataSourcesComponent, isStandalone: true, selector: "axp-designer-data-sources", ngImport: i0, template: "<axp-designer-drawer-content>\n\n <ax-title>Data Sources</ax-title>\n\n <ax-content header>\n <ax-button look=\"ghost\" class=\"ax-xs\" title=\"Add New Data Source\">\n <ax-icon class=\"fa-light fa-plus\"></ax-icon>\n </ax-button>\n </ax-content>\n\n <ax-content body>\n @if(list().length)\n {\n <ul class=\"axp-designer-drawer-list\">\n @for (item of list(); track $index) {\n <li>\n <i class=\"ax-me-1 fa-solid fa-table\"></i>\n {{ item.title }}\n </li>\n }\n </ul>\n }\n @else {\n <div class=\"axp-designer-drawer-empty\">No data source found in the\n document\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: AXPLayoutDesignerDrawerContentComponent, selector: "axp-designer-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1100
1315
|
}
|
|
1101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
|
1316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerDataSourcesComponent, decorators: [{
|
|
1102
1317
|
type: Component,
|
|
1103
|
-
args: [{ standalone: true, imports: [
|
|
1318
|
+
args: [{ selector: 'axp-designer-data-sources', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1104
1319
|
CommonModule,
|
|
1105
1320
|
AXDecoratorModule,
|
|
1106
|
-
|
|
1107
|
-
|
|
1321
|
+
AXButtonModule,
|
|
1322
|
+
AXPLayoutDesignerDrawerContentComponent
|
|
1323
|
+
], template: "<axp-designer-drawer-content>\n\n <ax-title>Data Sources</ax-title>\n\n <ax-content header>\n <ax-button look=\"ghost\" class=\"ax-xs\" title=\"Add New Data Source\">\n <ax-icon class=\"fa-light fa-plus\"></ax-icon>\n </ax-button>\n </ax-content>\n\n <ax-content body>\n @if(list().length)\n {\n <ul class=\"axp-designer-drawer-list\">\n @for (item of list(); track $index) {\n <li>\n <i class=\"ax-me-1 fa-solid fa-table\"></i>\n {{ item.title }}\n </li>\n }\n </ul>\n }\n @else {\n <div class=\"axp-designer-drawer-empty\">No data source found in the\n document\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>" }]
|
|
1324
|
+
}] });
|
|
1325
|
+
|
|
1326
|
+
class AXPDesignerHistoryComponent {
|
|
1327
|
+
constructor() {
|
|
1328
|
+
this.service = inject(AXPDesignerService);
|
|
1329
|
+
}
|
|
1330
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1331
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerHistoryComponent, isStandalone: true, selector: "axp-designer-history", ngImport: i0, template: "<axp-designer-drawer-content>\n\n <ax-title>History</ax-title>\n\n <ax-content header>\n <ax-button look=\"ghost\" class=\"ax-xs\">\n <ax-icon class=\"fa-light fa-ellipsis\"></ax-icon>\n <ax-dropdown-panel class=\"ax-xs\">\n <ax-button-item-list>\n <ax-button-item text=\"Clear\" name=\"add\" (onClick)=\"service.clearHistory()\"> </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </ax-content>\n\n <ax-content body>\n @if(service.history().length)\n {\n <ul class=\"axp-designer-drawer-list\">\n @for (step of service.history(); track $index) {\n <li (click)=\"service.navigateTo($index)\" [class.ax-italic]=\"step.isFuture\"\n [class.ax-text-neutral-400]=\"step.isFuture\" [class.ax-state-selected]=\"step.isCurrent\">\n <i class=\"ax-me-1\" [ngClass]=\"step.icon\"></i>\n {{ step.description }}\n </li>\n }\n </ul>\n }\n @else {\n <div class=\"axp-designer-drawer-empty\">\n No changes have been made yet.\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXPLayoutDesignerDrawerContentComponent, selector: "axp-designer-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1332
|
+
}
|
|
1333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerHistoryComponent, decorators: [{
|
|
1334
|
+
type: Component,
|
|
1335
|
+
args: [{ selector: 'axp-designer-history', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1336
|
+
CommonModule,
|
|
1337
|
+
AXDecoratorModule,
|
|
1338
|
+
AXButtonModule,
|
|
1339
|
+
AXDropdownModule,
|
|
1340
|
+
AXPLayoutDesignerDrawerContentComponent
|
|
1341
|
+
], template: "<axp-designer-drawer-content>\n\n <ax-title>History</ax-title>\n\n <ax-content header>\n <ax-button look=\"ghost\" class=\"ax-xs\">\n <ax-icon class=\"fa-light fa-ellipsis\"></ax-icon>\n <ax-dropdown-panel class=\"ax-xs\">\n <ax-button-item-list>\n <ax-button-item text=\"Clear\" name=\"add\" (onClick)=\"service.clearHistory()\"> </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </ax-content>\n\n <ax-content body>\n @if(service.history().length)\n {\n <ul class=\"axp-designer-drawer-list\">\n @for (step of service.history(); track $index) {\n <li (click)=\"service.navigateTo($index)\" [class.ax-italic]=\"step.isFuture\"\n [class.ax-text-neutral-400]=\"step.isFuture\" [class.ax-state-selected]=\"step.isCurrent\">\n <i class=\"ax-me-1\" [ngClass]=\"step.icon\"></i>\n {{ step.description }}\n </li>\n }\n </ul>\n }\n @else {\n <div class=\"axp-designer-drawer-empty\">\n No changes have been made yet.\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>" }]
|
|
1108
1342
|
}] });
|
|
1109
1343
|
|
|
1110
1344
|
class AXPDesignerOutlineComponent {
|
|
@@ -1146,142 +1380,49 @@ class AXPDesignerOutlineComponent {
|
|
|
1146
1380
|
this.service.focus({ widget: node });
|
|
1147
1381
|
}
|
|
1148
1382
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerOutlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerOutlineComponent, isStandalone: true, selector: "axp-designer-outline", ngImport: i0, template: "<
|
|
1383
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerOutlineComponent, isStandalone: true, selector: "axp-designer-outline", ngImport: i0, template: "<axp-designer-drawer-content>\n\n <ax-title>Outline</ax-title>\n\n <ax-content body>\n @if(root().children?.length)\n {\n <ul class=\"ax-space-y-1 ax-p-1 ax-text-white ax-text-sm\">\n @for( node of root().children;track $index)\n {\n <ng-container [ngTemplateOutlet]=\"sideMenu\" [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n }\n </ul>\n <ng-template #sideMenu let-item>\n <li (click)=\"handleClick($event,item)\" (mouseover)=\"handleMouseOver($event,item)\">\n <div [class.ax-bg-neutral-700]=\"item === service.selectedNode()\"\n class=\"ax-flex ax-flex-row ax-items-center ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out ax-hover:bg-gray-700 ax-py-1 ax-px-2 ax-rounded-sm ax-group\">\n <span class=\"ax-w-5 \">\n @if(item.children?.length)\n {\n <i class=\"fa-solid\" [class.fa-chevron-right]=\"isCollapsed(item)\"\n (click)=\"handleToggleClick($event, item)\" [class.fa-chevron-down]=\"!isCollapsed(item)\"></i>\n }\n </span>\n @let config = getConfig(item);\n <span class=\"ax-w-5\">\n @if(config.icon)\n {\n <i [ngClass]=\"config.icon\"></i>\n }\n </span>\n <span class=\"ax-truncate ax-flex-1 ax-pe-2\">{{config.title}} : {{item.name}}</span>\n <div class=\"ax-invisible group-hover:ax-visible ax-flex ax-gap-2 ax-justify-end \">\n @if(config.type=='container')\n {\n <i class=\"fa-light fa-plus hover:ax-text-primary-500\" (click)=\"service.showPicker(item)\"></i>\n }\n @if(config.name!=\"page-layout\")\n {\n <i class=\"fa-light fa-xmark hover:ax-text-danger-500\" (click)=\"service.removeWidget(item)\"></i>\n }\n </div>\n </div>\n @if(item.children?.length && !isCollapsed(item)) {\n <ul class=\"ax-space-y-1 ax-ps-3 ax-text-white ax-text-sm\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ul>\n }\n </li>\n </ng-template>\n }\n @else {\n <div class=\"axp-designer-drawer-empty\">No widgets found in the page\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: AXPLayoutDesignerDrawerContentComponent, selector: "axp-designer-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1150
1384
|
}
|
|
1151
1385
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerOutlineComponent, decorators: [{
|
|
1152
1386
|
type: Component,
|
|
1153
|
-
args: [{ selector: 'axp-designer-outline', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1387
|
+
args: [{ selector: 'axp-designer-outline', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1388
|
+
CommonModule,
|
|
1389
|
+
AXDecoratorModule,
|
|
1390
|
+
AXPLayoutDesignerDrawerContentComponent
|
|
1391
|
+
], template: "<axp-designer-drawer-content>\n\n <ax-title>Outline</ax-title>\n\n <ax-content body>\n @if(root().children?.length)\n {\n <ul class=\"ax-space-y-1 ax-p-1 ax-text-white ax-text-sm\">\n @for( node of root().children;track $index)\n {\n <ng-container [ngTemplateOutlet]=\"sideMenu\" [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n }\n </ul>\n <ng-template #sideMenu let-item>\n <li (click)=\"handleClick($event,item)\" (mouseover)=\"handleMouseOver($event,item)\">\n <div [class.ax-bg-neutral-700]=\"item === service.selectedNode()\"\n class=\"ax-flex ax-flex-row ax-items-center ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out ax-hover:bg-gray-700 ax-py-1 ax-px-2 ax-rounded-sm ax-group\">\n <span class=\"ax-w-5 \">\n @if(item.children?.length)\n {\n <i class=\"fa-solid\" [class.fa-chevron-right]=\"isCollapsed(item)\"\n (click)=\"handleToggleClick($event, item)\" [class.fa-chevron-down]=\"!isCollapsed(item)\"></i>\n }\n </span>\n @let config = getConfig(item);\n <span class=\"ax-w-5\">\n @if(config.icon)\n {\n <i [ngClass]=\"config.icon\"></i>\n }\n </span>\n <span class=\"ax-truncate ax-flex-1 ax-pe-2\">{{config.title}} : {{item.name}}</span>\n <div class=\"ax-invisible group-hover:ax-visible ax-flex ax-gap-2 ax-justify-end \">\n @if(config.type=='container')\n {\n <i class=\"fa-light fa-plus hover:ax-text-primary-500\" (click)=\"service.showPicker(item)\"></i>\n }\n @if(config.name!=\"page-layout\")\n {\n <i class=\"fa-light fa-xmark hover:ax-text-danger-500\" (click)=\"service.removeWidget(item)\"></i>\n }\n </div>\n </div>\n @if(item.children?.length && !isCollapsed(item)) {\n <ul class=\"ax-space-y-1 ax-ps-3 ax-text-white ax-text-sm\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ul>\n }\n </li>\n </ng-template>\n }\n @else {\n <div class=\"axp-designer-drawer-empty\">No widgets found in the page\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>" }]
|
|
1154
1392
|
}], ctorParameters: () => [] });
|
|
1155
1393
|
|
|
1156
|
-
class
|
|
1157
|
-
constructor() {
|
|
1158
|
-
this.widget = input.required();
|
|
1159
|
-
this.widgetRegistryService = inject(AXPWidgetRegistryService);
|
|
1160
|
-
this.currentTabIndex = signal(0);
|
|
1161
|
-
this.config = signal(null);
|
|
1162
|
-
this.allPoperties = [];
|
|
1163
|
-
this.tabs = signal([]);
|
|
1164
|
-
this.groups = computed(() => {
|
|
1165
|
-
return this.tabs().length ? this.tabs()[this.currentTabIndex()].groups : [];
|
|
1166
|
-
});
|
|
1167
|
-
this.onChanged = new EventEmitter();
|
|
1168
|
-
this.context = signal({});
|
|
1169
|
-
this.initialContext = {};
|
|
1170
|
-
effect(() => {
|
|
1171
|
-
if (!this.widget())
|
|
1172
|
-
return;
|
|
1173
|
-
const config = this.widgetRegistryService.resolve(this.widget()?.type);
|
|
1174
|
-
if (config) {
|
|
1175
|
-
this.initialContext = {};
|
|
1176
|
-
this.config.set(config);
|
|
1177
|
-
this.fillTabs();
|
|
1178
|
-
}
|
|
1179
|
-
else {
|
|
1180
|
-
console.error(`Invalid widget name: ${this.widget()}`);
|
|
1181
|
-
}
|
|
1182
|
-
}, { allowSignalWrites: true });
|
|
1183
|
-
}
|
|
1184
|
-
update(values) {
|
|
1185
|
-
this.context.set(merge(cloneDeep(this.context()), values));
|
|
1186
|
-
}
|
|
1187
|
-
fillTabs() {
|
|
1188
|
-
const tabs = [
|
|
1189
|
-
{
|
|
1190
|
-
name: 'general',
|
|
1191
|
-
title: 'General',
|
|
1192
|
-
groups: [],
|
|
1193
|
-
},
|
|
1194
|
-
];
|
|
1195
|
-
Object.entries(this.config()?.components ?? {}).forEach((c) => {
|
|
1196
|
-
if (c[1].component != null && c[1].properties?.length) {
|
|
1197
|
-
tabs.push({ name: c[0], title: capitalize(c[0]), groups: [] });
|
|
1198
|
-
}
|
|
1199
|
-
});
|
|
1200
|
-
///
|
|
1201
|
-
this.allPoperties = [];
|
|
1202
|
-
///
|
|
1203
|
-
tabs.forEach((tab) => {
|
|
1204
|
-
const props = tab.name == 'general'
|
|
1205
|
-
? this.config()?.properties ?? []
|
|
1206
|
-
: ((this.config()?.components)[tab.name]?.properties ?? []).filter((c) => c.visible);
|
|
1207
|
-
//
|
|
1208
|
-
this.allPoperties.push(...props);
|
|
1209
|
-
tab.groups = unionBy(sortBy(props.map((pg) => ({
|
|
1210
|
-
isCollapsed: false,
|
|
1211
|
-
name: pg.group.name,
|
|
1212
|
-
title: pg.group.title,
|
|
1213
|
-
props: sortBy(props.filter((p) => p.group.name == pg.group.name), 'title'),
|
|
1214
|
-
})), 'title'), 'name');
|
|
1215
|
-
});
|
|
1216
|
-
this.tabs.set(tabs.filter((c) => c.groups.length));
|
|
1217
|
-
//
|
|
1218
|
-
this.initialContext = this.allPoperties
|
|
1219
|
-
.filter((c) => (!isArray(c.schema.defaultValue) && !isNil(c.schema.defaultValue)) || (isArray(c.schema.defaultValue) && !isEmpty(c.schema.defaultValue)))
|
|
1220
|
-
.reduce((acc, c) => {
|
|
1221
|
-
set(acc, c.schema.interface.path, c.schema.defaultValue); // Use lodash's set
|
|
1222
|
-
return acc;
|
|
1223
|
-
}, {});
|
|
1224
|
-
//
|
|
1225
|
-
untracked(() => {
|
|
1226
|
-
this.context.set(merge(cloneDeep(this.initialContext), this.widget()));
|
|
1227
|
-
this.onChanged.emit({ values: this.context(), mode: 'init' });
|
|
1228
|
-
});
|
|
1229
|
-
}
|
|
1230
|
-
handleContextChange(e) {
|
|
1231
|
-
untracked(() => {
|
|
1232
|
-
this.context.set(e.data);
|
|
1233
|
-
this.onChanged.emit({ values: this.context(), mode: e.init ? 'init' : 'update' });
|
|
1234
|
-
});
|
|
1235
|
-
}
|
|
1236
|
-
handleTabChange(event) {
|
|
1237
|
-
const indx = event.index;
|
|
1238
|
-
if (this.currentTabIndex() != indx) {
|
|
1239
|
-
this.currentTabIndex.set(indx);
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPWidgetPropertyViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1243
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPWidgetPropertyViewerComponent, isStandalone: true, selector: "axp-widget-property-viewer", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onChanged: "onChanged" }, ngImport: i0, template: "<axp-widgets-container [context]=\"context()\" (onChanged)=\"handleContextChange($event)\">\n <div class=\"ax-flex ax-flex-col\">\n <div class=\"ax-pb-2\">\n <ax-tabs look=\"default\" (onActiveTabChanged)=\"handleTabChange($event)\" [look]=\"'with-line'\">\n @for( tab of tabs();track $index){\n <ax-tab-item [text]=\"tab.title\" [key]=\"$index.toString()\" [active]=\"currentTabIndex() === $index\">\n </ax-tab-item>\n }\n </ax-tabs>\n </div>\n <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-collapse-group class=\"ax-h-fit\" look=\"blank\">\n @for( group of groups();track $index){\n <ax-collapse [caption]=\"group.title\" look=\"solid\" [(isCollapsed)]=\"group.isCollapsed\">\n <div class=\"ax-flex ax-flex-col ax-divide-y\">\n @for( p of group.props;track $index){\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <span class=\"ax-font-semibold\">{{p.title}}</span>\n @if(p.schema.interface)\n {\n <axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\">\n </axp-widget-renderer>\n }\n </div>\n }\n </div>\n </ax-collapse>\n }\n </ax-collapse-group>\n </div>\n </div>\n</axp-widgets-container>", styles: ["ax-collapse .ax-collapse-header{font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXCollapseModule }, { kind: "component", type: i1$2.AXCollapseComponent, selector: "ax-collapse", inputs: ["disabled", "look", "isCollapsed", "showHeader", "caption", "icon", "isLoading", "headerTemplate"], outputs: ["onClick", "isCollapsedChange"] }, { kind: "component", type: i1$2.AXCollapseGroupComponent, selector: "ax-collapse-group", inputs: ["look", "accordion", "activeIndex"], outputs: ["accordionChange", "activeIndexChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i2$4.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i2$4.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "variables", "functions"], outputs: ["onChanged", "contextChange"] }, { kind: "component", type: i3$1.AXPWidgetRendererComponent, selector: "axp-widget-renderer", inputs: ["node", "mode", "parentNode", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1244
|
-
}
|
|
1245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPWidgetPropertyViewerComponent, decorators: [{
|
|
1246
|
-
type: Component,
|
|
1247
|
-
args: [{ selector: 'axp-widget-property-viewer', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, AXCollapseModule, AXTabsModule, AXPLayoutBuilderModule], template: "<axp-widgets-container [context]=\"context()\" (onChanged)=\"handleContextChange($event)\">\n <div class=\"ax-flex ax-flex-col\">\n <div class=\"ax-pb-2\">\n <ax-tabs look=\"default\" (onActiveTabChanged)=\"handleTabChange($event)\" [look]=\"'with-line'\">\n @for( tab of tabs();track $index){\n <ax-tab-item [text]=\"tab.title\" [key]=\"$index.toString()\" [active]=\"currentTabIndex() === $index\">\n </ax-tab-item>\n }\n </ax-tabs>\n </div>\n <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-collapse-group class=\"ax-h-fit\" look=\"blank\">\n @for( group of groups();track $index){\n <ax-collapse [caption]=\"group.title\" look=\"solid\" [(isCollapsed)]=\"group.isCollapsed\">\n <div class=\"ax-flex ax-flex-col ax-divide-y\">\n @for( p of group.props;track $index){\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <span class=\"ax-font-semibold\">{{p.title}}</span>\n @if(p.schema.interface)\n {\n <axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\">\n </axp-widget-renderer>\n }\n </div>\n }\n </div>\n </ax-collapse>\n }\n </ax-collapse-group>\n </div>\n </div>\n</axp-widgets-container>", styles: ["ax-collapse .ax-collapse-header{font-weight:600}\n"] }]
|
|
1248
|
-
}], ctorParameters: () => [], propDecorators: { onChanged: [{
|
|
1249
|
-
type: Output
|
|
1250
|
-
}] } });
|
|
1251
|
-
|
|
1252
|
-
class AXPDesignerHistoryComponent {
|
|
1394
|
+
class AXPDesignerPagesComponent {
|
|
1253
1395
|
constructor() {
|
|
1254
1396
|
this.service = inject(AXPDesignerService);
|
|
1255
1397
|
}
|
|
1256
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
|
1257
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type:
|
|
1398
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerPagesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1399
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerPagesComponent, isStandalone: true, selector: "axp-designer-pages", ngImport: i0, template: "<axp-designer-drawer-content>\n\n <ax-title>Pages</ax-title>\n\n <ax-content header>\n <ax-button look=\"ghost\" class=\"ax-xs\" (onClick)=\"service.addNewPage()\" title=\"Add New Page\">\n <ax-icon class=\"fa-light fa-file-circle-plus\"></ax-icon>\n </ax-button>\n </ax-content>\n\n <ax-content body>\n @let count = service.document().children?.length ?? 0;\n @if(count)\n {\n <ul class=\"ax-text-white ax-text-sm ax-bg-gray-800 ax-p-2 ax-rounded-md ax-space-y-1\">\n @for( page of service.document().children;track $index)\n {\n <li (click)=\"service.goToPage($index)\"\n class=\"ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out hover:ax-bg-gray-700 ax-py-1 ax-px-2 ax-rounded-sm ax-group ax-flex ax-justify-between ax-items-center\"\n [class.ax-bg-neutral-700]=\"$index==service.currentPageIndex()\">\n <div>\n <i class=\"fa-light fa-file ax-me-1\"></i>\n Page {{$index + 1}}\n </div>\n <div class=\"ax-invisible group-hover:ax-visible ax-flex ax-gap-2\">\n @if(count>1)\n {\n <i class=\"fa-light fa-xmark hover:ax-text-danger-500\" (click)=\"service.removePage($index)\"></i>\n }\n <i class=\"fa-light fa-clone hover:ax-text-primary-500\" (click)=\"service.clonePage($index)\"></i>\n </div>\n </li>\n }\n </ul>\n }\n @else {\n <div class=\"ax-flex ax-justify-center ax-items-center ax-text-gray-300 ax-p-4\">No pages found in the document\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: AXPLayoutDesignerDrawerContentComponent, selector: "axp-designer-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1258
1400
|
}
|
|
1259
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
|
1401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerPagesComponent, decorators: [{
|
|
1260
1402
|
type: Component,
|
|
1261
|
-
args: [{ selector: 'axp-designer-
|
|
1403
|
+
args: [{ selector: 'axp-designer-pages', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1262
1404
|
CommonModule,
|
|
1405
|
+
AXPLayoutBuilderModule,
|
|
1263
1406
|
AXDecoratorModule,
|
|
1264
1407
|
AXButtonModule,
|
|
1265
|
-
|
|
1266
|
-
], template: "<
|
|
1408
|
+
AXPLayoutDesignerDrawerContentComponent
|
|
1409
|
+
], template: "<axp-designer-drawer-content>\n\n <ax-title>Pages</ax-title>\n\n <ax-content header>\n <ax-button look=\"ghost\" class=\"ax-xs\" (onClick)=\"service.addNewPage()\" title=\"Add New Page\">\n <ax-icon class=\"fa-light fa-file-circle-plus\"></ax-icon>\n </ax-button>\n </ax-content>\n\n <ax-content body>\n @let count = service.document().children?.length ?? 0;\n @if(count)\n {\n <ul class=\"ax-text-white ax-text-sm ax-bg-gray-800 ax-p-2 ax-rounded-md ax-space-y-1\">\n @for( page of service.document().children;track $index)\n {\n <li (click)=\"service.goToPage($index)\"\n class=\"ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out hover:ax-bg-gray-700 ax-py-1 ax-px-2 ax-rounded-sm ax-group ax-flex ax-justify-between ax-items-center\"\n [class.ax-bg-neutral-700]=\"$index==service.currentPageIndex()\">\n <div>\n <i class=\"fa-light fa-file ax-me-1\"></i>\n Page {{$index + 1}}\n </div>\n <div class=\"ax-invisible group-hover:ax-visible ax-flex ax-gap-2\">\n @if(count>1)\n {\n <i class=\"fa-light fa-xmark hover:ax-text-danger-500\" (click)=\"service.removePage($index)\"></i>\n }\n <i class=\"fa-light fa-clone hover:ax-text-primary-500\" (click)=\"service.clonePage($index)\"></i>\n </div>\n </li>\n }\n </ul>\n }\n @else {\n <div class=\"ax-flex ax-justify-center ax-items-center ax-text-gray-300 ax-p-4\">No pages found in the document\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>" }]
|
|
1267
1410
|
}] });
|
|
1268
1411
|
|
|
1269
|
-
class
|
|
1412
|
+
class AXPDesignerHeaderMenuComponent {
|
|
1270
1413
|
constructor() {
|
|
1271
1414
|
this.service = inject(AXPDesignerService);
|
|
1272
1415
|
}
|
|
1273
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
|
1274
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1416
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerHeaderMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1417
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPDesignerHeaderMenuComponent, isStandalone: true, selector: "axp-designer-header-menu", ngImport: i0, template: "<ax-menu [openOn]=\"'hover'\">\n <ax-menu-item>\n <ax-text>Home</ax-text>\n <ax-menu-item (onClick)=\"service.new()\">\n <ax-text>New</ax-text>\n <ax-suffix>\n <ax-text>\n Shift+N\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item>\n <ax-text>Export</ax-text>\n <ax-menu-item (onClick)=\"service.downloadJson()\">\n <ax-text>Download JSON</ax-text>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item>\n <ax-text>Import</ax-text>\n <ax-menu-item (onClick)=\"service.importJSon()\">\n <ax-text>Import JSON</ax-text>\n </ax-menu-item>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item>\n <ax-text>Edit</ax-text>\n <ax-menu-item [disabled]=\"!service.canUndo()\" (onClick)=\"service.undo()\">\n <ax-text>Undo</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-left\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Z\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item [disabled]=\"!service.canRedo()\" (onClick)=\"service.redo()\">\n <ax-text>Redo</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-right\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Y\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-divider></ax-divider>\n <ax-menu-item [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.cut()\">\n <ax-text>Cut</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-cut\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+X\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.copy()\">\n <ax-text>Copy</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-copy\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+C\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item [disabled]=\"!service.canPaste()\" (onClick)=\"service.paste()\">\n <ax-text>Paste</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-paste\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+V\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item>\n <ax-text>Help</ax-text>\n <ax-menu-item>\n <ax-text>About</ax-text>\n </ax-menu-item>\n </ax-menu-item>\n</ax-menu>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "component", type: i2$2.AXMenuItemComponent, selector: "ax-menu-item", inputs: ["disabled", "active", "arrowState"], outputs: ["activeChange", "onClick"] }, { kind: "component", type: i2$2.AXMenuComponent, selector: "ax-menu", inputs: ["orientation", "openOn"] }] }); }
|
|
1275
1418
|
}
|
|
1276
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
|
1419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerHeaderMenuComponent, decorators: [{
|
|
1277
1420
|
type: Component,
|
|
1278
|
-
args: [{
|
|
1421
|
+
args: [{ standalone: true, imports: [
|
|
1279
1422
|
CommonModule,
|
|
1280
|
-
AXPLayoutBuilderModule,
|
|
1281
1423
|
AXDecoratorModule,
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
], template: "<div class=\"ax-flex ax-flex-col ax-border-e ax-w-72\">\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-p-2 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <span class=\"ax-font-semibold\">Pages</span>\n </div>\n <div class=\"ax-flex ax-gap-1 ax-items-center\">\n <ax-button look=\"ghost\" class=\"ax-xs\" (onClick)=\"service.addNewPage()\" title=\"Add New Page\">\n <ax-icon class=\"fa-light fa-file-circle-plus\"></ax-icon>\n </ax-button>\n <ax-close-button></ax-close-button>\n </div>\n </div>\n <div class=\"ax-flex-1 ax-h-full ax-overflow-auto\">\n @let count = service.document().children?.length ?? 0;\n @if(count)\n {\n <ul class=\"ax-text-white ax-text-sm ax-bg-gray-800 ax-p-2 ax-rounded-md ax-space-y-1\">\n @for( page of service.document().children;track $index)\n {\n <li (click)=\"service.goToPage($index)\"\n class=\"ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out ax-hover:bg-gray-700 ax-py-1 ax-px-2 ax-rounded-sm ax-group ax-flex ax-justify-between ax-items-center\"\n [class.ax-bg-neutral-700]=\"$index==service.currentPageIndex()\">\n <div>\n <i class=\"fa-light fa-file ax-me-1\"></i>\n Page {{$index + 1}}\n </div>\n <div class=\"ax-invisible group-hover:ax-visible ax-flex ax-gap-2\">\n @if(count>1)\n {\n <i class=\"fa-light fa-xmark hover:ax-text-danger-500\" (click)=\"service.removePage($index)\"></i>\n }\n <i class=\"fa-light fa-clone hover:ax-text-primary-500\" (click)=\"service.clonePage($index)\"></i>\n </div>\n </li>\n }\n </ul>\n }\n @else {\n <div class=\"ax-flex ax-justify-center ax-items-center ax-text-gray-300 ax-p-4\">No pages found in the document\n </div>\n }\n </div>\n</div>" }]
|
|
1424
|
+
AXMenuModule,
|
|
1425
|
+
], selector: 'axp-designer-header-menu', template: "<ax-menu [openOn]=\"'hover'\">\n <ax-menu-item>\n <ax-text>Home</ax-text>\n <ax-menu-item (onClick)=\"service.new()\">\n <ax-text>New</ax-text>\n <ax-suffix>\n <ax-text>\n Shift+N\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item>\n <ax-text>Export</ax-text>\n <ax-menu-item (onClick)=\"service.downloadJson()\">\n <ax-text>Download JSON</ax-text>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item>\n <ax-text>Import</ax-text>\n <ax-menu-item (onClick)=\"service.importJSon()\">\n <ax-text>Import JSON</ax-text>\n </ax-menu-item>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item>\n <ax-text>Edit</ax-text>\n <ax-menu-item [disabled]=\"!service.canUndo()\" (onClick)=\"service.undo()\">\n <ax-text>Undo</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-left\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Z\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item [disabled]=\"!service.canRedo()\" (onClick)=\"service.redo()\">\n <ax-text>Redo</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-right\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Y\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-divider></ax-divider>\n <ax-menu-item [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.cut()\">\n <ax-text>Cut</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-cut\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+X\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.copy()\">\n <ax-text>Copy</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-copy\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+C\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item [disabled]=\"!service.canPaste()\" (onClick)=\"service.paste()\">\n <ax-text>Paste</ax-text>\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-paste\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+V\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item>\n <ax-text>Help</ax-text>\n <ax-menu-item>\n <ax-text>About</ax-text>\n </ax-menu-item>\n </ax-menu-item>\n</ax-menu>" }]
|
|
1285
1426
|
}] });
|
|
1286
1427
|
|
|
1287
1428
|
class AXPLayoutDesignerComponent {
|
|
@@ -1293,38 +1434,47 @@ class AXPLayoutDesignerComponent {
|
|
|
1293
1434
|
});
|
|
1294
1435
|
}
|
|
1295
1436
|
handleKeyboardEvent(event) {
|
|
1437
|
+
if (event.shiftKey && event.target == document.body) {
|
|
1438
|
+
switch (event.key.toLowerCase()) {
|
|
1439
|
+
case 'n':
|
|
1440
|
+
event.preventDefault();
|
|
1441
|
+
this.service.new();
|
|
1442
|
+
break;
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
//
|
|
1296
1446
|
if (event.ctrlKey && event.target == document.body) {
|
|
1297
|
-
switch (event.key.toLowerCase()) {
|
|
1447
|
+
switch (event.key.toLowerCase()) {
|
|
1298
1448
|
case 'z':
|
|
1299
|
-
event.preventDefault();
|
|
1449
|
+
event.preventDefault();
|
|
1300
1450
|
this.service.undo();
|
|
1301
1451
|
break;
|
|
1302
1452
|
case 'y':
|
|
1303
|
-
event.preventDefault();
|
|
1453
|
+
event.preventDefault();
|
|
1304
1454
|
this.service.redo();
|
|
1305
1455
|
break;
|
|
1306
1456
|
case 'c':
|
|
1307
1457
|
if (this.service.canCutCopy()) {
|
|
1308
|
-
event.preventDefault();
|
|
1458
|
+
event.preventDefault();
|
|
1309
1459
|
this.service.copy();
|
|
1310
1460
|
}
|
|
1311
1461
|
break;
|
|
1312
1462
|
case 'd':
|
|
1313
1463
|
if (this.service.canCutCopy()) {
|
|
1314
|
-
event.preventDefault();
|
|
1464
|
+
event.preventDefault();
|
|
1315
1465
|
this.service.clone();
|
|
1316
1466
|
}
|
|
1317
1467
|
break;
|
|
1318
1468
|
case 'x':
|
|
1319
1469
|
if (this.service.canCutCopy()) {
|
|
1320
1470
|
debugger;
|
|
1321
|
-
event.preventDefault();
|
|
1471
|
+
event.preventDefault();
|
|
1322
1472
|
this.service.cut();
|
|
1323
1473
|
}
|
|
1324
1474
|
break;
|
|
1325
1475
|
case 'v':
|
|
1326
1476
|
if (this.service.canPaste()) {
|
|
1327
|
-
event.preventDefault();
|
|
1477
|
+
event.preventDefault();
|
|
1328
1478
|
this.service.paste();
|
|
1329
1479
|
}
|
|
1330
1480
|
break;
|
|
@@ -1332,7 +1482,7 @@ class AXPLayoutDesignerComponent {
|
|
|
1332
1482
|
}
|
|
1333
1483
|
}
|
|
1334
1484
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLayoutDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1335
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPLayoutDesignerComponent, isStandalone: true, selector: "axp-layout-designer", host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" } }, providers: [AXPDesignerService], viewQueries: [{ propertyName: "propertyViewer", first: true, predicate: AXPWidgetPropertyViewerComponent, descendants: true, static: true }], ngImport: i0, template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative child:ax-h-full ax-overflow-hidden ax-dark\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-surface ax-border-e ax-xs ax-flex ax-flex-col ax-items-center \">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.png\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <!-- <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button> -->\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"pages.toggle()\" title=\"Pages\">\n <ax-icon class=\"fa-solid fa-page ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"datasources.toggle()\" title=\"Data Sources\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <!-- <ax-button color=\"ghost\" look=\"twotone\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button> -->\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1\">\n <!-- Header Toolbar -->\n <div class=\"ax-min-h-10 ax-bg-surface ax-border-b ax-flex ax-flex-grow ax-justify-between ax-px-2\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-text-white\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button-group color=\"ghost\" look=\"twotone\" [selection]=\"'single'\">\n <ax-button-item [selected]=\"service.size() == 'xl'\" [data]=\"'xl'\" (onClick)=\"service.size.set('xl')\">\n <ax-icon class=\"fa-light fa-desktop\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'lg'\" [data]=\"'lg'\" (onClick)=\"service.size.set('lg')\">\n <ax-icon class=\"fa-light fa-tablet\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'sm'\" [data]=\"'sm'\" (onClick)=\"service.size.set('sm')\">\n <ax-icon class=\"fa-light fa-mobile\"></ax-icon>\n </ax-button-item>\n </ax-button-group>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button text=\"Design\" look=\"outline\" class=\"ax-xs\">\n <ax-suffix>\n <ax-icon class=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <ax-button-item text=\"Print\" name=\"print\"> </ax-button-item>\n <ax-button-item text=\"View\" name=\"view\"> </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <ax-button color=\"success\" look=\"outline\" text=\"Preview\" class=\"ax-xs\" (onClick)=\"service.openPreview()\">\n <ax-suffix>\n <ax-icon class=\"fa-solid fa-play\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n <!-- Board -->\n <div class=\"ax-h-full \">\n <ax-drawer-container class=\"ax-w-full ax-h-full\">\n <!-- Pages -->\n <ax-drawer #pages location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-pages></axp-designer-pages>\n </ax-content>\n </ax-drawer>\n <!-- Datasources -->\n <ax-drawer #datasources location=\"start\" mode=\"push\">\n <ax-content>\n Datasources\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light\">\n <axp-designer-board class=\"ax-h-full ax-bg-on-surface ax-flex ax-justify-center\"> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n </div>\n <!-- Footer -->\n <div class=\"ax-min-h-10 ax-bg-surface ax-border-t ax-flex ax-items-center\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-w-80 ax-border-s\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-py-2 ax-px-4 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer [widget]=\"service.selectedNode()!\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\" class=\"ax-w-1/4\">\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".axp-designer-board{display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-surface),var(--tw-bg-opacity));padding:.75rem}.axp-designer-board.axp-state-design .axp-widget-host{position:relative;display:block;cursor:pointer}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:2px;outline-offset:1px;outline-color:#60a5fa;position:relative}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover:not(.axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.axp-state-selected){outline-style:solid;outline-width:1px;outline-offset:1px;outline-color:#60a5fa}.axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:10;height:100%;width:100%}@keyframes moveLight{0%{background-position:0% 50%}to{background-position:100% 50%}}.axp-designer-board .axp-empty-space{background-color:rgba(var(--ax-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-color-primary-300),50%) 0,rgba(var(--ax-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px}.axp-designer-board .grid-stack-item-content{color:#2c3e50;text-align:center;background-color:#18bc9c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: AXPDesignerBoardComponent, selector: "axp-designer-board" }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget"], outputs: ["onChanged"] }, { kind: "component", type: AXPDesignerBreadcrumbsComponent, selector: "axp-designer-breadcrumbs" }, { kind: "component", type: AXPDesignerOutlineComponent, selector: "axp-designer-outline" }, { kind: "component", type: AXPDesignerHeaderMenuComponent, selector: "axp-designer-header-menu" }, { kind: "component", type: AXPDesignerHistoryComponent, selector: "axp-designer-history" }, { kind: "component", type: AXPDesignerPagesComponent, selector: "axp-designer-pages" }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2$1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2$1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$2.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "collapsed", "closeOthers"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i3$2.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "component", type: i5.AXButtonGroupComponent, selector: "ax-button-group", inputs: ["disabled", "color", "look", "selection"], outputs: ["onBlur", "onFocus", "lookChange", "colorChange", "disabledChange", "selectionChange"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1485
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPLayoutDesignerComponent, isStandalone: true, selector: "axp-layout-designer", host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" } }, providers: [AXPDesignerService], viewQueries: [{ propertyName: "propertyViewer", first: true, predicate: AXPWidgetPropertyViewerComponent, descendants: true, static: true }], ngImport: i0, template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative ax-overflow-hidden ax-dark\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-surface ax-border-e ax-xs ax-flex ax-flex-col ax-items-center \">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.png\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <!-- <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button> -->\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"pages.toggle()\" title=\"Pages\">\n <ax-icon class=\"fa-solid fa-page ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"datasources.toggle()\" title=\"Data Sources\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <!-- <ax-button color=\"ghost\" look=\"twotone\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button> -->\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1 \">\n <!-- Header Toolbar -->\n <div class=\"ax-h-10 ax-bg-surface ax-border-b ax-flex ax-justify-between ax-px-2\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-text-white\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button-group color=\"ghost\" look=\"twotone\" [selection]=\"'single'\">\n <ax-button-item [selected]=\"service.size() == 'xl'\" [data]=\"'xl'\" (onClick)=\"service.size.set('xl')\">\n <ax-icon class=\"fa-light fa-desktop\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'lg'\" [data]=\"'lg'\" (onClick)=\"service.size.set('lg')\">\n <ax-icon class=\"fa-light fa-tablet\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'sm'\" [data]=\"'sm'\" (onClick)=\"service.size.set('sm')\">\n <ax-icon class=\"fa-light fa-mobile\"></ax-icon>\n </ax-button-item>\n </ax-button-group>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button text=\"Design\" look=\"outline\" class=\"ax-xs\">\n <ax-suffix>\n <ax-icon class=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <ax-button-item text=\"Print\" name=\"print\"> </ax-button-item>\n <ax-button-item text=\"View\" name=\"view\"> </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <ax-button color=\"success\" look=\"outline\" text=\"Preview\" class=\"ax-xs\" (onClick)=\"service.openPreview()\">\n <ax-suffix>\n <ax-icon class=\"fa-solid fa-play\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n <!-- Board -->\n <ax-drawer-container class=\"ax-w-full ax-flex-1\">\n <!-- Pages -->\n <ax-drawer #pages location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-pages></axp-designer-pages>\n </ax-content>\n </ax-drawer>\n <!-- Datasources -->\n <ax-drawer #datasources location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-data-sources></axp-designer-data-sources>\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light ax-h-screen ax-bg-on-surface ax-flex ax-justify-center\">\n <axp-designer-board> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n <!-- Footer -->\n <div class=\"ax-h-10 ax-bg-surface ax-border-t ax-flex ax-items-center\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-w-80 ax-border-s\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-py-2 ax-px-4 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer [widget]=\"service.selectedNode()!\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\" class=\"ax-w-1/4\">\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".axp-designer-board{display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-surface),var(--tw-bg-opacity));padding:.75rem}.axp-designer-board.axp-state-design .axp-widget-host{cursor:pointer}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:2px;outline-offset:1px;outline-color:#60a5fa;position:relative}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover:not(.axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.axp-state-selected){outline-style:solid;outline-width:1px;outline-offset:1px;outline-color:#60a5fa}.axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:2000;height:100%;width:100%}@keyframes moveLight{0%{background-position:0% 50%}to{background-position:100% 50%}}.axp-designer-board .axp-empty-space{background-color:rgba(var(--ax-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-color-primary-300),50%) 0,rgba(var(--ax-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px;height:100%}.axp-designer-board .grid-stack-item-content{color:#2c3e50;text-align:center;background-color:#18bc9c}axp-designer-drawer-content ul.axp-designer-drawer-list>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}axp-designer-drawer-content ul.axp-designer-drawer-list{padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}axp-designer-drawer-content ul.axp-designer-drawer-list li{cursor:pointer;border-radius:.125rem;padding:.25rem .5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}axp-designer-drawer-content ul.axp-designer-drawer-list li:hover:not(.axp-designer-drawer-list){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}axp-designer-drawer-content ul.axp-designer-drawer-list li.ax-state-selected{--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-neutral-700),var(--tw-bg-opacity))}axp-designer-drawer-content .axp-designer-drawer-empty{display:flex;align-items:center;justify-content:center;padding:1rem;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: AXPDesignerBoardComponent, selector: "axp-designer-board" }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget"], outputs: ["onChanged"] }, { kind: "component", type: AXPDesignerBreadcrumbsComponent, selector: "axp-designer-breadcrumbs" }, { kind: "component", type: AXPDesignerOutlineComponent, selector: "axp-designer-outline" }, { kind: "component", type: AXPDesignerHeaderMenuComponent, selector: "axp-designer-header-menu" }, { kind: "component", type: AXPDesignerHistoryComponent, selector: "axp-designer-history" }, { kind: "component", type: AXPDesignerDataSourcesComponent, selector: "axp-designer-data-sources" }, { kind: "component", type: AXPDesignerPagesComponent, selector: "axp-designer-pages" }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$1.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "collapsed", "closeOthers"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i3$1.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "component", type: i5.AXButtonGroupComponent, selector: "ax-button-group", inputs: ["disabled", "color", "look", "selection"], outputs: ["onBlur", "onFocus", "lookChange", "colorChange", "disabledChange", "selectionChange"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1336
1486
|
}
|
|
1337
1487
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLayoutDesignerComponent, decorators: [{
|
|
1338
1488
|
type: Component,
|
|
@@ -1345,6 +1495,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1345
1495
|
AXPDesignerOutlineComponent,
|
|
1346
1496
|
AXPDesignerHeaderMenuComponent,
|
|
1347
1497
|
AXPDesignerHistoryComponent,
|
|
1498
|
+
AXPDesignerDataSourcesComponent,
|
|
1348
1499
|
AXPDesignerPagesComponent,
|
|
1349
1500
|
AXTabsModule,
|
|
1350
1501
|
AXButtonModule,
|
|
@@ -1353,7 +1504,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1353
1504
|
AXMenuModule,
|
|
1354
1505
|
AXButtonGroupModule,
|
|
1355
1506
|
AXDropdownModule,
|
|
1356
|
-
], providers: [AXPDesignerService], template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative
|
|
1507
|
+
], providers: [AXPDesignerService], template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative ax-overflow-hidden ax-dark\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-surface ax-border-e ax-xs ax-flex ax-flex-col ax-items-center \">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.png\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <!-- <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button> -->\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"pages.toggle()\" title=\"Pages\">\n <ax-icon class=\"fa-solid fa-page ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"datasources.toggle()\" title=\"Data Sources\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <!-- <ax-button color=\"ghost\" look=\"twotone\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button> -->\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1 \">\n <!-- Header Toolbar -->\n <div class=\"ax-h-10 ax-bg-surface ax-border-b ax-flex ax-justify-between ax-px-2\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-text-white\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button-group color=\"ghost\" look=\"twotone\" [selection]=\"'single'\">\n <ax-button-item [selected]=\"service.size() == 'xl'\" [data]=\"'xl'\" (onClick)=\"service.size.set('xl')\">\n <ax-icon class=\"fa-light fa-desktop\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'lg'\" [data]=\"'lg'\" (onClick)=\"service.size.set('lg')\">\n <ax-icon class=\"fa-light fa-tablet\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'sm'\" [data]=\"'sm'\" (onClick)=\"service.size.set('sm')\">\n <ax-icon class=\"fa-light fa-mobile\"></ax-icon>\n </ax-button-item>\n </ax-button-group>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button text=\"Design\" look=\"outline\" class=\"ax-xs\">\n <ax-suffix>\n <ax-icon class=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <ax-button-item text=\"Print\" name=\"print\"> </ax-button-item>\n <ax-button-item text=\"View\" name=\"view\"> </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <ax-button color=\"success\" look=\"outline\" text=\"Preview\" class=\"ax-xs\" (onClick)=\"service.openPreview()\">\n <ax-suffix>\n <ax-icon class=\"fa-solid fa-play\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n <!-- Board -->\n <ax-drawer-container class=\"ax-w-full ax-flex-1\">\n <!-- Pages -->\n <ax-drawer #pages location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-pages></axp-designer-pages>\n </ax-content>\n </ax-drawer>\n <!-- Datasources -->\n <ax-drawer #datasources location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-data-sources></axp-designer-data-sources>\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light ax-h-screen ax-bg-on-surface ax-flex ax-justify-center\">\n <axp-designer-board> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n <!-- Footer -->\n <div class=\"ax-h-10 ax-bg-surface ax-border-t ax-flex ax-items-center\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-w-80 ax-border-s\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-py-2 ax-px-4 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer [widget]=\"service.selectedNode()!\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\" class=\"ax-w-1/4\">\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".axp-designer-board{display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-surface),var(--tw-bg-opacity));padding:.75rem}.axp-designer-board.axp-state-design .axp-widget-host{cursor:pointer}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:2px;outline-offset:1px;outline-color:#60a5fa;position:relative}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover:not(.axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.axp-state-selected){outline-style:solid;outline-width:1px;outline-offset:1px;outline-color:#60a5fa}.axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:2000;height:100%;width:100%}@keyframes moveLight{0%{background-position:0% 50%}to{background-position:100% 50%}}.axp-designer-board .axp-empty-space{background-color:rgba(var(--ax-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-color-primary-300),50%) 0,rgba(var(--ax-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px;height:100%}.axp-designer-board .grid-stack-item-content{color:#2c3e50;text-align:center;background-color:#18bc9c}axp-designer-drawer-content ul.axp-designer-drawer-list>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}axp-designer-drawer-content ul.axp-designer-drawer-list{padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}axp-designer-drawer-content ul.axp-designer-drawer-list li{cursor:pointer;border-radius:.125rem;padding:.25rem .5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}axp-designer-drawer-content ul.axp-designer-drawer-list li:hover:not(.axp-designer-drawer-list){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}axp-designer-drawer-content ul.axp-designer-drawer-list li.ax-state-selected{--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-neutral-700),var(--tw-bg-opacity))}axp-designer-drawer-content .axp-designer-drawer-empty{display:flex;align-items:center;justify-content:center;padding:1rem;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}\n"] }]
|
|
1357
1508
|
}], ctorParameters: () => [], propDecorators: { propertyViewer: [{
|
|
1358
1509
|
type: ViewChild,
|
|
1359
1510
|
args: [AXPWidgetPropertyViewerComponent, { static: true }]
|
|
@@ -1366,5 +1517,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1366
1517
|
* Generated bundle index. Do not edit.
|
|
1367
1518
|
*/
|
|
1368
1519
|
|
|
1369
|
-
export { AXPDesignerAddWidgetButtonComponent,
|
|
1520
|
+
export { AXPDesignerAddWidgetButtonComponent, AXPDesignerConnectorAbstract, AXPDesignerGridDrawerComponent, AXPDesignerService, AXPLayoutDesignerComponent, AXPWidgetDesignerRendererDirective, AXPWidgetPropertyViewerComponent };
|
|
1370
1521
|
//# sourceMappingURL=acorex-platform-layout-designer.mjs.map
|