@wavemaker/app-ng-runtime 11.4.1-next.141652 → 11.4.1-next.141654
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.
- app-ng-runtime/components/advanced/carousel/bundles/index.umd.js +12 -23
- app-ng-runtime/components/advanced/carousel/carousel-template/carousel-template.directive.d.ts +2 -4
- app-ng-runtime/components/advanced/carousel/carousel.directive.d.ts +2 -4
- app-ng-runtime/components/advanced/carousel/esm2020/carousel-template/carousel-template.directive.mjs +6 -11
- app-ng-runtime/components/advanced/carousel/esm2020/carousel.directive.mjs +6 -11
- app-ng-runtime/components/advanced/carousel/fesm2015/index.mjs +9 -20
- app-ng-runtime/components/advanced/carousel/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/advanced/carousel/fesm2020/index.mjs +9 -16
- app-ng-runtime/components/advanced/carousel/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/advanced/login/bundles/index.umd.js +21 -27
- app-ng-runtime/components/advanced/login/esm2020/login.component.mjs +8 -13
- app-ng-runtime/components/advanced/login/fesm2015/index.mjs +7 -13
- app-ng-runtime/components/advanced/login/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/advanced/login/fesm2020/index.mjs +7 -11
- app-ng-runtime/components/advanced/login/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/advanced/login/login.component.d.ts +2 -4
- app-ng-runtime/components/advanced/marquee/bundles/index.umd.js +8 -14
- app-ng-runtime/components/advanced/marquee/esm2020/marquee.directive.mjs +6 -11
- app-ng-runtime/components/advanced/marquee/fesm2015/index.mjs +5 -11
- app-ng-runtime/components/advanced/marquee/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/advanced/marquee/fesm2020/index.mjs +5 -9
- app-ng-runtime/components/advanced/marquee/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/advanced/marquee/marquee.directive.d.ts +2 -4
- app-ng-runtime/components/base/bundles/index.umd.js +31 -61
- app-ng-runtime/components/base/esm2020/widgets/common/base/base-container.component.mjs +4 -6
- app-ng-runtime/components/base/esm2020/widgets/common/base/base.component.mjs +5 -6
- app-ng-runtime/components/base/esm2020/widgets/common/base/dataset-aware-nav.component.mjs +3 -3
- app-ng-runtime/components/base/esm2020/widgets/common/container/container.directive.mjs +7 -11
- app-ng-runtime/components/base/esm2020/widgets/common/item-template/item-template.directive.mjs +7 -10
- app-ng-runtime/components/base/esm2020/widgets/common/lazy-load/lazy-load.directive.mjs +6 -10
- app-ng-runtime/components/base/esm2020/widgets/common/message/message.component.mjs +7 -11
- app-ng-runtime/components/base/esm2020/widgets/common/partial/partial.directive.mjs +7 -10
- app-ng-runtime/components/base/esm2020/widgets/common/repeat-template/repeat-template.directive.mjs +6 -11
- app-ng-runtime/components/base/fesm2015/index.mjs +32 -62
- app-ng-runtime/components/base/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/base/fesm2020/index.mjs +32 -50
- app-ng-runtime/components/base/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/base/widgets/common/base/base-container.component.d.ts +1 -2
- app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +2 -3
- app-ng-runtime/components/base/widgets/common/base/dataset-aware-nav.component.d.ts +1 -2
- app-ng-runtime/components/base/widgets/common/container/container.directive.d.ts +2 -4
- app-ng-runtime/components/base/widgets/common/item-template/item-template.directive.d.ts +3 -4
- app-ng-runtime/components/base/widgets/common/lazy-load/lazy-load.directive.d.ts +2 -4
- app-ng-runtime/components/base/widgets/common/message/message.component.d.ts +2 -4
- app-ng-runtime/components/base/widgets/common/partial/partial.directive.d.ts +3 -4
- app-ng-runtime/components/base/widgets/common/repeat-template/repeat-template.directive.d.ts +2 -4
- app-ng-runtime/components/basic/default/anchor/anchor.component.d.ts +3 -4
- app-ng-runtime/components/basic/default/audio/audio.component.d.ts +2 -4
- app-ng-runtime/components/basic/default/bundles/index.umd.js +247 -290
- app-ng-runtime/components/basic/default/esm2020/anchor/anchor.component.mjs +7 -10
- app-ng-runtime/components/basic/default/esm2020/audio/audio.component.mjs +8 -13
- app-ng-runtime/components/basic/default/esm2020/html/html.directive.mjs +7 -11
- app-ng-runtime/components/basic/default/esm2020/icon/icon.component.mjs +9 -14
- app-ng-runtime/components/basic/default/esm2020/iframe/iframe.component.mjs +9 -13
- app-ng-runtime/components/basic/default/esm2020/label/label.directive.mjs +7 -11
- app-ng-runtime/components/basic/default/esm2020/picture/picture.directive.mjs +7 -11
- app-ng-runtime/components/basic/default/esm2020/spinner/spinner.component.mjs +9 -13
- app-ng-runtime/components/basic/default/esm2020/video/video.component.mjs +9 -13
- app-ng-runtime/components/basic/default/fesm2015/index.mjs +46 -89
- app-ng-runtime/components/basic/default/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/basic/default/fesm2020/index.mjs +46 -73
- app-ng-runtime/components/basic/default/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/basic/default/html/html.directive.d.ts +2 -4
- app-ng-runtime/components/basic/default/icon/icon.component.d.ts +2 -4
- app-ng-runtime/components/basic/default/iframe/iframe.component.d.ts +2 -4
- app-ng-runtime/components/basic/default/label/label.directive.d.ts +2 -4
- app-ng-runtime/components/basic/default/picture/picture.directive.d.ts +2 -4
- app-ng-runtime/components/basic/default/spinner/spinner.component.d.ts +2 -4
- app-ng-runtime/components/basic/default/video/video.component.d.ts +2 -4
- app-ng-runtime/components/basic/progress/bundles/index.umd.js +23 -32
- app-ng-runtime/components/basic/progress/esm2020/progress-bar/progress-bar.component.mjs +8 -12
- app-ng-runtime/components/basic/progress/esm2020/progress-circle/progress-circle.component.mjs +8 -13
- app-ng-runtime/components/basic/progress/fesm2015/index.mjs +12 -21
- app-ng-runtime/components/basic/progress/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/basic/progress/fesm2020/index.mjs +12 -19
- app-ng-runtime/components/basic/progress/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/basic/progress/progress-bar/progress-bar.component.d.ts +2 -4
- app-ng-runtime/components/basic/progress/progress-circle/progress-circle.component.d.ts +2 -4
- app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js +14 -20
- app-ng-runtime/components/basic/rich-text-editor/esm2020/rich-text-editor.component.mjs +9 -13
- app-ng-runtime/components/basic/rich-text-editor/fesm2015/index.mjs +7 -13
- app-ng-runtime/components/basic/rich-text-editor/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/basic/rich-text-editor/fesm2020/index.mjs +7 -11
- app-ng-runtime/components/basic/rich-text-editor/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/basic/rich-text-editor/rich-text-editor.component.d.ts +2 -4
- app-ng-runtime/components/basic/search/bundles/index.umd.js +3 -6
- app-ng-runtime/components/basic/search/esm2020/search.component.mjs +6 -9
- app-ng-runtime/components/basic/search/fesm2015/index.mjs +4 -7
- app-ng-runtime/components/basic/search/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/basic/search/fesm2020/index.mjs +4 -7
- app-ng-runtime/components/basic/search/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/basic/search/search.component.d.ts +3 -4
- app-ng-runtime/components/chart/bundles/index.umd.js +4 -9
- app-ng-runtime/components/chart/chart.component.d.ts +3 -4
- app-ng-runtime/components/chart/esm2020/chart.component.mjs +7 -10
- app-ng-runtime/components/chart/fesm2015/index.mjs +5 -10
- app-ng-runtime/components/chart/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/chart/fesm2020/index.mjs +5 -8
- app-ng-runtime/components/chart/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/containers/accordion/accordion-pane/accordion-pane.component.d.ts +2 -4
- app-ng-runtime/components/containers/accordion/accordion.directive.d.ts +3 -4
- app-ng-runtime/components/containers/accordion/bundles/index.umd.js +56 -66
- app-ng-runtime/components/containers/accordion/esm2020/accordion-pane/accordion-pane.component.mjs +10 -14
- app-ng-runtime/components/containers/accordion/esm2020/accordion.directive.mjs +7 -10
- app-ng-runtime/components/containers/accordion/fesm2015/index.mjs +12 -22
- app-ng-runtime/components/containers/accordion/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/containers/accordion/fesm2020/index.mjs +12 -18
- app-ng-runtime/components/containers/accordion/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/containers/layout-grid/bundles/index.umd.js +12 -25
- app-ng-runtime/components/containers/layout-grid/esm2020/layout-grid-column/layout-grid-column.directive.mjs +7 -10
- app-ng-runtime/components/containers/layout-grid/esm2020/layout-grid-row/layout-grid-row.directive.mjs +6 -11
- app-ng-runtime/components/containers/layout-grid/esm2020/layout-grid.directive.mjs +6 -11
- app-ng-runtime/components/containers/layout-grid/fesm2015/index.mjs +13 -26
- app-ng-runtime/components/containers/layout-grid/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/containers/layout-grid/fesm2020/index.mjs +13 -22
- app-ng-runtime/components/containers/layout-grid/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/containers/layout-grid/layout-grid-column/layout-grid-column.directive.d.ts +3 -4
- app-ng-runtime/components/containers/layout-grid/layout-grid-row/layout-grid-row.directive.d.ts +2 -4
- app-ng-runtime/components/containers/layout-grid/layout-grid.directive.d.ts +2 -4
- app-ng-runtime/components/containers/linear-layout/bundles/index.umd.js +12 -23
- app-ng-runtime/components/containers/linear-layout/esm2020/linear-layout-item/linear-layout-item.directive.mjs +6 -11
- app-ng-runtime/components/containers/linear-layout/esm2020/linear-layout.directive.mjs +6 -11
- app-ng-runtime/components/containers/linear-layout/fesm2015/index.mjs +9 -20
- app-ng-runtime/components/containers/linear-layout/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/containers/linear-layout/fesm2020/index.mjs +9 -16
- app-ng-runtime/components/containers/linear-layout/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/containers/linear-layout/linear-layout-item/linear-layout-item.directive.d.ts +2 -4
- app-ng-runtime/components/containers/linear-layout/linear-layout.directive.d.ts +2 -4
- app-ng-runtime/components/containers/panel/bundles/index.umd.js +65 -71
- app-ng-runtime/components/containers/panel/esm2020/panel.component.mjs +12 -16
- app-ng-runtime/components/containers/panel/fesm2015/index.mjs +10 -16
- app-ng-runtime/components/containers/panel/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/containers/panel/fesm2020/index.mjs +10 -14
- app-ng-runtime/components/containers/panel/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/containers/panel/panel.component.d.ts +2 -4
- app-ng-runtime/components/containers/tabs/bundles/index.umd.js +57 -63
- app-ng-runtime/components/containers/tabs/esm2020/tab-pane/tab-pane.component.mjs +8 -12
- app-ng-runtime/components/containers/tabs/esm2020/tabs.component.mjs +7 -10
- app-ng-runtime/components/containers/tabs/fesm2015/index.mjs +12 -18
- app-ng-runtime/components/containers/tabs/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/containers/tabs/fesm2020/index.mjs +12 -18
- app-ng-runtime/components/containers/tabs/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/containers/tabs/tab-pane/tab-pane.component.d.ts +2 -4
- app-ng-runtime/components/containers/tabs/tabs.component.d.ts +3 -4
- app-ng-runtime/components/containers/tile/bundles/index.umd.js +8 -14
- app-ng-runtime/components/containers/tile/esm2020/tile.directive.mjs +6 -11
- app-ng-runtime/components/containers/tile/fesm2015/index.mjs +5 -11
- app-ng-runtime/components/containers/tile/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/containers/tile/fesm2020/index.mjs +5 -9
- app-ng-runtime/components/containers/tile/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/containers/tile/tile.directive.d.ts +2 -4
- app-ng-runtime/components/containers/wizard/bundles/index.umd.js +48 -57
- app-ng-runtime/components/containers/wizard/esm2020/wizard-step/wizard-step.directive.mjs +5 -10
- app-ng-runtime/components/containers/wizard/esm2020/wizard.component.mjs +10 -14
- app-ng-runtime/components/containers/wizard/fesm2015/index.mjs +11 -20
- app-ng-runtime/components/containers/wizard/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/containers/wizard/fesm2020/index.mjs +11 -18
- app-ng-runtime/components/containers/wizard/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/containers/wizard/wizard-step/wizard-step.directive.d.ts +2 -4
- app-ng-runtime/components/containers/wizard/wizard.component.d.ts +2 -4
- app-ng-runtime/components/data/card/bundles/index.umd.js +83 -106
- app-ng-runtime/components/data/card/card-actions/card-actions.directive.d.ts +2 -4
- app-ng-runtime/components/data/card/card-content/card-content.component.d.ts +2 -4
- app-ng-runtime/components/data/card/card-footer/card-footer.directive.d.ts +2 -4
- app-ng-runtime/components/data/card/card.component.d.ts +2 -4
- app-ng-runtime/components/data/card/esm2020/card-actions/card-actions.directive.mjs +6 -11
- app-ng-runtime/components/data/card/esm2020/card-content/card-content.component.mjs +6 -11
- app-ng-runtime/components/data/card/esm2020/card-footer/card-footer.directive.mjs +6 -11
- app-ng-runtime/components/data/card/esm2020/card.component.mjs +12 -18
- app-ng-runtime/components/data/card/fesm2015/index.mjs +23 -46
- app-ng-runtime/components/data/card/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/data/card/fesm2020/index.mjs +23 -38
- app-ng-runtime/components/data/card/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/bundles/index.umd.js +128 -137
- app-ng-runtime/components/data/form/esm2020/form-action/form-action.directive.mjs +4 -9
- app-ng-runtime/components/data/form/esm2020/form-field/form-field.directive.mjs +5 -8
- app-ng-runtime/components/data/form/esm2020/form.component.mjs +5 -8
- app-ng-runtime/components/data/form/fesm2015/index.mjs +20 -29
- app-ng-runtime/components/data/form/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/fesm2020/index.mjs +20 -29
- app-ng-runtime/components/data/form/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/form-action/form-action.directive.d.ts +2 -4
- app-ng-runtime/components/data/form/form-field/form-field.directive.d.ts +3 -4
- app-ng-runtime/components/data/form/form.component.d.ts +3 -4
- app-ng-runtime/components/data/list/bundles/index.umd.js +4 -7
- app-ng-runtime/components/data/list/esm2020/list.component.mjs +7 -10
- app-ng-runtime/components/data/list/fesm2015/index.mjs +4 -7
- app-ng-runtime/components/data/list/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/data/list/fesm2020/index.mjs +4 -7
- app-ng-runtime/components/data/list/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/data/list/list.component.d.ts +3 -4
- app-ng-runtime/components/data/live-table/bundles/index.umd.js +3 -6
- app-ng-runtime/components/data/live-table/esm2020/live-table.component.mjs +6 -9
- app-ng-runtime/components/data/live-table/fesm2015/index.mjs +4 -7
- app-ng-runtime/components/data/live-table/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/data/live-table/fesm2020/index.mjs +4 -7
- app-ng-runtime/components/data/live-table/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/data/live-table/live-table.component.d.ts +3 -4
- app-ng-runtime/components/data/pagination/bundles/index.umd.js +30 -34
- app-ng-runtime/components/data/pagination/esm2020/pagination.component.mjs +10 -14
- app-ng-runtime/components/data/pagination/fesm2015/index.mjs +8 -12
- app-ng-runtime/components/data/pagination/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/data/pagination/fesm2020/index.mjs +8 -12
- app-ng-runtime/components/data/pagination/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/data/pagination/pagination.component.d.ts +2 -4
- app-ng-runtime/components/data/table/bundles/index.umd.js +19 -37
- app-ng-runtime/components/data/table/esm2020/table-action/table-action.directive.mjs +4 -9
- app-ng-runtime/components/data/table/esm2020/table-column/table-column.directive.mjs +5 -8
- app-ng-runtime/components/data/table/esm2020/table-column-group/table-column-group.directive.mjs +4 -9
- app-ng-runtime/components/data/table/esm2020/table-row/table-row.directive.mjs +4 -9
- app-ng-runtime/components/data/table/esm2020/table-row-action/table-row-action.directive.mjs +4 -9
- app-ng-runtime/components/data/table/esm2020/table.component.mjs +6 -9
- app-ng-runtime/components/data/table/fesm2015/index.mjs +19 -37
- app-ng-runtime/components/data/table/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/fesm2020/index.mjs +19 -37
- app-ng-runtime/components/data/table/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/table-action/table-action.directive.d.ts +2 -4
- app-ng-runtime/components/data/table/table-column/table-column.directive.d.ts +3 -4
- app-ng-runtime/components/data/table/table-column-group/table-column-group.directive.d.ts +2 -4
- app-ng-runtime/components/data/table/table-row/table-row.directive.d.ts +2 -4
- app-ng-runtime/components/data/table/table-row-action/table-row-action.directive.d.ts +2 -4
- app-ng-runtime/components/data/table/table.component.d.ts +3 -4
- app-ng-runtime/components/dialogs/alert-dialog/alert-dialog.component.d.ts +2 -4
- app-ng-runtime/components/dialogs/alert-dialog/bundles/index.umd.js +40 -46
- app-ng-runtime/components/dialogs/alert-dialog/esm2020/alert-dialog.component.mjs +9 -15
- app-ng-runtime/components/dialogs/alert-dialog/fesm2015/index.mjs +8 -14
- app-ng-runtime/components/dialogs/alert-dialog/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/alert-dialog/fesm2020/index.mjs +8 -14
- app-ng-runtime/components/dialogs/alert-dialog/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/confirm-dialog/bundles/index.umd.js +16 -22
- app-ng-runtime/components/dialogs/confirm-dialog/confirm-dialog.component.d.ts +2 -4
- app-ng-runtime/components/dialogs/confirm-dialog/esm2020/confirm-dialog.component.mjs +8 -14
- app-ng-runtime/components/dialogs/confirm-dialog/fesm2015/index.mjs +7 -13
- app-ng-runtime/components/dialogs/confirm-dialog/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/confirm-dialog/fesm2020/index.mjs +7 -13
- app-ng-runtime/components/dialogs/confirm-dialog/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/default/base-dialog.d.ts +1 -2
- app-ng-runtime/components/dialogs/default/bundles/index.umd.js +25 -31
- app-ng-runtime/components/dialogs/default/dialog-footer/dialog-footer.directive.d.ts +2 -4
- app-ng-runtime/components/dialogs/default/esm2020/base-dialog.mjs +7 -8
- app-ng-runtime/components/dialogs/default/esm2020/dialog-footer/dialog-footer.directive.mjs +6 -11
- app-ng-runtime/components/dialogs/default/fesm2015/index.mjs +11 -17
- app-ng-runtime/components/dialogs/default/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/default/fesm2020/index.mjs +11 -15
- app-ng-runtime/components/dialogs/default/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/design-dialog/bundles/index.umd.js +17 -23
- app-ng-runtime/components/dialogs/design-dialog/dialog.component.d.ts +2 -4
- app-ng-runtime/components/dialogs/design-dialog/esm2020/dialog.component.mjs +8 -14
- app-ng-runtime/components/dialogs/design-dialog/fesm2015/index.mjs +7 -13
- app-ng-runtime/components/dialogs/design-dialog/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/design-dialog/fesm2020/index.mjs +7 -13
- app-ng-runtime/components/dialogs/design-dialog/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/iframe-dialog/bundles/index.umd.js +24 -30
- app-ng-runtime/components/dialogs/iframe-dialog/esm2020/iframe-dialog.component.mjs +10 -16
- app-ng-runtime/components/dialogs/iframe-dialog/fesm2015/index.mjs +9 -15
- app-ng-runtime/components/dialogs/iframe-dialog/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/iframe-dialog/fesm2020/index.mjs +9 -15
- app-ng-runtime/components/dialogs/iframe-dialog/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/iframe-dialog/iframe-dialog.component.d.ts +2 -4
- app-ng-runtime/components/dialogs/partial-dialog/bundles/index.umd.js +3 -8
- app-ng-runtime/components/dialogs/partial-dialog/esm2020/partial-dialog.component.mjs +5 -10
- app-ng-runtime/components/dialogs/partial-dialog/fesm2015/index.mjs +4 -9
- app-ng-runtime/components/dialogs/partial-dialog/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/partial-dialog/fesm2020/index.mjs +4 -9
- app-ng-runtime/components/dialogs/partial-dialog/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/partial-dialog/partial-dialog.component.d.ts +3 -4
- app-ng-runtime/components/input/calendar/bundles/index.umd.js +5 -10
- app-ng-runtime/components/input/calendar/calendar.component.d.ts +3 -4
- app-ng-runtime/components/input/calendar/esm2020/calendar.component.mjs +8 -11
- app-ng-runtime/components/input/calendar/fesm2015/index.mjs +6 -11
- app-ng-runtime/components/input/calendar/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/calendar/fesm2020/index.mjs +6 -9
- app-ng-runtime/components/input/calendar/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/chips/bundles/index.umd.js +87 -93
- app-ng-runtime/components/input/chips/chips.component.d.ts +2 -4
- app-ng-runtime/components/input/chips/esm2020/chips.component.mjs +9 -15
- app-ng-runtime/components/input/chips/fesm2015/index.mjs +8 -14
- app-ng-runtime/components/input/chips/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/chips/fesm2020/index.mjs +8 -14
- app-ng-runtime/components/input/chips/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/color-picker/bundles/index.umd.js +22 -28
- app-ng-runtime/components/input/color-picker/color-picker.component.d.ts +2 -4
- app-ng-runtime/components/input/color-picker/esm2020/color-picker.component.mjs +10 -14
- app-ng-runtime/components/input/color-picker/fesm2015/index.mjs +8 -14
- app-ng-runtime/components/input/color-picker/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/color-picker/fesm2020/index.mjs +8 -12
- app-ng-runtime/components/input/color-picker/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/currency/bundles/index.umd.js +4 -9
- app-ng-runtime/components/input/currency/currency.component.d.ts +3 -4
- app-ng-runtime/components/input/currency/esm2020/currency.component.mjs +7 -10
- app-ng-runtime/components/input/currency/fesm2015/index.mjs +5 -10
- app-ng-runtime/components/input/currency/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/currency/fesm2020/index.mjs +5 -8
- app-ng-runtime/components/input/currency/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/base-form.component.d.ts +1 -2
- app-ng-runtime/components/input/default/bundles/index.umd.js +575 -648
- app-ng-runtime/components/input/default/button/button.component.d.ts +2 -4
- app-ng-runtime/components/input/default/button-group/button-group.directive.d.ts +2 -4
- app-ng-runtime/components/input/default/checkbox/checkbox.component.d.ts +2 -4
- app-ng-runtime/components/input/default/checkboxset/checkboxset.component.d.ts +2 -4
- app-ng-runtime/components/input/default/composite/composite.directive.d.ts +2 -4
- app-ng-runtime/components/input/default/dataset-aware-form.component.d.ts +2 -3
- app-ng-runtime/components/input/default/esm2020/base-form.component.mjs +6 -7
- app-ng-runtime/components/input/default/esm2020/button/button.component.mjs +9 -14
- app-ng-runtime/components/input/default/esm2020/button-group/button-group.directive.mjs +6 -11
- app-ng-runtime/components/input/default/esm2020/checkbox/checkbox.component.mjs +9 -13
- app-ng-runtime/components/input/default/esm2020/checkboxset/checkboxset.component.mjs +10 -14
- app-ng-runtime/components/input/default/esm2020/composite/composite.directive.mjs +7 -11
- app-ng-runtime/components/input/default/esm2020/dataset-aware-form.component.mjs +6 -7
- app-ng-runtime/components/input/default/esm2020/number/number.component.mjs +7 -10
- app-ng-runtime/components/input/default/esm2020/radioset/radioset.component.mjs +10 -14
- app-ng-runtime/components/input/default/esm2020/select/select.component.mjs +11 -15
- app-ng-runtime/components/input/default/esm2020/switch/switch.component.mjs +10 -14
- app-ng-runtime/components/input/default/esm2020/text/base/base-input.mjs +6 -7
- app-ng-runtime/components/input/default/esm2020/text/calendar/input-calendar.component.mjs +8 -13
- app-ng-runtime/components/input/default/esm2020/text/color/input-color.component.mjs +8 -13
- app-ng-runtime/components/input/default/esm2020/text/email/input-email.component.mjs +8 -13
- app-ng-runtime/components/input/default/esm2020/text/locale/number-locale.mjs +3 -3
- app-ng-runtime/components/input/default/esm2020/text/number/input-number.component.mjs +9 -14
- app-ng-runtime/components/input/default/esm2020/text/text/input-text.component.mjs +9 -14
- app-ng-runtime/components/input/default/esm2020/textarea/textarea.component.mjs +9 -14
- app-ng-runtime/components/input/default/fesm2015/index.mjs +94 -167
- app-ng-runtime/components/input/default/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/fesm2020/index.mjs +94 -139
- app-ng-runtime/components/input/default/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/number/number.component.d.ts +3 -4
- app-ng-runtime/components/input/default/radioset/radioset.component.d.ts +2 -4
- app-ng-runtime/components/input/default/select/select.component.d.ts +2 -4
- app-ng-runtime/components/input/default/switch/switch.component.d.ts +2 -4
- app-ng-runtime/components/input/default/text/base/base-input.d.ts +1 -2
- app-ng-runtime/components/input/default/text/calendar/input-calendar.component.d.ts +2 -4
- app-ng-runtime/components/input/default/text/color/input-color.component.d.ts +2 -4
- app-ng-runtime/components/input/default/text/email/input-email.component.d.ts +2 -4
- app-ng-runtime/components/input/default/text/locale/number-locale.d.ts +2 -2
- app-ng-runtime/components/input/default/text/number/input-number.component.d.ts +2 -4
- app-ng-runtime/components/input/default/text/text/input-text.component.d.ts +2 -4
- app-ng-runtime/components/input/default/textarea/textarea.component.d.ts +2 -4
- app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +1 -2
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +12 -21
- app-ng-runtime/components/input/epoch/date/date.component.d.ts +3 -4
- app-ng-runtime/components/input/epoch/date-time/date-time.component.d.ts +3 -4
- app-ng-runtime/components/input/epoch/esm2020/base-date-time.component.mjs +5 -6
- app-ng-runtime/components/input/epoch/esm2020/date/date.component.mjs +6 -9
- app-ng-runtime/components/input/epoch/esm2020/date-time/date-time.component.mjs +6 -9
- app-ng-runtime/components/input/epoch/esm2020/time/time.component.mjs +6 -9
- app-ng-runtime/components/input/epoch/fesm2015/index.mjs +13 -22
- app-ng-runtime/components/input/epoch/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/epoch/fesm2020/index.mjs +13 -22
- app-ng-runtime/components/input/epoch/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/epoch/time/time.component.d.ts +3 -4
- app-ng-runtime/components/input/file-upload/bundles/index.umd.js +3 -6
- app-ng-runtime/components/input/file-upload/esm2020/file-upload.component.mjs +6 -9
- app-ng-runtime/components/input/file-upload/fesm2015/index.mjs +4 -7
- app-ng-runtime/components/input/file-upload/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/file-upload/fesm2020/index.mjs +4 -7
- app-ng-runtime/components/input/file-upload/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/file-upload/file-upload.component.d.ts +3 -4
- app-ng-runtime/components/input/rating/bundles/index.umd.js +45 -51
- app-ng-runtime/components/input/rating/esm2020/rating.component.mjs +11 -15
- app-ng-runtime/components/input/rating/fesm2015/index.mjs +9 -15
- app-ng-runtime/components/input/rating/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/rating/fesm2020/index.mjs +9 -13
- app-ng-runtime/components/input/rating/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/rating/rating.component.d.ts +2 -4
- app-ng-runtime/components/input/slider/bundles/index.umd.js +37 -43
- app-ng-runtime/components/input/slider/esm2020/slider.component.mjs +10 -15
- app-ng-runtime/components/input/slider/fesm2015/index.mjs +9 -15
- app-ng-runtime/components/input/slider/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/slider/fesm2020/index.mjs +9 -13
- app-ng-runtime/components/input/slider/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/slider/slider.component.d.ts +2 -4
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js +13 -25
- app-ng-runtime/components/navigation/menu/esm2020/menu-adapator.component.mjs +4 -6
- app-ng-runtime/components/navigation/menu/esm2020/menu.component.mjs +4 -7
- app-ng-runtime/components/navigation/menu/esm2020/nav/nav-item/nav-item.directive.mjs +7 -11
- app-ng-runtime/components/navigation/menu/esm2020/nav/nav.component.mjs +5 -9
- app-ng-runtime/components/navigation/menu/fesm2015/index.mjs +14 -26
- app-ng-runtime/components/navigation/menu/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/fesm2020/index.mjs +14 -24
- app-ng-runtime/components/navigation/menu/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/menu-adapator.component.d.ts +1 -2
- app-ng-runtime/components/navigation/menu/menu.component.d.ts +2 -3
- app-ng-runtime/components/navigation/menu/nav/nav-item/nav-item.directive.d.ts +2 -4
- app-ng-runtime/components/navigation/menu/nav/nav.component.d.ts +3 -3
- app-ng-runtime/components/navigation/navbar/bundles/index.umd.js +28 -34
- app-ng-runtime/components/navigation/navbar/esm2020/navbar.component.mjs +9 -14
- app-ng-runtime/components/navigation/navbar/fesm2015/index.mjs +8 -14
- app-ng-runtime/components/navigation/navbar/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/navbar/fesm2020/index.mjs +8 -12
- app-ng-runtime/components/navigation/navbar/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/navbar/navbar.component.d.ts +2 -4
- app-ng-runtime/components/page/default/bundles/index.umd.js +32 -64
- app-ng-runtime/components/page/default/content/content.component.d.ts +2 -4
- app-ng-runtime/components/page/default/esm2020/content/content.component.mjs +6 -11
- app-ng-runtime/components/page/default/esm2020/layout.directive.mjs +7 -11
- app-ng-runtime/components/page/default/esm2020/page-content/page-content.component.mjs +7 -10
- app-ng-runtime/components/page/default/esm2020/page.directive.mjs +7 -12
- app-ng-runtime/components/page/default/esm2020/router-outlet.directive.mjs +7 -11
- app-ng-runtime/components/page/default/esm2020/spa-page.directive.mjs +7 -10
- app-ng-runtime/components/page/default/fesm2015/index.mjs +26 -58
- app-ng-runtime/components/page/default/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/page/default/fesm2020/index.mjs +26 -46
- app-ng-runtime/components/page/default/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/page/default/layout.directive.d.ts +2 -4
- app-ng-runtime/components/page/default/page-content/page-content.component.d.ts +3 -4
- app-ng-runtime/components/page/default/page.directive.d.ts +3 -4
- app-ng-runtime/components/page/default/router-outlet.directive.d.ts +2 -4
- app-ng-runtime/components/page/default/spa-page.directive.d.ts +3 -4
- app-ng-runtime/components/page/footer/bundles/index.umd.js +8 -14
- app-ng-runtime/components/page/footer/esm2020/footer.directive.mjs +6 -11
- app-ng-runtime/components/page/footer/fesm2015/index.mjs +5 -11
- app-ng-runtime/components/page/footer/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/page/footer/fesm2020/index.mjs +5 -9
- app-ng-runtime/components/page/footer/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/page/footer/footer.directive.d.ts +2 -4
- app-ng-runtime/components/page/header/bundles/index.umd.js +8 -14
- app-ng-runtime/components/page/header/esm2020/header.component.mjs +6 -11
- app-ng-runtime/components/page/header/fesm2015/index.mjs +5 -11
- app-ng-runtime/components/page/header/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/page/header/fesm2020/index.mjs +5 -9
- app-ng-runtime/components/page/header/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/page/header/header.component.d.ts +2 -4
- app-ng-runtime/components/page/left-panel/bundles/index.umd.js +4 -7
- app-ng-runtime/components/page/left-panel/esm2020/left-panel.directive.mjs +6 -9
- app-ng-runtime/components/page/left-panel/fesm2015/index.mjs +4 -7
- app-ng-runtime/components/page/left-panel/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/page/left-panel/fesm2020/index.mjs +4 -7
- app-ng-runtime/components/page/left-panel/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/page/left-panel/left-panel.directive.d.ts +3 -4
- app-ng-runtime/components/page/right-panel/bundles/index.umd.js +6 -12
- app-ng-runtime/components/page/right-panel/esm2020/right-panel.directive.mjs +7 -11
- app-ng-runtime/components/page/right-panel/fesm2015/index.mjs +5 -11
- app-ng-runtime/components/page/right-panel/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/page/right-panel/fesm2020/index.mjs +5 -9
- app-ng-runtime/components/page/right-panel/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/page/right-panel/right-panel.directive.d.ts +2 -4
- app-ng-runtime/components/page/top-nav/bundles/index.umd.js +8 -14
- app-ng-runtime/components/page/top-nav/esm2020/top-nav.directive.mjs +6 -11
- app-ng-runtime/components/page/top-nav/fesm2015/index.mjs +5 -11
- app-ng-runtime/components/page/top-nav/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/page/top-nav/fesm2020/index.mjs +5 -9
- app-ng-runtime/components/page/top-nav/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/page/top-nav/top-nav.directive.d.ts +2 -4
- app-ng-runtime/components/prefab/bundles/index.umd.js +7 -15
- app-ng-runtime/components/prefab/esm2020/prefab-container/prefab-container.directive.mjs +7 -10
- app-ng-runtime/components/prefab/esm2020/prefab.directive.mjs +6 -10
- app-ng-runtime/components/prefab/fesm2015/index.mjs +8 -16
- app-ng-runtime/components/prefab/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/prefab/fesm2020/index.mjs +8 -14
- app-ng-runtime/components/prefab/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/prefab/prefab-container/prefab-container.directive.d.ts +3 -4
- app-ng-runtime/components/prefab/prefab.directive.d.ts +2 -4
- app-ng-runtime/mobile/components/basic/default/bundles/index.umd.js +32 -37
- app-ng-runtime/mobile/components/basic/default/esm2020/network-info-toaster/network-info-toaster.component.mjs +7 -10
- app-ng-runtime/mobile/components/basic/default/fesm2015/index.mjs +10 -15
- app-ng-runtime/mobile/components/basic/default/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/basic/default/fesm2020/index.mjs +10 -13
- app-ng-runtime/mobile/components/basic/default/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/basic/default/network-info-toaster/network-info-toaster.component.d.ts +3 -4
- app-ng-runtime/mobile/components/containers/segmented-control/bundles/index.umd.js +18 -29
- app-ng-runtime/mobile/components/containers/segmented-control/esm2020/segment-content/segment-content.component.mjs +8 -13
- app-ng-runtime/mobile/components/containers/segmented-control/esm2020/segmented-control.component.mjs +9 -13
- app-ng-runtime/mobile/components/containers/segmented-control/fesm2015/index.mjs +12 -23
- app-ng-runtime/mobile/components/containers/segmented-control/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/containers/segmented-control/fesm2020/index.mjs +12 -19
- app-ng-runtime/mobile/components/containers/segmented-control/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/containers/segmented-control/segment-content/segment-content.component.d.ts +2 -4
- app-ng-runtime/mobile/components/containers/segmented-control/segmented-control.component.d.ts +2 -4
- app-ng-runtime/mobile/components/data/media-list/bundles/index.umd.js +30 -36
- app-ng-runtime/mobile/components/data/media-list/esm2020/media-list.component.mjs +14 -18
- app-ng-runtime/mobile/components/data/media-list/fesm2015/index.mjs +11 -17
- app-ng-runtime/mobile/components/data/media-list/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/data/media-list/fesm2020/index.mjs +11 -15
- app-ng-runtime/mobile/components/data/media-list/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/data/media-list/media-list.component.d.ts +2 -4
- app-ng-runtime/mobile/components/device/barcode-scanner/barcode-scanner.component.d.ts +2 -4
- app-ng-runtime/mobile/components/device/barcode-scanner/bundles/index.umd.js +28 -34
- app-ng-runtime/mobile/components/device/barcode-scanner/esm2020/barcode-scanner.component.mjs +10 -14
- app-ng-runtime/mobile/components/device/barcode-scanner/fesm2015/index.mjs +8 -14
- app-ng-runtime/mobile/components/device/barcode-scanner/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/device/barcode-scanner/fesm2020/index.mjs +8 -12
- app-ng-runtime/mobile/components/device/barcode-scanner/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/device/camera/bundles/index.umd.js +12 -18
- app-ng-runtime/mobile/components/device/camera/camera.component.d.ts +2 -4
- app-ng-runtime/mobile/components/device/camera/esm2020/camera.component.mjs +9 -13
- app-ng-runtime/mobile/components/device/camera/fesm2015/index.mjs +7 -13
- app-ng-runtime/mobile/components/device/camera/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/device/camera/fesm2020/index.mjs +7 -11
- app-ng-runtime/mobile/components/device/camera/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/page/mobile-navbar/bundles/index.umd.js +3 -6
- app-ng-runtime/mobile/components/page/mobile-navbar/esm2020/mobile-navbar.component.mjs +6 -9
- app-ng-runtime/mobile/components/page/mobile-navbar/fesm2015/index.mjs +4 -7
- app-ng-runtime/mobile/components/page/mobile-navbar/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/page/mobile-navbar/fesm2020/index.mjs +4 -7
- app-ng-runtime/mobile/components/page/mobile-navbar/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/page/mobile-navbar/mobile-navbar.component.d.ts +3 -4
- app-ng-runtime/mobile/components/page/tab-bar/bundles/index.umd.js +32 -36
- app-ng-runtime/mobile/components/page/tab-bar/esm2020/tabbar.component.mjs +8 -13
- app-ng-runtime/mobile/components/page/tab-bar/fesm2015/index.mjs +7 -11
- app-ng-runtime/mobile/components/page/tab-bar/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/page/tab-bar/fesm2020/index.mjs +7 -11
- app-ng-runtime/mobile/components/page/tab-bar/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/page/tab-bar/tabbar.component.d.ts +2 -4
- app-ng-runtime/package.json +1 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, Component,
|
|
2
|
+
import { ElementRef, Component, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import * as
|
|
4
|
+
import * as i2 from '@angular/forms';
|
|
5
5
|
import { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
|
6
|
-
import * as
|
|
6
|
+
import * as i1 from 'ngx-color-picker';
|
|
7
7
|
import { ColorPickerDirective, ColorPickerModule as ColorPickerModule$1 } from 'ngx-color-picker';
|
|
8
8
|
import { PROP_STRING, PROP_BOOLEAN, PROP_NUMBER, register, registerFormWidget, styler, AUTOCLOSE_TYPE, provideAs, provideAsWidgetRef, WmComponentsModule } from '@wm/components/base';
|
|
9
|
-
import * as i1 from '@wm/core';
|
|
10
9
|
import { FormWidgetType, addClass, removeClass } from '@wm/core';
|
|
11
10
|
import { BaseFormCustomComponent } from '@wm/components/input';
|
|
12
11
|
|
|
@@ -39,9 +38,8 @@ const WIDGET_CONFIG = {
|
|
|
39
38
|
displayType: 'inline-block'
|
|
40
39
|
};
|
|
41
40
|
class ColorPickerComponent extends BaseFormCustomComponent {
|
|
42
|
-
constructor(inj
|
|
43
|
-
super(inj, WIDGET_CONFIG
|
|
44
|
-
this._viewParent = _viewParent;
|
|
41
|
+
constructor(inj) {
|
|
42
|
+
super(inj, WIDGET_CONFIG);
|
|
45
43
|
styler(this.nativeElement, this);
|
|
46
44
|
}
|
|
47
45
|
// To remove space occupied by colorpicker when it is closed
|
|
@@ -95,7 +93,7 @@ class ColorPickerComponent extends BaseFormCustomComponent {
|
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
95
|
ColorPickerComponent.initializeProps = registerProps();
|
|
98
|
-
ColorPickerComponent.ɵfac = function ColorPickerComponent_Factory(t) { return new (t || ColorPickerComponent)(i0.ɵɵdirectiveInject(i0.Injector)
|
|
96
|
+
ColorPickerComponent.ɵfac = function ColorPickerComponent_Factory(t) { return new (t || ColorPickerComponent)(i0.ɵɵdirectiveInject(i0.Injector)); };
|
|
99
97
|
ColorPickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ColorPickerComponent, selectors: [["", "wmColorPicker", ""]], viewQuery: function ColorPickerComponent_Query(rf, ctx) {
|
|
100
98
|
if (rf & 1) {
|
|
101
99
|
i0.ɵɵviewQuery(NgModel, 5);
|
|
@@ -127,7 +125,7 @@ ColorPickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ColorP
|
|
|
127
125
|
i0.ɵɵadvance(3);
|
|
128
126
|
i0.ɵɵstyleProp("background-color", ctx.datavalue);
|
|
129
127
|
}
|
|
130
|
-
}, dependencies: [
|
|
128
|
+
}, dependencies: [i1.ColorPickerDirective, i2.DefaultValueAccessor, i2.NgControlStatus, i2.RequiredValidator, i2.NgModel], encapsulation: 2 });
|
|
131
129
|
(function () {
|
|
132
130
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ColorPickerComponent, [{
|
|
133
131
|
type: Component,
|
|
@@ -136,11 +134,7 @@ ColorPickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ColorP
|
|
|
136
134
|
provideAs(ColorPickerComponent, NG_VALIDATORS, true),
|
|
137
135
|
provideAsWidgetRef(ColorPickerComponent)
|
|
138
136
|
], template: "<input class=\"form-control app-textbox\" aria-haspopup=\"true\" aria-expanded=\"false\"\n #input\n focus-target\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint\"\n [(colorPicker)]=\"datavalue\"\n (colorPickerChange)=\"handleChange($event);\"\n (cpToggleChange)=\"colorPickerToggleChange($event)\"\n [cpPosition]=\"'bottom'\"\n [cpCloseClickOutside]=\"outsideclick\"\n (colorPickerOpen)=\"colorPickerOpen($event)\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"readonly || disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [(ngModel)]=\"datavalue\"\n (ngModelChange)=\"handleChange($event);\"\n [ngModelOptions]=\"{updateOn: 'change'}\"\n (blur)=\"invokeOnTouched($event)\"\n [attr.accesskey]=\"shortcutkey\">\n<span class=\"input-group-addon colorpicker-container\">\n <i class=\"colored-box\" [style.backgroundColor]=\"datavalue\"> </i>\n</span>\n" }]
|
|
139
|
-
}], function () {
|
|
140
|
-
return [{ type: i0.Injector }, { type: i1.UserDefinedExecutionContext, decorators: [{
|
|
141
|
-
type: Optional
|
|
142
|
-
}] }];
|
|
143
|
-
}, { ngModel: [{
|
|
137
|
+
}], function () { return [{ type: i0.Injector }]; }, { ngModel: [{
|
|
144
138
|
type: ViewChild,
|
|
145
139
|
args: [NgModel]
|
|
146
140
|
}], inputEl: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/color-picker/src/color-picker.props.ts","../../../../../projects/components/widgets/input/color-picker/src/color-picker.component.ts","../../../../../projects/components/widgets/input/color-picker/src/color-picker.component.html","../../../../../projects/components/widgets/input/color-picker/src/color-picker.module.ts","../../../../../projects/components/widgets/input/color-picker/src/index.ts"],"sourcesContent":["import { PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const colorPickerProps = new Map(\n [\n ['autoclose', {value: 'outsideClick', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['datavalue', PROP_STRING],\n ['disabled', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['placeholder', {value: 'Select Color', ...PROP_STRING}],\n ['readonly', PROP_BOOLEAN],\n ['required', PROP_BOOLEAN],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-colorpicker',\n colorPickerProps\n );\n registerFormWidget(\n FormWidgetType.COLORPICKER,\n new Map(colorPickerProps)\n );\n};\n","import {Component, ElementRef, Injector, Optional, ViewChild} from '@angular/core';\nimport { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nimport { ColorPickerDirective} from 'ngx-color-picker';\n\nimport {addClass, removeClass, UserDefinedExecutionContext} from '@wm/core';\nimport { AUTOCLOSE_TYPE, IWidgetConfig, provideAs, provideAsWidgetRef, styler } from '@wm/components/base';\nimport { BaseFormCustomComponent } from '@wm/components/input';\nimport { registerProps } from './color-picker.props';\n\n\nconst DEFAULT_CLS = 'input-group app-colorpicker';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-colorpicker',\n hostClass: DEFAULT_CLS,\n displayType: 'inline-block'\n};\n\n@Component({\n selector: '[wmColorPicker]',\n templateUrl: './color-picker.component.html',\n providers: [\n provideAs(ColorPickerComponent, NG_VALUE_ACCESSOR, true),\n provideAs(ColorPickerComponent, NG_VALIDATORS, true),\n provideAsWidgetRef(ColorPickerComponent)\n ]\n})\nexport class ColorPickerComponent extends BaseFormCustomComponent {\n static initializeProps = registerProps();\n\n public required: boolean;\n public readonly: boolean;\n public disabled: boolean;\n public name: string;\n public placeholder: any;\n public tabindex: any;\n public shortcutkey: string;\n public outsideclick: boolean;\n public autoclose: string;\n public hint: string;\n\n\n @ViewChild(NgModel) ngModel: NgModel;\n @ViewChild('input', { static: true, read: ElementRef }) inputEl: ElementRef;\n @ViewChild(ColorPickerDirective) cpDirective: ColorPickerDirective;\n\n constructor(inj: Injector, @Optional() public _viewParent: UserDefinedExecutionContext) {\n super(inj, WIDGET_CONFIG, _viewParent);\n styler(this.nativeElement, this);\n }\n\n // To remove space occupied by colorpicker when it is closed\n public colorPickerToggleChange(isOpen: boolean) {\n const colorPickerContainer = this.nativeElement.querySelector(`.color-picker`) as HTMLElement;\n if (colorPickerContainer) {\n (!isOpen) ? addClass(colorPickerContainer, 'hidden') : removeClass(colorPickerContainer, 'hidden');\n }\n }\n\n colorPickerOpen(value: string) {\n // Whenever autoclose property is set to 'always', adding the onclick listener to the colorPicker container to close the picker.\n if (this.autoclose === AUTOCLOSE_TYPE.ALWAYS) {\n const colorPickerContainer = this.nativeElement.querySelector(`.color-picker`) as HTMLElement;\n colorPickerContainer.onclick = () => this.cpDirective.closeDialog();\n }\n }\n\n // This mehtod is used to show/open the colorpicker popup.\n open() {\n this.cpDirective.openDialog();\n }\n\n // This mehtod is used to hide/close the colorpicker popup.\n close() {\n this.cpDirective.closeDialog();\n }\n\n\n // change and blur events are added from the template\n protected handleEvent(node: HTMLElement, eventName: string, callback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(this.inputEl.nativeElement, eventName, callback, locals);\n }\n }\n\n public handleChange(newVal: boolean) {\n this.invokeOnChange(this.datavalue, {type: 'change'}, this.ngModel.valid);\n }\n\n protected onPropertyChange(key: string, nv: any, ov: any) {\n if (key === 'tabindex') {\n return;\n }\n if (key === 'required') {\n /* WMS-18269 | Update Angular about the required attr value change */\n this._onChange(this.datavalue);\n return;\n }\n if (key === 'datavalue') {\n this._onChange(nv);\n return;\n }\n if (key === 'autoclose') {\n this.outsideclick = (nv === AUTOCLOSE_TYPE.OUTSIDECLICK || nv === AUTOCLOSE_TYPE.ALWAYS) ? true : false;\n }\n super.onPropertyChange(key, nv, ov);\n }\n}\n","<input class=\"form-control app-textbox\" aria-haspopup=\"true\" aria-expanded=\"false\"\n #input\n focus-target\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint\"\n [(colorPicker)]=\"datavalue\"\n (colorPickerChange)=\"handleChange($event);\"\n (cpToggleChange)=\"colorPickerToggleChange($event)\"\n [cpPosition]=\"'bottom'\"\n [cpCloseClickOutside]=\"outsideclick\"\n (colorPickerOpen)=\"colorPickerOpen($event)\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"readonly || disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [(ngModel)]=\"datavalue\"\n (ngModelChange)=\"handleChange($event);\"\n [ngModelOptions]=\"{updateOn: 'change'}\"\n (blur)=\"invokeOnTouched($event)\"\n [attr.accesskey]=\"shortcutkey\">\n<span class=\"input-group-addon colorpicker-container\">\n <i class=\"colored-box\" [style.backgroundColor]=\"datavalue\"> </i>\n</span>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { ColorPickerModule as ngxColorPickerModule } from 'ngx-color-picker';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { ColorPickerComponent } from './color-picker.component';\n\nconst components = [\n ColorPickerComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ngxColorPickerModule,\n FormsModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class ColorPickerModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ngxColorPickerModule"],"mappings":";;;;;;;;;;;;AAGO,MAAM,gBAAgB,GAAG,IAAI,GAAG,CACnC;AACI,IAAA,CAAC,WAAW,EAAG,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAE,cAAc,EAAA,EAAK,WAAW,CAAE,CAAA;IACtD,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;AACrB,IAAA,CAAC,aAAa,EAAG,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAE,cAAc,EAAA,EAAK,WAAW,CAAE,CAAA;IACxD,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,aAAa,EAAE,WAAW,CAAC;AAC5B,IAAA,CAAC,MAAM,EAAG,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAE,IAAI,EAAA,EAAK,YAAY,CAAE,CAAA;AACxC,IAAA,CAAC,UAAU,EAAG,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAE,CAAC,EAAA,EAAK,WAAW,CAAE,CAAA;AAC3C,CAAA,CACJ,CAAC;AAEK,MAAM,aAAa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;uBAAC,oBAAoB,CAAA;;;;AEjCnC,MAAM,UAAU,GAAG;IACf,oBAAoB;CACvB,CAAC;MAYW,iBAAiB,CAAA;;kFAAjB,iBAAiB,GAAA,CAAA,EAAA,CAAA;mEAAjB,iBAAiB,EAAA,CAAA,CAAA;uEARtB,YAAY;QACZA,mBAAoB;QACpB,WAAW;QACX,kBAAkB,CAAA,EAAA,CAAA,CAAA;;4EAKb,iBAAiB,EAAA,CAAA;kBAV7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZA,mBAAoB;wBACpB,WAAW;wBACX,kBAAkB;AACrB,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;iBAC3B,CAAA;;;;6EACY,iBAAiB,EAAA,EAAA,YAAA,EAAA,CAb1B,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAKhB,YAAY;YACZA,mBAAoB;YACpB,WAAW;YACX,kBAAkB,aARtB,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAAA,CAAA,GAAA;;ACXxB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/color-picker/src/color-picker.props.ts","../../../../../projects/components/widgets/input/color-picker/src/color-picker.component.ts","../../../../../projects/components/widgets/input/color-picker/src/color-picker.component.html","../../../../../projects/components/widgets/input/color-picker/src/color-picker.module.ts","../../../../../projects/components/widgets/input/color-picker/src/index.ts"],"sourcesContent":["import { PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const colorPickerProps = new Map(\n [\n ['autoclose', {value: 'outsideClick', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['datavalue', PROP_STRING],\n ['disabled', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['placeholder', {value: 'Select Color', ...PROP_STRING}],\n ['readonly', PROP_BOOLEAN],\n ['required', PROP_BOOLEAN],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-colorpicker',\n colorPickerProps\n );\n registerFormWidget(\n FormWidgetType.COLORPICKER,\n new Map(colorPickerProps)\n );\n};\n","import {Component, ElementRef, Injector, Optional, ViewChild} from '@angular/core';\nimport { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nimport { ColorPickerDirective} from 'ngx-color-picker';\n\nimport {addClass, removeClass, UserDefinedExecutionContext} from '@wm/core';\nimport { AUTOCLOSE_TYPE, IWidgetConfig, provideAs, provideAsWidgetRef, styler } from '@wm/components/base';\nimport { BaseFormCustomComponent } from '@wm/components/input';\nimport { registerProps } from './color-picker.props';\n\n\nconst DEFAULT_CLS = 'input-group app-colorpicker';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-colorpicker',\n hostClass: DEFAULT_CLS,\n displayType: 'inline-block'\n};\n\n@Component({\n selector: '[wmColorPicker]',\n templateUrl: './color-picker.component.html',\n providers: [\n provideAs(ColorPickerComponent, NG_VALUE_ACCESSOR, true),\n provideAs(ColorPickerComponent, NG_VALIDATORS, true),\n provideAsWidgetRef(ColorPickerComponent)\n ]\n})\nexport class ColorPickerComponent extends BaseFormCustomComponent {\n static initializeProps = registerProps();\n\n public required: boolean;\n public readonly: boolean;\n public disabled: boolean;\n public name: string;\n public placeholder: any;\n public tabindex: any;\n public shortcutkey: string;\n public outsideclick: boolean;\n public autoclose: string;\n public hint: string;\n\n\n @ViewChild(NgModel) ngModel: NgModel;\n @ViewChild('input', { static: true, read: ElementRef }) inputEl: ElementRef;\n @ViewChild(ColorPickerDirective) cpDirective: ColorPickerDirective;\n\n constructor(inj: Injector) {\n super(inj, WIDGET_CONFIG);\n styler(this.nativeElement, this);\n }\n\n // To remove space occupied by colorpicker when it is closed\n public colorPickerToggleChange(isOpen: boolean) {\n const colorPickerContainer = this.nativeElement.querySelector(`.color-picker`) as HTMLElement;\n if (colorPickerContainer) {\n (!isOpen) ? addClass(colorPickerContainer, 'hidden') : removeClass(colorPickerContainer, 'hidden');\n }\n }\n\n colorPickerOpen(value: string) {\n // Whenever autoclose property is set to 'always', adding the onclick listener to the colorPicker container to close the picker.\n if (this.autoclose === AUTOCLOSE_TYPE.ALWAYS) {\n const colorPickerContainer = this.nativeElement.querySelector(`.color-picker`) as HTMLElement;\n colorPickerContainer.onclick = () => this.cpDirective.closeDialog();\n }\n }\n\n // This mehtod is used to show/open the colorpicker popup.\n open() {\n this.cpDirective.openDialog();\n }\n\n // This mehtod is used to hide/close the colorpicker popup.\n close() {\n this.cpDirective.closeDialog();\n }\n\n\n // change and blur events are added from the template\n protected handleEvent(node: HTMLElement, eventName: string, callback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(this.inputEl.nativeElement, eventName, callback, locals);\n }\n }\n\n public handleChange(newVal: boolean) {\n this.invokeOnChange(this.datavalue, {type: 'change'}, this.ngModel.valid);\n }\n\n protected onPropertyChange(key: string, nv: any, ov: any) {\n if (key === 'tabindex') {\n return;\n }\n if (key === 'required') {\n /* WMS-18269 | Update Angular about the required attr value change */\n this._onChange(this.datavalue);\n return;\n }\n if (key === 'datavalue') {\n this._onChange(nv);\n return;\n }\n if (key === 'autoclose') {\n this.outsideclick = (nv === AUTOCLOSE_TYPE.OUTSIDECLICK || nv === AUTOCLOSE_TYPE.ALWAYS) ? true : false;\n }\n super.onPropertyChange(key, nv, ov);\n }\n}\n","<input class=\"form-control app-textbox\" aria-haspopup=\"true\" aria-expanded=\"false\"\n #input\n focus-target\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint\"\n [(colorPicker)]=\"datavalue\"\n (colorPickerChange)=\"handleChange($event);\"\n (cpToggleChange)=\"colorPickerToggleChange($event)\"\n [cpPosition]=\"'bottom'\"\n [cpCloseClickOutside]=\"outsideclick\"\n (colorPickerOpen)=\"colorPickerOpen($event)\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"readonly || disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [(ngModel)]=\"datavalue\"\n (ngModelChange)=\"handleChange($event);\"\n [ngModelOptions]=\"{updateOn: 'change'}\"\n (blur)=\"invokeOnTouched($event)\"\n [attr.accesskey]=\"shortcutkey\">\n<span class=\"input-group-addon colorpicker-container\">\n <i class=\"colored-box\" [style.backgroundColor]=\"datavalue\"> </i>\n</span>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { ColorPickerModule as ngxColorPickerModule } from 'ngx-color-picker';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { ColorPickerComponent } from './color-picker.component';\n\nconst components = [\n ColorPickerComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ngxColorPickerModule,\n FormsModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class ColorPickerModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ngxColorPickerModule"],"mappings":";;;;;;;;;;;AAGO,MAAM,gBAAgB,GAAG,IAAI,GAAG,CACnC;AACI,IAAA,CAAC,WAAW,EAAG,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAE,cAAc,EAAA,EAAK,WAAW,CAAE,CAAA;IACtD,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;AACrB,IAAA,CAAC,aAAa,EAAG,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAE,cAAc,EAAA,EAAK,W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A,EAAA,CAAA;+DAiBmB,OAAO,EAAA,CAAA;sBAA1B,SAAS;uBAAC,OAAO,CAAA;gBACsC,OAAO,EAAA,CAAA;sBAA9D,SAAS;uBAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;gBACrB,WAAW,EAAA,CAAA;sBAA3C,SAAS;uBAAC,oBAAoB,CAAA;;;;AEjCnC,MAAM,UAAU,GAAG;IACf,oBAAoB;CACvB,CAAC;MAYW,iBAAiB,CAAA;;kFAAjB,iBAAiB,GAAA,CAAA,EAAA,CAAA;mEAAjB,iBAAiB,EAAA,CAAA,CAAA;uEARtB,YAAY;QACZA,mBAAoB;QACpB,WAAW;QACX,kBAAkB,CAAA,EAAA,CAAA,CAAA;;4EAKb,iBAAiB,EAAA,CAAA;kBAV7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZA,mBAAoB;wBACpB,WAAW;wBACX,kBAAkB;AACrB,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;iBAC3B,CAAA;;;;6EACY,iBAAiB,EAAA,EAAA,YAAA,EAAA,CAb1B,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAKhB,YAAY;YACZA,mBAAoB;YACpB,WAAW;YACX,kBAAkB,aARtB,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAAA,CAAA,GAAA;;ACXxB;;AAEG;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, Component,
|
|
2
|
+
import { ElementRef, Component, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import * as
|
|
4
|
+
import * as i2 from '@angular/forms';
|
|
5
5
|
import { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
|
6
|
-
import * as
|
|
6
|
+
import * as i1 from 'ngx-color-picker';
|
|
7
7
|
import { ColorPickerDirective, ColorPickerModule as ColorPickerModule$1 } from 'ngx-color-picker';
|
|
8
8
|
import { PROP_STRING, PROP_BOOLEAN, PROP_NUMBER, register, registerFormWidget, styler, AUTOCLOSE_TYPE, provideAs, provideAsWidgetRef, WmComponentsModule } from '@wm/components/base';
|
|
9
|
-
import * as i1 from '@wm/core';
|
|
10
9
|
import { FormWidgetType, addClass, removeClass } from '@wm/core';
|
|
11
10
|
import { BaseFormCustomComponent } from '@wm/components/input';
|
|
12
11
|
|
|
@@ -39,9 +38,8 @@ const WIDGET_CONFIG = {
|
|
|
39
38
|
displayType: 'inline-block'
|
|
40
39
|
};
|
|
41
40
|
class ColorPickerComponent extends BaseFormCustomComponent {
|
|
42
|
-
constructor(inj
|
|
43
|
-
super(inj, WIDGET_CONFIG
|
|
44
|
-
this._viewParent = _viewParent;
|
|
41
|
+
constructor(inj) {
|
|
42
|
+
super(inj, WIDGET_CONFIG);
|
|
45
43
|
styler(this.nativeElement, this);
|
|
46
44
|
}
|
|
47
45
|
// To remove space occupied by colorpicker when it is closed
|
|
@@ -95,7 +93,7 @@ class ColorPickerComponent extends BaseFormCustomComponent {
|
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
95
|
ColorPickerComponent.initializeProps = registerProps();
|
|
98
|
-
ColorPickerComponent.ɵfac = function ColorPickerComponent_Factory(t) { return new (t || ColorPickerComponent)(i0.ɵɵdirectiveInject(i0.Injector)
|
|
96
|
+
ColorPickerComponent.ɵfac = function ColorPickerComponent_Factory(t) { return new (t || ColorPickerComponent)(i0.ɵɵdirectiveInject(i0.Injector)); };
|
|
99
97
|
ColorPickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ColorPickerComponent, selectors: [["", "wmColorPicker", ""]], viewQuery: function ColorPickerComponent_Query(rf, ctx) { if (rf & 1) {
|
|
100
98
|
i0.ɵɵviewQuery(NgModel, 5);
|
|
101
99
|
i0.ɵɵviewQuery(_c0, 7, ElementRef);
|
|
@@ -121,7 +119,7 @@ ColorPickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ColorP
|
|
|
121
119
|
i0.ɵɵattribute("name", ctx.name)("aria-label", ctx.hint)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey);
|
|
122
120
|
i0.ɵɵadvance(3);
|
|
123
121
|
i0.ɵɵstyleProp("background-color", ctx.datavalue);
|
|
124
|
-
} }, dependencies: [
|
|
122
|
+
} }, dependencies: [i1.ColorPickerDirective, i2.DefaultValueAccessor, i2.NgControlStatus, i2.RequiredValidator, i2.NgModel], encapsulation: 2 });
|
|
125
123
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ColorPickerComponent, [{
|
|
126
124
|
type: Component,
|
|
127
125
|
args: [{ selector: '[wmColorPicker]', providers: [
|
|
@@ -129,9 +127,7 @@ ColorPickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ColorP
|
|
|
129
127
|
provideAs(ColorPickerComponent, NG_VALIDATORS, true),
|
|
130
128
|
provideAsWidgetRef(ColorPickerComponent)
|
|
131
129
|
], template: "<input class=\"form-control app-textbox\" aria-haspopup=\"true\" aria-expanded=\"false\"\n #input\n focus-target\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint\"\n [(colorPicker)]=\"datavalue\"\n (colorPickerChange)=\"handleChange($event);\"\n (cpToggleChange)=\"colorPickerToggleChange($event)\"\n [cpPosition]=\"'bottom'\"\n [cpCloseClickOutside]=\"outsideclick\"\n (colorPickerOpen)=\"colorPickerOpen($event)\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"readonly || disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [(ngModel)]=\"datavalue\"\n (ngModelChange)=\"handleChange($event);\"\n [ngModelOptions]=\"{updateOn: 'change'}\"\n (blur)=\"invokeOnTouched($event)\"\n [attr.accesskey]=\"shortcutkey\">\n<span class=\"input-group-addon colorpicker-container\">\n <i class=\"colored-box\" [style.backgroundColor]=\"datavalue\"> </i>\n</span>\n" }]
|
|
132
|
-
}], function () { return [{ type: i0.Injector }, {
|
|
133
|
-
type: Optional
|
|
134
|
-
}] }]; }, { ngModel: [{
|
|
130
|
+
}], function () { return [{ type: i0.Injector }]; }, { ngModel: [{
|
|
135
131
|
type: ViewChild,
|
|
136
132
|
args: [NgModel]
|
|
137
133
|
}], inputEl: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/color-picker/src/color-picker.props.ts","../../../../../projects/components/widgets/input/color-picker/src/color-picker.component.ts","../../../../../projects/components/widgets/input/color-picker/src/color-picker.component.html","../../../../../projects/components/widgets/input/color-picker/src/color-picker.module.ts","../../../../../projects/components/widgets/input/color-picker/src/index.ts"],"sourcesContent":["import { PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const colorPickerProps = new Map(\n [\n ['autoclose', {value: 'outsideClick', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['datavalue', PROP_STRING],\n ['disabled', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['placeholder', {value: 'Select Color', ...PROP_STRING}],\n ['readonly', PROP_BOOLEAN],\n ['required', PROP_BOOLEAN],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-colorpicker',\n colorPickerProps\n );\n registerFormWidget(\n FormWidgetType.COLORPICKER,\n new Map(colorPickerProps)\n );\n};\n","import {Component, ElementRef, Injector, Optional, ViewChild} from '@angular/core';\nimport { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nimport { ColorPickerDirective} from 'ngx-color-picker';\n\nimport {addClass, removeClass, UserDefinedExecutionContext} from '@wm/core';\nimport { AUTOCLOSE_TYPE, IWidgetConfig, provideAs, provideAsWidgetRef, styler } from '@wm/components/base';\nimport { BaseFormCustomComponent } from '@wm/components/input';\nimport { registerProps } from './color-picker.props';\n\n\nconst DEFAULT_CLS = 'input-group app-colorpicker';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-colorpicker',\n hostClass: DEFAULT_CLS,\n displayType: 'inline-block'\n};\n\n@Component({\n selector: '[wmColorPicker]',\n templateUrl: './color-picker.component.html',\n providers: [\n provideAs(ColorPickerComponent, NG_VALUE_ACCESSOR, true),\n provideAs(ColorPickerComponent, NG_VALIDATORS, true),\n provideAsWidgetRef(ColorPickerComponent)\n ]\n})\nexport class ColorPickerComponent extends BaseFormCustomComponent {\n static initializeProps = registerProps();\n\n public required: boolean;\n public readonly: boolean;\n public disabled: boolean;\n public name: string;\n public placeholder: any;\n public tabindex: any;\n public shortcutkey: string;\n public outsideclick: boolean;\n public autoclose: string;\n public hint: string;\n\n\n @ViewChild(NgModel) ngModel: NgModel;\n @ViewChild('input', { static: true, read: ElementRef }) inputEl: ElementRef;\n @ViewChild(ColorPickerDirective) cpDirective: ColorPickerDirective;\n\n constructor(inj: Injector, @Optional() public _viewParent: UserDefinedExecutionContext) {\n super(inj, WIDGET_CONFIG, _viewParent);\n styler(this.nativeElement, this);\n }\n\n // To remove space occupied by colorpicker when it is closed\n public colorPickerToggleChange(isOpen: boolean) {\n const colorPickerContainer = this.nativeElement.querySelector(`.color-picker`) as HTMLElement;\n if (colorPickerContainer) {\n (!isOpen) ? addClass(colorPickerContainer, 'hidden') : removeClass(colorPickerContainer, 'hidden');\n }\n }\n\n colorPickerOpen(value: string) {\n // Whenever autoclose property is set to 'always', adding the onclick listener to the colorPicker container to close the picker.\n if (this.autoclose === AUTOCLOSE_TYPE.ALWAYS) {\n const colorPickerContainer = this.nativeElement.querySelector(`.color-picker`) as HTMLElement;\n colorPickerContainer.onclick = () => this.cpDirective.closeDialog();\n }\n }\n\n // This mehtod is used to show/open the colorpicker popup.\n open() {\n this.cpDirective.openDialog();\n }\n\n // This mehtod is used to hide/close the colorpicker popup.\n close() {\n this.cpDirective.closeDialog();\n }\n\n\n // change and blur events are added from the template\n protected handleEvent(node: HTMLElement, eventName: string, callback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(this.inputEl.nativeElement, eventName, callback, locals);\n }\n }\n\n public handleChange(newVal: boolean) {\n this.invokeOnChange(this.datavalue, {type: 'change'}, this.ngModel.valid);\n }\n\n protected onPropertyChange(key: string, nv: any, ov: any) {\n if (key === 'tabindex') {\n return;\n }\n if (key === 'required') {\n /* WMS-18269 | Update Angular about the required attr value change */\n this._onChange(this.datavalue);\n return;\n }\n if (key === 'datavalue') {\n this._onChange(nv);\n return;\n }\n if (key === 'autoclose') {\n this.outsideclick = (nv === AUTOCLOSE_TYPE.OUTSIDECLICK || nv === AUTOCLOSE_TYPE.ALWAYS) ? true : false;\n }\n super.onPropertyChange(key, nv, ov);\n }\n}\n","<input class=\"form-control app-textbox\" aria-haspopup=\"true\" aria-expanded=\"false\"\n #input\n focus-target\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint\"\n [(colorPicker)]=\"datavalue\"\n (colorPickerChange)=\"handleChange($event);\"\n (cpToggleChange)=\"colorPickerToggleChange($event)\"\n [cpPosition]=\"'bottom'\"\n [cpCloseClickOutside]=\"outsideclick\"\n (colorPickerOpen)=\"colorPickerOpen($event)\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"readonly || disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [(ngModel)]=\"datavalue\"\n (ngModelChange)=\"handleChange($event);\"\n [ngModelOptions]=\"{updateOn: 'change'}\"\n (blur)=\"invokeOnTouched($event)\"\n [attr.accesskey]=\"shortcutkey\">\n<span class=\"input-group-addon colorpicker-container\">\n <i class=\"colored-box\" [style.backgroundColor]=\"datavalue\"> </i>\n</span>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { ColorPickerModule as ngxColorPickerModule } from 'ngx-color-picker';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { ColorPickerComponent } from './color-picker.component';\n\nconst components = [\n ColorPickerComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ngxColorPickerModule,\n FormsModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class ColorPickerModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ngxColorPickerModule"],"mappings":";;;;;;;;;;;;AAGO,MAAM,gBAAgB,GAAG,IAAI,GAAG,CACnC;IACI,CAAC,WAAW,EAAE,EAAC,KAAK,EAAE,cAAc,EAAE,GAAG,WAAW,EAAC,CAAC;IACtD,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,aAAa,EAAE,EAAC,KAAK,EAAE,cAAc,EAAE,GAAG,WAAW,EAAC,CAAC;IACxD,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,aAAa,EAAE,WAAW,CAAC;IAC5B,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;IACxC,CAAC,UAAU,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,GAAG,WAAW,EAAC,CAAC;AAC3C,CAAA,CACJ,CAAC;AAEK,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,gBAAgB,EAChB,gBAAgB,CACnB,CA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AiB,CAAA;;kFAAjB,iBAAiB,GAAA,CAAA,EAAA,CAAA;mEAAjB,iBAAiB,EAAA,CAAA,CAAA;uEARtB,YAAY;QACZA,mBAAoB;QACpB,WAAW;QACX,kBAAkB,CAAA,EAAA,CAAA,CAAA;uFAKb,iBAAiB,EAAA,CAAA;cAV7B,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;AACN,gBAAA,OAAO,EAAE;oBACL,YAAY;oBACZA,mBAAoB;oBACpB,WAAW;oBACX,kBAAkB;AACrB,iBAAA;AACD,gBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,gBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AAC3B,aAAA,CAAA;;wFACY,iBAAiB,EAAA,EAAA,YAAA,EAAA,CAb1B,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAKhB,YAAY;QACZA,mBAAoB;QACpB,WAAW;AACX,QAAA,kBAAkB,aARtB,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACXxB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/color-picker/src/color-picker.props.ts","../../../../../projects/components/widgets/input/color-picker/src/color-picker.component.ts","../../../../../projects/components/widgets/input/color-picker/src/color-picker.component.html","../../../../../projects/components/widgets/input/color-picker/src/color-picker.module.ts","../../../../../projects/components/widgets/input/color-picker/src/index.ts"],"sourcesContent":["import { PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const colorPickerProps = new Map(\n [\n ['autoclose', {value: 'outsideClick', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['datavalue', PROP_STRING],\n ['disabled', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['placeholder', {value: 'Select Color', ...PROP_STRING}],\n ['readonly', PROP_BOOLEAN],\n ['required', PROP_BOOLEAN],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-colorpicker',\n colorPickerProps\n );\n registerFormWidget(\n FormWidgetType.COLORPICKER,\n new Map(colorPickerProps)\n );\n};\n","import {Component, ElementRef, Injector, Optional, ViewChild} from '@angular/core';\nimport { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nimport { ColorPickerDirective} from 'ngx-color-picker';\n\nimport {addClass, removeClass, UserDefinedExecutionContext} from '@wm/core';\nimport { AUTOCLOSE_TYPE, IWidgetConfig, provideAs, provideAsWidgetRef, styler } from '@wm/components/base';\nimport { BaseFormCustomComponent } from '@wm/components/input';\nimport { registerProps } from './color-picker.props';\n\n\nconst DEFAULT_CLS = 'input-group app-colorpicker';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-colorpicker',\n hostClass: DEFAULT_CLS,\n displayType: 'inline-block'\n};\n\n@Component({\n selector: '[wmColorPicker]',\n templateUrl: './color-picker.component.html',\n providers: [\n provideAs(ColorPickerComponent, NG_VALUE_ACCESSOR, true),\n provideAs(ColorPickerComponent, NG_VALIDATORS, true),\n provideAsWidgetRef(ColorPickerComponent)\n ]\n})\nexport class ColorPickerComponent extends BaseFormCustomComponent {\n static initializeProps = registerProps();\n\n public required: boolean;\n public readonly: boolean;\n public disabled: boolean;\n public name: string;\n public placeholder: any;\n public tabindex: any;\n public shortcutkey: string;\n public outsideclick: boolean;\n public autoclose: string;\n public hint: string;\n\n\n @ViewChild(NgModel) ngModel: NgModel;\n @ViewChild('input', { static: true, read: ElementRef }) inputEl: ElementRef;\n @ViewChild(ColorPickerDirective) cpDirective: ColorPickerDirective;\n\n constructor(inj: Injector) {\n super(inj, WIDGET_CONFIG);\n styler(this.nativeElement, this);\n }\n\n // To remove space occupied by colorpicker when it is closed\n public colorPickerToggleChange(isOpen: boolean) {\n const colorPickerContainer = this.nativeElement.querySelector(`.color-picker`) as HTMLElement;\n if (colorPickerContainer) {\n (!isOpen) ? addClass(colorPickerContainer, 'hidden') : removeClass(colorPickerContainer, 'hidden');\n }\n }\n\n colorPickerOpen(value: string) {\n // Whenever autoclose property is set to 'always', adding the onclick listener to the colorPicker container to close the picker.\n if (this.autoclose === AUTOCLOSE_TYPE.ALWAYS) {\n const colorPickerContainer = this.nativeElement.querySelector(`.color-picker`) as HTMLElement;\n colorPickerContainer.onclick = () => this.cpDirective.closeDialog();\n }\n }\n\n // This mehtod is used to show/open the colorpicker popup.\n open() {\n this.cpDirective.openDialog();\n }\n\n // This mehtod is used to hide/close the colorpicker popup.\n close() {\n this.cpDirective.closeDialog();\n }\n\n\n // change and blur events are added from the template\n protected handleEvent(node: HTMLElement, eventName: string, callback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(this.inputEl.nativeElement, eventName, callback, locals);\n }\n }\n\n public handleChange(newVal: boolean) {\n this.invokeOnChange(this.datavalue, {type: 'change'}, this.ngModel.valid);\n }\n\n protected onPropertyChange(key: string, nv: any, ov: any) {\n if (key === 'tabindex') {\n return;\n }\n if (key === 'required') {\n /* WMS-18269 | Update Angular about the required attr value change */\n this._onChange(this.datavalue);\n return;\n }\n if (key === 'datavalue') {\n this._onChange(nv);\n return;\n }\n if (key === 'autoclose') {\n this.outsideclick = (nv === AUTOCLOSE_TYPE.OUTSIDECLICK || nv === AUTOCLOSE_TYPE.ALWAYS) ? true : false;\n }\n super.onPropertyChange(key, nv, ov);\n }\n}\n","<input class=\"form-control app-textbox\" aria-haspopup=\"true\" aria-expanded=\"false\"\n #input\n focus-target\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint\"\n [(colorPicker)]=\"datavalue\"\n (colorPickerChange)=\"handleChange($event);\"\n (cpToggleChange)=\"colorPickerToggleChange($event)\"\n [cpPosition]=\"'bottom'\"\n [cpCloseClickOutside]=\"outsideclick\"\n (colorPickerOpen)=\"colorPickerOpen($event)\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"readonly || disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [(ngModel)]=\"datavalue\"\n (ngModelChange)=\"handleChange($event);\"\n [ngModelOptions]=\"{updateOn: 'change'}\"\n (blur)=\"invokeOnTouched($event)\"\n [attr.accesskey]=\"shortcutkey\">\n<span class=\"input-group-addon colorpicker-container\">\n <i class=\"colored-box\" [style.backgroundColor]=\"datavalue\"> </i>\n</span>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { ColorPickerModule as ngxColorPickerModule } from 'ngx-color-picker';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { ColorPickerComponent } from './color-picker.component';\n\nconst components = [\n ColorPickerComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ngxColorPickerModule,\n FormsModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class ColorPickerModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ngxColorPickerModule"],"mappings":";;;;;;;;;;;AAGO,MAAM,gBAAgB,GAAG,IAAI,GAAG,CACnC;IACI,CAAC,WAAW,EAAE,EAAC,KAAK,EAAE,cAAc,EAAE,GAAG,WAAW,EAAC,CAAC;IACtD,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,aAAa,EAAE,EAAC,KAAK,EAAE,cAAc,EAAE,GAAG,WAAW,EAAC,CAAC;IACxD,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,aAAa,EAAE,WAAW,CAAC;IAC5B,CAAC,MAAM,E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AA;kBAA3C,SAAS;mBAAC,oBAAoB,CAAA;;;AEjCnC,MAAM,UAAU,GAAG;IACf,oBAAoB;CACvB,CAAC;MAYW,iBAAiB,CAAA;;kFAAjB,iBAAiB,GAAA,CAAA,EAAA,CAAA;mEAAjB,iBAAiB,EAAA,CAAA,CAAA;uEARtB,YAAY;QACZA,mBAAoB;QACpB,WAAW;QACX,kBAAkB,CAAA,EAAA,CAAA,CAAA;uFAKb,iBAAiB,EAAA,CAAA;cAV7B,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;AACN,gBAAA,OAAO,EAAE;oBACL,YAAY;oBACZA,mBAAoB;oBACpB,WAAW;oBACX,kBAAkB;AACrB,iBAAA;AACD,gBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,gBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AAC3B,aAAA,CAAA;;wFACY,iBAAiB,EAAA,EAAA,YAAA,EAAA,CAb1B,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAKhB,YAAY;QACZA,mBAAoB;QACpB,WAAW;AACX,QAAA,kBAAkB,aARtB,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACXxB;;AAEG;;;;"}
|
|
@@ -58,10 +58,9 @@
|
|
|
58
58
|
hostClass: DEFAULT_CLS
|
|
59
59
|
};
|
|
60
60
|
class CurrencyComponent extends input.NumberLocale {
|
|
61
|
-
constructor(inj, appDefaults, i18nService, trailingZeroDecimalPipe
|
|
62
|
-
super(inj, WIDGET_CONFIG,
|
|
61
|
+
constructor(inj, appDefaults, i18nService, trailingZeroDecimalPipe) {
|
|
62
|
+
super(inj, WIDGET_CONFIG, i18nService, trailingZeroDecimalPipe);
|
|
63
63
|
this.appDefaults = appDefaults;
|
|
64
|
-
this._viewParent = _viewParent;
|
|
65
64
|
this.currencyCode = this.appDefaults.currencyCode || 'USD';
|
|
66
65
|
this.currencySymbol = i1.CURRENCY_INFO[this.appDefaults.currencyCode || "USD"].symbol;
|
|
67
66
|
}
|
|
@@ -76,7 +75,7 @@
|
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
77
|
CurrencyComponent.initializeProps = registerProps();
|
|
79
|
-
CurrencyComponent.ɵfac = function CurrencyComponent_Factory(t) { return new (t || CurrencyComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1__namespace.AppDefaults), i0__namespace.ɵɵdirectiveInject(i1__namespace.AbstractI18nService), i0__namespace.ɵɵdirectiveInject(i2__namespace.TrailingZeroDecimalPipe)
|
|
78
|
+
CurrencyComponent.ɵfac = function CurrencyComponent_Factory(t) { return new (t || CurrencyComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1__namespace.AppDefaults), i0__namespace.ɵɵdirectiveInject(i1__namespace.AbstractI18nService), i0__namespace.ɵɵdirectiveInject(i2__namespace.TrailingZeroDecimalPipe)); };
|
|
80
79
|
CurrencyComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CurrencyComponent, selectors: [["", "wmCurrency", ""]], viewQuery: function CurrencyComponent_Query(rf, ctx) {
|
|
81
80
|
if (rf & 1) {
|
|
82
81
|
i0__namespace.ɵɵviewQuery(i3.NgModel, 7);
|
|
@@ -113,11 +112,7 @@
|
|
|
113
112
|
i2.provideAs(CurrencyComponent, i3.NG_VALIDATORS, true),
|
|
114
113
|
i2.provideAsWidgetRef(CurrencyComponent)
|
|
115
114
|
], template: "<span class=\"input-group-addon\" [textContent]=\"currencySymbol\"></span>\n<input class=\"form-control app-textbox app-currency-input\"\n #input\n role=\"textbox\"\n type=\"text\"\n inputmode=\"decimal\"\n focus-target\n [autofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [pattern]=\"regexp\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint || currencyCode\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [ngModel]=\"displayValue\"\n [ngModelOptions]=\"ngModelOptions\"\n\n (focus)=\"checkForTrailingZeros($event)\"\n (input)=\"onInputChange($event.target.value)\"\n (blur)=\"handleBlur($event); checkForTrailingZeros($event);\"\n (ngModelChange)=\"onModelChange($event)\"\n (keydown)=\"validateInputEntry($event);\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.ArrowUp)=\"onArrowPress($event, 'UP')\"\n (keydown.ArrowDown)=\"onArrowPress($event, 'DOWN')\">\n" }]
|
|
116
|
-
}], function () {
|
|
117
|
-
return [{ type: i0__namespace.Injector }, { type: i1__namespace.AppDefaults }, { type: i1__namespace.AbstractI18nService }, { type: i2__namespace.TrailingZeroDecimalPipe }, { type: i1__namespace.UserDefinedExecutionContext, decorators: [{
|
|
118
|
-
type: i0.Optional
|
|
119
|
-
}] }];
|
|
120
|
-
}, { ngModel: [{
|
|
115
|
+
}], function () { return [{ type: i0__namespace.Injector }, { type: i1__namespace.AppDefaults }, { type: i1__namespace.AbstractI18nService }, { type: i2__namespace.TrailingZeroDecimalPipe }]; }, { ngModel: [{
|
|
121
116
|
type: i0.ViewChild,
|
|
122
117
|
args: [i3.NgModel, { static: true }]
|
|
123
118
|
}], inputEl: [{
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ElementRef, Injector } from '@angular/core';
|
|
2
2
|
import { NgModel } from '@angular/forms';
|
|
3
|
-
import { AbstractI18nService, AppDefaults
|
|
3
|
+
import { AbstractI18nService, AppDefaults } from '@wm/core';
|
|
4
4
|
import { TrailingZeroDecimalPipe } from '@wm/components/base';
|
|
5
5
|
import { NumberLocale } from '@wm/components/input';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class CurrencyComponent extends NumberLocale {
|
|
8
8
|
private appDefaults;
|
|
9
|
-
_viewParent: UserDefinedExecutionContext;
|
|
10
9
|
static initializeProps: void;
|
|
11
10
|
currencyCode: string;
|
|
12
11
|
currencySymbol: string;
|
|
@@ -20,8 +19,8 @@ export declare class CurrencyComponent extends NumberLocale {
|
|
|
20
19
|
hint: string;
|
|
21
20
|
ngModel: NgModel;
|
|
22
21
|
inputEl: ElementRef;
|
|
23
|
-
constructor(inj: Injector, appDefaults: AppDefaults, i18nService: AbstractI18nService, trailingZeroDecimalPipe: TrailingZeroDecimalPipe
|
|
22
|
+
constructor(inj: Injector, appDefaults: AppDefaults, i18nService: AbstractI18nService, trailingZeroDecimalPipe: TrailingZeroDecimalPipe);
|
|
24
23
|
onPropertyChange(key: string, nv: any, ov?: any): void;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyComponent,
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyComponent, never>;
|
|
26
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<CurrencyComponent, "[wmCurrency]", never, {}, {}, never, never, false, never>;
|
|
27
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component, ElementRef, Injector,
|
|
1
|
+
import { Component, ElementRef, Injector, ViewChild } from '@angular/core';
|
|
2
2
|
import { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
3
|
-
import { CURRENCY_INFO, AbstractI18nService, AppDefaults
|
|
3
|
+
import { CURRENCY_INFO, AbstractI18nService, AppDefaults } from '@wm/core';
|
|
4
4
|
import { provideAs, provideAsWidgetRef, TrailingZeroDecimalPipe } from '@wm/components/base';
|
|
5
5
|
import { NumberLocale } from '@wm/components/input';
|
|
6
6
|
import { registerProps } from './currency.props';
|
|
@@ -16,10 +16,9 @@ const WIDGET_CONFIG = {
|
|
|
16
16
|
hostClass: DEFAULT_CLS
|
|
17
17
|
};
|
|
18
18
|
export class CurrencyComponent extends NumberLocale {
|
|
19
|
-
constructor(inj, appDefaults, i18nService, trailingZeroDecimalPipe
|
|
20
|
-
super(inj, WIDGET_CONFIG,
|
|
19
|
+
constructor(inj, appDefaults, i18nService, trailingZeroDecimalPipe) {
|
|
20
|
+
super(inj, WIDGET_CONFIG, i18nService, trailingZeroDecimalPipe);
|
|
21
21
|
this.appDefaults = appDefaults;
|
|
22
|
-
this._viewParent = _viewParent;
|
|
23
22
|
this.currencyCode = this.appDefaults.currencyCode || 'USD';
|
|
24
23
|
this.currencySymbol = CURRENCY_INFO[this.appDefaults.currencyCode || "USD"].symbol;
|
|
25
24
|
}
|
|
@@ -34,7 +33,7 @@ export class CurrencyComponent extends NumberLocale {
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
CurrencyComponent.initializeProps = registerProps();
|
|
37
|
-
CurrencyComponent.ɵfac = function CurrencyComponent_Factory(t) { return new (t || CurrencyComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.AppDefaults), i0.ɵɵdirectiveInject(i1.AbstractI18nService), i0.ɵɵdirectiveInject(i2.TrailingZeroDecimalPipe)
|
|
36
|
+
CurrencyComponent.ɵfac = function CurrencyComponent_Factory(t) { return new (t || CurrencyComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.AppDefaults), i0.ɵɵdirectiveInject(i1.AbstractI18nService), i0.ɵɵdirectiveInject(i2.TrailingZeroDecimalPipe)); };
|
|
38
37
|
CurrencyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CurrencyComponent, selectors: [["", "wmCurrency", ""]], viewQuery: function CurrencyComponent_Query(rf, ctx) { if (rf & 1) {
|
|
39
38
|
i0.ɵɵviewQuery(NgModel, 7);
|
|
40
39
|
i0.ɵɵviewQuery(_c0, 7, ElementRef);
|
|
@@ -64,13 +63,11 @@ CurrencyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CurrencyC
|
|
|
64
63
|
provideAs(CurrencyComponent, NG_VALIDATORS, true),
|
|
65
64
|
provideAsWidgetRef(CurrencyComponent)
|
|
66
65
|
], template: "<span class=\"input-group-addon\" [textContent]=\"currencySymbol\"></span>\n<input class=\"form-control app-textbox app-currency-input\"\n #input\n role=\"textbox\"\n type=\"text\"\n inputmode=\"decimal\"\n focus-target\n [autofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [pattern]=\"regexp\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint || currencyCode\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [ngModel]=\"displayValue\"\n [ngModelOptions]=\"ngModelOptions\"\n\n (focus)=\"checkForTrailingZeros($event)\"\n (input)=\"onInputChange($event.target.value)\"\n (blur)=\"handleBlur($event); checkForTrailingZeros($event);\"\n (ngModelChange)=\"onModelChange($event)\"\n (keydown)=\"validateInputEntry($event);\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.ArrowUp)=\"onArrowPress($event, 'UP')\"\n (keydown.ArrowDown)=\"onArrowPress($event, 'DOWN')\">\n" }]
|
|
67
|
-
}], function () { return [{ type: i0.Injector }, { type: i1.AppDefaults }, { type: i1.AbstractI18nService }, { type: i2.TrailingZeroDecimalPipe }, {
|
|
68
|
-
type: Optional
|
|
69
|
-
}] }]; }, { ngModel: [{
|
|
66
|
+
}], function () { return [{ type: i0.Injector }, { type: i1.AppDefaults }, { type: i1.AbstractI18nService }, { type: i2.TrailingZeroDecimalPipe }]; }, { ngModel: [{
|
|
70
67
|
type: ViewChild,
|
|
71
68
|
args: [NgModel, { static: true }]
|
|
72
69
|
}], inputEl: [{
|
|
73
70
|
type: ViewChild,
|
|
74
71
|
args: ['input', { static: true, read: ElementRef }]
|
|
75
72
|
}] }); })();
|
|
76
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
73
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3kuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsi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|
2
|
-
import { ElementRef, Component,
|
|
2
|
+
import { ElementRef, Component, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
5
|
import { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
|
@@ -41,10 +41,9 @@ const WIDGET_CONFIG = {
|
|
|
41
41
|
hostClass: DEFAULT_CLS
|
|
42
42
|
};
|
|
43
43
|
class CurrencyComponent extends NumberLocale {
|
|
44
|
-
constructor(inj, appDefaults, i18nService, trailingZeroDecimalPipe
|
|
45
|
-
super(inj, WIDGET_CONFIG,
|
|
44
|
+
constructor(inj, appDefaults, i18nService, trailingZeroDecimalPipe) {
|
|
45
|
+
super(inj, WIDGET_CONFIG, i18nService, trailingZeroDecimalPipe);
|
|
46
46
|
this.appDefaults = appDefaults;
|
|
47
|
-
this._viewParent = _viewParent;
|
|
48
47
|
this.currencyCode = this.appDefaults.currencyCode || 'USD';
|
|
49
48
|
this.currencySymbol = CURRENCY_INFO[this.appDefaults.currencyCode || "USD"].symbol;
|
|
50
49
|
}
|
|
@@ -59,7 +58,7 @@ class CurrencyComponent extends NumberLocale {
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
CurrencyComponent.initializeProps = registerProps();
|
|
62
|
-
CurrencyComponent.ɵfac = function CurrencyComponent_Factory(t) { return new (t || CurrencyComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.AppDefaults), i0.ɵɵdirectiveInject(i1.AbstractI18nService), i0.ɵɵdirectiveInject(i2.TrailingZeroDecimalPipe)
|
|
61
|
+
CurrencyComponent.ɵfac = function CurrencyComponent_Factory(t) { return new (t || CurrencyComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.AppDefaults), i0.ɵɵdirectiveInject(i1.AbstractI18nService), i0.ɵɵdirectiveInject(i2.TrailingZeroDecimalPipe)); };
|
|
63
62
|
CurrencyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CurrencyComponent, selectors: [["", "wmCurrency", ""]], viewQuery: function CurrencyComponent_Query(rf, ctx) {
|
|
64
63
|
if (rf & 1) {
|
|
65
64
|
i0.ɵɵviewQuery(NgModel, 7);
|
|
@@ -96,11 +95,7 @@ CurrencyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CurrencyC
|
|
|
96
95
|
provideAs(CurrencyComponent, NG_VALIDATORS, true),
|
|
97
96
|
provideAsWidgetRef(CurrencyComponent)
|
|
98
97
|
], template: "<span class=\"input-group-addon\" [textContent]=\"currencySymbol\"></span>\n<input class=\"form-control app-textbox app-currency-input\"\n #input\n role=\"textbox\"\n type=\"text\"\n inputmode=\"decimal\"\n focus-target\n [autofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [pattern]=\"regexp\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint || currencyCode\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [ngModel]=\"displayValue\"\n [ngModelOptions]=\"ngModelOptions\"\n\n (focus)=\"checkForTrailingZeros($event)\"\n (input)=\"onInputChange($event.target.value)\"\n (blur)=\"handleBlur($event); checkForTrailingZeros($event);\"\n (ngModelChange)=\"onModelChange($event)\"\n (keydown)=\"validateInputEntry($event);\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.ArrowUp)=\"onArrowPress($event, 'UP')\"\n (keydown.ArrowDown)=\"onArrowPress($event, 'DOWN')\">\n" }]
|
|
99
|
-
}], function () {
|
|
100
|
-
return [{ type: i0.Injector }, { type: i1.AppDefaults }, { type: i1.AbstractI18nService }, { type: i2.TrailingZeroDecimalPipe }, { type: i1.UserDefinedExecutionContext, decorators: [{
|
|
101
|
-
type: Optional
|
|
102
|
-
}] }];
|
|
103
|
-
}, { ngModel: [{
|
|
98
|
+
}], function () { return [{ type: i0.Injector }, { type: i1.AppDefaults }, { type: i1.AbstractI18nService }, { type: i2.TrailingZeroDecimalPipe }]; }, { ngModel: [{
|
|
104
99
|
type: ViewChild,
|
|
105
100
|
args: [NgModel, { static: true }]
|
|
106
101
|
}], inputEl: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/currency/src/currency.props.ts","../../../../../projects/components/widgets/input/currency/src/currency.component.ts","../../../../../projects/components/widgets/input/currency/src/currency.component.html","../../../../../projects/components/widgets/input/currency/src/currency.module.ts","../../../../../projects/components/widgets/input/currency/src/index.ts"],"sourcesContent":["import { PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const currencyProps = new Map(\n [\n ['class', PROP_STRING],\n ['currency', PROP_STRING],\n ['datavalue', PROP_STRING],\n ['disabled', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['maxvalue', PROP_NUMBER],\n ['minvalue', PROP_NUMBER],\n ['name', PROP_STRING],\n ['placeholder', {value: 'Enter value', ...PROP_STRING}],\n ['readonly', PROP_BOOLEAN],\n ['required', PROP_BOOLEAN],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['step', {value: 1, ...PROP_NUMBER}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['trailingzero', {value: false, ...PROP_BOOLEAN}],\n ['inputmode', {value: 'natural', ...PROP_STRING}]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-currency',\n currencyProps\n );\n registerFormWidget(\n FormWidgetType.CURRENCY,\n new Map(currencyProps)\n );\n};\n","import {Component, ElementRef, Injector, Optional, ViewChild} from '@angular/core';\nimport { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nimport { DecimalPipe } from '@angular/common';\n\nimport {CURRENCY_INFO, AbstractI18nService, AppDefaults, UserDefinedExecutionContext} from '@wm/core';\nimport { IWidgetConfig, provideAs, provideAsWidgetRef, TrailingZeroDecimalPipe } from '@wm/components/base';\nimport { NumberLocale } from '@wm/components/input';\n\nimport { registerProps } from './currency.props';\n\nconst DEFAULT_CLS = 'input-group app-currency';\n\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-currency',\n hostClass: DEFAULT_CLS\n};\n\n@Component({\n selector: '[wmCurrency]',\n templateUrl: './currency.component.html',\n providers: [\n provideAs(CurrencyComponent, NG_VALUE_ACCESSOR, true),\n provideAs(CurrencyComponent, NG_VALIDATORS, true),\n provideAsWidgetRef(CurrencyComponent)\n ]\n})\nexport class CurrencyComponent extends NumberLocale {\n static initializeProps = registerProps();\n\n currencyCode: string;\n currencySymbol: string;\n public required: boolean;\n public regexp: any;\n public disabled: boolean;\n public autofocus: boolean;\n public name: string;\n public tabindex: any;\n public shortcutkey: string;\n public hint: string;\n\n @ViewChild(NgModel, {static: true}) ngModel: NgModel;\n @ViewChild('input', { static: true, read: ElementRef }) inputEl: ElementRef;\n\n constructor(inj: Injector, private appDefaults: AppDefaults, i18nService: AbstractI18nService, trailingZeroDecimalPipe: TrailingZeroDecimalPipe, @Optional() public _viewParent: UserDefinedExecutionContext) {\n super(inj, WIDGET_CONFIG, _viewParent, i18nService, trailingZeroDecimalPipe);\n this.currencyCode = this.appDefaults.currencyCode || 'USD';\n this.currencySymbol = CURRENCY_INFO[this.appDefaults.currencyCode || \"USD\"].symbol;\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'currency') {\n this.currencyCode = nv;\n this.currencySymbol = CURRENCY_INFO[this.currencyCode|| this.appDefaults.currencyCode].symbol;\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n}\n","<span class=\"input-group-addon\" [textContent]=\"currencySymbol\"></span>\n<input class=\"form-control app-textbox app-currency-input\"\n #input\n role=\"textbox\"\n type=\"text\"\n inputmode=\"decimal\"\n focus-target\n [autofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [pattern]=\"regexp\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint || currencyCode\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [ngModel]=\"displayValue\"\n [ngModelOptions]=\"ngModelOptions\"\n\n (focus)=\"checkForTrailingZeros($event)\"\n (input)=\"onInputChange($event.target.value)\"\n (blur)=\"handleBlur($event); checkForTrailingZeros($event);\"\n (ngModelChange)=\"onModelChange($event)\"\n (keydown)=\"validateInputEntry($event);\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.ArrowUp)=\"onArrowPress($event, 'UP')\"\n (keydown.ArrowDown)=\"onArrowPress($event, 'DOWN')\">\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { WmComponentsModule } from '@wm/components/base';\nimport { InputModule } from '@wm/components/input';\n\nimport { CurrencyComponent } from './currency.component';\n\nconst components = [\n CurrencyComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n InputModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class CurrencyModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;AAGO,MAAM,aAAa,GAAG,IAAI,GAAG,CAChC;IACI,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,UAAU,EAAE,WAAW,CAAC;IACzB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,UAAU,EAAE,WAAW,CAAC;IACzB,CAAC,UAAU,EAAE,WAAW,CAAC;IACzB,CAAC,MAAM,EAAE,WAAW,CAAC;AACrB,IAAA,CAAC,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B;CACpB,CAAC;MAYW,cAAc,CAAA;;4EAAd,cAAc,GAAA,CAAA,EAAA,CAAA;gEAAd,cAAc,EAAA,CAAA,CAAA;oEARnB,YAAY;QACZ,WAAW;QACX,WAAW;QACX,kBAAkB,CAAA,EAAA,CAAA,CAAA;;4EAKb,cAAc,EAAA,CAAA;kBAV1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,WAAW;wBACX,kBAAkB;AACrB,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;iBAC3B,CAAA;;;;6EACY,cAAc,EAAA,EAAA,YAAA,EAAA,CAbvB,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAKb,YAAY;YACZ,WAAW;YACX,WAAW;YACX,kBAAkB,aARtB,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAAA,CAAA,GAAA;;ACVrB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/currency/src/currency.props.ts","../../../../../projects/components/widgets/input/currency/src/currency.component.ts","../../../../../projects/components/widgets/input/currency/src/currency.component.html","../../../../../projects/components/widgets/input/currency/src/currency.module.ts","../../../../../projects/components/widgets/input/currency/src/index.ts"],"sourcesContent":["import { PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const currencyProps = new Map(\n [\n ['class', PROP_STRING],\n ['currency', PROP_STRING],\n ['datavalue', PROP_STRING],\n ['disabled', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['maxvalue', PROP_NUMBER],\n ['minvalue', PROP_NUMBER],\n ['name', PROP_STRING],\n ['placeholder', {value: 'Enter value', ...PROP_STRING}],\n ['readonly', PROP_BOOLEAN],\n ['required', PROP_BOOLEAN],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['step', {value: 1, ...PROP_NUMBER}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['trailingzero', {value: false, ...PROP_BOOLEAN}],\n ['inputmode', {value: 'natural', ...PROP_STRING}]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-currency',\n currencyProps\n );\n registerFormWidget(\n FormWidgetType.CURRENCY,\n new Map(currencyProps)\n );\n};\n","import {Component, ElementRef, Injector, Optional, ViewChild} from '@angular/core';\nimport { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nimport { DecimalPipe } from '@angular/common';\n\nimport {CURRENCY_INFO, AbstractI18nService, AppDefaults, UserDefinedExecutionContext} from '@wm/core';\nimport { IWidgetConfig, provideAs, provideAsWidgetRef, TrailingZeroDecimalPipe } from '@wm/components/base';\nimport { NumberLocale } from '@wm/components/input';\n\nimport { registerProps } from './currency.props';\n\nconst DEFAULT_CLS = 'input-group app-currency';\n\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-currency',\n hostClass: DEFAULT_CLS\n};\n\n@Component({\n selector: '[wmCurrency]',\n templateUrl: './currency.component.html',\n providers: [\n provideAs(CurrencyComponent, NG_VALUE_ACCESSOR, true),\n provideAs(CurrencyComponent, NG_VALIDATORS, true),\n provideAsWidgetRef(CurrencyComponent)\n ]\n})\nexport class CurrencyComponent extends NumberLocale {\n static initializeProps = registerProps();\n\n currencyCode: string;\n currencySymbol: string;\n public required: boolean;\n public regexp: any;\n public disabled: boolean;\n public autofocus: boolean;\n public name: string;\n public tabindex: any;\n public shortcutkey: string;\n public hint: string;\n\n @ViewChild(NgModel, {static: true}) ngModel: NgModel;\n @ViewChild('input', { static: true, read: ElementRef }) inputEl: ElementRef;\n\n constructor(inj: Injector, private appDefaults: AppDefaults, i18nService: AbstractI18nService, trailingZeroDecimalPipe: TrailingZeroDecimalPipe) {\n super(inj, WIDGET_CONFIG, i18nService, trailingZeroDecimalPipe);\n this.currencyCode = this.appDefaults.currencyCode || 'USD';\n this.currencySymbol = CURRENCY_INFO[this.appDefaults.currencyCode || \"USD\"].symbol;\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'currency') {\n this.currencyCode = nv;\n this.currencySymbol = CURRENCY_INFO[this.currencyCode|| this.appDefaults.currencyCode].symbol;\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n}\n","<span class=\"input-group-addon\" [textContent]=\"currencySymbol\"></span>\n<input class=\"form-control app-textbox app-currency-input\"\n #input\n role=\"textbox\"\n type=\"text\"\n inputmode=\"decimal\"\n focus-target\n [autofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [pattern]=\"regexp\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint || currencyCode\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [ngModel]=\"displayValue\"\n [ngModelOptions]=\"ngModelOptions\"\n\n (focus)=\"checkForTrailingZeros($event)\"\n (input)=\"onInputChange($event.target.value)\"\n (blur)=\"handleBlur($event); checkForTrailingZeros($event);\"\n (ngModelChange)=\"onModelChange($event)\"\n (keydown)=\"validateInputEntry($event);\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.ArrowUp)=\"onArrowPress($event, 'UP')\"\n (keydown.ArrowDown)=\"onArrowPress($event, 'DOWN')\">\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { WmComponentsModule } from '@wm/components/base';\nimport { InputModule } from '@wm/components/input';\n\nimport { CurrencyComponent } from './currency.component';\n\nconst components = [\n CurrencyComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n InputModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class CurrencyModule {\n}\n","/**\n * Generated bundle index. Do not ed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C,SAAS;gBAAC,IAAA,EAAA,CAAA,OAAO,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAA;gBACsB,OAAO,EAAA,CAAA;sBAA9D,SAAS;uBAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;;;;AEhC1D,MAAM,UAAU,GAAG;IACf,iBAAiB;CACpB,CAAC;MAYW,cAAc,CAAA;;4EAAd,cAAc,GAAA,CAAA,EAAA,CAAA;gEAAd,cAAc,EAAA,CAAA,CAAA;oEARnB,YAAY;QACZ,WAAW;QACX,WAAW;QACX,kBAAkB,CAAA,EAAA,CAAA,CAAA;;4EAKb,cAAc,EAAA,CAAA;kBAV1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,WAAW;wBACX,kBAAkB;AACrB,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;iBAC3B,CAAA;;;;6EACY,cAAc,EAAA,EAAA,YAAA,EAAA,CAbvB,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAKb,YAAY;YACZ,WAAW;YACX,WAAW;YACX,kBAAkB,aARtB,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAAA,CAAA,GAAA;;ACVrB;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, Component,
|
|
2
|
+
import { ElementRef, Component, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
5
|
import { NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
|
@@ -41,10 +41,9 @@ const WIDGET_CONFIG = {
|
|
|
41
41
|
hostClass: DEFAULT_CLS
|
|
42
42
|
};
|
|
43
43
|
class CurrencyComponent extends NumberLocale {
|
|
44
|
-
constructor(inj, appDefaults, i18nService, trailingZeroDecimalPipe
|
|
45
|
-
super(inj, WIDGET_CONFIG,
|
|
44
|
+
constructor(inj, appDefaults, i18nService, trailingZeroDecimalPipe) {
|
|
45
|
+
super(inj, WIDGET_CONFIG, i18nService, trailingZeroDecimalPipe);
|
|
46
46
|
this.appDefaults = appDefaults;
|
|
47
|
-
this._viewParent = _viewParent;
|
|
48
47
|
this.currencyCode = this.appDefaults.currencyCode || 'USD';
|
|
49
48
|
this.currencySymbol = CURRENCY_INFO[this.appDefaults.currencyCode || "USD"].symbol;
|
|
50
49
|
}
|
|
@@ -59,7 +58,7 @@ class CurrencyComponent extends NumberLocale {
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
CurrencyComponent.initializeProps = registerProps();
|
|
62
|
-
CurrencyComponent.ɵfac = function CurrencyComponent_Factory(t) { return new (t || CurrencyComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.AppDefaults), i0.ɵɵdirectiveInject(i1.AbstractI18nService), i0.ɵɵdirectiveInject(i2.TrailingZeroDecimalPipe)
|
|
61
|
+
CurrencyComponent.ɵfac = function CurrencyComponent_Factory(t) { return new (t || CurrencyComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.AppDefaults), i0.ɵɵdirectiveInject(i1.AbstractI18nService), i0.ɵɵdirectiveInject(i2.TrailingZeroDecimalPipe)); };
|
|
63
62
|
CurrencyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CurrencyComponent, selectors: [["", "wmCurrency", ""]], viewQuery: function CurrencyComponent_Query(rf, ctx) { if (rf & 1) {
|
|
64
63
|
i0.ɵɵviewQuery(NgModel, 7);
|
|
65
64
|
i0.ɵɵviewQuery(_c0, 7, ElementRef);
|
|
@@ -89,9 +88,7 @@ CurrencyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CurrencyC
|
|
|
89
88
|
provideAs(CurrencyComponent, NG_VALIDATORS, true),
|
|
90
89
|
provideAsWidgetRef(CurrencyComponent)
|
|
91
90
|
], template: "<span class=\"input-group-addon\" [textContent]=\"currencySymbol\"></span>\n<input class=\"form-control app-textbox app-currency-input\"\n #input\n role=\"textbox\"\n type=\"text\"\n inputmode=\"decimal\"\n focus-target\n [autofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [pattern]=\"regexp\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint || currencyCode\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [ngModel]=\"displayValue\"\n [ngModelOptions]=\"ngModelOptions\"\n\n (focus)=\"checkForTrailingZeros($event)\"\n (input)=\"onInputChange($event.target.value)\"\n (blur)=\"handleBlur($event); checkForTrailingZeros($event);\"\n (ngModelChange)=\"onModelChange($event)\"\n (keydown)=\"validateInputEntry($event);\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.ArrowUp)=\"onArrowPress($event, 'UP')\"\n (keydown.ArrowDown)=\"onArrowPress($event, 'DOWN')\">\n" }]
|
|
92
|
-
}], function () { return [{ type: i0.Injector }, { type: i1.AppDefaults }, { type: i1.AbstractI18nService }, { type: i2.TrailingZeroDecimalPipe }, {
|
|
93
|
-
type: Optional
|
|
94
|
-
}] }]; }, { ngModel: [{
|
|
91
|
+
}], function () { return [{ type: i0.Injector }, { type: i1.AppDefaults }, { type: i1.AbstractI18nService }, { type: i2.TrailingZeroDecimalPipe }]; }, { ngModel: [{
|
|
95
92
|
type: ViewChild,
|
|
96
93
|
args: [NgModel, { static: true }]
|
|
97
94
|
}], inputEl: [{
|