@wavemaker/app-ng-runtime 11.13.0-rc.6255 → 11.14.0-rc.226
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-task/bundles/index.umd.js +34 -5
- package/build-task/esm2022/basic/anchor/anchor.build.mjs +15 -0
- package/build-task/esm2022/basic/audio/audio.build.mjs +10 -0
- package/build-task/esm2022/basic/html/html.build.mjs +15 -0
- package/build-task/esm2022/basic/icon/icon.build.mjs +10 -0
- package/build-task/esm2022/basic/iframe/iframe.build.mjs +10 -0
- package/build-task/esm2022/basic/label/label.build.mjs +25 -0
- package/build-task/esm2022/basic/picture/picture.build.mjs +14 -0
- package/build-task/esm2022/basic/spinner/spinner.build.mjs +15 -0
- package/build-task/esm2022/basic/video/video.build.mjs +10 -0
- package/build-task/esm2022/data/form/form-field/form-field.build.mjs +8 -3
- package/build-task/esm2022/data/form/form.build.mjs +8 -1
- package/build-task/esm2022/data/table/table-column/table-column.build.mjs +14 -3
- package/build-task/esm2022/input/default/checkbox/checkbox.build.mjs +2 -2
- package/build-task/esm2022/page/page-content/page-content.build.mjs +8 -2
- package/build-task/esm2022/public_api.mjs +10 -10
- package/build-task/fesm2022/index.mjs +36 -7
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/build-task/package.json +3 -6
- package/build-task/public_api.d.ts +9 -9
- package/components/advanced/carousel/bundles/index.umd.js +33 -38
- package/components/advanced/carousel/esm2022/carousel-template/carousel-template.directive.mjs +16 -16
- package/components/advanced/carousel/esm2022/carousel.directive.mjs +19 -24
- package/components/advanced/carousel/fesm2022/index.mjs +34 -39
- package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
- package/components/advanced/carousel/package.json +0 -3
- package/components/advanced/custom/bundles/index.umd.js +48 -48
- package/components/advanced/custom/custom-widget-container/custom-widget-container.directive.d.ts +1 -1
- package/components/advanced/custom/esm2022/custom-widget-container/custom-widget-container.directive.mjs +31 -31
- package/components/advanced/custom/esm2022/custom-widget.directive.mjs +15 -15
- package/components/advanced/custom/fesm2022/index.mjs +45 -45
- package/components/advanced/custom/fesm2022/index.mjs.map +1 -1
- package/components/advanced/custom/package.json +0 -3
- package/components/advanced/login/bundles/index.umd.js +33 -53
- package/components/advanced/login/esm2022/login.component.mjs +26 -47
- package/components/advanced/login/fesm2022/index.mjs +27 -47
- package/components/advanced/login/fesm2022/index.mjs.map +1 -1
- package/components/advanced/login/login.component.d.ts +1 -1
- package/components/advanced/login/package.json +0 -3
- package/components/advanced/marquee/bundles/index.umd.js +19 -19
- package/components/advanced/marquee/esm2022/marquee.directive.mjs +20 -20
- package/components/advanced/marquee/fesm2022/index.mjs +20 -20
- package/components/advanced/marquee/fesm2022/index.mjs.map +1 -1
- package/components/advanced/marquee/package.json +0 -3
- package/components/base/bundles/index.umd.js +4272 -4243
- package/components/base/esm2022/pipes/custom-pipes.mjs +14 -12
- package/components/base/esm2022/pipes/wm-pipe.mjs +3 -3
- package/components/base/esm2022/public_api.mjs +1 -2
- package/components/base/esm2022/widgets/common/container/container.directive.mjs +154 -1
- package/components/base/esm2022/widgets/common/container/container.props.mjs +7 -2
- package/components/base/esm2022/widgets/common/redraw/redrawable.directive.mjs +1 -1
- package/components/base/fesm2022/index.mjs +4280 -4251
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/package.json +2 -2
- package/components/base/pipes/custom-pipes.d.ts +4 -2
- package/components/base/pipes/wm-pipe.d.ts +1 -1
- package/components/base/public_api.d.ts +0 -1
- package/components/base/widgets/common/container/container.directive.d.ts +9 -0
- package/components/base/widgets/common/pull-to-refresh/pull-to-refresh.d.ts +0 -2
- package/components/basic/anchor/bundles/index.umd.js +192 -0
- package/components/basic/anchor/esm2022/anchor.component.mjs +143 -0
- package/components/basic/anchor/esm2022/anchor.props.mjs +27 -0
- package/components/basic/anchor/esm2022/index.mjs +5 -0
- package/components/basic/anchor/esm2022/public_api.mjs +2 -0
- package/components/basic/anchor/fesm2022/index.mjs +175 -0
- package/components/basic/anchor/fesm2022/index.mjs.map +1 -0
- package/components/basic/{progress → anchor}/index.d.ts +1 -1
- package/components/basic/{default → anchor}/package.json +1 -4
- package/components/basic/anchor/public_api.d.ts +1 -0
- package/components/basic/audio/bundles/index.umd.js +83 -0
- package/components/basic/audio/esm2022/audio.component.mjs +41 -0
- package/components/basic/audio/esm2022/audio.props.mjs +19 -0
- package/components/{input/epoch → basic/audio}/esm2022/index.mjs +1 -1
- package/components/basic/audio/esm2022/public_api.mjs +2 -0
- package/components/basic/audio/fesm2022/index.mjs +65 -0
- package/components/basic/audio/fesm2022/index.mjs.map +1 -0
- package/components/{input/epoch → basic/audio}/index.d.ts +1 -1
- package/components/{input/default → basic/audio}/package.json +2 -5
- package/components/basic/audio/public_api.d.ts +1 -0
- package/components/basic/html/bundles/index.umd.js +110 -0
- package/components/basic/html/esm2022/html.directive.mjs +76 -0
- package/components/basic/html/esm2022/html.props.mjs +12 -0
- package/components/basic/html/esm2022/index.mjs +5 -0
- package/components/basic/html/esm2022/public_api.mjs +2 -0
- package/components/basic/html/fesm2022/index.mjs +93 -0
- package/components/basic/html/fesm2022/index.mjs.map +1 -0
- package/components/basic/{default → html}/index.d.ts +1 -1
- package/components/{input/epoch → basic/html}/package.json +1 -4
- package/components/basic/html/public_api.d.ts +1 -0
- package/components/basic/icon/bundles/index.umd.js +80 -0
- package/components/basic/icon/esm2022/icon.component.mjs +38 -0
- package/components/basic/icon/esm2022/icon.props.mjs +19 -0
- package/components/basic/icon/esm2022/index.mjs +5 -0
- package/components/basic/icon/esm2022/public_api.mjs +2 -0
- package/components/basic/icon/fesm2022/index.mjs +62 -0
- package/components/basic/icon/fesm2022/index.mjs.map +1 -0
- package/components/{input/default → basic/icon}/index.d.ts +1 -1
- package/components/basic/{progress → icon}/package.json +1 -4
- package/components/basic/icon/public_api.d.ts +1 -0
- package/components/basic/iframe/.npmignore +2 -0
- package/components/basic/iframe/bundles/index.umd.js +101 -0
- package/components/basic/iframe/esm2022/iframe.component.mjs +65 -0
- package/components/basic/iframe/esm2022/iframe.props.mjs +15 -0
- package/components/basic/iframe/esm2022/index.mjs +5 -0
- package/components/basic/iframe/esm2022/public_api.mjs +2 -0
- package/components/basic/iframe/fesm2022/index.mjs +84 -0
- package/components/basic/iframe/fesm2022/index.mjs.map +1 -0
- package/components/basic/iframe/index.d.ts +5 -0
- package/components/basic/iframe/package.json +20 -0
- package/components/basic/iframe/public_api.d.ts +1 -0
- package/components/basic/label/.npmignore +2 -0
- package/components/basic/label/bundles/index.umd.js +109 -0
- package/components/basic/label/esm2022/index.mjs +5 -0
- package/components/basic/label/esm2022/label.directive.mjs +71 -0
- package/components/basic/label/esm2022/label.props.mjs +17 -0
- package/components/basic/label/esm2022/public_api.mjs +2 -0
- package/components/basic/label/fesm2022/index.mjs +93 -0
- package/components/basic/label/fesm2022/index.mjs.map +1 -0
- package/components/basic/label/index.d.ts +5 -0
- package/components/basic/{default/label → label}/label.directive.d.ts +1 -1
- package/components/basic/label/package.json +20 -0
- package/components/basic/label/public_api.d.ts +1 -0
- package/components/basic/picture/.npmignore +2 -0
- package/components/basic/picture/bundles/index.umd.js +138 -0
- package/components/basic/{default → picture}/esm2022/index.mjs +1 -1
- package/components/basic/picture/esm2022/picture.directive.mjs +93 -0
- package/components/basic/picture/esm2022/picture.props.mjs +23 -0
- package/components/basic/picture/esm2022/public_api.mjs +2 -0
- package/components/basic/picture/fesm2022/index.mjs +121 -0
- package/components/basic/picture/fesm2022/index.mjs.map +1 -0
- package/components/basic/picture/index.d.ts +5 -0
- package/components/basic/picture/package.json +20 -0
- package/components/basic/picture/public_api.d.ts +1 -0
- package/components/basic/progress/progress-bar/.npmignore +2 -0
- package/components/basic/progress/progress-bar/bundles/index.umd.js +170 -0
- package/components/basic/progress/progress-bar/esm2022/index.mjs +5 -0
- package/components/basic/progress/progress-bar/esm2022/progress-bar.component.mjs +130 -0
- package/components/basic/progress/{esm2022/progress-bar → progress-bar/esm2022}/progress-bar.props.mjs +1 -1
- package/components/basic/progress/progress-bar/esm2022/public_api.mjs +2 -0
- package/components/basic/progress/progress-bar/fesm2022/index.mjs +154 -0
- package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -0
- package/components/basic/progress/progress-bar/index.d.ts +5 -0
- package/components/basic/progress/progress-bar/package.json +20 -0
- package/components/basic/progress/progress-bar/public_api.d.ts +1 -0
- package/components/basic/progress/progress-circle/.npmignore +2 -0
- package/components/basic/progress/progress-circle/bundles/index.umd.js +161 -0
- package/components/basic/progress/progress-circle/esm2022/index.mjs +5 -0
- package/components/basic/progress/progress-circle/esm2022/progress-circle.component.mjs +120 -0
- package/components/basic/progress/{esm2022/progress-circle → progress-circle/esm2022}/progress-circle.props.mjs +1 -1
- package/components/basic/progress/progress-circle/esm2022/public_api.mjs +2 -0
- package/components/basic/progress/progress-circle/fesm2022/index.mjs +145 -0
- package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -0
- package/components/basic/progress/progress-circle/index.d.ts +5 -0
- package/components/basic/progress/progress-circle/package.json +20 -0
- package/components/basic/progress/progress-circle/public_api.d.ts +1 -0
- package/components/basic/progress/progress-utils/.npmignore +2 -0
- package/components/basic/progress/progress-utils/bundles/index.umd.js +35 -0
- package/components/basic/progress/progress-utils/esm2022/index.mjs +5 -0
- package/components/basic/progress/progress-utils/esm2022/progress-utils.mjs +25 -0
- package/components/basic/progress/progress-utils/esm2022/public_api.mjs +2 -0
- package/components/basic/progress/progress-utils/fesm2022/index.mjs +32 -0
- package/components/basic/progress/progress-utils/fesm2022/index.mjs.map +1 -0
- package/components/basic/progress/progress-utils/index.d.ts +5 -0
- package/components/basic/progress/progress-utils/package.json +20 -0
- package/components/basic/progress/progress-utils/public_api.d.ts +1 -0
- package/components/basic/rich-text-editor/bundles/index.umd.js +23 -40
- package/components/basic/rich-text-editor/esm2022/rich-text-editor.component.mjs +19 -38
- package/components/basic/rich-text-editor/fesm2022/index.mjs +21 -39
- package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
- package/components/basic/rich-text-editor/package.json +0 -3
- package/components/basic/rich-text-editor/rich-text-editor.component.d.ts +1 -1
- package/components/basic/search/bundles/index.umd.js +109 -313
- package/components/basic/search/esm2022/scrollable.directive.mjs +13 -14
- package/components/basic/search/esm2022/search.component.mjs +40 -246
- package/components/basic/search/fesm2022/index.mjs +52 -256
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/package.json +0 -3
- package/components/basic/search/scrollable.directive.d.ts +2 -3
- package/components/basic/search/search.component.d.ts +1 -1
- package/components/basic/spinner/.npmignore +2 -0
- package/components/basic/spinner/bundles/index.umd.js +118 -0
- package/components/{input/default → basic/spinner}/esm2022/index.mjs +1 -1
- package/components/basic/spinner/esm2022/public_api.mjs +2 -0
- package/components/basic/spinner/esm2022/spinner.component.mjs +79 -0
- package/components/basic/spinner/esm2022/spinner.props.mjs +20 -0
- package/components/basic/spinner/fesm2022/index.mjs +103 -0
- package/components/basic/spinner/fesm2022/index.mjs.map +1 -0
- package/components/basic/spinner/index.d.ts +5 -0
- package/components/basic/spinner/package.json +20 -0
- package/components/basic/spinner/public_api.d.ts +1 -0
- package/components/basic/tree/bundles/index.umd.js +34 -38
- package/components/basic/tree/esm2022/tree.component.mjs +31 -36
- package/components/basic/tree/fesm2022/index.mjs +32 -36
- package/components/basic/tree/fesm2022/index.mjs.map +1 -1
- package/components/basic/tree/package.json +0 -3
- package/components/basic/video/.npmignore +2 -0
- package/components/basic/video/bundles/index.umd.js +116 -0
- package/components/basic/video/esm2022/index.mjs +5 -0
- package/components/basic/video/esm2022/public_api.mjs +2 -0
- package/components/basic/video/esm2022/video.component.mjs +70 -0
- package/components/basic/video/esm2022/video.props.mjs +24 -0
- package/components/basic/video/fesm2022/index.mjs +99 -0
- package/components/basic/video/fesm2022/index.mjs.map +1 -0
- package/components/basic/video/index.d.ts +5 -0
- package/components/basic/video/package.json +20 -0
- package/components/basic/video/public_api.d.ts +1 -0
- package/components/chart/bundles/index.umd.js +22 -75
- package/components/chart/esm2022/chart.component.mjs +20 -74
- package/components/chart/fesm2022/index.mjs +21 -74
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/chart/package.json +0 -3
- package/components/containers/accordion/bundles/index.umd.js +45 -100
- package/components/containers/accordion/esm2022/accordion-pane/accordion-pane.component.mjs +19 -70
- package/components/containers/accordion/esm2022/accordion.directive.mjs +24 -29
- package/components/containers/accordion/fesm2022/index.mjs +43 -98
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/package.json +0 -3
- package/components/containers/layout-grid/bundles/index.umd.js +60 -60
- package/components/containers/layout-grid/esm2022/layout-grid-column/layout-grid-column.directive.mjs +23 -23
- package/components/containers/layout-grid/esm2022/layout-grid-row/layout-grid-row.directive.mjs +20 -20
- package/components/containers/layout-grid/esm2022/layout-grid.directive.mjs +20 -20
- package/components/containers/layout-grid/fesm2022/index.mjs +61 -61
- package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
- package/components/containers/layout-grid/package.json +0 -3
- package/components/containers/linear-layout/bundles/index.umd.js +38 -38
- package/components/containers/linear-layout/esm2022/linear-layout-item/linear-layout-item.directive.mjs +20 -20
- package/components/containers/linear-layout/esm2022/linear-layout.directive.mjs +20 -20
- package/components/containers/linear-layout/fesm2022/index.mjs +39 -39
- package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
- package/components/containers/linear-layout/package.json +0 -3
- package/components/containers/panel/bundles/index.umd.js +62 -223
- package/components/containers/panel/esm2022/panel.component.mjs +29 -190
- package/components/containers/panel/fesm2022/index.mjs +29 -190
- package/components/containers/panel/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/package.json +0 -3
- package/components/containers/tabs/bundles/index.umd.js +95 -204
- package/components/containers/tabs/esm2022/tab-pane/tab-pane.component.mjs +34 -51
- package/components/containers/tabs/esm2022/tabs.component.mjs +29 -123
- package/components/containers/tabs/fesm2022/index.mjs +61 -170
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/tabs/package.json +0 -3
- package/components/containers/tabs/tab-pane/tab-pane.component.d.ts +3 -4
- package/components/containers/tile/bundles/index.umd.js +19 -19
- package/components/containers/tile/esm2022/tile.directive.mjs +20 -20
- package/components/containers/tile/fesm2022/index.mjs +20 -20
- package/components/containers/tile/fesm2022/index.mjs.map +1 -1
- package/components/containers/tile/package.json +0 -3
- package/components/containers/wizard/bundles/index.umd.js +119 -302
- package/components/containers/wizard/esm2022/wizard-action/wizard-action.directive.mjs +21 -21
- package/components/containers/wizard/esm2022/wizard-step/wizard-step.component.mjs +32 -45
- package/components/containers/wizard/esm2022/wizard.component.mjs +30 -201
- package/components/containers/wizard/fesm2022/index.mjs +81 -264
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/package.json +0 -3
- package/components/containers/wizard/wizard.component.d.ts +1 -1
- package/components/data/card/bundles/index.umd.js +108 -208
- package/components/data/card/esm2022/card-actions/card-actions.directive.mjs +15 -15
- package/components/data/card/esm2022/card-content/card-content.component.mjs +19 -34
- package/components/data/card/esm2022/card-footer/card-footer.directive.mjs +15 -15
- package/components/data/card/esm2022/card.component.mjs +21 -107
- package/components/data/card/fesm2022/index.mjs +67 -167
- package/components/data/card/fesm2022/index.mjs.map +1 -1
- package/components/data/card/package.json +0 -3
- package/components/data/form/bundles/index.umd.js +287 -467
- package/components/data/form/esm2022/form-action/form-action.directive.mjs +22 -22
- package/components/data/form/esm2022/form-field/form-field.directive.mjs +80 -91
- package/components/data/form/esm2022/form-widget.directive.mjs +31 -31
- package/components/data/form/esm2022/form.component.mjs +88 -251
- package/components/data/form/esm2022/form.props.mjs +1 -1
- package/components/data/form/esm2022/live-actions/dependson.directive.mjs +19 -24
- package/components/data/form/esm2022/live-actions/live-actions.directive.mjs +15 -15
- package/components/data/form/esm2022/live-filter/live-filter.directive.mjs +15 -15
- package/components/data/form/esm2022/live-form/live-form.directive.mjs +23 -25
- package/components/data/form/fesm2022/index.mjs +288 -468
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/package.json +0 -3
- package/components/data/list/bundles/index.umd.js +80 -360
- package/components/data/list/esm2022/list-item.directive.mjs +27 -34
- package/components/data/list/esm2022/list.animator.mjs +1 -1
- package/components/data/list/esm2022/list.component.mjs +55 -330
- package/components/data/list/esm2022/list.props.mjs +1 -1
- package/components/data/list/fesm2022/index.mjs +79 -358
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/list-item.directive.d.ts +3 -3
- package/components/data/list/list.component.d.ts +2 -4
- package/components/data/list/package.json +0 -3
- package/components/data/live-table/bundles/index.umd.js +28 -39
- package/components/data/live-table/esm2022/live-table.component.mjs +25 -37
- package/components/data/live-table/fesm2022/index.mjs +26 -37
- package/components/data/live-table/fesm2022/index.mjs.map +1 -1
- package/components/data/live-table/package.json +0 -3
- package/components/data/pagination/bundles/index.umd.js +33 -505
- package/components/data/pagination/esm2022/pagination.component.mjs +33 -507
- package/components/data/pagination/esm2022/pagination.props.mjs +1 -1
- package/components/data/pagination/fesm2022/index.mjs +32 -505
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/package.json +0 -3
- package/components/data/pagination/pagination.component.d.ts +1 -1
- package/components/data/table/bundles/index.umd.js +310 -457
- package/components/data/table/esm2022/table-action/table-action.directive.mjs +22 -22
- package/components/data/table/esm2022/table-column/table-column.directive.mjs +50 -71
- package/components/data/table/esm2022/table-column/table-column.props.mjs +1 -1
- package/components/data/table/esm2022/table-column-group/table-column-group.directive.mjs +26 -26
- package/components/data/table/esm2022/table-cud.directive.mjs +15 -15
- package/components/data/table/esm2022/table-filter.directive.mjs +16 -16
- package/components/data/table/esm2022/table-row/table-row.directive.mjs +24 -24
- package/components/data/table/esm2022/table-row-action/table-row-action.directive.mjs +29 -29
- package/components/data/table/esm2022/table.component.mjs +135 -263
- package/components/data/table/esm2022/table.props.mjs +2 -1
- package/components/data/table/fesm2022/index.mjs +312 -459
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/package.json +0 -3
- package/components/data/table/table-column/table-column.directive.d.ts +1 -1
- package/components/data/table/table.component.d.ts +3 -0
- package/components/dialogs/alert-dialog/bundles/index.umd.js +50 -79
- package/components/dialogs/alert-dialog/esm2022/alert-dialog.component.mjs +32 -62
- package/components/dialogs/alert-dialog/fesm2022/index.mjs +32 -61
- package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/alert-dialog/package.json +0 -3
- package/components/dialogs/confirm-dialog/bundles/index.umd.js +36 -72
- package/components/dialogs/confirm-dialog/esm2022/confirm-dialog.component.mjs +34 -71
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs +35 -71
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/confirm-dialog/package.json +0 -3
- package/components/dialogs/default/bundles/index.umd.js +85 -232
- package/components/dialogs/default/esm2022/base-dialog.mjs +14 -14
- package/components/dialogs/default/esm2022/dialog-body/dialog-body.directive.mjs +16 -18
- package/components/dialogs/default/esm2022/dialog-footer/dialog-footer.directive.mjs +20 -20
- package/components/dialogs/default/esm2022/dialog-header/dialog-header.component.mjs +34 -179
- package/components/dialogs/default/fesm2022/index.mjs +80 -227
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/default/package.json +0 -3
- package/components/dialogs/design-dialog/bundles/index.umd.js +52 -108
- package/components/dialogs/design-dialog/esm2022/dialog.component.mjs +50 -107
- package/components/dialogs/design-dialog/fesm2022/index.mjs +51 -107
- package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/design-dialog/package.json +0 -3
- package/components/dialogs/iframe-dialog/bundles/index.umd.js +33 -81
- package/components/dialogs/iframe-dialog/esm2022/iframe-dialog.component.mjs +32 -82
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs +33 -82
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/iframe-dialog/package.json +0 -3
- package/components/dialogs/login-dialog/bundles/index.umd.js +22 -29
- package/components/dialogs/login-dialog/esm2022/login-dialog.directive.mjs +23 -30
- package/components/dialogs/login-dialog/fesm2022/index.mjs +23 -30
- package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/login-dialog/package.json +0 -3
- package/components/dialogs/partial-dialog/bundles/index.umd.js +39 -85
- package/components/dialogs/partial-dialog/esm2022/partial-dialog.component.mjs +38 -85
- package/components/dialogs/partial-dialog/fesm2022/index.mjs +39 -85
- package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/partial-dialog/package.json +0 -3
- package/components/input/base-form/.npmignore +2 -0
- package/components/input/base-form/bundles/index.umd.js +133 -0
- package/components/input/base-form/esm2022/base-form.component.mjs +110 -0
- package/components/input/base-form/esm2022/index.mjs +5 -0
- package/components/input/base-form/esm2022/public_api.mjs +2 -0
- package/components/input/base-form/fesm2022/index.mjs +117 -0
- package/components/input/base-form/fesm2022/index.mjs.map +1 -0
- package/components/input/base-form/index.d.ts +5 -0
- package/components/input/base-form/package.json +20 -0
- package/components/input/base-form/public_api.d.ts +1 -0
- package/components/input/base-form-custom/.npmignore +2 -0
- package/components/input/{default → base-form-custom}/base-form-custom.component.d.ts +1 -1
- package/components/input/base-form-custom/bundles/index.umd.js +118 -0
- package/components/input/base-form-custom/esm2022/base-form-custom.component.mjs +94 -0
- package/components/input/base-form-custom/esm2022/index.mjs +5 -0
- package/components/input/base-form-custom/esm2022/public_api.mjs +2 -0
- package/components/input/base-form-custom/fesm2022/index.mjs +101 -0
- package/components/input/base-form-custom/fesm2022/index.mjs.map +1 -0
- package/components/input/base-form-custom/index.d.ts +5 -0
- package/components/input/base-form-custom/package.json +20 -0
- package/components/input/base-form-custom/public_api.d.ts +1 -0
- package/components/input/button/.npmignore +2 -0
- package/components/input/button/bundles/index.umd.js +98 -0
- package/components/input/button/esm2022/button.component.mjs +50 -0
- package/components/input/button/esm2022/button.props.mjs +26 -0
- package/components/input/button/esm2022/index.mjs +5 -0
- package/components/input/button/esm2022/public_api.mjs +2 -0
- package/components/input/button/fesm2022/index.mjs +81 -0
- package/components/input/button/fesm2022/index.mjs.map +1 -0
- package/components/input/button/index.d.ts +5 -0
- package/components/input/button/package.json +20 -0
- package/components/input/button/public_api.d.ts +1 -0
- package/components/input/button-group/.npmignore +2 -0
- package/components/input/button-group/bundles/index.umd.js +80 -0
- package/components/input/button-group/esm2022/button-group.directive.mjs +47 -0
- package/components/input/button-group/esm2022/button-group.props.mjs +10 -0
- package/components/input/button-group/esm2022/index.mjs +5 -0
- package/components/input/button-group/esm2022/public_api.mjs +2 -0
- package/components/input/button-group/fesm2022/index.mjs +62 -0
- package/components/input/button-group/fesm2022/index.mjs.map +1 -0
- package/components/input/button-group/index.d.ts +5 -0
- package/components/input/button-group/package.json +20 -0
- package/components/input/button-group/public_api.d.ts +1 -0
- package/components/input/calendar/bundles/index.umd.js +25 -38
- package/components/input/calendar/esm2022/calendar.component.mjs +22 -36
- package/components/input/calendar/fesm2022/index.mjs +23 -36
- package/components/input/calendar/fesm2022/index.mjs.map +1 -1
- package/components/input/calendar/package.json +0 -3
- package/components/input/caption-position/.npmignore +2 -0
- package/components/input/caption-position/bundles/index.umd.js +196 -0
- package/components/input/caption-position/esm2022/caption-position.directive.mjs +172 -0
- package/components/input/caption-position/esm2022/index.mjs +5 -0
- package/components/input/caption-position/esm2022/public_api.mjs +2 -0
- package/components/input/caption-position/fesm2022/index.mjs +178 -0
- package/components/input/caption-position/fesm2022/index.mjs.map +1 -0
- package/components/input/caption-position/index.d.ts +5 -0
- package/components/input/caption-position/package.json +20 -0
- package/components/input/caption-position/public_api.d.ts +1 -0
- package/components/input/checkbox/.npmignore +2 -0
- package/components/input/checkbox/bundles/index.umd.js +190 -0
- package/components/input/{default/checkbox → checkbox}/checkbox.component.d.ts +1 -1
- package/components/input/checkbox/esm2022/checkbox.component.mjs +145 -0
- package/components/input/checkbox/esm2022/checkbox.props.mjs +27 -0
- package/components/{basic/progress → input/checkbox}/esm2022/index.mjs +1 -1
- package/components/input/checkbox/esm2022/public_api.mjs +2 -0
- package/components/input/checkbox/fesm2022/index.mjs +175 -0
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -0
- package/components/input/checkbox/index.d.ts +5 -0
- package/components/input/checkbox/package.json +20 -0
- package/components/input/checkbox/public_api.d.ts +1 -0
- package/components/input/checkboxset/.npmignore +2 -0
- package/components/input/checkboxset/bundles/index.umd.js +151 -0
- package/components/input/{default/checkboxset → checkboxset}/checkboxset.component.d.ts +1 -1
- package/components/input/checkboxset/esm2022/checkboxset.component.mjs +99 -0
- package/components/input/checkboxset/esm2022/checkboxset.props.mjs +35 -0
- package/components/input/checkboxset/esm2022/index.mjs +5 -0
- package/components/input/checkboxset/esm2022/public_api.mjs +2 -0
- package/components/input/checkboxset/fesm2022/index.mjs +138 -0
- package/components/input/checkboxset/fesm2022/index.mjs.map +1 -0
- package/components/input/checkboxset/index.d.ts +5 -0
- package/components/input/checkboxset/package.json +20 -0
- package/components/input/checkboxset/public_api.d.ts +1 -0
- package/components/input/chips/bundles/index.umd.js +94 -153
- package/components/input/chips/chips.component.d.ts +1 -1
- package/components/input/chips/esm2022/chips.component.mjs +41 -101
- package/components/input/chips/fesm2022/index.mjs +42 -101
- package/components/input/chips/fesm2022/index.mjs.map +1 -1
- package/components/input/chips/package.json +0 -3
- package/components/input/color-picker/bundles/index.umd.js +35 -74
- package/components/input/color-picker/color-picker.component.d.ts +2 -2
- package/components/input/color-picker/esm2022/color-picker.component.mjs +34 -75
- package/components/input/color-picker/fesm2022/index.mjs +36 -75
- package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/color-picker/package.json +0 -3
- package/components/input/composite/.npmignore +2 -0
- package/components/input/composite/bundles/index.umd.js +111 -0
- package/components/input/composite/esm2022/composite.directive.mjs +79 -0
- package/components/input/composite/esm2022/composite.props.mjs +10 -0
- package/components/input/composite/esm2022/index.mjs +5 -0
- package/components/input/composite/esm2022/public_api.mjs +2 -0
- package/components/input/composite/fesm2022/index.mjs +94 -0
- package/components/input/composite/fesm2022/index.mjs.map +1 -0
- package/components/input/composite/index.d.ts +5 -0
- package/components/input/composite/package.json +20 -0
- package/components/input/composite/public_api.d.ts +1 -0
- package/components/input/currency/bundles/index.umd.js +31 -52
- package/components/input/currency/currency.component.d.ts +1 -1
- package/components/input/currency/esm2022/currency.component.mjs +28 -50
- package/components/input/currency/fesm2022/index.mjs +30 -51
- package/components/input/currency/fesm2022/index.mjs.map +1 -1
- package/components/input/currency/package.json +0 -3
- package/components/input/dataset-aware-form/.npmignore +2 -0
- package/components/input/dataset-aware-form/bundles/index.umd.js +328 -0
- package/components/input/{default → dataset-aware-form}/dataset-aware-form.component.d.ts +1 -1
- package/components/input/dataset-aware-form/esm2022/dataset-aware-form.component.mjs +307 -0
- package/components/input/dataset-aware-form/esm2022/index.mjs +5 -0
- package/components/input/dataset-aware-form/esm2022/public_api.mjs +2 -0
- package/components/input/dataset-aware-form/fesm2022/index.mjs +314 -0
- package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -0
- package/components/input/dataset-aware-form/index.d.ts +5 -0
- package/components/input/dataset-aware-form/package.json +20 -0
- package/components/input/dataset-aware-form/public_api.d.ts +1 -0
- package/components/input/epoch/base-date-time/.npmignore +2 -0
- package/components/input/epoch/{base-date-time.component.d.ts → base-date-time/base-date-time.component.d.ts} +1 -1
- package/components/input/epoch/base-date-time/bundles/index.umd.js +1086 -0
- package/components/input/epoch/{esm2022 → base-date-time/esm2022}/base-date-time.component.mjs +22 -31
- package/components/input/epoch/base-date-time/esm2022/index.mjs +5 -0
- package/components/input/epoch/base-date-time/esm2022/public_api.mjs +2 -0
- package/components/input/epoch/base-date-time/fesm2022/index.mjs +1077 -0
- package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -0
- package/components/input/epoch/base-date-time/index.d.ts +5 -0
- package/components/input/epoch/base-date-time/package.json +20 -0
- package/components/input/epoch/base-date-time/public_api.d.ts +1 -0
- package/components/input/epoch/date/.npmignore +2 -0
- package/components/input/epoch/date/bundles/index.umd.js +492 -0
- package/components/input/epoch/date/date.component.d.ts +2 -2
- package/components/input/epoch/date/esm2022/date.component.mjs +322 -0
- package/components/input/epoch/{esm2022/date → date/esm2022}/date.props.mjs +1 -1
- package/components/input/epoch/{esm2022/date → date/esm2022}/imaskUtil.mjs +1 -1
- package/components/input/epoch/date/esm2022/index.mjs +5 -0
- package/components/input/epoch/date/esm2022/public_api.mjs +2 -0
- package/components/input/epoch/date/fesm2022/index.mjs +482 -0
- package/components/input/epoch/date/fesm2022/index.mjs.map +1 -0
- package/components/input/epoch/date/index.d.ts +5 -0
- package/components/input/epoch/date/package.json +20 -0
- package/components/input/epoch/date/public_api.d.ts +1 -0
- package/components/input/epoch/date-time/.npmignore +2 -0
- package/components/input/epoch/date-time/bundles/index.umd.js +518 -0
- package/components/input/epoch/date-time/date-time.component.d.ts +1 -1
- package/components/input/epoch/date-time/esm2022/date-time.component.mjs +458 -0
- package/components/input/epoch/{esm2022/date-time → date-time/esm2022}/date-time.props.mjs +1 -1
- package/components/input/epoch/date-time/esm2022/index.mjs +5 -0
- package/components/input/epoch/date-time/esm2022/public_api.mjs +2 -0
- package/components/input/epoch/date-time/fesm2022/index.mjs +509 -0
- package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -0
- package/components/input/epoch/date-time/index.d.ts +5 -0
- package/components/input/epoch/date-time/package.json +20 -0
- package/components/input/epoch/date-time/public_api.d.ts +1 -0
- package/components/input/epoch/date-time-picker/.npmignore +2 -0
- package/components/input/epoch/date-time-picker/bundles/index.umd.js +453 -0
- package/components/input/epoch/date-time-picker/esm2022/date-time-picker.component.mjs +433 -0
- package/components/input/epoch/date-time-picker/esm2022/index.mjs +5 -0
- package/components/input/epoch/date-time-picker/esm2022/public_api.mjs +2 -0
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs +439 -0
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -0
- package/components/input/epoch/date-time-picker/index.d.ts +5 -0
- package/components/input/epoch/date-time-picker/package.json +20 -0
- package/components/input/epoch/date-time-picker/public_api.d.ts +1 -0
- package/components/input/epoch/picker/.npmignore +2 -0
- package/components/input/epoch/picker/bundles/index.umd.js +192 -0
- package/components/input/epoch/picker/esm2022/index.mjs +5 -0
- package/components/input/epoch/picker/esm2022/picker.component.mjs +165 -0
- package/components/input/epoch/picker/esm2022/public_api.mjs +3 -0
- package/components/input/epoch/picker/fesm2022/index.mjs +172 -0
- package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -0
- package/components/input/epoch/picker/index.d.ts +5 -0
- package/components/input/epoch/picker/package.json +20 -0
- package/components/input/epoch/picker/public_api.d.ts +2 -0
- package/components/input/epoch/time/.npmignore +2 -0
- package/components/input/epoch/time/bundles/index.umd.js +397 -0
- package/components/input/epoch/time/esm2022/index.mjs +5 -0
- package/components/input/epoch/time/esm2022/public_api.mjs +2 -0
- package/components/input/epoch/time/esm2022/time.component.mjs +348 -0
- package/components/input/epoch/{esm2022/time → time/esm2022}/time.props.mjs +1 -1
- package/components/input/epoch/time/fesm2022/index.mjs +387 -0
- package/components/input/epoch/time/fesm2022/index.mjs.map +1 -0
- package/components/input/epoch/time/index.d.ts +5 -0
- package/components/input/epoch/time/package.json +20 -0
- package/components/input/epoch/time/public_api.d.ts +1 -0
- package/components/input/epoch/time/time.component.d.ts +1 -1
- package/components/input/file-upload/bundles/index.umd.js +56 -348
- package/components/input/file-upload/esm2022/file-upload.component.mjs +20 -313
- package/components/input/file-upload/fesm2022/index.mjs +20 -312
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/package.json +0 -3
- package/components/input/number/.npmignore +2 -0
- package/components/input/number/bundles/index.umd.js +101 -0
- package/components/input/number/esm2022/index.mjs +5 -0
- package/components/input/number/esm2022/number.component.mjs +49 -0
- package/components/input/number/esm2022/number.props.mjs +35 -0
- package/components/input/number/esm2022/public_api.mjs +2 -0
- package/components/input/number/fesm2022/index.mjs +87 -0
- package/components/input/number/fesm2022/index.mjs.map +1 -0
- package/components/input/number/index.d.ts +5 -0
- package/components/input/{default/number → number}/number.component.d.ts +1 -1
- package/components/input/number/package.json +20 -0
- package/components/input/number/public_api.d.ts +1 -0
- package/components/input/radioset/.npmignore +2 -0
- package/components/input/radioset/bundles/index.umd.js +136 -0
- package/components/input/radioset/esm2022/index.mjs +5 -0
- package/components/input/radioset/esm2022/public_api.mjs +2 -0
- package/components/input/radioset/esm2022/radioset.component.mjs +84 -0
- package/components/input/radioset/esm2022/radioset.props.mjs +35 -0
- package/components/input/radioset/fesm2022/index.mjs +123 -0
- package/components/input/radioset/fesm2022/index.mjs.map +1 -0
- package/components/input/radioset/index.d.ts +5 -0
- package/components/input/radioset/package.json +20 -0
- package/components/input/radioset/public_api.d.ts +1 -0
- package/components/input/{default/radioset → radioset}/radioset.component.d.ts +1 -1
- package/components/input/rating/bundles/index.umd.js +49 -103
- package/components/input/rating/esm2022/rating.component.mjs +24 -79
- package/components/input/rating/fesm2022/index.mjs +25 -79
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/package.json +0 -3
- package/components/input/rating/rating.component.d.ts +1 -1
- package/components/input/select/.npmignore +2 -0
- package/components/input/select/bundles/index.umd.js +219 -0
- package/components/input/select/esm2022/index.mjs +5 -0
- package/components/input/select/esm2022/public_api.mjs +2 -0
- package/components/input/select/esm2022/select.component.mjs +166 -0
- package/components/input/select/esm2022/select.props.mjs +36 -0
- package/components/input/select/fesm2022/index.mjs +205 -0
- package/components/input/select/fesm2022/index.mjs.map +1 -0
- package/components/input/select/index.d.ts +5 -0
- package/components/input/select/package.json +20 -0
- package/components/input/select/public_api.d.ts +1 -0
- package/components/input/{default/select → select}/select.component.d.ts +1 -1
- package/components/input/slider/bundles/index.umd.js +44 -111
- package/components/input/slider/esm2022/slider.component.mjs +25 -95
- package/components/input/slider/esm2022/slider.props.mjs +1 -1
- package/components/input/slider/fesm2022/index.mjs +25 -93
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/package.json +0 -3
- package/components/input/slider/slider.component.d.ts +2 -2
- package/components/input/switch/.npmignore +2 -0
- package/components/input/switch/bundles/index.umd.js +204 -0
- package/components/input/switch/esm2022/index.mjs +5 -0
- package/components/input/switch/esm2022/public_api.mjs +2 -0
- package/components/input/switch/esm2022/switch.component.mjs +159 -0
- package/components/input/switch/esm2022/switch.props.mjs +28 -0
- package/components/input/switch/fesm2022/index.mjs +191 -0
- package/components/input/switch/fesm2022/index.mjs.map +1 -0
- package/components/input/switch/index.d.ts +5 -0
- package/components/input/switch/package.json +20 -0
- package/components/input/switch/public_api.d.ts +1 -0
- package/components/input/{default/switch → switch}/switch.component.d.ts +1 -1
- package/components/input/text/.npmignore +2 -0
- package/components/input/{default/text/base → text/base-input}/base-input.d.ts +1 -1
- package/components/input/text/bundles/index.umd.js +1070 -0
- package/components/input/text/esm2022/base-input/base-input.mjs +93 -0
- package/components/input/text/esm2022/index.mjs +5 -0
- package/components/input/text/esm2022/input-calendar/input-calendar.component.mjs +46 -0
- package/components/input/text/esm2022/input-calendar/input-calendar.props.mjs +30 -0
- package/components/input/text/esm2022/input-color/input-color.component.mjs +46 -0
- package/components/input/text/esm2022/input-color/input-color.props.mjs +27 -0
- package/components/input/text/esm2022/input-email/input-email.component.mjs +46 -0
- package/components/input/text/esm2022/input-email/input-email.props.mjs +29 -0
- package/components/input/text/esm2022/input-number/input-number.component.mjs +56 -0
- package/components/input/text/esm2022/input-number/input-number.props.mjs +32 -0
- package/components/input/text/esm2022/input-text/input-text.component.mjs +121 -0
- package/components/input/text/esm2022/input-text/input-text.props.mjs +46 -0
- package/components/input/text/esm2022/number-locale/number-locale.mjs +539 -0
- package/components/input/text/esm2022/public_api.mjs +8 -0
- package/components/input/text/fesm2022/index.mjs +1054 -0
- package/components/input/text/fesm2022/index.mjs.map +1 -0
- package/components/input/text/index.d.ts +5 -0
- package/components/input/{default/text/calendar → text/input-calendar}/input-calendar.component.d.ts +1 -1
- package/components/input/{default/text/color → text/input-color}/input-color.component.d.ts +1 -1
- package/components/input/{default/text/email → text/input-email}/input-email.component.d.ts +1 -1
- package/components/input/{default/text/number → text/input-number}/input-number.component.d.ts +1 -1
- package/components/input/{default/text/text → text/input-text}/input-text.component.d.ts +1 -1
- package/components/input/{default/text/locale → text/number-locale}/number-locale.d.ts +1 -1
- package/components/input/text/package.json +20 -0
- package/components/input/text/public_api.d.ts +7 -0
- package/components/input/textarea/.npmignore +2 -0
- package/components/input/textarea/bundles/index.umd.js +101 -0
- package/components/input/textarea/esm2022/index.mjs +5 -0
- package/components/input/textarea/esm2022/public_api.mjs +2 -0
- package/components/input/textarea/esm2022/textarea.component.mjs +53 -0
- package/components/input/textarea/esm2022/textarea.props.mjs +30 -0
- package/components/input/textarea/fesm2022/index.mjs +87 -0
- package/components/input/textarea/fesm2022/index.mjs.map +1 -0
- package/components/input/textarea/index.d.ts +5 -0
- package/components/input/textarea/package.json +20 -0
- package/components/input/textarea/public_api.d.ts +1 -0
- package/components/input/{default/textarea → textarea}/textarea.component.d.ts +1 -1
- package/components/navigation/breadcrumb/bundles/index.umd.js +37 -79
- package/components/navigation/breadcrumb/esm2022/breadcrumb.component.mjs +20 -64
- package/components/navigation/breadcrumb/fesm2022/index.mjs +21 -64
- package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
- package/components/navigation/breadcrumb/package.json +0 -3
- package/components/navigation/menu/bundles/index.umd.js +247 -442
- package/components/navigation/menu/esm2022/menu-adapator.component.mjs +14 -19
- package/components/navigation/menu/esm2022/menu-dropdown/menu-dropdown.component.mjs +13 -29
- package/components/navigation/menu/esm2022/menu-dropdown-item/menu-dropdown-item.component.mjs +43 -100
- package/components/navigation/menu/esm2022/menu.component.mjs +53 -104
- package/components/navigation/menu/esm2022/nav/nav-item/nav-item.directive.mjs +30 -37
- package/components/navigation/menu/esm2022/nav/nav.component.mjs +20 -88
- package/components/navigation/menu/esm2022/nav/navigation-control.directive.mjs +14 -14
- package/components/navigation/menu/fesm2022/index.mjs +174 -369
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/menu/menu-dropdown/menu-dropdown.component.d.ts +2 -3
- package/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +3 -3
- package/components/navigation/menu/package.json +0 -3
- package/components/navigation/navbar/bundles/index.umd.js +32 -83
- package/components/navigation/navbar/esm2022/navbar.component.mjs +20 -72
- package/components/navigation/navbar/fesm2022/index.mjs +20 -71
- package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
- package/components/navigation/navbar/package.json +0 -3
- package/components/navigation/popover/bundles/index.umd.js +31 -59
- package/components/navigation/popover/esm2022/popover.component.mjs +29 -58
- package/components/navigation/popover/fesm2022/index.mjs +31 -59
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/package.json +0 -3
- package/components/page/default/bundles/index.umd.js +109 -123
- package/components/page/default/esm2022/content/content.component.mjs +16 -25
- package/components/page/default/esm2022/layout.directive.mjs +21 -21
- package/components/page/default/esm2022/page-content/page-content.component.mjs +16 -23
- package/components/page/default/esm2022/page.directive.mjs +21 -21
- package/components/page/default/esm2022/router-outlet.directive.mjs +20 -20
- package/components/page/default/esm2022/spa-page.directive.mjs +21 -21
- package/components/page/default/fesm2022/index.mjs +111 -125
- package/components/page/default/fesm2022/index.mjs.map +1 -1
- package/components/page/default/package.json +0 -3
- package/components/page/footer/bundles/index.umd.js +20 -20
- package/components/page/footer/esm2022/footer.directive.mjs +21 -21
- package/components/page/footer/fesm2022/index.mjs +21 -21
- package/components/page/footer/fesm2022/index.mjs.map +1 -1
- package/components/page/footer/package.json +0 -3
- package/components/page/header/bundles/index.umd.js +19 -26
- package/components/page/header/esm2022/header.component.mjs +16 -24
- package/components/page/header/fesm2022/index.mjs +17 -24
- package/components/page/header/fesm2022/index.mjs.map +1 -1
- package/components/page/header/package.json +0 -3
- package/components/page/left-panel/bundles/index.umd.js +30 -30
- package/components/page/left-panel/esm2022/left-panel.directive.mjs +31 -31
- package/components/page/left-panel/fesm2022/index.mjs +31 -31
- package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/left-panel/package.json +0 -3
- package/components/page/right-panel/bundles/index.umd.js +23 -23
- package/components/page/right-panel/esm2022/right-panel.directive.mjs +24 -24
- package/components/page/right-panel/fesm2022/index.mjs +24 -24
- package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/right-panel/package.json +0 -3
- package/components/page/top-nav/bundles/index.umd.js +20 -20
- package/components/page/top-nav/esm2022/top-nav.directive.mjs +21 -21
- package/components/page/top-nav/fesm2022/index.mjs +21 -21
- package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
- package/components/page/top-nav/package.json +0 -3
- package/components/prefab/bundles/index.umd.js +41 -41
- package/components/prefab/esm2022/prefab-container/prefab-container.directive.mjs +20 -20
- package/components/prefab/esm2022/prefab.directive.mjs +23 -23
- package/components/prefab/fesm2022/index.mjs +42 -42
- package/components/prefab/fesm2022/index.mjs.map +1 -1
- package/components/prefab/package.json +0 -3
- package/core/bundles/index.umd.js +80 -61
- package/core/esm2022/services/constant.service.mjs +7 -7
- package/core/esm2022/services/custom-icons-loader.service.mjs +7 -7
- package/core/esm2022/services/field-type.service.mjs +7 -7
- package/core/esm2022/services/field-widget.service.mjs +7 -7
- package/core/esm2022/services/pagination.service.mjs +7 -7
- package/core/esm2022/services/script-loader.service.mjs +7 -7
- package/core/esm2022/services/state-persistence.service.mjs +7 -7
- package/core/esm2022/services/user-custom-pipe-manager.service.mjs +7 -7
- package/core/esm2022/services/utils.service.mjs +7 -7
- package/core/esm2022/services/viewport.service.mjs +7 -7
- package/core/esm2022/types/types.mjs +1 -1
- package/core/esm2022/utils/build-utils.mjs +21 -2
- package/core/fesm2022/index.mjs +80 -61
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/package.json +3 -6
- package/core/types/types.d.ts +2 -1
- package/http/bundles/index.umd.js +8 -8
- package/http/esm2022/http.service.mjs +9 -9
- package/http/fesm2022/index.mjs +8 -8
- package/http/fesm2022/index.mjs.map +1 -1
- package/http/package.json +2 -5
- package/locales/moment/ar-dz.js +8 -8
- package/locales/moment/ar-ly.js +8 -8
- package/locales/moment/ar-ps.js +123 -0
- package/locales/moment/ar.js +8 -8
- package/locales/moment/be.js +2 -2
- package/locales/moment/bs.js +14 -4
- package/locales/moment/ca.js +6 -6
- package/locales/moment/cs.js +5 -4
- package/locales/moment/cv.js +2 -2
- package/locales/moment/en-au.js +6 -6
- package/locales/moment/en-ca.js +6 -6
- package/locales/moment/en-gb.js +6 -6
- package/locales/moment/en-ie.js +6 -6
- package/locales/moment/en-il.js +6 -6
- package/locales/moment/en-in.js +6 -6
- package/locales/moment/en-nz.js +6 -6
- package/locales/moment/en-sg.js +6 -6
- package/locales/moment/it.js +4 -4
- package/locales/moment/ku-kmr.js +125 -0
- package/locales/moment/lt.js +2 -2
- package/locales/moment/me.js +2 -2
- package/locales/moment/nb.js +4 -4
- package/locales/moment/nl-be.js +1 -1
- package/locales/moment/nl.js +1 -1
- package/locales/moment/oc-lnc.js +6 -6
- package/locales/moment/ru.js +2 -2
- package/locales/moment/sv.js +6 -6
- package/locales/moment/tet.js +6 -6
- package/locales/moment/tlh.js +8 -8
- package/locales/moment/tzl.js +2 -2
- package/locales/moment/uk.js +4 -4
- package/locales/moment/x-pseudo.js +6 -6
- package/locales/moment-timezone/moment-timezone-with-data.js +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/oAuth/bundles/index.umd.js +5 -5
- package/oAuth/esm2022/oAuth.service.mjs +6 -6
- package/oAuth/fesm2022/index.mjs +5 -5
- package/oAuth/fesm2022/index.mjs.map +1 -1
- package/oAuth/package.json +2 -5
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +3162 -3100
- package/runtime/base/components/empty-component/empty-page.component.d.ts +1 -0
- package/runtime/base/esm2022/components/app-component/app.component.mjs +14 -95
- package/runtime/base/esm2022/components/app-spinner.component.mjs +34 -45
- package/runtime/base/esm2022/components/base-custom-widget.component.mjs +8 -7
- package/runtime/base/esm2022/components/base-layout.component.mjs +14 -21
- package/runtime/base/esm2022/components/base-page.component.mjs +12 -19
- package/runtime/base/esm2022/components/base-partial.component.mjs +9 -14
- package/runtime/base/esm2022/components/base-prefab.component.mjs +9 -14
- package/runtime/base/esm2022/components/base-spa-page.component.mjs +12 -19
- package/runtime/base/esm2022/components/custom-toaster.component.mjs +30 -52
- package/runtime/base/esm2022/components/empty-component/empty-page.component.mjs +33 -15
- package/runtime/base/esm2022/components/prefab-preview.component.mjs +19 -26
- package/runtime/base/esm2022/directives/accessroles.directive.mjs +17 -17
- package/runtime/base/esm2022/directives/prefab.directive.mjs +15 -15
- package/runtime/base/esm2022/guards/auth.guard.mjs +6 -6
- package/runtime/base/esm2022/guards/can-deactivate-page.guard.mjs +11 -11
- package/runtime/base/esm2022/guards/page-not-found.guard.mjs +6 -6
- package/runtime/base/esm2022/guards/role.guard.mjs +6 -6
- package/runtime/base/esm2022/overrides/wm_dom_renderer.mjs +12 -12
- package/runtime/base/esm2022/overrides/wm_shared_styles_host.mjs +14 -14
- package/runtime/base/esm2022/public_api.mjs +5 -2
- package/runtime/base/esm2022/resolves/app-before-load.resolve.mjs +22 -0
- package/runtime/base/esm2022/resolves/app-extension.resolve.mjs +6 -6
- package/runtime/base/esm2022/resolves/app-js.resolve.mjs +6 -6
- package/runtime/base/esm2022/resolves/app-variables.resolve.mjs +9 -9
- package/runtime/base/esm2022/resolves/i18n.resolve.mjs +6 -6
- package/runtime/base/esm2022/resolves/metadata.resolve.mjs +9 -9
- package/runtime/base/esm2022/resolves/security-config.resolve.mjs +9 -9
- package/runtime/base/esm2022/runtime-base.module.mjs +457 -316
- package/runtime/base/esm2022/services/app-defaults.service.mjs +6 -6
- package/runtime/base/esm2022/services/app.manager.service.mjs +25 -9
- package/runtime/base/esm2022/services/app.service.mjs +39 -18
- package/runtime/base/esm2022/services/dynamic-component-ref-provider.service.mjs +6 -6
- package/runtime/base/esm2022/services/http-interceptor.services.mjs +6 -6
- package/runtime/base/esm2022/services/i18n.service.mjs +37 -34
- package/runtime/base/esm2022/services/navigation.service.mjs +6 -6
- package/runtime/base/esm2022/services/pipe-provider.service.mjs +13 -13
- package/runtime/base/esm2022/services/pipe.service.mjs +10 -8
- package/runtime/base/esm2022/services/prefab-manager.service.mjs +6 -6
- package/runtime/base/esm2022/services/spinner.service.mjs +6 -6
- package/runtime/base/esm2022/services/toaster.service.mjs +6 -6
- package/runtime/base/esm2022/util/fragment-monitor.mjs +6 -6
- package/runtime/base/esm2022/util/utils.mjs +15 -1
- package/runtime/base/esm2022/util/wm-route-reuse-strategy.mjs +1 -1
- package/runtime/base/fesm2022/index.mjs +3145 -3071
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/package.json +2 -5
- package/runtime/base/public_api.d.ts +4 -1
- package/runtime/base/resolves/app-before-load.resolve.d.ts +11 -0
- package/runtime/base/runtime-base.module.d.ts +96 -59
- package/runtime/base/services/app.manager.service.d.ts +2 -1
- package/runtime/base/services/app.service.d.ts +3 -2
- package/runtime/base/services/i18n.service.d.ts +2 -1
- package/runtime/base/util/utils.d.ts +2 -1
- package/runtime/dynamic/app/app.config.d.ts +1 -1
- package/runtime/dynamic/app/services/app-variables-provider.service.d.ts +3 -1
- package/runtime/dynamic/bundles/index.umd.js +145 -114
- package/runtime/dynamic/esm2022/app/app.config.mjs +11 -10
- package/runtime/dynamic/esm2022/app/app.module.mjs +35 -5
- package/runtime/dynamic/esm2022/app/app.routes.mjs +2 -11
- package/runtime/dynamic/esm2022/app/components/page-wrapper.component.mjs +11 -16
- package/runtime/dynamic/esm2022/app/services/app-extension.service.mjs +9 -9
- package/runtime/dynamic/esm2022/app/services/app-js-provider.service.mjs +9 -9
- package/runtime/dynamic/esm2022/app/services/app-resource-manager.service.mjs +6 -6
- package/runtime/dynamic/esm2022/app/services/app-variables-provider.service.mjs +15 -11
- package/runtime/dynamic/esm2022/app/services/component-ref-provider.service.mjs +57 -8
- package/runtime/dynamic/esm2022/app/services/customwidget-config-provider.service.mjs +6 -6
- package/runtime/dynamic/esm2022/app/services/prefab-config-provider.service.mjs +6 -6
- package/runtime/dynamic/fesm2022/index.mjs +143 -88
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/runtime/dynamic/package.json +2 -5
- package/scripts/datatable/datatable.js +26 -5
- package/scripts/jquery-ui/ui/widgets/droppable.js +3 -3
- package/scripts/jquery-ui/ui/widgets/resizable.js +72 -19
- package/scripts/jquery-ui/ui/widgets/sortable.js +9 -16
- package/security/bundles/index.umd.js +5 -5
- package/security/esm2022/security.service.mjs +6 -6
- package/security/fesm2022/index.mjs +5 -5
- package/security/fesm2022/index.mjs.map +1 -1
- package/security/package.json +2 -5
- package/swipey/fesm2022/index.mjs.map +1 -1
- package/swipey/package.json +2 -5
- package/transpiler/build.d.ts +1 -1
- package/transpiler/bundles/index.umd.js +94 -56
- package/transpiler/esm2022/build.mjs +5 -2
- package/transpiler/esm2022/imports.mjs +92 -57
- package/transpiler/fesm2022/index.mjs +94 -56
- package/transpiler/fesm2022/index.mjs.map +1 -1
- package/transpiler/package.json +3 -6
- package/variables/bundles/index.umd.js +20 -10
- package/variables/constants/variables.constants.d.ts +9 -0
- package/variables/esm2022/constants/variables.constants.mjs +10 -1
- package/variables/esm2022/service/metadata-service/metadata.service.mjs +6 -6
- package/variables/esm2022/service/variables.service.mjs +6 -6
- package/variables/fesm2022/index.mjs +20 -11
- package/variables/fesm2022/index.mjs.map +1 -1
- package/variables/package.json +2 -5
- package/variables/service/variables.service.d.ts +1 -1
- package/build-task/esm2022/basic/default/anchor/anchor.build.mjs +0 -15
- package/build-task/esm2022/basic/default/audio/audio.build.mjs +0 -10
- package/build-task/esm2022/basic/default/html/html.build.mjs +0 -15
- package/build-task/esm2022/basic/default/icon/icon.build.mjs +0 -10
- package/build-task/esm2022/basic/default/iframe/iframe.build.mjs +0 -10
- package/build-task/esm2022/basic/default/label/label.build.mjs +0 -25
- package/build-task/esm2022/basic/default/picture/picture.build.mjs +0 -14
- package/build-task/esm2022/basic/default/spinner/spinner.build.mjs +0 -15
- package/build-task/esm2022/basic/default/video/video.build.mjs +0 -10
- package/components/base/components.module.d.ts +0 -25
- package/components/base/esm2022/components.module.mjs +0 -152
- package/components/basic/default/bundles/index.umd.js +0 -1036
- package/components/basic/default/esm2022/anchor/anchor.component.mjs +0 -198
- package/components/basic/default/esm2022/anchor/anchor.props.mjs +0 -27
- package/components/basic/default/esm2022/audio/audio.component.mjs +0 -59
- package/components/basic/default/esm2022/audio/audio.props.mjs +0 -19
- package/components/basic/default/esm2022/html/html.directive.mjs +0 -76
- package/components/basic/default/esm2022/html/html.props.mjs +0 -12
- package/components/basic/default/esm2022/icon/icon.component.mjs +0 -70
- package/components/basic/default/esm2022/icon/icon.props.mjs +0 -19
- package/components/basic/default/esm2022/iframe/iframe.component.mjs +0 -85
- package/components/basic/default/esm2022/iframe/iframe.props.mjs +0 -15
- package/components/basic/default/esm2022/label/label.directive.mjs +0 -71
- package/components/basic/default/esm2022/label/label.props.mjs +0 -17
- package/components/basic/default/esm2022/picture/picture.directive.mjs +0 -95
- package/components/basic/default/esm2022/picture/picture.props.mjs +0 -23
- package/components/basic/default/esm2022/public_api.mjs +0 -10
- package/components/basic/default/esm2022/spinner/spinner.component.mjs +0 -130
- package/components/basic/default/esm2022/spinner/spinner.props.mjs +0 -20
- package/components/basic/default/esm2022/video/video.component.mjs +0 -113
- package/components/basic/default/esm2022/video/video.props.mjs +0 -24
- package/components/basic/default/fesm2022/index.mjs +0 -1012
- package/components/basic/default/fesm2022/index.mjs.map +0 -1
- package/components/basic/default/public_api.d.ts +0 -9
- package/components/basic/progress/bundles/index.umd.js +0 -361
- package/components/basic/progress/esm2022/progress-bar/progress-bar.component.mjs +0 -154
- package/components/basic/progress/esm2022/progress-circle/progress-circle.component.mjs +0 -132
- package/components/basic/progress/esm2022/public_api.mjs +0 -3
- package/components/basic/progress/esm2022/utils.mjs +0 -25
- package/components/basic/progress/fesm2022/index.mjs +0 -344
- package/components/basic/progress/fesm2022/index.mjs.map +0 -1
- package/components/basic/progress/public_api.d.ts +0 -2
- package/components/input/default/bundles/index.umd.js +0 -3559
- package/components/input/default/esm2022/base-form-custom.component.mjs +0 -94
- package/components/input/default/esm2022/base-form.component.mjs +0 -110
- package/components/input/default/esm2022/button/button.component.mjs +0 -106
- package/components/input/default/esm2022/button/button.props.mjs +0 -26
- package/components/input/default/esm2022/button-group/button-group.directive.mjs +0 -51
- package/components/input/default/esm2022/button-group/button-group.props.mjs +0 -10
- package/components/input/default/esm2022/caption-position.directive.mjs +0 -172
- package/components/input/default/esm2022/checkbox/checkbox.component.mjs +0 -179
- package/components/input/default/esm2022/checkbox/checkbox.props.mjs +0 -27
- package/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +0 -268
- package/components/input/default/esm2022/checkboxset/checkboxset.props.mjs +0 -35
- package/components/input/default/esm2022/composite/composite.directive.mjs +0 -84
- package/components/input/default/esm2022/composite/composite.props.mjs +0 -10
- package/components/input/default/esm2022/dataset-aware-form.component.mjs +0 -307
- package/components/input/default/esm2022/number/number.component.mjs +0 -68
- package/components/input/default/esm2022/number/number.props.mjs +0 -35
- package/components/input/default/esm2022/public_api.mjs +0 -21
- package/components/input/default/esm2022/radioset/radioset.component.mjs +0 -251
- package/components/input/default/esm2022/radioset/radioset.props.mjs +0 -35
- package/components/input/default/esm2022/select/select.component.mjs +0 -230
- package/components/input/default/esm2022/select/select.props.mjs +0 -36
- package/components/input/default/esm2022/switch/switch.component.mjs +0 -227
- package/components/input/default/esm2022/switch/switch.props.mjs +0 -28
- package/components/input/default/esm2022/text/base/base-input.mjs +0 -93
- package/components/input/default/esm2022/text/calendar/input-calendar.component.mjs +0 -69
- package/components/input/default/esm2022/text/calendar/input-calendar.props.mjs +0 -30
- package/components/input/default/esm2022/text/color/input-color.component.mjs +0 -69
- package/components/input/default/esm2022/text/color/input-color.props.mjs +0 -27
- package/components/input/default/esm2022/text/email/input-email.component.mjs +0 -68
- package/components/input/default/esm2022/text/email/input-email.props.mjs +0 -29
- package/components/input/default/esm2022/text/locale/number-locale.mjs +0 -539
- package/components/input/default/esm2022/text/number/input-number.component.mjs +0 -79
- package/components/input/default/esm2022/text/number/input-number.props.mjs +0 -32
- package/components/input/default/esm2022/text/text/input-text.component.mjs +0 -145
- package/components/input/default/esm2022/text/text/input-text.props.mjs +0 -46
- package/components/input/default/esm2022/textarea/textarea.component.mjs +0 -85
- package/components/input/default/esm2022/textarea/textarea.props.mjs +0 -30
- package/components/input/default/fesm2022/index.mjs +0 -3529
- package/components/input/default/fesm2022/index.mjs.map +0 -1
- package/components/input/default/public_api.d.ts +0 -20
- package/components/input/epoch/bundles/index.umd.js +0 -3292
- package/components/input/epoch/esm2022/date/date.component.mjs +0 -376
- package/components/input/epoch/esm2022/date-time/date-time-picker.component.mjs +0 -473
- package/components/input/epoch/esm2022/date-time/date-time.component.mjs +0 -563
- package/components/input/epoch/esm2022/picker/picker.component.mjs +0 -184
- package/components/input/epoch/esm2022/public_api.mjs +0 -6
- package/components/input/epoch/esm2022/time/time.component.mjs +0 -432
- package/components/input/epoch/fesm2022/index.mjs +0 -3280
- package/components/input/epoch/fesm2022/index.mjs.map +0 -1
- package/components/input/epoch/public_api.d.ts +0 -5
- /package/build-task/basic/{default/anchor → anchor}/anchor.build.d.ts +0 -0
- /package/build-task/basic/{default/audio → audio}/audio.build.d.ts +0 -0
- /package/build-task/basic/{default/html → html}/html.build.d.ts +0 -0
- /package/build-task/basic/{default/icon → icon}/icon.build.d.ts +0 -0
- /package/build-task/basic/{default/iframe → iframe}/iframe.build.d.ts +0 -0
- /package/build-task/basic/{default/label → label}/label.build.d.ts +0 -0
- /package/build-task/basic/{default/picture → picture}/picture.build.d.ts +0 -0
- /package/build-task/basic/{default/spinner → spinner}/spinner.build.d.ts +0 -0
- /package/build-task/basic/{default/video → video}/video.build.d.ts +0 -0
- /package/components/basic/{default → anchor}/.npmignore +0 -0
- /package/components/basic/{default/anchor → anchor}/anchor.component.d.ts +0 -0
- /package/components/basic/{default/anchor → anchor}/anchor.props.d.ts +0 -0
- /package/components/basic/{progress → audio}/.npmignore +0 -0
- /package/components/basic/{default/audio → audio}/audio.component.d.ts +0 -0
- /package/components/basic/{default/audio → audio}/audio.props.d.ts +0 -0
- /package/components/{input/default → basic/html}/.npmignore +0 -0
- /package/components/basic/{default/html → html}/html.directive.d.ts +0 -0
- /package/components/basic/{default/html → html}/html.props.d.ts +0 -0
- /package/components/{input/epoch → basic/icon}/.npmignore +0 -0
- /package/components/basic/{default/icon → icon}/icon.component.d.ts +0 -0
- /package/components/basic/{default/icon → icon}/icon.props.d.ts +0 -0
- /package/components/basic/{default/iframe → iframe}/iframe.component.d.ts +0 -0
- /package/components/basic/{default/iframe → iframe}/iframe.props.d.ts +0 -0
- /package/components/basic/{default/label → label}/label.props.d.ts +0 -0
- /package/components/basic/{default/picture → picture}/picture.directive.d.ts +0 -0
- /package/components/basic/{default/picture → picture}/picture.props.d.ts +0 -0
- /package/components/basic/progress/{utils.d.ts → progress-utils/progress-utils.d.ts} +0 -0
- /package/components/basic/{default/spinner → spinner}/spinner.component.d.ts +0 -0
- /package/components/basic/{default/spinner → spinner}/spinner.props.d.ts +0 -0
- /package/components/basic/{default/video → video}/video.component.d.ts +0 -0
- /package/components/basic/{default/video → video}/video.props.d.ts +0 -0
- /package/components/input/{default → base-form}/base-form.component.d.ts +0 -0
- /package/components/input/{default/button → button}/button.component.d.ts +0 -0
- /package/components/input/{default/button → button}/button.props.d.ts +0 -0
- /package/components/input/{default/button-group → button-group}/button-group.directive.d.ts +0 -0
- /package/components/input/{default/button-group → button-group}/button-group.props.d.ts +0 -0
- /package/components/input/{default → caption-position}/caption-position.directive.d.ts +0 -0
- /package/components/input/{default/checkbox → checkbox}/checkbox.props.d.ts +0 -0
- /package/components/input/{default/checkboxset → checkboxset}/checkboxset.props.d.ts +0 -0
- /package/components/input/{default/composite → composite}/composite.directive.d.ts +0 -0
- /package/components/input/{default/composite → composite}/composite.props.d.ts +0 -0
- /package/components/input/epoch/{date-time → date-time-picker}/date-time-picker.component.d.ts +0 -0
- /package/components/input/{default/number → number}/number.props.d.ts +0 -0
- /package/components/input/{default/radioset → radioset}/radioset.props.d.ts +0 -0
- /package/components/input/{default/select → select}/select.props.d.ts +0 -0
- /package/components/input/{default/switch → switch}/switch.props.d.ts +0 -0
- /package/components/input/{default/text/calendar → text/input-calendar}/input-calendar.props.d.ts +0 -0
- /package/components/input/{default/text/color → text/input-color}/input-color.props.d.ts +0 -0
- /package/components/input/{default/text/email → text/input-email}/input-email.props.d.ts +0 -0
- /package/components/input/{default/text/number → text/input-number}/input-number.props.d.ts +0 -0
- /package/components/input/{default/text/text → text/input-text}/input-text.props.d.ts +0 -0
- /package/components/input/{default/textarea → textarea}/textarea.props.d.ts +0 -0
|
@@ -1,3292 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@wm/components/base'), require('angular-imask'), require('@angular/core'), require('@angular/forms'), require('ngx-bootstrap/datepicker'), require('@wm/core'), require('@angular/common'), require('ngx-bootstrap/dropdown'), require('ngx-bootstrap/timepicker'), require('@wm/components/input'), require('ngx-bootstrap/modal'), require('lodash-es'), require('moment'), require('imask')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@wm/components/base', 'angular-imask', '@angular/core', '@angular/forms', 'ngx-bootstrap/datepicker', '@wm/core', '@angular/common', 'ngx-bootstrap/dropdown', 'ngx-bootstrap/timepicker', '@wm/components/input', 'ngx-bootstrap/modal', 'lodash-es', 'moment', 'imask'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.input = global.wm.components.input || {}, global.wm.components.input.epoch = {}), global.wm.components.base, global.angularIMask, global.ng.core, global.ng.forms, global.datepicker, global.wm.core, global.ng.common, global.dropdown, global.timepicker, global.wm.components.input, global.modal, global._, global.momentLib, global.IMask));
|
|
5
|
-
})(this, (function (exports, base, i2$1, i0, i2$2, i2, i1$1, i6, i3, i5, input, i1, lodashEs, momentLib, IMask) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespaceDefault(e) {
|
|
8
|
-
var n = Object.create(null);
|
|
9
|
-
if (e) {
|
|
10
|
-
Object.keys(e).forEach(function (k) {
|
|
11
|
-
if (k !== 'default') {
|
|
12
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return e[k]; }
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
n.default = e;
|
|
21
|
-
return Object.freeze(n);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var i2$1__namespace = /*#__PURE__*/_interopNamespaceDefault(i2$1);
|
|
25
|
-
var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);
|
|
26
|
-
var i2$2__namespace = /*#__PURE__*/_interopNamespaceDefault(i2$2);
|
|
27
|
-
var i2__namespace = /*#__PURE__*/_interopNamespaceDefault(i2);
|
|
28
|
-
var i1$1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1$1);
|
|
29
|
-
var i6__namespace = /*#__PURE__*/_interopNamespaceDefault(i6);
|
|
30
|
-
var i3__namespace = /*#__PURE__*/_interopNamespaceDefault(i3);
|
|
31
|
-
var i5__namespace = /*#__PURE__*/_interopNamespaceDefault(i5);
|
|
32
|
-
var i1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1);
|
|
33
|
-
var momentLib__namespace = /*#__PURE__*/_interopNamespaceDefault(momentLib);
|
|
34
|
-
|
|
35
|
-
const _c0$4 = ["*"];
|
|
36
|
-
function PickerComponent_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
37
|
-
i0__namespace.ɵɵelementStart(0, "div", 3);
|
|
38
|
-
i0__namespace.ɵɵtext(1);
|
|
39
|
-
i0__namespace.ɵɵelementEnd();
|
|
40
|
-
} if (rf & 2) {
|
|
41
|
-
const option_r1 = ctx.$implicit;
|
|
42
|
-
i0__namespace.ɵɵadvance();
|
|
43
|
-
i0__namespace.ɵɵtextInterpolate1(" ", option_r1.label, " ");
|
|
44
|
-
} }
|
|
45
|
-
class PickerGroupComponent {
|
|
46
|
-
static { this.ɵfac = function PickerGroupComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PickerGroupComponent)(); }; }
|
|
47
|
-
static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: PickerGroupComponent, selectors: [["wm-pickergroup"]], standalone: true, features: [i0__namespace.ɵɵStandaloneFeature], ngContentSelectors: _c0$4, decls: 2, vars: 0, consts: [[1, "app-picker-group"]], template: function PickerGroupComponent_Template(rf, ctx) { if (rf & 1) {
|
|
48
|
-
i0__namespace.ɵɵprojectionDef();
|
|
49
|
-
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
50
|
-
i0__namespace.ɵɵprojection(1);
|
|
51
|
-
i0__namespace.ɵɵelementEnd();
|
|
52
|
-
} }, dependencies: [base.WmComponentsModule], encapsulation: 2 }); }
|
|
53
|
-
}
|
|
54
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PickerGroupComponent, [{
|
|
55
|
-
type: i0.Component,
|
|
56
|
-
args: [{
|
|
57
|
-
standalone: true,
|
|
58
|
-
imports: [base.WmComponentsModule],
|
|
59
|
-
selector: 'wm-pickergroup',
|
|
60
|
-
template: `
|
|
61
|
-
<div class="app-picker-group">
|
|
62
|
-
<ng-content></ng-content>
|
|
63
|
-
</div>
|
|
64
|
-
`
|
|
65
|
-
}]
|
|
66
|
-
}], null, null); })();
|
|
67
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(PickerGroupComponent, { className: "PickerGroupComponent", filePath: "picker/picker.component.ts", lineNumber: 16 }); })();
|
|
68
|
-
class PickerComponent {
|
|
69
|
-
constructor(inj) {
|
|
70
|
-
this.inj = inj;
|
|
71
|
-
this.change = new i0.EventEmitter();
|
|
72
|
-
this._selectedIndex = 0;
|
|
73
|
-
this._options = [];
|
|
74
|
-
this.noOfEmptyElements = 2;
|
|
75
|
-
this.$el = $(inj.get(i0.ElementRef).nativeElement);
|
|
76
|
-
}
|
|
77
|
-
set selectedValue(s) {
|
|
78
|
-
this._selectedValue = s;
|
|
79
|
-
this.reRender();
|
|
80
|
-
}
|
|
81
|
-
get selectedValue() {
|
|
82
|
-
return this._selectedValue;
|
|
83
|
-
}
|
|
84
|
-
set options(opts) {
|
|
85
|
-
this._options = opts.map(o => ({
|
|
86
|
-
label: o.label,
|
|
87
|
-
value: o.value !== undefined ? o.value : o.label
|
|
88
|
-
}));
|
|
89
|
-
this.reRender();
|
|
90
|
-
}
|
|
91
|
-
get options() {
|
|
92
|
-
return this._options;
|
|
93
|
-
}
|
|
94
|
-
reRender() {
|
|
95
|
-
this._selectedIndex = this.options.findIndex(o => o.value === this.selectedValue);
|
|
96
|
-
this.pickerAnimator?.select(this._selectedIndex + this.noOfEmptyElements);
|
|
97
|
-
}
|
|
98
|
-
set selectedIndex(i) {
|
|
99
|
-
this._selectedIndex = i;
|
|
100
|
-
this._selectedValue = this.options[i].value;
|
|
101
|
-
this.change.emit(this.options[i]);
|
|
102
|
-
}
|
|
103
|
-
get selectedIndex() {
|
|
104
|
-
return this._selectedIndex;
|
|
105
|
-
}
|
|
106
|
-
ngAfterViewInit() {
|
|
107
|
-
this.pickerAnimator = new PickerAnimator(this);
|
|
108
|
-
}
|
|
109
|
-
static { this.ɵfac = function PickerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PickerComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector)); }; }
|
|
110
|
-
static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: PickerComponent, selectors: [["wm-picker"]], inputs: { selectedValue: "selectedValue", options: "options" }, outputs: { change: "change" }, standalone: true, features: [i0__namespace.ɵɵStandaloneFeature], decls: 13, vars: 0, consts: [[1, "app-picker"], [1, "app-picker-option-container"], [1, "app-picker-option", "app-picker-empty-option"], [1, "app-picker-option"], [1, "app-picker-ruler"]], template: function PickerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
-
i0__namespace.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
112
|
-
i0__namespace.ɵɵtext(3, "E");
|
|
113
|
-
i0__namespace.ɵɵelementEnd();
|
|
114
|
-
i0__namespace.ɵɵelementStart(4, "div", 2);
|
|
115
|
-
i0__namespace.ɵɵtext(5, "E");
|
|
116
|
-
i0__namespace.ɵɵelementEnd();
|
|
117
|
-
i0__namespace.ɵɵrepeaterCreate(6, PickerComponent_For_7_Template, 2, 1, "div", 3, i0__namespace.ɵɵrepeaterTrackByIdentity);
|
|
118
|
-
i0__namespace.ɵɵelementStart(8, "div", 2);
|
|
119
|
-
i0__namespace.ɵɵtext(9, "E");
|
|
120
|
-
i0__namespace.ɵɵelementEnd();
|
|
121
|
-
i0__namespace.ɵɵelementStart(10, "div", 2);
|
|
122
|
-
i0__namespace.ɵɵtext(11, "E");
|
|
123
|
-
i0__namespace.ɵɵelementEnd()();
|
|
124
|
-
i0__namespace.ɵɵelement(12, "div", 4);
|
|
125
|
-
i0__namespace.ɵɵelementEnd();
|
|
126
|
-
} if (rf & 2) {
|
|
127
|
-
i0__namespace.ɵɵadvance(6);
|
|
128
|
-
i0__namespace.ɵɵrepeater(ctx.options);
|
|
129
|
-
} }, encapsulation: 2 }); }
|
|
130
|
-
}
|
|
131
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PickerComponent, [{
|
|
132
|
-
type: i0.Component,
|
|
133
|
-
args: [{
|
|
134
|
-
selector: 'wm-picker',
|
|
135
|
-
standalone: true,
|
|
136
|
-
template: `
|
|
137
|
-
<div class="app-picker">
|
|
138
|
-
<div class="app-picker-option-container">
|
|
139
|
-
<div class="app-picker-option app-picker-empty-option">E</div>
|
|
140
|
-
<div class="app-picker-option app-picker-empty-option">E</div>
|
|
141
|
-
@for (option of options; track option; let i = $index) {
|
|
142
|
-
<div class="app-picker-option">
|
|
143
|
-
{{option.label}}
|
|
144
|
-
</div>
|
|
145
|
-
}
|
|
146
|
-
<div class="app-picker-option app-picker-empty-option">E</div>
|
|
147
|
-
<div class="app-picker-option app-picker-empty-option">E</div>
|
|
148
|
-
</div>
|
|
149
|
-
<div class="app-picker-ruler"></div>
|
|
150
|
-
</div>
|
|
151
|
-
`
|
|
152
|
-
}]
|
|
153
|
-
}], () => [{ type: i0__namespace.Injector }], { change: [{
|
|
154
|
-
type: i0.Output
|
|
155
|
-
}], selectedValue: [{
|
|
156
|
-
type: i0.Input
|
|
157
|
-
}], options: [{
|
|
158
|
-
type: i0.Input
|
|
159
|
-
}] }); })();
|
|
160
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(PickerComponent, { className: "PickerComponent", filePath: "picker/picker.component.ts", lineNumber: 40 }); })();
|
|
161
|
-
class PickerAnimator {
|
|
162
|
-
constructor(picker) {
|
|
163
|
-
this.picker = picker;
|
|
164
|
-
let lastSelectedIndex = picker.selectedIndex + picker.noOfEmptyElements;
|
|
165
|
-
const computeIndex = (d) => lastSelectedIndex + Math.floor(d / 16);
|
|
166
|
-
this.select(lastSelectedIndex);
|
|
167
|
-
this.getElement().swipey({
|
|
168
|
-
'direction': $.fn.swipey.DIRECTIONS.VERTICAL,
|
|
169
|
-
'threshold': 10,
|
|
170
|
-
'target': picker.$el,
|
|
171
|
-
'onSwipe': (e, data) => {
|
|
172
|
-
this.select(computeIndex(-1 * data.length));
|
|
173
|
-
},
|
|
174
|
-
'onSwipeEnd': (e, data) => {
|
|
175
|
-
const nextSelectedIndex = computeIndex(-1 * data.length);
|
|
176
|
-
this.select(nextSelectedIndex);
|
|
177
|
-
lastSelectedIndex = picker.selectedIndex + picker.noOfEmptyElements;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
getElement() {
|
|
182
|
-
return this.picker.$el.find('.app-picker-option-container:first');
|
|
183
|
-
}
|
|
184
|
-
getOptionElements() {
|
|
185
|
-
return this.getElement().find('.app-picker-option');
|
|
186
|
-
}
|
|
187
|
-
select(selectedIndex) {
|
|
188
|
-
const options = this.getOptionElements();
|
|
189
|
-
if (selectedIndex < this.picker.noOfEmptyElements
|
|
190
|
-
|| selectedIndex >= options.length - this.picker.noOfEmptyElements) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
this.getElement()
|
|
194
|
-
.find('.app-picker-option.app-picker-option-selected')
|
|
195
|
-
.removeClass('app-picker-option-selected');
|
|
196
|
-
options.eq(selectedIndex).addClass('app-picker-option-selected');
|
|
197
|
-
this.picker.selectedIndex = selectedIndex - this.picker.noOfEmptyElements;
|
|
198
|
-
const minIndex = selectedIndex - this.picker.noOfEmptyElements;
|
|
199
|
-
const maxIndex = selectedIndex + this.picker.noOfEmptyElements;
|
|
200
|
-
options.each((i, e) => {
|
|
201
|
-
if (i >= minIndex && i <= maxIndex) {
|
|
202
|
-
const rotation = (i - selectedIndex) * 30;
|
|
203
|
-
const opacity = 1 - Math.abs(i - selectedIndex) * 0.3;
|
|
204
|
-
$(e).css({
|
|
205
|
-
transform: 'perspective(500px) rotateX(' + rotation + 'deg)',
|
|
206
|
-
opacity: opacity
|
|
207
|
-
}).show();
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
$(e).hide();
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
const _c0$3 = ["datetimepickerTemplate"];
|
|
217
|
-
function DateTimePickerComponent_ng_template_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
218
|
-
const _r2 = i0__namespace.ɵɵgetCurrentView();
|
|
219
|
-
i0__namespace.ɵɵelementStart(0, "bs-datepicker-inline", 11);
|
|
220
|
-
i0__namespace.ɵɵlistener("bsValueChange", function DateTimePickerComponent_ng_template_0_Conditional_3_Template_bs_datepicker_inline_bsValueChange_0_listener($event) { i0__namespace.ɵɵrestoreView(_r2); const ctx_r2 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r2.onDateUpdate($event)); });
|
|
221
|
-
i0__namespace.ɵɵelementEnd();
|
|
222
|
-
} if (rf & 2) {
|
|
223
|
-
const ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
224
|
-
i0__namespace.ɵɵproperty("bsConfig", ctx_r2.bsDatepickerConfig)("datesDisabled", ctx_r2.excludedDatesToDisable)("bsValue", ctx_r2.changedValue);
|
|
225
|
-
} }
|
|
226
|
-
function DateTimePickerComponent_ng_template_0_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
227
|
-
const _r4 = i0__namespace.ɵɵgetCurrentView();
|
|
228
|
-
i0__namespace.ɵɵelementStart(0, "wm-timepicker", 12);
|
|
229
|
-
i0__namespace.ɵɵlistener("change", function DateTimePickerComponent_ng_template_0_Conditional_4_Template_wm_timepicker_change_0_listener($event) { i0__namespace.ɵɵrestoreView(_r4); const ctx_r2 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r2.onTimeUpdate($event)); });
|
|
230
|
-
i0__namespace.ɵɵelementEnd();
|
|
231
|
-
} if (rf & 2) {
|
|
232
|
-
const ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
233
|
-
i0__namespace.ɵɵproperty("value", ctx_r2.changedValue)("min", ctx_r2.minTime)("max", ctx_r2.maxTime);
|
|
234
|
-
} }
|
|
235
|
-
function DateTimePickerComponent_ng_template_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
236
|
-
const _r5 = i0__namespace.ɵɵgetCurrentView();
|
|
237
|
-
i0__namespace.ɵɵelementStart(0, "button", 13);
|
|
238
|
-
i0__namespace.ɵɵlistener("click", function DateTimePickerComponent_ng_template_0_Conditional_8_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r5); const ctx_r2 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r2.setToday()); });
|
|
239
|
-
i0__namespace.ɵɵtext(1);
|
|
240
|
-
i0__namespace.ɵɵelementEnd();
|
|
241
|
-
} if (rf & 2) {
|
|
242
|
-
const ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
243
|
-
i0__namespace.ɵɵadvance();
|
|
244
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r2.appLocale.LABEL_TODAY_DATE || "Today");
|
|
245
|
-
} }
|
|
246
|
-
function DateTimePickerComponent_ng_template_0_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
247
|
-
const _r6 = i0__namespace.ɵɵgetCurrentView();
|
|
248
|
-
i0__namespace.ɵɵelementStart(0, "button", 14);
|
|
249
|
-
i0__namespace.ɵɵlistener("click", function DateTimePickerComponent_ng_template_0_Conditional_9_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r6); const ctx_r2 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r2.onOkClick()); });
|
|
250
|
-
i0__namespace.ɵɵtext(1);
|
|
251
|
-
i0__namespace.ɵɵelementEnd();
|
|
252
|
-
} if (rf & 2) {
|
|
253
|
-
const ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
254
|
-
i0__namespace.ɵɵadvance();
|
|
255
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r2.appLocale.LABEL_OK || "Ok");
|
|
256
|
-
} }
|
|
257
|
-
function DateTimePickerComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
258
|
-
const _r1 = i0__namespace.ɵɵgetCurrentView();
|
|
259
|
-
i0__namespace.ɵɵelementStart(0, "div", 1)(1, "div", 2);
|
|
260
|
-
i0__namespace.ɵɵelement(2, "div", 3);
|
|
261
|
-
i0__namespace.ɵɵtemplate(3, DateTimePickerComponent_ng_template_0_Conditional_3_Template, 1, 3, "bs-datepicker-inline", 4)(4, DateTimePickerComponent_ng_template_0_Conditional_4_Template, 1, 3, "wm-timepicker", 5);
|
|
262
|
-
i0__namespace.ɵɵelementStart(5, "span", 6);
|
|
263
|
-
i0__namespace.ɵɵtext(6);
|
|
264
|
-
i0__namespace.ɵɵelementEnd()();
|
|
265
|
-
i0__namespace.ɵɵelementStart(7, "div", 7);
|
|
266
|
-
i0__namespace.ɵɵtemplate(8, DateTimePickerComponent_ng_template_0_Conditional_8_Template, 2, 1, "button", 8)(9, DateTimePickerComponent_ng_template_0_Conditional_9_Template, 2, 1, "button", 9);
|
|
267
|
-
i0__namespace.ɵɵelementStart(10, "button", 10);
|
|
268
|
-
i0__namespace.ɵɵlistener("click", function DateTimePickerComponent_ng_template_0_Template_button_click_10_listener() { i0__namespace.ɵɵrestoreView(_r1); const ctx_r2 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r2.clear()); });
|
|
269
|
-
i0__namespace.ɵɵtext(11);
|
|
270
|
-
i0__namespace.ɵɵelementEnd()()();
|
|
271
|
-
} if (rf & 2) {
|
|
272
|
-
const ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
273
|
-
i0__namespace.ɵɵadvance(3);
|
|
274
|
-
i0__namespace.ɵɵconditional(ctx_r2.mode === "DATE_TIME" || ctx_r2.mode === "DATE" ? 3 : -1);
|
|
275
|
-
i0__namespace.ɵɵadvance();
|
|
276
|
-
i0__namespace.ɵɵconditional(ctx_r2.mode === "DATE_TIME" || ctx_r2.mode === "TIME" ? 4 : -1);
|
|
277
|
-
i0__namespace.ɵɵadvance(2);
|
|
278
|
-
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.getDateLabel(), " ");
|
|
279
|
-
i0__namespace.ɵɵadvance(2);
|
|
280
|
-
i0__namespace.ɵɵconditional(ctx_r2.mode === "DATE_TIME" || ctx_r2.mode === "DATE" ? 8 : -1);
|
|
281
|
-
i0__namespace.ɵɵadvance();
|
|
282
|
-
i0__namespace.ɵɵconditional(ctx_r2.mode === "DATE_TIME" || ctx_r2.mode === "TIME" ? 9 : -1);
|
|
283
|
-
i0__namespace.ɵɵadvance(2);
|
|
284
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r2.appLocale.LABEL_CLEAR_DATE || "Clear");
|
|
285
|
-
} }
|
|
286
|
-
const moment$4 = momentLib__namespace.default || window['moment'];
|
|
287
|
-
class DateTimePickerComponent {
|
|
288
|
-
constructor(inj, bsModalService) {
|
|
289
|
-
this.inj = inj;
|
|
290
|
-
this.bsModalService = bsModalService;
|
|
291
|
-
this.isDateOpen = true;
|
|
292
|
-
this.isTimeOpen = false;
|
|
293
|
-
this.mode = 'DATE_TIME';
|
|
294
|
-
this.placement = 'MODAL';
|
|
295
|
-
this.change = new i0.EventEmitter();
|
|
296
|
-
this._value = new Date();
|
|
297
|
-
this.changedValue = null;
|
|
298
|
-
this.appLocale = inj.get(i1$1.App).appLocale || {};
|
|
299
|
-
}
|
|
300
|
-
set value(d) {
|
|
301
|
-
d = d || new Date();
|
|
302
|
-
this._value = d;
|
|
303
|
-
this.changedValue = d;
|
|
304
|
-
}
|
|
305
|
-
set bsDatepickerConfig(config) {
|
|
306
|
-
this._bsDatepickerConfig = config;
|
|
307
|
-
this._bsDatepickerConfig.showClearButton = false;
|
|
308
|
-
this._bsDatepickerConfig.showTodayButton = false;
|
|
309
|
-
}
|
|
310
|
-
set excludedDaysToDisable(v) {
|
|
311
|
-
this._bsDatepickerConfig.daysDisabled = v;
|
|
312
|
-
}
|
|
313
|
-
get bsDatepickerConfig() {
|
|
314
|
-
return this._bsDatepickerConfig;
|
|
315
|
-
}
|
|
316
|
-
set displayFormat(format) {
|
|
317
|
-
if (format) {
|
|
318
|
-
this._displayFormat = format.replace(/y/g, "Y").replace(/d/g, "D").replace("a", "A");
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
validateSelectedDate() {
|
|
322
|
-
if (!this.changedValue) {
|
|
323
|
-
return true;
|
|
324
|
-
}
|
|
325
|
-
const cd = moment$4(this.changedValue);
|
|
326
|
-
const minDate = this._bsDatepickerConfig?.minDate;
|
|
327
|
-
const maxDate = this._bsDatepickerConfig?.maxDate;
|
|
328
|
-
if (minDate
|
|
329
|
-
&& ((this.mode === 'DATE'
|
|
330
|
-
&& moment$4(minDate).startOf('day').toDate() > this.changedValue)
|
|
331
|
-
|| (this.mode !== 'DATE'
|
|
332
|
-
&& minDate > this.changedValue))) {
|
|
333
|
-
return false;
|
|
334
|
-
}
|
|
335
|
-
if (maxDate
|
|
336
|
-
&& ((this.mode === 'DATE'
|
|
337
|
-
&& moment$4(maxDate).endOf('day').toDate() < this.changedValue)
|
|
338
|
-
|| (this.mode !== 'DATE'
|
|
339
|
-
&& maxDate < this.changedValue))) {
|
|
340
|
-
return false;
|
|
341
|
-
}
|
|
342
|
-
if (this._bsDatepickerConfig?.daysDisabled?.indexOf(cd.day()) >= 0) {
|
|
343
|
-
return false;
|
|
344
|
-
}
|
|
345
|
-
const cdSt = cd.startOf('day').toDate().getTime();
|
|
346
|
-
if (this.excludedDatesToDisable?.find(d => d.getTime() === cdSt)) {
|
|
347
|
-
return false;
|
|
348
|
-
}
|
|
349
|
-
return true;
|
|
350
|
-
}
|
|
351
|
-
get displayFormat() {
|
|
352
|
-
if (this._displayFormat) {
|
|
353
|
-
return this._displayFormat;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* This method is used to highlight the current date
|
|
358
|
-
*/
|
|
359
|
-
hightlightToday() {
|
|
360
|
-
const toDay = new Date().getDate().toString();
|
|
361
|
-
lodashEs.filter($(`body > modal-container .date-picker-modal span:contains(${toDay})`)
|
|
362
|
-
.not('.is-other-month,.current-date'), (obj) => {
|
|
363
|
-
if ($(obj).text() === toDay) {
|
|
364
|
-
$(obj).addClass('current-date text-info');
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
hideOnClick() {
|
|
369
|
-
$('body>modal-container .date-picker-modal .app-datetime-picker')
|
|
370
|
-
.click(($event) => $event.stopPropagation());
|
|
371
|
-
$('body>modal-container .date-picker-modal').click(() => this.onCancelClick());
|
|
372
|
-
}
|
|
373
|
-
getDateLabel() {
|
|
374
|
-
return moment$4(this.changedValue).format(this.displayFormat);
|
|
375
|
-
}
|
|
376
|
-
openDatePicker() {
|
|
377
|
-
this.isTimeOpen = false;
|
|
378
|
-
this.isDateOpen = true;
|
|
379
|
-
}
|
|
380
|
-
openTimePicker() {
|
|
381
|
-
this.isTimeOpen = true;
|
|
382
|
-
this.isDateOpen = false;
|
|
383
|
-
}
|
|
384
|
-
onDateUpdate(newVal) {
|
|
385
|
-
const oldVal = this.changedValue;
|
|
386
|
-
if (this.mode === 'DATE') {
|
|
387
|
-
newVal.setHours(0);
|
|
388
|
-
newVal.setMinutes(0);
|
|
389
|
-
newVal.setSeconds(0);
|
|
390
|
-
newVal.setMilliseconds(0);
|
|
391
|
-
}
|
|
392
|
-
else if (oldVal && newVal) {
|
|
393
|
-
newVal.setHours(oldVal.getHours());
|
|
394
|
-
newVal.setMinutes(oldVal.getMinutes());
|
|
395
|
-
newVal.setSeconds(oldVal.getSeconds());
|
|
396
|
-
newVal.setMilliseconds(oldVal.getMilliseconds());
|
|
397
|
-
}
|
|
398
|
-
this.changedValue = newVal;
|
|
399
|
-
if (this.mode === 'DATE'
|
|
400
|
-
&& oldVal !== newVal
|
|
401
|
-
&& this.validateSelectedDate()) {
|
|
402
|
-
this.onOkClick();
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
onTimeUpdate(newVal) {
|
|
406
|
-
this.changedValue = newVal;
|
|
407
|
-
}
|
|
408
|
-
show() {
|
|
409
|
-
this.reset();
|
|
410
|
-
this.modalRef = this.bsModalService.show(this.datetimepickerTemplate, {
|
|
411
|
-
animated: true,
|
|
412
|
-
backdrop: 'static',
|
|
413
|
-
class: 'date-picker-modal modal-dialog-centered'
|
|
414
|
-
});
|
|
415
|
-
setTimeout(() => { this.hideOnClick(); }, 500);
|
|
416
|
-
}
|
|
417
|
-
clear() {
|
|
418
|
-
this.changedValue = null;
|
|
419
|
-
this.triggerChange();
|
|
420
|
-
this.hideModal();
|
|
421
|
-
}
|
|
422
|
-
setToday() {
|
|
423
|
-
const today = moment$4().startOf('day').toDate();
|
|
424
|
-
this.onDateUpdate(today);
|
|
425
|
-
}
|
|
426
|
-
reset() {
|
|
427
|
-
this.changedValue = this._value;
|
|
428
|
-
}
|
|
429
|
-
hideModal() {
|
|
430
|
-
if (this.modalRef?.id) {
|
|
431
|
-
this.bsModalService.hide(this.modalRef.id);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
onCancelClick() {
|
|
435
|
-
this.changedValue = this._value;
|
|
436
|
-
this.hideModal();
|
|
437
|
-
}
|
|
438
|
-
onOkClick() {
|
|
439
|
-
if (this.validateSelectedDate()) {
|
|
440
|
-
this.triggerChange();
|
|
441
|
-
}
|
|
442
|
-
this.hideModal();
|
|
443
|
-
}
|
|
444
|
-
triggerChange() {
|
|
445
|
-
if (this.value !== this.changedValue) {
|
|
446
|
-
this.change.emit(this.changedValue);
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
ngAfterViewInit() {
|
|
450
|
-
}
|
|
451
|
-
ngOnDestroy() {
|
|
452
|
-
this.hideModal();
|
|
453
|
-
}
|
|
454
|
-
static { this.ɵfac = function DateTimePickerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DateTimePickerComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1__namespace.BsModalService)); }; }
|
|
455
|
-
static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: DateTimePickerComponent, selectors: [["wm-datetimepicker"]], viewQuery: function DateTimePickerComponent_Query(rf, ctx) { if (rf & 1) {
|
|
456
|
-
i0__namespace.ɵɵviewQuery(_c0$3, 7);
|
|
457
|
-
} if (rf & 2) {
|
|
458
|
-
let _t;
|
|
459
|
-
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.datetimepickerTemplate = _t.first);
|
|
460
|
-
} }, inputs: { mode: "mode", placement: "placement", _bsDatepickerConfig: [0, "config", "_bsDatepickerConfig"], minTime: "minTime", maxTime: "maxTime", _displayFormat: "_displayFormat", excludedDatesToDisable: "excludedDatesToDisable", value: "value", bsDatepickerConfig: [0, "config", "bsDatepickerConfig"], excludedDaysToDisable: "excludedDaysToDisable", displayFormat: "displayFormat" }, outputs: { change: "change" }, standalone: true, features: [i0__namespace.ɵɵStandaloneFeature], decls: 2, vars: 0, consts: [["datetimepickerTemplate", ""], [1, "app-datetime-picker"], [1, "modal-body"], [1, "mobile-datetime-picker-options"], ["bsDatepicker", "", 3, "bsConfig", "datesDisabled", "bsValue"], [3, "value", "min", "max"], [1, "text-primary", "date-picker-value"], [1, "modal-footer"], [1, "btn", "btn-secondary", "today-btn"], [1, "btn", "btn-primary", "pull-right", "ok-btn"], [1, "btn", "btn-secondary", "pull-right", "clear-btn", 3, "click"], ["bsDatepicker", "", 3, "bsValueChange", "bsConfig", "datesDisabled", "bsValue"], [3, "change", "value", "min", "max"], [1, "btn", "btn-secondary", "today-btn", 3, "click"], [1, "btn", "btn-primary", "pull-right", "ok-btn", 3, "click"]], template: function DateTimePickerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
461
|
-
i0__namespace.ɵɵtemplate(0, DateTimePickerComponent_ng_template_0_Template, 12, 6, "ng-template", null, 0, i0__namespace.ɵɵtemplateRefExtractor);
|
|
462
|
-
} }, dependencies: [i6.CommonModule, base.WmComponentsModule, i2.BsDatepickerModule, i2__namespace.BsDatepickerDirective, i2__namespace.BsDatepickerInlineDirective, i3.BsDropdownModule], encapsulation: 2 }); }
|
|
463
|
-
}
|
|
464
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(DateTimePickerComponent, [{
|
|
465
|
-
type: i0.Component,
|
|
466
|
-
args: [{
|
|
467
|
-
standalone: true,
|
|
468
|
-
imports: [i6.CommonModule, base.WmComponentsModule, i2.BsDatepickerModule, i3.BsDropdownModule],
|
|
469
|
-
selector: 'wm-datetimepicker',
|
|
470
|
-
template: `
|
|
471
|
-
<ng-template #datetimepickerTemplate>
|
|
472
|
-
<div class="app-datetime-picker">
|
|
473
|
-
<div class="modal-body">
|
|
474
|
-
<div class="mobile-datetime-picker-options">
|
|
475
|
-
|
|
476
|
-
</div>
|
|
477
|
-
@if (mode === 'DATE_TIME' || mode === 'DATE') {
|
|
478
|
-
<bs-datepicker-inline
|
|
479
|
-
[bsConfig]="bsDatepickerConfig"
|
|
480
|
-
[datesDisabled]="excludedDatesToDisable"
|
|
481
|
-
bsDatepicker
|
|
482
|
-
[bsValue]="changedValue"
|
|
483
|
-
(bsValueChange)="onDateUpdate($event)"
|
|
484
|
-
>
|
|
485
|
-
</bs-datepicker-inline>
|
|
486
|
-
}
|
|
487
|
-
@if (mode === 'DATE_TIME' || mode === 'TIME') {
|
|
488
|
-
<wm-timepicker
|
|
489
|
-
[value]="changedValue"
|
|
490
|
-
[min]="minTime"
|
|
491
|
-
[max]="maxTime"
|
|
492
|
-
(change)="onTimeUpdate($event)"
|
|
493
|
-
></wm-timepicker>
|
|
494
|
-
}
|
|
495
|
-
<span class="text-primary date-picker-value">
|
|
496
|
-
{{getDateLabel()}}
|
|
497
|
-
</span>
|
|
498
|
-
</div>
|
|
499
|
-
<div class="modal-footer">
|
|
500
|
-
@if (mode === 'DATE_TIME' || mode === 'DATE') {
|
|
501
|
-
<button
|
|
502
|
-
class="btn btn-secondary today-btn"
|
|
503
|
-
(click)="setToday()">{{appLocale.LABEL_TODAY_DATE || "Today" }}</button>
|
|
504
|
-
}
|
|
505
|
-
@if (mode === 'DATE_TIME' || mode === 'TIME') {
|
|
506
|
-
<button
|
|
507
|
-
class="btn btn-primary pull-right ok-btn"
|
|
508
|
-
(click)="onOkClick()">{{appLocale.LABEL_OK || "Ok" }}</button>
|
|
509
|
-
}
|
|
510
|
-
<button
|
|
511
|
-
class="btn btn-secondary pull-right clear-btn"
|
|
512
|
-
(click)="clear()">{{appLocale.LABEL_CLEAR_DATE || "Clear" }}</button>
|
|
513
|
-
</div>
|
|
514
|
-
</div>
|
|
515
|
-
</ng-template>
|
|
516
|
-
`
|
|
517
|
-
}]
|
|
518
|
-
}], () => [{ type: i0__namespace.Injector }, { type: i1__namespace.BsModalService }], { datetimepickerTemplate: [{
|
|
519
|
-
type: i0.ViewChild,
|
|
520
|
-
args: ['datetimepickerTemplate', { static: true }]
|
|
521
|
-
}], mode: [{
|
|
522
|
-
type: i0.Input
|
|
523
|
-
}], placement: [{
|
|
524
|
-
type: i0.Input
|
|
525
|
-
}], _bsDatepickerConfig: [{
|
|
526
|
-
type: i0.Input,
|
|
527
|
-
args: ["config"]
|
|
528
|
-
}], minTime: [{
|
|
529
|
-
type: i0.Input
|
|
530
|
-
}], maxTime: [{
|
|
531
|
-
type: i0.Input
|
|
532
|
-
}], _displayFormat: [{
|
|
533
|
-
type: i0.Input
|
|
534
|
-
}], change: [{
|
|
535
|
-
type: i0.Output
|
|
536
|
-
}], excludedDatesToDisable: [{
|
|
537
|
-
type: i0.Input
|
|
538
|
-
}], value: [{
|
|
539
|
-
type: i0.Input
|
|
540
|
-
}], bsDatepickerConfig: [{
|
|
541
|
-
type: i0.Input,
|
|
542
|
-
args: ["config"]
|
|
543
|
-
}], excludedDaysToDisable: [{
|
|
544
|
-
type: i0.Input
|
|
545
|
-
}], displayFormat: [{
|
|
546
|
-
type: i0.Input
|
|
547
|
-
}] }); })();
|
|
548
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(DateTimePickerComponent, { className: "DateTimePickerComponent", filePath: "date-time/date-time-picker.component.ts", lineNumber: 67 }); })();
|
|
549
|
-
class TimePickerComponent {
|
|
550
|
-
constructor(inj) {
|
|
551
|
-
this.inj = inj;
|
|
552
|
-
this.options = {
|
|
553
|
-
hour: [],
|
|
554
|
-
minute: [],
|
|
555
|
-
second: [],
|
|
556
|
-
meridian: ['AM', 'PM']
|
|
557
|
-
};
|
|
558
|
-
this.value = new Date();
|
|
559
|
-
this.min = null;
|
|
560
|
-
this.max = null;
|
|
561
|
-
this.change = new i0.EventEmitter();
|
|
562
|
-
this.options.hour = this.populateNumbers(0, 23);
|
|
563
|
-
this.options.minute = this.populateNumbers(0, 59);
|
|
564
|
-
this.options.second = this.populateNumbers(0, 59);
|
|
565
|
-
}
|
|
566
|
-
populateNumbers(start, to) {
|
|
567
|
-
const arr = [];
|
|
568
|
-
for (let i = start; i <= to; i++) {
|
|
569
|
-
arr.push({
|
|
570
|
-
label: (i < 10 ? '0' : '') + i,
|
|
571
|
-
value: i
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
return arr;
|
|
575
|
-
}
|
|
576
|
-
set({ index, value }, unit) {
|
|
577
|
-
if (unit === 'HOUR') {
|
|
578
|
-
this.value = moment$4(this.value).hour(parseInt(value)).toDate();
|
|
579
|
-
}
|
|
580
|
-
else if (unit === 'MINUTE') {
|
|
581
|
-
this.value = moment$4(this.value).minute(parseInt(value)).toDate();
|
|
582
|
-
}
|
|
583
|
-
else if (unit === 'SECOND') {
|
|
584
|
-
this.value = moment$4(this.value).second(parseInt(value)).toDate();
|
|
585
|
-
}
|
|
586
|
-
else if (unit === 'MERIDIAN') {
|
|
587
|
-
this.value = moment$4(this.value).minute(value).toDate();
|
|
588
|
-
}
|
|
589
|
-
if (this.min && this.value < this.min) {
|
|
590
|
-
this.value = this.min;
|
|
591
|
-
}
|
|
592
|
-
if (this.max && this.value > this.max) {
|
|
593
|
-
this.value = this.max;
|
|
594
|
-
}
|
|
595
|
-
this.change.emit(this.value);
|
|
596
|
-
}
|
|
597
|
-
get hour() {
|
|
598
|
-
return moment$4(this.value).hour();
|
|
599
|
-
}
|
|
600
|
-
get minute() {
|
|
601
|
-
return moment$4(this.value).minute();
|
|
602
|
-
}
|
|
603
|
-
get second() {
|
|
604
|
-
return moment$4(this.value).second();
|
|
605
|
-
}
|
|
606
|
-
get meridian() {
|
|
607
|
-
return 'AM';
|
|
608
|
-
}
|
|
609
|
-
onDateUpdate(newVal) {
|
|
610
|
-
debugger;
|
|
611
|
-
}
|
|
612
|
-
ngAfterViewInit() {
|
|
613
|
-
}
|
|
614
|
-
static { this.ɵfac = function TimePickerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimePickerComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector)); }; }
|
|
615
|
-
static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: TimePickerComponent, selectors: [["wm-timepicker"]], inputs: { value: "value", min: "min", max: "max" }, outputs: { change: "change" }, standalone: true, features: [i0__namespace.ɵɵStandaloneFeature], decls: 8, vars: 6, consts: [[3, "change", "options", "selectedValue"], [1, "app-time-separator"]], template: function TimePickerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
616
|
-
i0__namespace.ɵɵelementStart(0, "wm-pickergroup")(1, "wm-picker", 0);
|
|
617
|
-
i0__namespace.ɵɵlistener("change", function TimePickerComponent_Template_wm_picker_change_1_listener($event) { return ctx.set($event, "HOUR"); });
|
|
618
|
-
i0__namespace.ɵɵelementEnd();
|
|
619
|
-
i0__namespace.ɵɵelementStart(2, "span", 1);
|
|
620
|
-
i0__namespace.ɵɵtext(3, ":");
|
|
621
|
-
i0__namespace.ɵɵelementEnd();
|
|
622
|
-
i0__namespace.ɵɵelementStart(4, "wm-picker", 0);
|
|
623
|
-
i0__namespace.ɵɵlistener("change", function TimePickerComponent_Template_wm_picker_change_4_listener($event) { return ctx.set($event, "MINUTE"); });
|
|
624
|
-
i0__namespace.ɵɵelementEnd();
|
|
625
|
-
i0__namespace.ɵɵelementStart(5, "span", 1);
|
|
626
|
-
i0__namespace.ɵɵtext(6, ":");
|
|
627
|
-
i0__namespace.ɵɵelementEnd();
|
|
628
|
-
i0__namespace.ɵɵelementStart(7, "wm-picker", 0);
|
|
629
|
-
i0__namespace.ɵɵlistener("change", function TimePickerComponent_Template_wm_picker_change_7_listener($event) { return ctx.set($event, "SECOND"); });
|
|
630
|
-
i0__namespace.ɵɵelementEnd()();
|
|
631
|
-
} if (rf & 2) {
|
|
632
|
-
i0__namespace.ɵɵadvance();
|
|
633
|
-
i0__namespace.ɵɵproperty("options", ctx.options.hour)("selectedValue", ctx.hour);
|
|
634
|
-
i0__namespace.ɵɵadvance(3);
|
|
635
|
-
i0__namespace.ɵɵproperty("options", ctx.options.minute)("selectedValue", ctx.minute);
|
|
636
|
-
i0__namespace.ɵɵadvance(3);
|
|
637
|
-
i0__namespace.ɵɵproperty("options", ctx.options.minute)("selectedValue", ctx.second);
|
|
638
|
-
} }, dependencies: [PickerGroupComponent, PickerComponent], encapsulation: 2 }); }
|
|
639
|
-
}
|
|
640
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(TimePickerComponent, [{
|
|
641
|
-
type: i0.Component,
|
|
642
|
-
args: [{
|
|
643
|
-
selector: 'wm-timepicker',
|
|
644
|
-
standalone: true,
|
|
645
|
-
template: `
|
|
646
|
-
<wm-pickergroup>
|
|
647
|
-
<wm-picker
|
|
648
|
-
[options]="options.hour"
|
|
649
|
-
[selectedValue]="hour"
|
|
650
|
-
(change)="set($event, 'HOUR')"></wm-picker>
|
|
651
|
-
<span class="app-time-separator">:</span>
|
|
652
|
-
<wm-picker
|
|
653
|
-
[options]="options.minute"
|
|
654
|
-
[selectedValue]="minute"
|
|
655
|
-
(change)="set($event, 'MINUTE')"></wm-picker>
|
|
656
|
-
<span class="app-time-separator">:</span>
|
|
657
|
-
<wm-picker
|
|
658
|
-
[options]="options.minute"
|
|
659
|
-
[selectedValue]="second"
|
|
660
|
-
(change)="set($event, 'SECOND')"></wm-picker>
|
|
661
|
-
</wm-pickergroup>
|
|
662
|
-
`,
|
|
663
|
-
imports: [PickerGroupComponent, PickerComponent]
|
|
664
|
-
}]
|
|
665
|
-
}], () => [{ type: i0__namespace.Injector }], { value: [{
|
|
666
|
-
type: i0.Input
|
|
667
|
-
}], min: [{
|
|
668
|
-
type: i0.Input
|
|
669
|
-
}], max: [{
|
|
670
|
-
type: i0.Input
|
|
671
|
-
}], change: [{
|
|
672
|
-
type: i0.Output
|
|
673
|
-
}] }); })();
|
|
674
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(TimePickerComponent, { className: "TimePickerComponent", filePath: "date-time/date-time-picker.component.ts", lineNumber: 320 }); })();
|
|
675
|
-
|
|
676
|
-
const moment$3 = momentLib__namespace.default || window['moment'];
|
|
677
|
-
const CURRENT_DATE$2 = 'CURRENT_DATE';
|
|
678
|
-
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
679
|
-
const DATEPICKER_DROPDOWN_OPTIONS = {
|
|
680
|
-
DEFAULT: 'default'
|
|
681
|
-
};
|
|
682
|
-
const DATAENTRYMODE_DROPDOWN_OPTIONS = {
|
|
683
|
-
DEFAULT: 'default'
|
|
684
|
-
};
|
|
685
|
-
// Providing meridians to the timepicker baesd on selected locale
|
|
686
|
-
function getTimepickerConfig(i18nService) {
|
|
687
|
-
return Object.assign(new i5.TimepickerConfig(), {
|
|
688
|
-
meridians: [i18nService.getLocalizedMessage("LABEL_AM") || "AM", i18nService.getLocalizedMessage("LABEL_PM") || "PM"]
|
|
689
|
-
});
|
|
690
|
-
}
|
|
691
|
-
class BaseDateTimeComponent extends input.BaseFormCustomComponent {
|
|
692
|
-
get timeZone() { return this.inj.get(i1$1.AbstractI18nService).getTimezone(this); }
|
|
693
|
-
/**
|
|
694
|
-
* Safely replace internal meridians with localized display meridians only for string values
|
|
695
|
-
*/
|
|
696
|
-
safeReplaceMeridians(value) {
|
|
697
|
-
if (typeof value === 'string') {
|
|
698
|
-
return value.replace(this.meridians[0], this.am).replace(this.meridians[1], this.pm);
|
|
699
|
-
}
|
|
700
|
-
return value;
|
|
701
|
-
}
|
|
702
|
-
constructor(inj, WIDGET_CONFIG, explicitContext) {
|
|
703
|
-
super(inj, WIDGET_CONFIG, explicitContext);
|
|
704
|
-
this.isReadOnly = false;
|
|
705
|
-
this.clicked = false;
|
|
706
|
-
this.showampmbuttons = true;
|
|
707
|
-
this.formatsByLocale = { 'timezone': '' };
|
|
708
|
-
/**
|
|
709
|
-
* This is an internal property used to map the containerClass, showWeekNumbers etc., to the bsDatepicker
|
|
710
|
-
*/
|
|
711
|
-
this._dateOptions = new i2.BsDatepickerConfig();
|
|
712
|
-
this.i18nService = this.inj.get(i1$1.AbstractI18nService);
|
|
713
|
-
this.invokeEventCallback('beforeload');
|
|
714
|
-
this.datePipe = this.inj.get(base.ToDatePipe);
|
|
715
|
-
this.selectedLocale = this.i18nService.getSelectedLocale();
|
|
716
|
-
this._dateOptions.todayPosition = 'left';
|
|
717
|
-
this._dateOptions.clearPosition = 'right';
|
|
718
|
-
this.meridians = i6.getLocaleDayPeriods(this.selectedLocale, i6.FormStyle.Format, i6.TranslationWidth.Abbreviated);
|
|
719
|
-
this.loadNativeDateInput = i1$1.isMobile() && !this.showcustompicker;
|
|
720
|
-
this.am = this.i18nService.getLocalizedMessage("LABEL_AM") || "AM";
|
|
721
|
-
this.pm = this.i18nService.getLocalizedMessage("LABEL_PM") || "PM";
|
|
722
|
-
this.cancelLocaleChangeSubscription = this.getAppInstance().subscribe("locale-changed", (locale) => {
|
|
723
|
-
this.datePipe.datePipe.locale = locale.angular;
|
|
724
|
-
this._dateOptions.todayButtonLabel = this.i18nService.getLocalizedMessage('LABEL_TODAY_DATE');
|
|
725
|
-
this._dateOptions.clearButtonLabel = this.i18nService.getLocalizedMessage('LABEL_CLEAR_DATE');
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
/**
|
|
729
|
-
* returns true if the input value is default (i.e open date picker on input click)
|
|
730
|
-
* @param1 dropdownvalue, user selected value (by default datepicker opens on input click)
|
|
731
|
-
* **/
|
|
732
|
-
isDropDownDisplayEnabledOnInput(dropdownvalue) {
|
|
733
|
-
return dropdownvalue === DATEPICKER_DROPDOWN_OPTIONS.DEFAULT;
|
|
734
|
-
}
|
|
735
|
-
/**
|
|
736
|
-
* returns true if the input value is default (i.e Data entry can be done either by selecting from the Date/DateTime/Time Picker or by entering manually using the keyboard. )
|
|
737
|
-
* @param1 dropdownvalue, user selected value
|
|
738
|
-
* **/
|
|
739
|
-
isDataEntryModeEnabledOnInput(dropdownvalue) {
|
|
740
|
-
return dropdownvalue === DATAENTRYMODE_DROPDOWN_OPTIONS.DEFAULT;
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* This method is used to show validation message depending on the isNativePicker flag.
|
|
744
|
-
*/
|
|
745
|
-
showValidation($event, displayValue, isNativePicker, msg) {
|
|
746
|
-
if (isNativePicker) {
|
|
747
|
-
console.warn('min max date validation failed ', msg);
|
|
748
|
-
return $($event.target).val(displayValue);
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
resetDisplayInput() {
|
|
752
|
-
$(this.nativeElement).find('.display-input').val('');
|
|
753
|
-
}
|
|
754
|
-
validate(c) {
|
|
755
|
-
if (this.invalidDateTimeFormat) {
|
|
756
|
-
return {
|
|
757
|
-
invalidDateTimeFormat: {
|
|
758
|
-
valid: false
|
|
759
|
-
}
|
|
760
|
-
};
|
|
761
|
-
}
|
|
762
|
-
if (!lodashEs.isUndefined(this.dateNotInRange) && this.dateNotInRange) {
|
|
763
|
-
return {
|
|
764
|
-
dateNotInRange: {
|
|
765
|
-
valid: false
|
|
766
|
-
},
|
|
767
|
-
};
|
|
768
|
-
}
|
|
769
|
-
if (!lodashEs.isUndefined(this.timeNotInRange) && this.timeNotInRange) {
|
|
770
|
-
return {
|
|
771
|
-
timeNotInRange: {
|
|
772
|
-
valid: false
|
|
773
|
-
},
|
|
774
|
-
};
|
|
775
|
-
}
|
|
776
|
-
/* WMS-18269 | Extending the existing validation for 'required' */
|
|
777
|
-
if (this['show'] && this['required']) {
|
|
778
|
-
return !!c.value ? null : { required: true };
|
|
779
|
-
}
|
|
780
|
-
this.validateType = '';
|
|
781
|
-
return null;
|
|
782
|
-
}
|
|
783
|
-
/**
|
|
784
|
-
* This method is used to validate date pattern and time pattern
|
|
785
|
-
* If user selects one pattern in design time and if he tries to enter the date in another pattern then the device is throwing an error
|
|
786
|
-
*/
|
|
787
|
-
formatValidation(newVal, inputVal, isNativePicker) {
|
|
788
|
-
const pattern = this.datepattern || this.timepattern;
|
|
789
|
-
const timeZone = this.timeZone;
|
|
790
|
-
const formattedDate = i1$1.getFormattedDate(this.datePipe, newVal, pattern, timeZone, null, null, this);
|
|
791
|
-
inputVal = inputVal.trim();
|
|
792
|
-
if (inputVal) {
|
|
793
|
-
if (pattern === 'timestamp') {
|
|
794
|
-
if (!lodashEs.isNaN(inputVal) && lodashEs.parseInt(inputVal) !== formattedDate) {
|
|
795
|
-
this.invalidDateTimeFormat = true;
|
|
796
|
-
this.validateType = 'incorrectformat';
|
|
797
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
798
|
-
return false;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
else {
|
|
802
|
-
if (isNativePicker) {
|
|
803
|
-
// format the date value only when inputVal is obtained from $event.target.value, as the format doesnt match.
|
|
804
|
-
inputVal = i1$1.getFormattedDate(this.datePipe, inputVal, pattern, timeZone);
|
|
805
|
-
}
|
|
806
|
-
if (inputVal?.replace(this.am, this.meridians[0])?.replace(this.pm, this.meridians[1]) !== formattedDate) {
|
|
807
|
-
this.invalidDateTimeFormat = true;
|
|
808
|
-
this.validateType = 'incorrectformat';
|
|
809
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
810
|
-
return false;
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
return true;
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* This method is used to validate min date, max date, exclude dates and exclude days
|
|
818
|
-
* In mobile if invalid dates are entered, device is showing an alert.
|
|
819
|
-
* In web if invalid dates are entered, device is showing validation message.
|
|
820
|
-
*/
|
|
821
|
-
minDateMaxDateValidationOnInput(newVal, $event, displayValue, isNativePicker) {
|
|
822
|
-
if (newVal) {
|
|
823
|
-
const dateTimeVal = newVal;
|
|
824
|
-
newVal = moment$3(newVal).startOf('day').toDate();
|
|
825
|
-
const minDate = moment$3(i1$1.getDateObj(this.mindate)).startOf('day').toDate();
|
|
826
|
-
const maxDate = moment$3(i1$1.getDateObj(this.maxdate)).startOf('day').toDate();
|
|
827
|
-
if (this.mindate && newVal < minDate) {
|
|
828
|
-
const msg = `${this.appLocale.LABEL_MINDATE_VALIDATION_MESSAGE} ${this.mindate}.`;
|
|
829
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
830
|
-
if (isNativePicker && i1$1.getFormattedDate(this.datePipe, minDate, this.datepattern, this.timeZone, null, null, this) === displayValue) {
|
|
831
|
-
return $($event.target).val(displayValue);
|
|
832
|
-
}
|
|
833
|
-
this.dateNotInRange = true;
|
|
834
|
-
this.validateType = 'mindate';
|
|
835
|
-
return this.showValidation($event, displayValue, isNativePicker, msg);
|
|
836
|
-
}
|
|
837
|
-
if (this.maxdate && newVal > maxDate) {
|
|
838
|
-
const msg = `${this.appLocale.LABEL_MAXDATE_VALIDATION_MESSAGE} ${this.maxdate}.`;
|
|
839
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
840
|
-
if (isNativePicker && i1$1.getFormattedDate(this.datePipe, maxDate, this.datepattern, this.timeZone, null, null, this) === displayValue) {
|
|
841
|
-
return $($event.target).val(displayValue);
|
|
842
|
-
}
|
|
843
|
-
this.dateNotInRange = true;
|
|
844
|
-
this.validateType = 'maxdate';
|
|
845
|
-
return this.showValidation($event, displayValue, isNativePicker, msg);
|
|
846
|
-
}
|
|
847
|
-
if (this.excludedates) {
|
|
848
|
-
let excludeDatesArray;
|
|
849
|
-
if (lodashEs.isString(this.excludedates)) {
|
|
850
|
-
excludeDatesArray = lodashEs.split(this.excludedates, ',');
|
|
851
|
-
}
|
|
852
|
-
else {
|
|
853
|
-
excludeDatesArray = this.excludedates;
|
|
854
|
-
}
|
|
855
|
-
excludeDatesArray = excludeDatesArray.map(d => i1$1.getFormattedDate(this.datePipe, d, this.datepattern, this.timeZone, null, null, this));
|
|
856
|
-
if (excludeDatesArray.indexOf(i1$1.getFormattedDate(this.datePipe, dateTimeVal, this.datepattern, this.timeZone, null, null, this)) > -1) {
|
|
857
|
-
this.dateNotInRange = true;
|
|
858
|
-
this.validateType = 'excludedates';
|
|
859
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
860
|
-
return;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
if (this.excludedays) {
|
|
864
|
-
const excludeDaysArray = lodashEs.split(this.excludedays, ',');
|
|
865
|
-
const day = lodashEs.get(dateTimeVal, 'getDay') ? dateTimeVal.getDay() : dateTimeVal;
|
|
866
|
-
if (excludeDaysArray.indexOf(day.toString()) > -1) {
|
|
867
|
-
this.dateNotInRange = true;
|
|
868
|
-
this.validateType = 'excludedays';
|
|
869
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
870
|
-
return;
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
if (!isNativePicker) {
|
|
875
|
-
this.dateNotInRange = false;
|
|
876
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
/**
|
|
880
|
-
* This method is used to highlight the current date
|
|
881
|
-
*/
|
|
882
|
-
hightlightToday(newDate) {
|
|
883
|
-
if (this.datavalue)
|
|
884
|
-
return;
|
|
885
|
-
const activeMonth = $(`.bs-datepicker-head .current`).first().text();
|
|
886
|
-
const activeYear = $(".bs-datepicker-head .current").eq(1).text();
|
|
887
|
-
const month = new Date(newDate).toLocaleString('default', { month: 'long' });
|
|
888
|
-
newDate.getFullYear().toString();
|
|
889
|
-
if (activeMonth == month && activeYear == new Date().getFullYear() && newDate.getDate() === new Date().getDate() && newDate.getMonth() === new Date().getMonth() && newDate.getFullYear() === new Date().getFullYear()) {
|
|
890
|
-
const toDay = new Date().getDate().toString();
|
|
891
|
-
lodashEs.filter($(`span:contains(${toDay})`).not('.is-other-month'), (obj) => {
|
|
892
|
-
if ($(obj).text() === toDay) {
|
|
893
|
-
$(obj).addClass('current-date text-info');
|
|
894
|
-
}
|
|
895
|
-
});
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
/**
|
|
899
|
-
* This method is used to find the new date is from another year or not
|
|
900
|
-
* @param newDate - newly selected date value
|
|
901
|
-
*/
|
|
902
|
-
isOtheryear(newDate) {
|
|
903
|
-
return (newDate.getMonth() === 0 && this.activeDate.getMonth() === 11) || (newDate.getMonth() === 11 && this.activeDate.getMonth() === 0);
|
|
904
|
-
}
|
|
905
|
-
showDatePickerModal(bsDataValue) {
|
|
906
|
-
this.activeDate = bsDataValue || new Date();
|
|
907
|
-
this.setNextData(this.activeDate);
|
|
908
|
-
this.datetimepickerComponent.show();
|
|
909
|
-
setTimeout(() => {
|
|
910
|
-
this.addDatepickerMouseEvents();
|
|
911
|
-
this.setActiveDateFocus(this.activeDate, true);
|
|
912
|
-
}, 500);
|
|
913
|
-
return;
|
|
914
|
-
}
|
|
915
|
-
/**
|
|
916
|
-
* This method is used to load other month days or other month or other year
|
|
917
|
-
* @param btnClass - class(previous/next) of the button which we have to click
|
|
918
|
-
* @param timePeriod - String value decides to load other month days or other month or other year
|
|
919
|
-
*/
|
|
920
|
-
goToOtherMonthOryear(btnClass, timePeriod) {
|
|
921
|
-
const $node = $(`.bs-datepicker-head .${btnClass}`);
|
|
922
|
-
if ($node.attr('disabled')) {
|
|
923
|
-
return;
|
|
924
|
-
}
|
|
925
|
-
$node.trigger('click');
|
|
926
|
-
if (timePeriod === 'days') {
|
|
927
|
-
this.loadDays();
|
|
928
|
-
}
|
|
929
|
-
else if (timePeriod === 'month') {
|
|
930
|
-
this.loadMonths();
|
|
931
|
-
}
|
|
932
|
-
else if (timePeriod === 'year') {
|
|
933
|
-
this.loadYears();
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
/**
|
|
937
|
-
* This method is used to set focus for active day
|
|
938
|
-
* @param newDate - newly selected date value
|
|
939
|
-
* @param isMouseEvent - boolean value represents the event is mouse event/ keyboard event
|
|
940
|
-
* @param fromKeyboardEvents
|
|
941
|
-
*/
|
|
942
|
-
setActiveDateFocus(newDate, isMouseEvent, fromKeyboardEvents) {
|
|
943
|
-
this.setNextData(newDate);
|
|
944
|
-
this.clicked = false;
|
|
945
|
-
const activeMonth = this.activeDate.getMonth();
|
|
946
|
-
// check for keyboard event
|
|
947
|
-
if (!isMouseEvent) {
|
|
948
|
-
if (newDate.getMonth() < activeMonth) {
|
|
949
|
-
this.isOtheryear(newDate) ? this.goToOtherMonthOryear('next', 'days') : this.goToOtherMonthOryear('previous', 'days');
|
|
950
|
-
}
|
|
951
|
-
else if (newDate.getMonth() > activeMonth) {
|
|
952
|
-
this.isOtheryear(newDate) ? this.goToOtherMonthOryear('previous', 'days') : this.goToOtherMonthOryear('next', 'days');
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
setTimeout(() => {
|
|
956
|
-
const newDay = newDate.getDate().toString();
|
|
957
|
-
lodashEs.filter($(`span:contains(${newDay})`).not('.is-other-month'), (obj) => {
|
|
958
|
-
$(`.bs-datepicker-head .current`).first().text();
|
|
959
|
-
$(".bs-datepicker-head .current").eq(1).text();
|
|
960
|
-
new Date().toLocaleString('default', { month: 'long' });
|
|
961
|
-
if ($(obj).text() === newDay) {
|
|
962
|
-
if ($(obj).hasClass('selected')) {
|
|
963
|
-
$(obj).parent().attr('aria-selected', 'true');
|
|
964
|
-
}
|
|
965
|
-
$(obj).attr('aria-label', moment$3(newDate).format('dddd, MMMM Do YYYY'));
|
|
966
|
-
$('[bsdatepickerdaydecorator]').not('.is-other-month').attr('tabindex', '-1');
|
|
967
|
-
$(obj).attr('tabindex', '0');
|
|
968
|
-
$(obj).focus();
|
|
969
|
-
this.activeDate = newDate;
|
|
970
|
-
}
|
|
971
|
-
});
|
|
972
|
-
if (newDate.getDate() === new Date().getDate() && newDate.getMonth() === new Date().getMonth() && newDate.getFullYear() === new Date().getFullYear()) {
|
|
973
|
-
this.hightlightToday(newDate);
|
|
974
|
-
}
|
|
975
|
-
});
|
|
976
|
-
}
|
|
977
|
-
getMonth(date, inc) {
|
|
978
|
-
const currentMonth = new Date(date);
|
|
979
|
-
let month = currentMonth.getMonth();
|
|
980
|
-
const year = currentMonth.getFullYear();
|
|
981
|
-
month += inc;
|
|
982
|
-
const newDate = new Date(year, month);
|
|
983
|
-
const fullMonth = newDate.toLocaleString('en-US', { month: 'long' });
|
|
984
|
-
return {
|
|
985
|
-
date: newDate,
|
|
986
|
-
fullMonth: fullMonth
|
|
987
|
-
};
|
|
988
|
-
}
|
|
989
|
-
/**
|
|
990
|
-
* This method sets focus for months/days depending on the loaded datepicker table
|
|
991
|
-
*/
|
|
992
|
-
setFocusForMonthOrDay() {
|
|
993
|
-
const activeMonthOrYear = $(`.bs-datepicker-head .current`).first().text();
|
|
994
|
-
const datePickerBody = $('.bs-datepicker-body');
|
|
995
|
-
if (datePickerBody.find('table.months').length > 0) {
|
|
996
|
-
if (lodashEs.parseInt(activeMonthOrYear) !== this.activeDate.getFullYear()) {
|
|
997
|
-
this.loadMonths();
|
|
998
|
-
}
|
|
999
|
-
const newDate = new Date(lodashEs.parseInt(activeMonthOrYear), this.activeDate.getMonth(), this.activeDate.getDate());
|
|
1000
|
-
this.setActiveMonthFocus(newDate, true);
|
|
1001
|
-
}
|
|
1002
|
-
else if (datePickerBody.find('table.days').length > 0) {
|
|
1003
|
-
const newMonth = months.indexOf(activeMonthOrYear);
|
|
1004
|
-
if (newMonth !== this.activeDate.getMonth()) {
|
|
1005
|
-
this.loadDays();
|
|
1006
|
-
}
|
|
1007
|
-
const newDate = new Date(this.activeDate.getFullYear(), newMonth, 1);
|
|
1008
|
-
this.setActiveDateFocus(newDate, true);
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
/**
|
|
1012
|
-
* This method sets focus for months/years depending on the loaded datepicker table
|
|
1013
|
-
*/
|
|
1014
|
-
setFocusForCurrentMonthOryear() {
|
|
1015
|
-
const datePickerBody = $('.bs-datepicker-body');
|
|
1016
|
-
if (datePickerBody.find('table.months').length > 0) {
|
|
1017
|
-
this.loadMonths();
|
|
1018
|
-
this.setActiveMonthFocus(this.activeDate, true);
|
|
1019
|
-
}
|
|
1020
|
-
else if (datePickerBody.find('table.years').length > 0) {
|
|
1021
|
-
this.loadYears();
|
|
1022
|
-
this.setActiveYearFocus(this.activeDate, true);
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
/**
|
|
1026
|
-
* This method sets focus for months/years/days depending on the loaded datepicker table
|
|
1027
|
-
*/
|
|
1028
|
-
setFocusForDate(count) {
|
|
1029
|
-
const datePickerBody = $('.bs-datepicker-body');
|
|
1030
|
-
if (datePickerBody.find('table.months').length > 0) {
|
|
1031
|
-
this.loadMonths();
|
|
1032
|
-
const newDate = new Date(this.activeDate.getFullYear() + count, 0, this.activeDate.getDate());
|
|
1033
|
-
this.setActiveMonthFocus(newDate, true);
|
|
1034
|
-
}
|
|
1035
|
-
else if (datePickerBody.find('table.years').length > 0) {
|
|
1036
|
-
this.loadYears();
|
|
1037
|
-
const startYear = datePickerBody.find('table.years span').first().text();
|
|
1038
|
-
const newDate = new Date(lodashEs.parseInt(startYear), this.activeDate.getMonth(), this.activeDate.getDate());
|
|
1039
|
-
this.setActiveYearFocus(newDate, true);
|
|
1040
|
-
}
|
|
1041
|
-
else if (datePickerBody.find('table.days').length > 0) {
|
|
1042
|
-
this.loadDays();
|
|
1043
|
-
const [monthText, yearText] = $('.bs-datepicker-head .current').map((_, el) => $(el).text().trim()).get();
|
|
1044
|
-
const monthIndex = new Date(`${monthText} 1, ${yearText}`).getMonth();
|
|
1045
|
-
const year = lodashEs.parseInt(yearText, 10);
|
|
1046
|
-
const inMonth = (d) => d.getFullYear() === year && d.getMonth() === monthIndex;
|
|
1047
|
-
let newDate = this.mindate && inMonth(new Date(this.mindate)) ? new Date(this.mindate) : this.maxdate && inMonth(new Date(this.maxdate)) ? new Date(this.maxdate) : new Date(year, monthIndex, 1);
|
|
1048
|
-
this.setActiveDateFocus(newDate, true);
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
/**
|
|
1052
|
-
* This method is used to add keyboard events while opening the date picker
|
|
1053
|
-
* @param scope - scope of the date/datetime widget
|
|
1054
|
-
* @param isDateTime - boolean value represents the loaded widget is date or datetime
|
|
1055
|
-
*/
|
|
1056
|
-
addDatepickerKeyboardEvents(scope, isDateTime) {
|
|
1057
|
-
this.elementScope = scope;
|
|
1058
|
-
const dateContainer = document.querySelector(`.${scope.dateContainerCls}`);
|
|
1059
|
-
i1$1.setAttr(dateContainer, 'tabindex', '0');
|
|
1060
|
-
dateContainer.onkeydown = (event) => {
|
|
1061
|
-
// Check for Shift+Tab key or Tab key or escape
|
|
1062
|
-
if (event.key === 'Escape') {
|
|
1063
|
-
this.elementScope.hideDatepickerDropdown();
|
|
1064
|
-
const displayInputElem = this.elementScope.nativeElement.querySelector('.display-input');
|
|
1065
|
-
setTimeout(() => displayInputElem.focus());
|
|
1066
|
-
}
|
|
1067
|
-
};
|
|
1068
|
-
this.loadDays();
|
|
1069
|
-
this.setActiveDateFocus(this.activeDate, undefined, true);
|
|
1070
|
-
}
|
|
1071
|
-
setNextData(nextDate) {
|
|
1072
|
-
this.next = this.getMonth(nextDate, 1);
|
|
1073
|
-
this.prev = this.getMonth(nextDate, -1);
|
|
1074
|
-
}
|
|
1075
|
-
/**
|
|
1076
|
-
* This method is used to add tabindex, keybord and mouse events for days
|
|
1077
|
-
*/
|
|
1078
|
-
loadDays() {
|
|
1079
|
-
setTimeout(() => {
|
|
1080
|
-
$('[bsdatepickerdaydecorator]').not('.is-other-month').attr('tabindex', '0');
|
|
1081
|
-
// if (this.clicked === false) {
|
|
1082
|
-
// this.next = this.getMonth(this.activeDate, 1);
|
|
1083
|
-
// this.prev = this.getMonth(this.activeDate, -1);
|
|
1084
|
-
// }
|
|
1085
|
-
this.addKeyBoardEventsForDays();
|
|
1086
|
-
this.addDatepickerMouseEvents();
|
|
1087
|
-
});
|
|
1088
|
-
}
|
|
1089
|
-
/**
|
|
1090
|
-
* This method sets keyboard events for days
|
|
1091
|
-
*/
|
|
1092
|
-
addKeyBoardEventsForDays() {
|
|
1093
|
-
const datePickerBody = $('.bs-datepicker-body');
|
|
1094
|
-
datePickerBody.keydown((event) => {
|
|
1095
|
-
let newdate;
|
|
1096
|
-
if (event.key === 'ArrowDown') {
|
|
1097
|
-
event.preventDefault();
|
|
1098
|
-
newdate = moment$3(this.activeDate).add(7, 'days').toDate();
|
|
1099
|
-
this.setActiveDateFocus(newdate);
|
|
1100
|
-
}
|
|
1101
|
-
else if (event.ctrlKey && event.key === 'ArrowUp') {
|
|
1102
|
-
// clicking on table header month name to load list of months
|
|
1103
|
-
$('.bs-datepicker-head .current').first().click();
|
|
1104
|
-
this.loadMonths();
|
|
1105
|
-
this.setActiveMonthFocus(this.activeDate);
|
|
1106
|
-
}
|
|
1107
|
-
else if (event.key === 'ArrowUp') {
|
|
1108
|
-
event.preventDefault();
|
|
1109
|
-
newdate = moment$3(this.activeDate).add(-7, 'days').toDate();
|
|
1110
|
-
this.setActiveDateFocus(newdate);
|
|
1111
|
-
}
|
|
1112
|
-
else if (event.key === 'ArrowLeft') {
|
|
1113
|
-
newdate = moment$3(this.activeDate).add(-1, 'days').toDate();
|
|
1114
|
-
this.setActiveDateFocus(newdate);
|
|
1115
|
-
}
|
|
1116
|
-
else if (event.key === 'ArrowRight') {
|
|
1117
|
-
newdate = moment$3(this.activeDate).add(1, 'days').toDate();
|
|
1118
|
-
this.setActiveDateFocus(newdate);
|
|
1119
|
-
}
|
|
1120
|
-
else if (event.key === 'PageUp') {
|
|
1121
|
-
event.preventDefault();
|
|
1122
|
-
newdate = moment$3(this.activeDate).add(-1, 'month').toDate();
|
|
1123
|
-
this.setActiveDateFocus(newdate);
|
|
1124
|
-
}
|
|
1125
|
-
else if (event.key === 'PageDown') {
|
|
1126
|
-
event.preventDefault();
|
|
1127
|
-
newdate = moment$3(this.activeDate).add(1, 'month').toDate();
|
|
1128
|
-
this.setActiveDateFocus(newdate);
|
|
1129
|
-
}
|
|
1130
|
-
else if (event.key === 'Enter') {
|
|
1131
|
-
if ($(document.activeElement).hasClass('disabled')) {
|
|
1132
|
-
return;
|
|
1133
|
-
}
|
|
1134
|
-
$(document.activeElement).click();
|
|
1135
|
-
this.elementScope.hideDatepickerDropdown();
|
|
1136
|
-
const displayInputElem = this.elementScope.nativeElement.querySelector('.display-input');
|
|
1137
|
-
setTimeout(() => displayInputElem.focus());
|
|
1138
|
-
}
|
|
1139
|
-
});
|
|
1140
|
-
this.focusBlurDatePickerHeadButtons();
|
|
1141
|
-
}
|
|
1142
|
-
focusBlurDatePickerHeadButtons() {
|
|
1143
|
-
const datePickerHeadButton = $('.bs-datepicker-head button');
|
|
1144
|
-
datePickerHeadButton.on('focus', function () { $(this).css('background-color', '#9AA0A3'); });
|
|
1145
|
-
datePickerHeadButton.on('blur', function () { $(this).css('background-color', ''); });
|
|
1146
|
-
}
|
|
1147
|
-
/**
|
|
1148
|
-
* This method is used to add tabindex, keybord and mouse events for months
|
|
1149
|
-
*/
|
|
1150
|
-
loadMonths() {
|
|
1151
|
-
setTimeout(() => {
|
|
1152
|
-
this.addKeyBoardEventsForMonths();
|
|
1153
|
-
this.addDatepickerMouseEvents();
|
|
1154
|
-
});
|
|
1155
|
-
}
|
|
1156
|
-
/**
|
|
1157
|
-
* This method sets keyboard events for months
|
|
1158
|
-
*/
|
|
1159
|
-
addKeyBoardEventsForMonths() {
|
|
1160
|
-
$('.bs-datepicker-body').keydown((event) => {
|
|
1161
|
-
let newdate;
|
|
1162
|
-
if ((event.ctrlKey && event.key === 'ArrowDown') || event.key === 'Enter') {
|
|
1163
|
-
if ($(document.activeElement).parent().hasClass('disabled')) {
|
|
1164
|
-
return;
|
|
1165
|
-
}
|
|
1166
|
-
$(document.activeElement).click();
|
|
1167
|
-
this.loadDays();
|
|
1168
|
-
const newDate = new Date(this.activeDate.getFullYear(), this.activeDate.getMonth(), 1);
|
|
1169
|
-
this.setActiveDateFocus(newDate);
|
|
1170
|
-
}
|
|
1171
|
-
else if (event.ctrlKey && event.key === 'ArrowUp') {
|
|
1172
|
-
// clicking on table header year to load list of years
|
|
1173
|
-
$('.bs-datepicker-head .current').first().click();
|
|
1174
|
-
this.loadYears();
|
|
1175
|
-
this.setActiveYearFocus(this.activeDate);
|
|
1176
|
-
}
|
|
1177
|
-
else if (event.key === 'ArrowDown') {
|
|
1178
|
-
event.preventDefault();
|
|
1179
|
-
newdate = moment$3(this.activeDate).add(3, 'month').toDate();
|
|
1180
|
-
this.setActiveMonthFocus(newdate);
|
|
1181
|
-
}
|
|
1182
|
-
else if (event.key === 'ArrowUp') {
|
|
1183
|
-
event.preventDefault();
|
|
1184
|
-
newdate = moment$3(this.activeDate).add(-3, 'month').toDate();
|
|
1185
|
-
this.setActiveMonthFocus(newdate);
|
|
1186
|
-
}
|
|
1187
|
-
else if (event.key === 'ArrowLeft') {
|
|
1188
|
-
newdate = moment$3(this.activeDate).add(-1, 'month').toDate();
|
|
1189
|
-
this.setActiveMonthFocus(newdate);
|
|
1190
|
-
}
|
|
1191
|
-
else if (event.key === 'ArrowRight') {
|
|
1192
|
-
newdate = moment$3(this.activeDate).add(1, 'month').toDate();
|
|
1193
|
-
this.setActiveMonthFocus(newdate);
|
|
1194
|
-
}
|
|
1195
|
-
});
|
|
1196
|
-
this.focusBlurDatePickerHeadButtons();
|
|
1197
|
-
}
|
|
1198
|
-
/**
|
|
1199
|
-
* This method is used to add tabindex, keybord and mouse events for years
|
|
1200
|
-
*/
|
|
1201
|
-
loadYears() {
|
|
1202
|
-
setTimeout(() => {
|
|
1203
|
-
this.addKeyBoardEventsForYears();
|
|
1204
|
-
this.addDatepickerMouseEvents();
|
|
1205
|
-
});
|
|
1206
|
-
}
|
|
1207
|
-
/**
|
|
1208
|
-
* This method is used to set focus for active month
|
|
1209
|
-
*/
|
|
1210
|
-
setActiveMonthFocus(newDate, isMoouseEvent) {
|
|
1211
|
-
this.setNextData(newDate);
|
|
1212
|
-
const newMonth = months[newDate.getMonth()];
|
|
1213
|
-
// check for keyboard event
|
|
1214
|
-
if (!isMoouseEvent) {
|
|
1215
|
-
if (newDate.getFullYear() < this.activeDate.getFullYear()) {
|
|
1216
|
-
this.goToOtherMonthOryear('previous', 'month');
|
|
1217
|
-
}
|
|
1218
|
-
else if (newDate.getFullYear() > this.activeDate.getFullYear()) {
|
|
1219
|
-
this.goToOtherMonthOryear('next', 'month');
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
setTimeout(() => {
|
|
1223
|
-
$(`.bs-datepicker-body table.months span`).attr('tabindex', '-1');
|
|
1224
|
-
$(`.bs-datepicker-body table.months span:contains(${newMonth})`).attr('tabindex', '0');
|
|
1225
|
-
$(`.bs-datepicker-body table.months span:contains(${newMonth})`).focus();
|
|
1226
|
-
this.activeDate = newDate;
|
|
1227
|
-
});
|
|
1228
|
-
}
|
|
1229
|
-
/**
|
|
1230
|
-
* This method sets keyboard events for years
|
|
1231
|
-
*/
|
|
1232
|
-
addKeyBoardEventsForYears() {
|
|
1233
|
-
$('.bs-datepicker-body').keydown((event) => {
|
|
1234
|
-
let newdate;
|
|
1235
|
-
if ((event.ctrlKey && event.key === 'ArrowDown') || event.key === 'Enter') {
|
|
1236
|
-
if ($(document.activeElement).parent().hasClass('disabled')) {
|
|
1237
|
-
return;
|
|
1238
|
-
}
|
|
1239
|
-
$(document.activeElement).click();
|
|
1240
|
-
this.loadMonths();
|
|
1241
|
-
this.setActiveMonthFocus(this.activeDate);
|
|
1242
|
-
}
|
|
1243
|
-
else if (event.key === 'ArrowDown') {
|
|
1244
|
-
event.preventDefault();
|
|
1245
|
-
newdate = moment$3(this.activeDate).add(4, 'year').toDate();
|
|
1246
|
-
this.setActiveYearFocus(newdate);
|
|
1247
|
-
}
|
|
1248
|
-
else if (event.key === 'ArrowUp') {
|
|
1249
|
-
event.preventDefault();
|
|
1250
|
-
newdate = moment$3(this.activeDate).add(-4, 'year').toDate();
|
|
1251
|
-
this.setActiveYearFocus(newdate);
|
|
1252
|
-
}
|
|
1253
|
-
else if (event.key === 'ArrowLeft') {
|
|
1254
|
-
newdate = moment$3(this.activeDate).add(-1, 'year').toDate();
|
|
1255
|
-
this.setActiveYearFocus(newdate);
|
|
1256
|
-
}
|
|
1257
|
-
else if (event.key === 'ArrowRight') {
|
|
1258
|
-
newdate = moment$3(this.activeDate).add(1, 'year').toDate();
|
|
1259
|
-
this.setActiveYearFocus(newdate);
|
|
1260
|
-
}
|
|
1261
|
-
});
|
|
1262
|
-
this.focusBlurDatePickerHeadButtons();
|
|
1263
|
-
}
|
|
1264
|
-
/**
|
|
1265
|
-
* This method is used to set focus for active year
|
|
1266
|
-
*/
|
|
1267
|
-
setActiveYearFocus(newDate, isMouseEvent) {
|
|
1268
|
-
const newYear = newDate.getFullYear();
|
|
1269
|
-
const datePickerYears = $('.bs-datepicker-body table.years span');
|
|
1270
|
-
const startYear = datePickerYears.first().text();
|
|
1271
|
-
const endYear = datePickerYears.last().text();
|
|
1272
|
-
// check for keyboard event
|
|
1273
|
-
if (!isMouseEvent) {
|
|
1274
|
-
if (newDate.getFullYear() < lodashEs.parseInt(startYear)) {
|
|
1275
|
-
this.goToOtherMonthOryear('previous', 'year');
|
|
1276
|
-
}
|
|
1277
|
-
else if (newDate.getFullYear() > lodashEs.parseInt(endYear)) {
|
|
1278
|
-
this.goToOtherMonthOryear('next', 'year');
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
setTimeout(() => {
|
|
1282
|
-
$(`.bs-datepicker-body table.years span`).attr('tabindex', '-1');
|
|
1283
|
-
$(`.bs-datepicker-body table.years span:contains(${newYear})`).attr('tabindex', '0');
|
|
1284
|
-
$(`.bs-datepicker-body table.years span:contains(${newYear})`).focus();
|
|
1285
|
-
this.activeDate = newDate;
|
|
1286
|
-
});
|
|
1287
|
-
}
|
|
1288
|
-
/**
|
|
1289
|
-
* This method sets focus for timepicker first input field(hours field) while opening time picker
|
|
1290
|
-
* @param scope - scope of the time picker widget
|
|
1291
|
-
*/
|
|
1292
|
-
focusTimePickerPopover(scope) {
|
|
1293
|
-
this.elementScope = scope;
|
|
1294
|
-
// setTimeout is used so that by then time input has the updated value. focus is setting back to the input field
|
|
1295
|
-
this.elementScope.ngZone.runOutsideAngular(() => {
|
|
1296
|
-
setTimeout(() => {
|
|
1297
|
-
$('timepicker .form-group').first().find('> input.form-control').focus();
|
|
1298
|
-
});
|
|
1299
|
-
});
|
|
1300
|
-
}
|
|
1301
|
-
/**
|
|
1302
|
-
* This function sets the keyboard events to Timepicker popup
|
|
1303
|
-
*/
|
|
1304
|
-
bindTimePickerKeyboardEvents() {
|
|
1305
|
-
setTimeout(() => {
|
|
1306
|
-
const $timepickerPopup = $('body').find('> bs-dropdown-container timepicker');
|
|
1307
|
-
$timepickerPopup.attr('tabindex', 0);
|
|
1308
|
-
this.addEventsOnTimePicker($timepickerPopup);
|
|
1309
|
-
});
|
|
1310
|
-
}
|
|
1311
|
-
focusOnInputEl() {
|
|
1312
|
-
if ($(this.nativeElement).closest('.caption-floating').length > 0) {
|
|
1313
|
-
setTimeout(() => {
|
|
1314
|
-
$(this.nativeElement).find('.app-textbox').focus();
|
|
1315
|
-
}, 100);
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
/**
|
|
1319
|
-
* This function checks whether the given date is valid or not
|
|
1320
|
-
* @returns boolean value, true if date is valid else returns false
|
|
1321
|
-
*/
|
|
1322
|
-
isValidDate(date) {
|
|
1323
|
-
return date && date instanceof Date && !isNaN(date.getTime());
|
|
1324
|
-
}
|
|
1325
|
-
/**
|
|
1326
|
-
* This function checks whether the given time is valid or not
|
|
1327
|
-
*/
|
|
1328
|
-
timeFormatValidation() {
|
|
1329
|
-
const enteredDate = $(this.nativeElement).find('input').val()?.replace(this.am, this.meridians[0])?.replace(this.pm, this.meridians[1]);
|
|
1330
|
-
const newVal = i1$1.getNativeDateObject(enteredDate, { meridians: this.meridians, pattern: this.datepattern });
|
|
1331
|
-
if (!this.formatValidation(newVal, enteredDate)) {
|
|
1332
|
-
return;
|
|
1333
|
-
}
|
|
1334
|
-
this.invalidDateTimeFormat = false;
|
|
1335
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
1336
|
-
}
|
|
1337
|
-
updateTimeValue(el, value, fieldName) {
|
|
1338
|
-
let minEl = el.find('input[aria-label="minutes"]');
|
|
1339
|
-
let secEl = el.find('input[aria-label="seconds"]');
|
|
1340
|
-
minEl.value = secEl.value = '00';
|
|
1341
|
-
if (value.length < 2) {
|
|
1342
|
-
setTimeout(() => {
|
|
1343
|
-
fieldName === 'minutes' ? this.bsTimePicker.updateMinutes(minEl) : this.bsTimePicker.updateSeconds(secEl);
|
|
1344
|
-
}, 500);
|
|
1345
|
-
}
|
|
1346
|
-
else {
|
|
1347
|
-
fieldName === 'minutes' ? this.bsTimePicker.updateMinutes(minEl) : this.bsTimePicker.updateSeconds(secEl);
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
/**
|
|
1351
|
-
* This function sets the events to given element
|
|
1352
|
-
* @param $el - element on which the event is added
|
|
1353
|
-
*/
|
|
1354
|
-
addEventsOnTimePicker($el) {
|
|
1355
|
-
const inputFields = $el.find('.bs-timepicker-field');
|
|
1356
|
-
// WMS-19382: update minutes and seconds to 0 when we enter hour value
|
|
1357
|
-
inputFields.first().on('keyup', evt => {
|
|
1358
|
-
const hourValue = evt.target.value;
|
|
1359
|
-
lodashEs.forEach(inputFields, (field, index) => {
|
|
1360
|
-
// @ts-ignore
|
|
1361
|
-
if (evt.target !== field && field.value === '' && hourValue.length) {
|
|
1362
|
-
const fieldName = index === 1 ? 'minutes' : 'seconds';
|
|
1363
|
-
this.updateTimeValue($el, hourValue, fieldName);
|
|
1364
|
-
}
|
|
1365
|
-
});
|
|
1366
|
-
});
|
|
1367
|
-
this.removeKeyupListener = () => {
|
|
1368
|
-
inputFields.first().off('keyup');
|
|
1369
|
-
};
|
|
1370
|
-
$el.on('keydown', event => {
|
|
1371
|
-
const $target = $(event.target);
|
|
1372
|
-
const $parent = $target.parent();
|
|
1373
|
-
const elementScope = this.elementScope;
|
|
1374
|
-
let stopPropogation, preventDefault;
|
|
1375
|
-
if (event.key === 'Escape') {
|
|
1376
|
-
elementScope.hideTimepickerDropdown();
|
|
1377
|
-
}
|
|
1378
|
-
if ($target.hasClass('bs-timepicker-field')) {
|
|
1379
|
-
if ($parent.is(':first-child')) {
|
|
1380
|
-
if ((event.shiftKey && event.key === 'Tab') || event.key === 'Enter' || event.key === 'Escape') {
|
|
1381
|
-
elementScope.setIsTimeOpen(false);
|
|
1382
|
-
this.focus();
|
|
1383
|
-
stopPropogation = true;
|
|
1384
|
-
preventDefault = true;
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
else if ($parent.is(':last-child') || ($parent.next().next().find('button.disabled').length)) {
|
|
1388
|
-
if (event.key === 'Tab' || event.key === 'Escape' || event.key === 'Enter') {
|
|
1389
|
-
elementScope.setIsTimeOpen(false);
|
|
1390
|
-
this.focus();
|
|
1391
|
-
stopPropogation = true;
|
|
1392
|
-
preventDefault = true;
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
else {
|
|
1396
|
-
if (event.key === 'Enter' || event.key === 'Escape') {
|
|
1397
|
-
elementScope.setIsTimeOpen(false);
|
|
1398
|
-
this.focus();
|
|
1399
|
-
stopPropogation = true;
|
|
1400
|
-
preventDefault = true;
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
if (stopPropogation) {
|
|
1404
|
-
event.stopPropagation();
|
|
1405
|
-
}
|
|
1406
|
-
if (preventDefault) {
|
|
1407
|
-
event.preventDefault();
|
|
1408
|
-
}
|
|
1409
|
-
if (elementScope.mintime && elementScope.maxtime && !this.isValidDate(elementScope.bsTimeValue)) {
|
|
1410
|
-
if (event.key === 'ArrowDown') {
|
|
1411
|
-
elementScope.bsTimeValue = elementScope.maxTime;
|
|
1412
|
-
}
|
|
1413
|
-
else if (event.key === 'ArrowUp') {
|
|
1414
|
-
elementScope.bsTimeValue = elementScope.minTime;
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
if (event.key === 'Tab') {
|
|
1418
|
-
this.invalidDateTimeFormat = false;
|
|
1419
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
1420
|
-
const pattern = this.datepattern || this.timepattern;
|
|
1421
|
-
if (i1$1.getFormattedDate(elementScope.datePipe, elementScope.bsTimeValue, pattern, this.timeZone, null, null, this) === elementScope.displayValue) {
|
|
1422
|
-
$(this.nativeElement).find('.display-input').val(elementScope.displayValue);
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
1426
|
-
this.timeFormatValidation();
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
else if ($target.hasClass('btn-default')) {
|
|
1430
|
-
if (event.key === 'Tab' || event.key === 'Escape') {
|
|
1431
|
-
elementScope.setIsTimeOpen(false);
|
|
1432
|
-
this.focus();
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
});
|
|
1436
|
-
$el.find('a').on('click', evt => {
|
|
1437
|
-
const elementScope = this.elementScope;
|
|
1438
|
-
const $target = $(evt.target);
|
|
1439
|
-
if (elementScope.mintime && elementScope.maxtime && !this.isValidDate(elementScope.bsTimeValue)) {
|
|
1440
|
-
if ($target.find('span').hasClass('bs-chevron-down')) {
|
|
1441
|
-
elementScope.bsTimeValue = elementScope.maxTime;
|
|
1442
|
-
}
|
|
1443
|
-
else if ($target.find('span').hasClass('bs-chevron-up')) {
|
|
1444
|
-
elementScope.bsTimeValue = elementScope.minTime;
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
this.timeFormatValidation();
|
|
1448
|
-
});
|
|
1449
|
-
}
|
|
1450
|
-
updateFormat(pattern) {
|
|
1451
|
-
if (pattern === 'datepattern') {
|
|
1452
|
-
this._dateOptions.dateInputFormat = this.datepattern;
|
|
1453
|
-
this.showseconds = lodashEs.includes(this.datepattern, 's');
|
|
1454
|
-
this.ismeridian = lodashEs.includes(this.datepattern, 'h');
|
|
1455
|
-
}
|
|
1456
|
-
else if (pattern === 'timepattern') {
|
|
1457
|
-
this.showseconds = lodashEs.includes(this.timepattern, 's');
|
|
1458
|
-
this.ismeridian = lodashEs.includes(this.timepattern, 'h');
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
getMobileInput() {
|
|
1462
|
-
return this.nativeElement.querySelector('.mobile-input');
|
|
1463
|
-
}
|
|
1464
|
-
onDateTimeInputBlur() {
|
|
1465
|
-
// removing the opacity on blur of the mobile widget
|
|
1466
|
-
const displayInputElem = this.getMobileInput();
|
|
1467
|
-
if (displayInputElem) {
|
|
1468
|
-
const children = this.nativeElement.children;
|
|
1469
|
-
for (let i = 0; i < children.length; i++) {
|
|
1470
|
-
children[i].classList.remove('add-opacity');
|
|
1471
|
-
}
|
|
1472
|
-
displayInputElem.classList.remove('remove-opacity');
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
onDateTimeInputFocus(skipFocus = false) {
|
|
1476
|
-
if (!this.loadNativeDateInput) {
|
|
1477
|
-
return;
|
|
1478
|
-
}
|
|
1479
|
-
const displayInputElem = this.getMobileInput();
|
|
1480
|
-
// toggling the classes to show and hide the native widget using opacity
|
|
1481
|
-
if (skipFocus) {
|
|
1482
|
-
const children = this.nativeElement.children;
|
|
1483
|
-
for (let i = 0; i < children.length; i++) {
|
|
1484
|
-
children[i].classList.add('add-opacity');
|
|
1485
|
-
}
|
|
1486
|
-
displayInputElem.classList.add('remove-opacity');
|
|
1487
|
-
return;
|
|
1488
|
-
}
|
|
1489
|
-
if (displayInputElem && this._triggeredByUser) {
|
|
1490
|
-
displayInputElem.focus();
|
|
1491
|
-
displayInputElem.click();
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
/**
|
|
1495
|
-
* This method sets the mouse events to Datepicker popup. These events are required when we navigate date picker through mouse.
|
|
1496
|
-
*/
|
|
1497
|
-
addDatepickerMouseEvents() {
|
|
1498
|
-
$(".bs-datepicker-head .previous span").attr("aria-hidden", 'true');
|
|
1499
|
-
$(".bs-datepicker-head .next span").attr("aria-hidden", 'true');
|
|
1500
|
-
$(".bs-datepicker-head").on("click", ".previous", (event) => {
|
|
1501
|
-
this.next = this.getMonth(this.activeDate, 0);
|
|
1502
|
-
this.prev = this.getMonth(this.activeDate, -2);
|
|
1503
|
-
this.clicked = true;
|
|
1504
|
-
// check for original mouse click
|
|
1505
|
-
if (event.originalEvent) {
|
|
1506
|
-
this.setFocusForDate(-1);
|
|
1507
|
-
}
|
|
1508
|
-
var prevMon = this.getMonth(this.activeDate, -1);
|
|
1509
|
-
const current = new Date();
|
|
1510
|
-
if (prevMon.date.getMonth() === current.getMonth() && prevMon.date.getFullYear() === current.getFullYear()) {
|
|
1511
|
-
this.hightlightToday(new Date());
|
|
1512
|
-
}
|
|
1513
|
-
setTimeout(() => {
|
|
1514
|
-
$(".bs-datepicker-head .previous span").attr("aria-hidden", 'true');
|
|
1515
|
-
$(".bs-datepicker-head .next span").attr("aria-hidden", 'true');
|
|
1516
|
-
$(".bs-datepicker-head .next").attr('aria-label', `Next Month, ${this.next.fullMonth} ${this.next.date.getFullYear()}`);
|
|
1517
|
-
$(".bs-datepicker-head .previous").attr('aria-label', `Previous Month, ${this.prev.fullMonth} ${this.prev.date.getFullYear()}`);
|
|
1518
|
-
$('.bs-datepicker-head .current').first().append(`<h2 aria-hidden="false" aria-atomic="true" aria-live='polite' class="sr-only">Changed to Previous Month, ${prevMon.fullMonth} and year ${prevMon.date.getFullYear()}</h2>`);
|
|
1519
|
-
$('.bs-datepicker-head').on('focus', '.current', function () {
|
|
1520
|
-
$('.bs-datepicker-head .current').find('h2').remove();
|
|
1521
|
-
});
|
|
1522
|
-
$(`.bs-datepicker-head .previous`).focus();
|
|
1523
|
-
});
|
|
1524
|
-
});
|
|
1525
|
-
$(".bs-datepicker-head").on("click", ".next", (event) => {
|
|
1526
|
-
this.next = this.getMonth(this.activeDate, 2);
|
|
1527
|
-
this.prev = this.getMonth(this.activeDate, 0);
|
|
1528
|
-
this.clicked = true;
|
|
1529
|
-
// check for original mouse click
|
|
1530
|
-
if (event.originalEvent) {
|
|
1531
|
-
this.setFocusForDate(1);
|
|
1532
|
-
}
|
|
1533
|
-
var nextMon = this.getMonth(this.activeDate, 1);
|
|
1534
|
-
const current = new Date();
|
|
1535
|
-
if (nextMon.date.getMonth() === current.getMonth() && nextMon.date.getFullYear() === current.getFullYear()) {
|
|
1536
|
-
this.hightlightToday(current);
|
|
1537
|
-
}
|
|
1538
|
-
setTimeout(() => {
|
|
1539
|
-
$(".bs-datepicker-head .previous span").attr("aria-hidden", 'true');
|
|
1540
|
-
$(".bs-datepicker-head .next span").attr("aria-hidden", 'true');
|
|
1541
|
-
$(".bs-datepicker-head .next").attr('aria-label', `Next Month, ${this.next.fullMonth} ${this.next.date.getFullYear()}`);
|
|
1542
|
-
$(".bs-datepicker-head .previous").attr('aria-label', `Previous Month, ${this.prev.fullMonth} ${this.prev.date.getFullYear()}`);
|
|
1543
|
-
$('.bs-datepicker-head .current').first().append(`<h2 aria-hidden="false" aria-atomic="true" aria-live='polite' class="sr-only">Changed to Next Month, ${nextMon.fullMonth} and year ${nextMon.date.getFullYear()}</h2>`);
|
|
1544
|
-
$('.bs-datepicker-head').on('focus', '.current', function () {
|
|
1545
|
-
$('.bs-datepicker-head .current').find('h2').remove();
|
|
1546
|
-
});
|
|
1547
|
-
$(`.bs-datepicker-head .next`).focus();
|
|
1548
|
-
});
|
|
1549
|
-
});
|
|
1550
|
-
$(".bs-datepicker-head").on("click", ".current", (event) => {
|
|
1551
|
-
// check for original mouse click
|
|
1552
|
-
if (event.originalEvent) {
|
|
1553
|
-
this.setFocusForCurrentMonthOryear();
|
|
1554
|
-
}
|
|
1555
|
-
});
|
|
1556
|
-
$('.bs-datepicker-body').on("click", ".bs-datepicker-action-buttons", (event) => {
|
|
1557
|
-
event.stopPropagation();
|
|
1558
|
-
// check for original mouse click
|
|
1559
|
-
if (event.originalEvent) {
|
|
1560
|
-
this.setFocusForMonthOrDay();
|
|
1561
|
-
}
|
|
1562
|
-
});
|
|
1563
|
-
// if(!this.clicked) {
|
|
1564
|
-
$(".bs-datepicker-head .next").attr('aria-label', `Next Month, ${this.next.fullMonth} ${this.next.date.getFullYear()}`);
|
|
1565
|
-
$(".bs-datepicker-head .previous").attr('aria-label', `Previous Month, ${this.prev.fullMonth} ${this.prev.date.getFullYear()}`);
|
|
1566
|
-
// }
|
|
1567
|
-
}
|
|
1568
|
-
blurDateInput(isPickerOpen) {
|
|
1569
|
-
const displayInputElem = this.nativeElement.querySelector('.display-input');
|
|
1570
|
-
if (isPickerOpen) {
|
|
1571
|
-
setTimeout(() => displayInputElem.blur());
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
getPeriod() {
|
|
1575
|
-
if (!this.elementScope.bsTimeValue)
|
|
1576
|
-
return 'AM';
|
|
1577
|
-
const hours = this.elementScope.bsTimeValue.getHours();
|
|
1578
|
-
return hours >= 12 ? 'PM' : 'AM';
|
|
1579
|
-
}
|
|
1580
|
-
setPeriod(period) {
|
|
1581
|
-
const current = this.elementScope.bsTimeValue;
|
|
1582
|
-
if (!current || !(current instanceof Date))
|
|
1583
|
-
return;
|
|
1584
|
-
const updatedDate = new Date(current);
|
|
1585
|
-
const hours = updatedDate.getHours();
|
|
1586
|
-
if (period === 'AM' && hours >= 12) {
|
|
1587
|
-
updatedDate.setHours(hours - 12);
|
|
1588
|
-
}
|
|
1589
|
-
else if (period === 'PM' && hours < 12) {
|
|
1590
|
-
updatedDate.setHours(hours + 12);
|
|
1591
|
-
}
|
|
1592
|
-
if (this.elementScope.widgetType === 'wm-time') {
|
|
1593
|
-
const isInvalid = this.elementScope.minTime && this.elementScope.maxTime && (updatedDate < this.elementScope.minTime || updatedDate > this.elementScope.maxTime);
|
|
1594
|
-
if (!isInvalid)
|
|
1595
|
-
this.elementScope.onTimeChange(updatedDate);
|
|
1596
|
-
}
|
|
1597
|
-
else {
|
|
1598
|
-
this.elementScope.onModelUpdate(updatedDate);
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
onPropertyChange(key, nv, ov) {
|
|
1602
|
-
if (key === 'tabindex') {
|
|
1603
|
-
return;
|
|
1604
|
-
}
|
|
1605
|
-
if (key === 'showampmbuttons') {
|
|
1606
|
-
this.showampmbuttons = nv;
|
|
1607
|
-
}
|
|
1608
|
-
if (key === 'required') {
|
|
1609
|
-
this._onChange(this.datavalue);
|
|
1610
|
-
return;
|
|
1611
|
-
}
|
|
1612
|
-
if (key === 'datepattern') {
|
|
1613
|
-
this.updateFormat(key);
|
|
1614
|
-
}
|
|
1615
|
-
else if (key === 'viewmode') {
|
|
1616
|
-
this._dateOptions.minMode = this.viewmode;
|
|
1617
|
-
}
|
|
1618
|
-
else if (key === 'showweeks') {
|
|
1619
|
-
this._dateOptions.showWeekNumbers = nv;
|
|
1620
|
-
}
|
|
1621
|
-
else if (key === 'mindate') {
|
|
1622
|
-
this._dateOptions.minDate = (nv === CURRENT_DATE$2) ? this.mindate = new Date() : i1$1.getDateObj(nv);
|
|
1623
|
-
this.minDateMaxDateValidationOnInput(this.datavalue);
|
|
1624
|
-
}
|
|
1625
|
-
else if (key === 'maxdate') {
|
|
1626
|
-
this._dateOptions.maxDate = (nv === CURRENT_DATE$2) ? this.maxdate = new Date() : i1$1.getDateObj(nv);
|
|
1627
|
-
this.minDateMaxDateValidationOnInput(this.datavalue);
|
|
1628
|
-
}
|
|
1629
|
-
else if (key === 'excludedates' || key === 'excludedays') {
|
|
1630
|
-
if (this.excludedays) {
|
|
1631
|
-
this.excludedDaysToDisable = lodashEs.split(this.excludedays, ',').map((day) => {
|
|
1632
|
-
return +day;
|
|
1633
|
-
});
|
|
1634
|
-
}
|
|
1635
|
-
if (this.excludedates) {
|
|
1636
|
-
this.excludedDatesToDisable = this.excludedates;
|
|
1637
|
-
if (lodashEs.isString(this.excludedates)) {
|
|
1638
|
-
// @ts-ignore
|
|
1639
|
-
this.excludedDatesToDisable = lodashEs.split(this.excludedates, ',');
|
|
1640
|
-
}
|
|
1641
|
-
this.excludedDatesToDisable = this.excludedDatesToDisable.map(d => i1$1.getDateObj(d));
|
|
1642
|
-
}
|
|
1643
|
-
this.minDateMaxDateValidationOnInput(this.datavalue);
|
|
1644
|
-
}
|
|
1645
|
-
else if (key === 'selectfromothermonth') {
|
|
1646
|
-
this._dateOptions.selectFromOtherMonth = nv;
|
|
1647
|
-
}
|
|
1648
|
-
else if (key === 'todaybutton') {
|
|
1649
|
-
this._dateOptions.showTodayButton = nv;
|
|
1650
|
-
}
|
|
1651
|
-
else if (key === 'clearbutton') {
|
|
1652
|
-
this._dateOptions.showClearButton = nv;
|
|
1653
|
-
}
|
|
1654
|
-
else if (key === 'todaybuttonlabel') {
|
|
1655
|
-
this._dateOptions.todayButtonLabel = this.i18nService.getLocalizedMessage(nv) || nv;
|
|
1656
|
-
}
|
|
1657
|
-
else if (key === 'clearbuttonlabel') {
|
|
1658
|
-
this._dateOptions.clearButtonLabel = this.i18nService.getLocalizedMessage(nv) || nv;
|
|
1659
|
-
}
|
|
1660
|
-
else if (key === 'showcustompicker') {
|
|
1661
|
-
this.loadNativeDateInput = i1$1.isMobile() && !this.showcustompicker;
|
|
1662
|
-
}
|
|
1663
|
-
else if (key === 'adaptiveposition') {
|
|
1664
|
-
this._dateOptions.adaptivePosition = nv;
|
|
1665
|
-
}
|
|
1666
|
-
else {
|
|
1667
|
-
super.onPropertyChange(key, nv, ov);
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
ngAfterViewInit() {
|
|
1671
|
-
super.ngAfterViewInit();
|
|
1672
|
-
this.containerTarget = base.getContainerTargetClass(this.nativeElement);
|
|
1673
|
-
this.isReadOnly = this.dataentrymode != 'undefined' && !this.isDataEntryModeEnabledOnInput(this.dataentrymode);
|
|
1674
|
-
// this mobileinput width varies in ios hence setting width here.
|
|
1675
|
-
const mobileInput = this.getMobileInput();
|
|
1676
|
-
if (mobileInput) {
|
|
1677
|
-
setTimeout(() => {
|
|
1678
|
-
mobileInput.style.width = '100%';
|
|
1679
|
-
mobileInput.style.height = '100%';
|
|
1680
|
-
});
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
ngOnDestroy() {
|
|
1684
|
-
if (this.dateOnShowSubscription) {
|
|
1685
|
-
this.dateOnShowSubscription.unsubscribe();
|
|
1686
|
-
}
|
|
1687
|
-
if (this.cancelLocaleChangeSubscription) {
|
|
1688
|
-
this.cancelLocaleChangeSubscription();
|
|
1689
|
-
}
|
|
1690
|
-
super.ngOnDestroy();
|
|
1691
|
-
}
|
|
1692
|
-
ngOnDetach() {
|
|
1693
|
-
this.datetimepickerComponent?.hideModal();
|
|
1694
|
-
}
|
|
1695
|
-
setTimezone(locale) {
|
|
1696
|
-
this.i18nService.setTimezone(locale, this);
|
|
1697
|
-
}
|
|
1698
|
-
ngOnInit() {
|
|
1699
|
-
super.ngOnInit();
|
|
1700
|
-
if (this.dateNotInRange || this.timeNotInRange || this.invalidDateTimeFormat) {
|
|
1701
|
-
const formattedDisplay = i1$1.getFormattedDate(this.datePipe, this.datavalue, this.datepattern || this.timepattern, this.timeZone, null, null, this);
|
|
1702
|
-
const value = this.datavalue;
|
|
1703
|
-
this.datavalue = undefined;
|
|
1704
|
-
setTimeout(() => {
|
|
1705
|
-
$(this.nativeElement).find('.display-input').val(this.safeReplaceMeridians(formattedDisplay));
|
|
1706
|
-
this.minDateMaxDateValidationOnInput(formattedDisplay);
|
|
1707
|
-
this.invokeOnChange(value, {}, false);
|
|
1708
|
-
});
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
static { this.ɵfac = function BaseDateTimeComponent_Factory(__ngFactoryType__) { i0__namespace.ɵɵinvalidFactory(); }; }
|
|
1712
|
-
static { this.ɵdir = /*@__PURE__*/ i0__namespace.ɵɵdefineDirective({ type: BaseDateTimeComponent, viewQuery: function BaseDateTimeComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1713
|
-
i0__namespace.ɵɵviewQuery(i3.BsDropdownDirective, 5);
|
|
1714
|
-
i0__namespace.ɵɵviewQuery(i5.TimepickerComponent, 5);
|
|
1715
|
-
i0__namespace.ɵɵviewQuery(DateTimePickerComponent, 5);
|
|
1716
|
-
} if (rf & 2) {
|
|
1717
|
-
let _t;
|
|
1718
|
-
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.bsDropdown = _t.first);
|
|
1719
|
-
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.bsTimePicker = _t.first);
|
|
1720
|
-
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.datetimepickerComponent = _t.first);
|
|
1721
|
-
} }, features: [i0__namespace.ɵɵInheritDefinitionFeature] }); }
|
|
1722
|
-
}
|
|
1723
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BaseDateTimeComponent, [{
|
|
1724
|
-
type: i0.Directive
|
|
1725
|
-
}], () => [{ type: i0__namespace.Injector }, { type: undefined }, { type: undefined, decorators: [{
|
|
1726
|
-
type: i0.Inject,
|
|
1727
|
-
args: ['EXPLICIT_CONTEXT']
|
|
1728
|
-
}, {
|
|
1729
|
-
type: i0.Optional
|
|
1730
|
-
}] }], { bsDropdown: [{
|
|
1731
|
-
type: i0.ViewChild,
|
|
1732
|
-
args: [i3.BsDropdownDirective]
|
|
1733
|
-
}], bsTimePicker: [{
|
|
1734
|
-
type: i0.ViewChild,
|
|
1735
|
-
args: [i5.TimepickerComponent]
|
|
1736
|
-
}], datetimepickerComponent: [{
|
|
1737
|
-
type: i0.ViewChild,
|
|
1738
|
-
args: [DateTimePickerComponent]
|
|
1739
|
-
}] }); })();
|
|
1740
|
-
|
|
1741
|
-
const dateProps = new Map([
|
|
1742
|
-
['autofocus', base.PROP_BOOLEAN],
|
|
1743
|
-
['class', base.PROP_STRING],
|
|
1744
|
-
['dataentrymode', { value: 'default', ...base.PROP_STRING }],
|
|
1745
|
-
['datavaluesource', base.PROP_ANY],
|
|
1746
|
-
['datavalue', base.PROP_STRING],
|
|
1747
|
-
['datepattern', base.PROP_STRING],
|
|
1748
|
-
['disabled', base.PROP_BOOLEAN],
|
|
1749
|
-
['excludedays', base.PROP_STRING],
|
|
1750
|
-
['excludedates', base.PROP_STRING],
|
|
1751
|
-
['hint', base.PROP_STRING],
|
|
1752
|
-
['arialabel', base.PROP_STRING],
|
|
1753
|
-
['maxdate', base.PROP_STRING],
|
|
1754
|
-
['mindate', base.PROP_STRING],
|
|
1755
|
-
['name', base.PROP_STRING],
|
|
1756
|
-
['outputformat', { value: 'yyyy-MM-dd', ...base.PROP_STRING }],
|
|
1757
|
-
['placeholder', { value: 'Select Date', ...base.PROP_STRING }],
|
|
1758
|
-
['readonly', base.PROP_BOOLEAN],
|
|
1759
|
-
['required', base.PROP_BOOLEAN],
|
|
1760
|
-
['shortcutkey', base.PROP_STRING],
|
|
1761
|
-
['show', { value: true, ...base.PROP_BOOLEAN }],
|
|
1762
|
-
['showdropdownon', { value: 'default', ...base.PROP_STRING }],
|
|
1763
|
-
['showbuttonbar', { value: true, ...base.PROP_BOOLEAN }], // TODO not addressed
|
|
1764
|
-
['showcustompicker', { value: false, ...base.PROP_BOOLEAN }],
|
|
1765
|
-
['showindevice', { displayType: 'inline-block', value: 'all', ...base.PROP_STRING }],
|
|
1766
|
-
['showweeks', { value: false, ...base.PROP_BOOLEAN }],
|
|
1767
|
-
['tabindex', { value: 0, ...base.PROP_NUMBER }],
|
|
1768
|
-
['selectfromothermonth', { value: true, ...base.PROP_BOOLEAN }],
|
|
1769
|
-
['todaybutton', { value: true, ...base.PROP_BOOLEAN }],
|
|
1770
|
-
['clearbutton', { value: true, ...base.PROP_BOOLEAN }],
|
|
1771
|
-
['adaptiveposition', { value: true, ...base.PROP_BOOLEAN }],
|
|
1772
|
-
['todaybuttonlabel', { value: 'LABEL_TODAY_DATE', ...base.PROP_STRING }],
|
|
1773
|
-
['clearbuttonlabel', { value: 'LABEL_CLEAR_DATE', ...base.PROP_STRING }],
|
|
1774
|
-
['showdateformatasplaceholder', base.PROP_BOOLEAN],
|
|
1775
|
-
['viewmode', { value: 'day', ...base.PROP_STRING }]
|
|
1776
|
-
]);
|
|
1777
|
-
const registerProps$2 = () => {
|
|
1778
|
-
base.register('wm-date', dateProps);
|
|
1779
|
-
base.registerFormWidget(i1$1.FormWidgetType.DATE, new Map(dateProps));
|
|
1780
|
-
};
|
|
1781
|
-
|
|
1782
|
-
const moment$2 = momentLib__namespace.default || window['moment'];
|
|
1783
|
-
function validateTheMaskedDate(format, locale) {
|
|
1784
|
-
if (format == 'timestamp') {
|
|
1785
|
-
return false;
|
|
1786
|
-
}
|
|
1787
|
-
let modifiedFormat = format.toUpperCase().replace(/E/g, 'd');
|
|
1788
|
-
if ((modifiedFormat.split('D').length - 1) === 1) {
|
|
1789
|
-
modifiedFormat = modifiedFormat.replace('D', 'DD');
|
|
1790
|
-
}
|
|
1791
|
-
if ((modifiedFormat.split('M').length - 1) === 1) {
|
|
1792
|
-
modifiedFormat = modifiedFormat.replace('M', 'MM');
|
|
1793
|
-
}
|
|
1794
|
-
const parseFn = str => {
|
|
1795
|
-
return moment$2(str, modifiedFormat).toDate();
|
|
1796
|
-
};
|
|
1797
|
-
const formatFn = date => {
|
|
1798
|
-
return moment$2(date, modifiedFormat).format(modifiedFormat);
|
|
1799
|
-
};
|
|
1800
|
-
return {
|
|
1801
|
-
mask: Date,
|
|
1802
|
-
pattern: modifiedFormat,
|
|
1803
|
-
format: formatFn,
|
|
1804
|
-
parse: parseFn,
|
|
1805
|
-
blocks: {
|
|
1806
|
-
YYYY: {
|
|
1807
|
-
mask: IMask.MaskedRange,
|
|
1808
|
-
from: 1900,
|
|
1809
|
-
to: 9999,
|
|
1810
|
-
placeholderChar: 'Y',
|
|
1811
|
-
maxLength: 4,
|
|
1812
|
-
},
|
|
1813
|
-
YYY: {
|
|
1814
|
-
mask: IMask.MaskedRange,
|
|
1815
|
-
from: 900,
|
|
1816
|
-
to: 999,
|
|
1817
|
-
placeholderChar: 'Y',
|
|
1818
|
-
maxLength: 3,
|
|
1819
|
-
},
|
|
1820
|
-
YY: {
|
|
1821
|
-
mask: IMask.MaskedRange,
|
|
1822
|
-
from: 0,
|
|
1823
|
-
to: 99,
|
|
1824
|
-
placeholderChar: 'Y',
|
|
1825
|
-
maxLength: 2,
|
|
1826
|
-
},
|
|
1827
|
-
Y: {
|
|
1828
|
-
mask: IMask.MaskedRange,
|
|
1829
|
-
from: 1900,
|
|
1830
|
-
to: 9999,
|
|
1831
|
-
placeholderChar: 'Y',
|
|
1832
|
-
maxLength: 4,
|
|
1833
|
-
},
|
|
1834
|
-
M: {
|
|
1835
|
-
mask: IMask.MaskedRange,
|
|
1836
|
-
from: 1,
|
|
1837
|
-
to: 12,
|
|
1838
|
-
placeholderChar: 'M',
|
|
1839
|
-
maxLength: 2,
|
|
1840
|
-
},
|
|
1841
|
-
MM: {
|
|
1842
|
-
mask: IMask.MaskedRange,
|
|
1843
|
-
from: 1,
|
|
1844
|
-
to: 12,
|
|
1845
|
-
placeholderChar: 'M',
|
|
1846
|
-
maxLength: 2,
|
|
1847
|
-
},
|
|
1848
|
-
MMM: {
|
|
1849
|
-
mask: IMask.MaskedEnum,
|
|
1850
|
-
enum: Array.from({ length: 12 }, (_, i) => new Date(0, i).toLocaleString(locale, { month: 'short' })),
|
|
1851
|
-
placeholderChar: 'M',
|
|
1852
|
-
maxLength: 3,
|
|
1853
|
-
},
|
|
1854
|
-
MMMM: {
|
|
1855
|
-
mask: IMask.MaskedEnum,
|
|
1856
|
-
enum: Array.from({ length: 12 }, (_, i) => new Date(0, i).toLocaleString(locale, { month: 'long' })),
|
|
1857
|
-
placeholderChar: "M",
|
|
1858
|
-
maxLength: 4
|
|
1859
|
-
},
|
|
1860
|
-
DD: {
|
|
1861
|
-
mask: IMask.MaskedRange,
|
|
1862
|
-
from: 1,
|
|
1863
|
-
to: 31,
|
|
1864
|
-
placeholderChar: 'D',
|
|
1865
|
-
maxLength: 2,
|
|
1866
|
-
},
|
|
1867
|
-
D: {
|
|
1868
|
-
mask: IMask.MaskedRange,
|
|
1869
|
-
from: 1,
|
|
1870
|
-
to: 31,
|
|
1871
|
-
placeholderChar: 'D',
|
|
1872
|
-
maxLength: 2,
|
|
1873
|
-
},
|
|
1874
|
-
ddd: {
|
|
1875
|
-
mask: IMask.MaskedEnum,
|
|
1876
|
-
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(locale, { weekday: 'short' })),
|
|
1877
|
-
placeholderChar: 'E',
|
|
1878
|
-
maxLength: 3,
|
|
1879
|
-
},
|
|
1880
|
-
dddd: {
|
|
1881
|
-
mask: IMask.MaskedEnum,
|
|
1882
|
-
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(locale, { weekday: 'long' })),
|
|
1883
|
-
placeholderChar: 'E',
|
|
1884
|
-
minLength: 6,
|
|
1885
|
-
},
|
|
1886
|
-
},
|
|
1887
|
-
autofix: true,
|
|
1888
|
-
lazy: false,
|
|
1889
|
-
overwrite: true,
|
|
1890
|
-
skipInvalid: true
|
|
1891
|
-
};
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
const _c0$2 = ["dateInput"];
|
|
1895
|
-
const _c1$2 = ["wmDate", ""];
|
|
1896
|
-
function DateComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
1897
|
-
const _r2 = i0__namespace.ɵɵgetCurrentView();
|
|
1898
|
-
i0__namespace.ɵɵelementStart(0, "wm-datetimepicker", 8);
|
|
1899
|
-
i0__namespace.ɵɵlistener("change", function DateComponent_Conditional_8_Template_wm_datetimepicker_change_0_listener($event) { i0__namespace.ɵɵrestoreView(_r2); const ctx_r2 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r2.onDateChange($event)); });
|
|
1900
|
-
i0__namespace.ɵɵelementEnd();
|
|
1901
|
-
i0__namespace.ɵɵelementStart(1, "div", 9);
|
|
1902
|
-
i0__namespace.ɵɵlistener("click", function DateComponent_Conditional_8_Template_div_click_1_listener() { i0__namespace.ɵɵrestoreView(_r2); const ctx_r2 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(!(ctx_r2.disabled || ctx_r2.readonly) && ctx_r2.showDatePickerModal(ctx_r2.bsDataValue)); })("focus", function DateComponent_Conditional_8_Template_div_focus_1_listener($event) { i0__namespace.ɵɵrestoreView(_r2); const ctx_r2 = i0__namespace.ɵɵnextContext(); ctx_r2.onDateTimeInputFocus(true); return i0__namespace.ɵɵresetView(ctx_r2.invokeOnFocus($event)); })("blur", function DateComponent_Conditional_8_Template_div_blur_1_listener($event) { i0__namespace.ɵɵrestoreView(_r2); const ctx_r2 = i0__namespace.ɵɵnextContext(); ctx_r2.onDateTimeInputBlur(); return i0__namespace.ɵɵresetView(ctx_r2.invokeOnTouched($event)); });
|
|
1903
|
-
i0__namespace.ɵɵelementEnd();
|
|
1904
|
-
} if (rf & 2) {
|
|
1905
|
-
const ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
1906
|
-
i0__namespace.ɵɵproperty("config", ctx_r2._dateOptions)("placement", ctx_r2.modal)("excludedDaysToDisable", ctx_r2.excludedDaysToDisable)("excludedDatesToDisable", ctx_r2.excludedDatesToDisable)("displayFormat", ctx_r2.dateInputFormat)("value", ctx_r2.bsDataValue);
|
|
1907
|
-
i0__namespace.ɵɵadvance();
|
|
1908
|
-
i0__namespace.ɵɵproperty("tabindex", ctx_r2.tabindex || 0);
|
|
1909
|
-
i0__namespace.ɵɵattribute("aria-label", ctx_r2.displayValue ? "Change Date " + ctx_r2.displayValue : ctx_r2.arialabel || "Choose Date");
|
|
1910
|
-
} }
|
|
1911
|
-
const CURRENT_DATE$1 = 'CURRENT_DATE';
|
|
1912
|
-
const DEFAULT_CLS$2 = 'app-date input-group';
|
|
1913
|
-
const WIDGET_CONFIG$2 = {
|
|
1914
|
-
widgetType: 'wm-date',
|
|
1915
|
-
hostClass: DEFAULT_CLS$2
|
|
1916
|
-
};
|
|
1917
|
-
class DateComponent extends BaseDateTimeComponent {
|
|
1918
|
-
static { this.initializeProps = registerProps$2(); }
|
|
1919
|
-
get timestamp() {
|
|
1920
|
-
return this.bsDataValue ? this.bsDataValue.valueOf() : undefined;
|
|
1921
|
-
}
|
|
1922
|
-
get dateInputFormat() {
|
|
1923
|
-
return this._dateOptions.dateInputFormat || 'yyyy-MM-dd';
|
|
1924
|
-
}
|
|
1925
|
-
get displayValue() {
|
|
1926
|
-
if (this.showdateformatasplaceholder && this.imask?.maskRef && this.maskDateInputFormat) {
|
|
1927
|
-
return i1$1.getFormattedDate(this.datePipe, this.bsDataValue, this.maskDateInputFormat, this.timeZone, null, this.isCurrentDate, this) || '';
|
|
1928
|
-
}
|
|
1929
|
-
return i1$1.getFormattedDate(this.datePipe, this.bsDataValue, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this) || '';
|
|
1930
|
-
}
|
|
1931
|
-
get nativeDisplayValue() {
|
|
1932
|
-
return i1$1.getFormattedDate(this.datePipe, this.bsDataValue, 'yyyy-MM-dd', this.timeZone, null, this.isCurrentDate, this) || '';
|
|
1933
|
-
}
|
|
1934
|
-
// @ts-ignore
|
|
1935
|
-
get datavalue() {
|
|
1936
|
-
return i1$1.getFormattedDate(this.datePipe, this.bsDataValue, this.outputformat, this.timeZone, null, this.isCurrentDate, this) || '';
|
|
1937
|
-
}
|
|
1938
|
-
// Todo[Shubham]: needs to be redefined
|
|
1939
|
-
// sets the dataValue and computes the display model values
|
|
1940
|
-
// @ts-ignore
|
|
1941
|
-
set datavalue(newVal) {
|
|
1942
|
-
if (newVal === CURRENT_DATE$1) {
|
|
1943
|
-
setTimeout(() => {
|
|
1944
|
-
this.bsDataValue = this.timeZone ? i1$1.getMomentLocaleObject(this.timeZone) : new Date();
|
|
1945
|
-
}, 50);
|
|
1946
|
-
this.isCurrentDate = true;
|
|
1947
|
-
}
|
|
1948
|
-
else {
|
|
1949
|
-
this.bsDataValue = newVal ? i1$1.getDateObj(newVal, { isNativePicker: this.loadNativeDateInput }, this.timeZone) : undefined;
|
|
1950
|
-
this.isCurrentDate = false;
|
|
1951
|
-
}
|
|
1952
|
-
// update the previous datavalue.
|
|
1953
|
-
this.invokeOnChange(this.datavalue, undefined, true);
|
|
1954
|
-
this.cdRef.detectChanges();
|
|
1955
|
-
}
|
|
1956
|
-
// TODO use BsLocaleService to set the current user's locale to see the localized labels
|
|
1957
|
-
constructor(inj, cdRef, appDefaults, explicitContext) {
|
|
1958
|
-
super(inj, WIDGET_CONFIG$2, explicitContext);
|
|
1959
|
-
this.cdRef = cdRef;
|
|
1960
|
-
this.appDefaults = appDefaults;
|
|
1961
|
-
this.isOpen = false;
|
|
1962
|
-
this.isEnterPressedOnDateInput = false;
|
|
1963
|
-
this.showdateformatasplaceholder = false;
|
|
1964
|
-
base.styler(this.nativeElement, this);
|
|
1965
|
-
this.dateContainerCls = `app-date-${this.widgetId}`;
|
|
1966
|
-
this._dateOptions.containerClass = `app-date ${this.dateContainerCls}`;
|
|
1967
|
-
this._dateOptions.showWeekNumbers = false;
|
|
1968
|
-
this._bsDefaultLoadCheck = true;
|
|
1969
|
-
this.datepattern = this.appDefaults.dateFormat || i1$1.getDisplayDateTimeFormat(i1$1.FormWidgetType.DATE);
|
|
1970
|
-
this.updateFormat('datepattern');
|
|
1971
|
-
}
|
|
1972
|
-
/**
|
|
1973
|
-
* This is an internal method triggered when the date input changes
|
|
1974
|
-
*/
|
|
1975
|
-
onDisplayDateChange($event, isNativePicker = false) {
|
|
1976
|
-
this.updateIMask();
|
|
1977
|
-
if (this.isEnterPressedOnDateInput) {
|
|
1978
|
-
this.isEnterPressedOnDateInput = false;
|
|
1979
|
-
return;
|
|
1980
|
-
}
|
|
1981
|
-
let inputVal = $event.target.value;
|
|
1982
|
-
// When the input is cleared, the input value becomes maskDateInputFormatPlaceholder. This causes a validation error.
|
|
1983
|
-
// When the input value is equal to maskDateInputFormatPlaceholder, it means that the input is in an empty state.
|
|
1984
|
-
if (this.showdateformatasplaceholder && inputVal === this.maskDateInputFormatPlaceholder) {
|
|
1985
|
-
inputVal = "";
|
|
1986
|
-
}
|
|
1987
|
-
const newVal = i1$1.getDateObj(inputVal, { pattern: this.datepattern, isNativePicker: isNativePicker });
|
|
1988
|
-
// date pattern validation
|
|
1989
|
-
// if invalid pattern is entered, device is showing an error.
|
|
1990
|
-
if (!this.formatValidation(newVal, inputVal, isNativePicker)) {
|
|
1991
|
-
return;
|
|
1992
|
-
}
|
|
1993
|
-
// min date and max date validation in mobile view.
|
|
1994
|
-
// if invalid dates are entered, device is showing an alert.
|
|
1995
|
-
if (isNativePicker && this.minDateMaxDateValidationOnInput(newVal, $event, this.displayValue, isNativePicker)) {
|
|
1996
|
-
return;
|
|
1997
|
-
}
|
|
1998
|
-
this.setDataValue(newVal);
|
|
1999
|
-
}
|
|
2000
|
-
// sets the dataValue and computes the display model values
|
|
2001
|
-
setDataValue(newVal) {
|
|
2002
|
-
if (!newVal && $(this.nativeElement).find('.display-input').val()) {
|
|
2003
|
-
return;
|
|
2004
|
-
}
|
|
2005
|
-
this.invalidDateTimeFormat = false;
|
|
2006
|
-
// min date and max date validation in web.
|
|
2007
|
-
// if invalid dates are entered, device is showing validation message.
|
|
2008
|
-
this.minDateMaxDateValidationOnInput(newVal);
|
|
2009
|
-
if (i1$1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this) === this.displayValue) {
|
|
2010
|
-
$(this.nativeElement).find('.display-input').val(this.displayValue);
|
|
2011
|
-
}
|
|
2012
|
-
if (!this.dateNotInRange) {
|
|
2013
|
-
if (newVal) {
|
|
2014
|
-
this.bsDataValue = newVal;
|
|
2015
|
-
this.updateIMask();
|
|
2016
|
-
}
|
|
2017
|
-
else {
|
|
2018
|
-
this.bsDataValue = undefined;
|
|
2019
|
-
}
|
|
2020
|
-
if (this.datavalue === this.getPrevDataValue()) {
|
|
2021
|
-
const date = i1$1.getFormattedDate(this.datePipe, this.datavalue, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this);
|
|
2022
|
-
$(this.nativeElement).find('.display-input').val(date);
|
|
2023
|
-
}
|
|
2024
|
-
}
|
|
2025
|
-
this.invokeOnChange(this.datavalue, {}, true);
|
|
2026
|
-
}
|
|
2027
|
-
onDatePickerOpen() {
|
|
2028
|
-
this.isOpen = true;
|
|
2029
|
-
this.activeDate = this.bsDataValue ? this.bsDataValue : (this.timeZone ? i1$1.getMomentLocaleObject(this.timeZone) : new Date());
|
|
2030
|
-
if (!this.bsDataValue) {
|
|
2031
|
-
this.hightlightToday(this.activeDate);
|
|
2032
|
-
}
|
|
2033
|
-
this.updateIMask();
|
|
2034
|
-
if (this.bsDatePickerDirective && (this.dateNotInRange || this.invalidDateTimeFormat)) {
|
|
2035
|
-
this.bsDatePickerDirective._bsValue = null;
|
|
2036
|
-
}
|
|
2037
|
-
// We are using the two input tags(To maintain the modal and proxy modal) for the date control.
|
|
2038
|
-
// So actual bootstrap input target width we made it to 0, so bootstrap calculating the calendar container top position improperly.
|
|
2039
|
-
// To fix the container top position set the width 1px;
|
|
2040
|
-
this.$element.find('.model-holder').width('1px');
|
|
2041
|
-
const dpContainerEl = $('bs-datepicker-container');
|
|
2042
|
-
dpContainerEl.attr('aria-label', 'Use Arrow keys to navigate dates, Choose Date from datepicker');
|
|
2043
|
-
$('.bs-calendar-container').removeAttr('role');
|
|
2044
|
-
const datePickerContainer = $('.bs-datepicker-container')[0];
|
|
2045
|
-
this.focusTrap = base.setFocusTrap(datePickerContainer, true);
|
|
2046
|
-
this.focusTrap.activate();
|
|
2047
|
-
this.addDatepickerKeyboardEvents(this, false);
|
|
2048
|
-
i1$1.adjustContainerPosition($('bs-datepicker-container'), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
2049
|
-
i1$1.adjustContainerRightEdges($('bs-datepicker-container'), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
2050
|
-
if (this.timeZone) {
|
|
2051
|
-
const todayBtn = document.querySelector(`.${this.dateContainerCls} .bs-datepicker-buttons .btn-today-wrapper button`);
|
|
2052
|
-
const setTodayTZHandler = (event) => {
|
|
2053
|
-
const todayTZ = i1$1.getMomentLocaleObject(this.timeZone);
|
|
2054
|
-
if (new Date(this.bsDataValue).toDateString() !== new Date(todayTZ).toDateString()) {
|
|
2055
|
-
this.bsDataValue = todayTZ;
|
|
2056
|
-
}
|
|
2057
|
-
todayBtn.removeEventListener('click', setTodayTZHandler);
|
|
2058
|
-
};
|
|
2059
|
-
todayBtn.addEventListener('click', setTodayTZHandler);
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
onInputBlur($event) {
|
|
2063
|
-
this.updateIMask();
|
|
2064
|
-
if (!$($event.relatedTarget).hasClass('current-date')) {
|
|
2065
|
-
this.invokeOnTouched();
|
|
2066
|
-
this.invokeEventCallback('blur', { $event });
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
updateIMask() {
|
|
2070
|
-
this.imask?.maskRef?.updateValue();
|
|
2071
|
-
}
|
|
2072
|
-
hideDatepickerDropdown() {
|
|
2073
|
-
this.invokeOnTouched();
|
|
2074
|
-
this.isOpen = false;
|
|
2075
|
-
this.focusTrap?.deactivate();
|
|
2076
|
-
this.isEnterPressedOnDateInput = false;
|
|
2077
|
-
if (this.deregisterEventListener) {
|
|
2078
|
-
this.deregisterEventListener();
|
|
2079
|
-
}
|
|
2080
|
-
this.blurDateInput(this.isOpen);
|
|
2081
|
-
}
|
|
2082
|
-
// change and blur events are added from the template
|
|
2083
|
-
handleEvent(node, eventName, callback, locals) {
|
|
2084
|
-
if (!lodashEs.includes(['blur', 'focus', 'change', 'click'], eventName)) {
|
|
2085
|
-
super.handleEvent(node, eventName, callback, locals);
|
|
2086
|
-
}
|
|
2087
|
-
}
|
|
2088
|
-
/**
|
|
2089
|
-
* This is an internal method used to toggle the dropdown of the date widget
|
|
2090
|
-
*/
|
|
2091
|
-
toggleDpDropdown($event, skipFocus = false) {
|
|
2092
|
-
if (this.loadNativeDateInput) {
|
|
2093
|
-
// Fixes click event getting triggred twice in Mobile devices.
|
|
2094
|
-
if (!skipFocus) {
|
|
2095
|
-
this.onDateTimeInputFocus();
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
if ($event.type === 'click') {
|
|
2099
|
-
this.invokeEventCallback('click', { $event: $event });
|
|
2100
|
-
// this.focusOnInputEl();
|
|
2101
|
-
}
|
|
2102
|
-
if ($event.target && $($event.target).is('input') && !(this.isDropDownDisplayEnabledOnInput(this.showdropdownon))) {
|
|
2103
|
-
$event.stopPropagation();
|
|
2104
|
-
return;
|
|
2105
|
-
}
|
|
2106
|
-
this.bsDatePickerDirective.toggle();
|
|
2107
|
-
this.addBodyClickListener(this.bsDatePickerDirective.isOpen);
|
|
2108
|
-
}
|
|
2109
|
-
addBodyClickListener(skipListener) {
|
|
2110
|
-
if (!skipListener) {
|
|
2111
|
-
return;
|
|
2112
|
-
}
|
|
2113
|
-
const bodyElement = document.querySelector('body');
|
|
2114
|
-
setTimeout(() => {
|
|
2115
|
-
const bsDateContainerElement = bodyElement.querySelector(`.${this.dateContainerCls}`);
|
|
2116
|
-
this.deregisterEventListener = i1$1.addEventListenerOnElement(bodyElement, bsDateContainerElement, this.nativeElement, 'click', this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
2117
|
-
this.isOpen = false;
|
|
2118
|
-
}, 0 /* EVENT_LIFE.ONCE */, true);
|
|
2119
|
-
}, 350);
|
|
2120
|
-
}
|
|
2121
|
-
/**
|
|
2122
|
-
* This is an internal method triggered when pressing key on the date input
|
|
2123
|
-
*/
|
|
2124
|
-
onDisplayKeydown(event) {
|
|
2125
|
-
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
2126
|
-
event.stopPropagation();
|
|
2127
|
-
if (event.key === 'Enter') {
|
|
2128
|
-
const newVal = i1$1.getDateObj(event.target.value, { pattern: this.datepattern });
|
|
2129
|
-
event.preventDefault();
|
|
2130
|
-
const formattedDate = i1$1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this);
|
|
2131
|
-
let inputVal = event.target.value.trim();
|
|
2132
|
-
if (this.showdateformatasplaceholder && inputVal === this.maskDateInputFormatPlaceholder) {
|
|
2133
|
-
inputVal = "";
|
|
2134
|
-
}
|
|
2135
|
-
if (inputVal && this.datepattern === 'timestamp') {
|
|
2136
|
-
if (!lodashEs.isNaN(inputVal) && lodashEs.parseInt(inputVal) !== formattedDate) {
|
|
2137
|
-
this.invalidDateTimeFormat = true;
|
|
2138
|
-
this.invokeOnChange(this.datavalue, event, false);
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
else if (inputVal && inputVal !== formattedDate) {
|
|
2142
|
-
this.invalidDateTimeFormat = true;
|
|
2143
|
-
this.invokeOnChange(this.datavalue, event, false);
|
|
2144
|
-
}
|
|
2145
|
-
else {
|
|
2146
|
-
this.invalidDateTimeFormat = false;
|
|
2147
|
-
this.isEnterPressedOnDateInput = true;
|
|
2148
|
-
this.bsDatePickerDirective.bsValue = inputVal ? newVal : '';
|
|
2149
|
-
this.updateIMask();
|
|
2150
|
-
}
|
|
2151
|
-
this.toggleDpDropdown(event);
|
|
2152
|
-
}
|
|
2153
|
-
else {
|
|
2154
|
-
this.hideDatepickerDropdown();
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
else {
|
|
2158
|
-
this.hideDatepickerDropdown();
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
/**
|
|
2162
|
-
* This is an internal method triggered when the date selection changes
|
|
2163
|
-
*/
|
|
2164
|
-
onDateChange(newVal) {
|
|
2165
|
-
/**
|
|
2166
|
-
* Ngx-bootstrap upgrade : To avoid the page load datechange event;
|
|
2167
|
-
* TODO:
|
|
2168
|
-
* https://github.com/valor-software/ngx-bootstrap/issues/6016
|
|
2169
|
-
* For above issue, once we get the solution from Ngx-Bootstrap team, remove the _bsDefaultLoadCheck check and update accordingly.
|
|
2170
|
-
* */
|
|
2171
|
-
if (this._bsDefaultLoadCheck) {
|
|
2172
|
-
this._bsDefaultLoadCheck = false;
|
|
2173
|
-
return;
|
|
2174
|
-
}
|
|
2175
|
-
this.setDataValue(newVal);
|
|
2176
|
-
}
|
|
2177
|
-
onPropertyChange(key, nv, ov) {
|
|
2178
|
-
if (key === 'showdateformatasplaceholder') {
|
|
2179
|
-
this.showdateformatasplaceholder = nv;
|
|
2180
|
-
this.imask?.destroyMask();
|
|
2181
|
-
if (this.showdateformatasplaceholder && this.datepattern !== 'timestamp') {
|
|
2182
|
-
this.mask = validateTheMaskedDate(this.datepattern, this.selectedLocale);
|
|
2183
|
-
this.maskDateInputFormat = this.dateInputFormat;
|
|
2184
|
-
this.maskDateInputFormat = (this.dateInputFormat.split('d').length - 1) === 1 ? this.maskDateInputFormat.replace('d', 'dd') : this.maskDateInputFormat;
|
|
2185
|
-
this.maskDateInputFormat = (this.dateInputFormat.split('M').length - 1) === 1 ? this.maskDateInputFormat.replace('M', 'MM') : this.maskDateInputFormat;
|
|
2186
|
-
this.maskDateInputFormatPlaceholder = this.maskDateInputFormat.toUpperCase().replace('EEEE', 'EEEEEE').replace('MMMM', 'MMM');
|
|
2187
|
-
this.updateIMask();
|
|
2188
|
-
}
|
|
2189
|
-
}
|
|
2190
|
-
else {
|
|
2191
|
-
super.onPropertyChange(key, nv, ov);
|
|
2192
|
-
}
|
|
2193
|
-
}
|
|
2194
|
-
static { this.ɵfac = function DateComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DateComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.AppDefaults), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
|
|
2195
|
-
static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: DateComponent, selectors: [["", "wmDate", ""]], viewQuery: function DateComponent_Query(rf, ctx) { if (rf & 1) {
|
|
2196
|
-
i0__namespace.ɵɵviewQuery(i2.BsDatepickerDirective, 5);
|
|
2197
|
-
i0__namespace.ɵɵviewQuery(_c0$2, 5, i2$1.IMaskDirective);
|
|
2198
|
-
} if (rf & 2) {
|
|
2199
|
-
let _t;
|
|
2200
|
-
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.bsDatePickerDirective = _t.first);
|
|
2201
|
-
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.imask = _t.first);
|
|
2202
|
-
} }, standalone: true, features: [i0__namespace.ɵɵProvidersFeature([
|
|
2203
|
-
base.provideAs(DateComponent, i2$2.NG_VALUE_ACCESSOR, true),
|
|
2204
|
-
base.provideAs(DateComponent, i2$2.NG_VALIDATORS, true),
|
|
2205
|
-
base.provideAsWidgetRef(DateComponent)
|
|
2206
|
-
]), i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵStandaloneFeature], attrs: _c1$2, decls: 9, vars: 28, consts: [["dateInput", ""], ["datepicker", "bsDatepicker"], ["focus-target", "", "type", "text", 1, "form-control", "app-textbox", "app-dateinput", "display-input", 3, "click", "focus", "blur", "change", "keydown", "name", "imask", "unmask", "tabindex", "value", "disabled", "autofocus", "required", "readOnly"], [1, "input-group-btn"], ["type", "button", "aria-haspopup", "true", 1, "btn", "btn-default", "btn-time", 3, "click", "tabindex", "disabled"], ["aria-hidden", "true", 1, "app-icon", "wm-sl-l", "sl-calendar"], [2, "width", "0", "display", "inline-block"], ["aria-label", "datepicker dropdownmenu", "aria-controls", "date", "bsDatepicker", "", "placement", "bottom right", 1, "model-holder", 3, "onShown", "onHidden", "bsValueChange", "tabindex", "container", "bsConfig", "isOpen", "daysDisabled", "datesDisabled", "isDisabled", "bsValue"], ["dateTimePicker", "", "mode", "DATE", 3, "change", "config", "placement", "excludedDaysToDisable", "excludedDatesToDisable", "displayFormat", "value"], ["role", "button", 1, "mobile-input", "mobile-datepicker-container", 3, "click", "focus", "blur", "tabindex"]], template: function DateComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2207
|
-
const _r1 = i0__namespace.ɵɵgetCurrentView();
|
|
2208
|
-
i0__namespace.ɵɵelementStart(0, "input", 2, 0);
|
|
2209
|
-
i0__namespace.ɵɵlistener("click", function DateComponent_Template_input_click_0_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.toggleDpDropdown($event, true)); })("focus", function DateComponent_Template_input_focus_0_listener($event) { i0__namespace.ɵɵrestoreView(_r1); ctx.onDateTimeInputFocus(); ctx.invokeOnFocus($event); return i0__namespace.ɵɵresetView(ctx.updateIMask()); })("blur", function DateComponent_Template_input_blur_0_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.onInputBlur($event)); })("change", function DateComponent_Template_input_change_0_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.onDisplayDateChange($event)); })("keydown", function DateComponent_Template_input_keydown_0_listener($event) { i0__namespace.ɵɵrestoreView(_r1); ctx._triggeredByUser = true; return i0__namespace.ɵɵresetView(ctx.onDisplayKeydown($event)); });
|
|
2210
|
-
i0__namespace.ɵɵelementEnd();
|
|
2211
|
-
i0__namespace.ɵɵelementStart(2, "span", 3)(3, "button", 4);
|
|
2212
|
-
i0__namespace.ɵɵlistener("click", function DateComponent_Template_button_click_3_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.toggleDpDropdown($event, false)); });
|
|
2213
|
-
i0__namespace.ɵɵelement(4, "i", 5);
|
|
2214
|
-
i0__namespace.ɵɵelementEnd()();
|
|
2215
|
-
i0__namespace.ɵɵelementStart(5, "div", 6)(6, "input", 7, 1);
|
|
2216
|
-
i0__namespace.ɵɵlistener("onShown", function DateComponent_Template_input_onShown_6_listener() { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.onDatePickerOpen()); })("onHidden", function DateComponent_Template_input_onHidden_6_listener() { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.hideDatepickerDropdown()); })("bsValueChange", function DateComponent_Template_input_bsValueChange_6_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.onDateChange($event)); });
|
|
2217
|
-
i0__namespace.ɵɵelementEnd()();
|
|
2218
|
-
i0__namespace.ɵɵtemplate(8, DateComponent_Conditional_8_Template, 2, 8);
|
|
2219
|
-
} if (rf & 2) {
|
|
2220
|
-
i0__namespace.ɵɵproperty("name", ctx.name)("imask", ctx.mask)("unmask", true)("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("value", ctx.displayValue)("disabled", ctx.disabled || ctx.readonly)("autofocus", ctx.autofocus)("required", ctx.required)("readOnly", ctx.isReadOnly);
|
|
2221
|
-
i0__namespace.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.arialabel);
|
|
2222
|
-
i0__namespace.ɵɵadvance(3);
|
|
2223
|
-
i0__namespace.ɵɵproperty("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("disabled", ctx.disabled || ctx.readonly);
|
|
2224
|
-
i0__namespace.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput)("aria-label", ctx.displayValue ? "Change Date " + ctx.displayValue : "Choose date by pressing enter")("aria-expanded", ctx.isOpen);
|
|
2225
|
-
i0__namespace.ɵɵadvance(3);
|
|
2226
|
-
i0__namespace.ɵɵproperty("tabindex", -1)("container", ctx.containerTarget || ".wm-app")("bsConfig", ctx._dateOptions)("isOpen", ctx.isOpen)("daysDisabled", ctx.excludedDaysToDisable)("datesDisabled", ctx.excludedDatesToDisable)("isDisabled", ctx.disabled || ctx.readonly)("bsValue", ctx.bsDataValue);
|
|
2227
|
-
i0__namespace.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput);
|
|
2228
|
-
i0__namespace.ɵɵadvance(2);
|
|
2229
|
-
i0__namespace.ɵɵconditional(ctx.loadNativeDateInput ? 8 : -1);
|
|
2230
|
-
} }, dependencies: [base.WmComponentsModule, DateTimePickerComponent, i2$1.IMaskModule, i2$1__namespace.IMaskDirective, i2.BsDatepickerModule, i2__namespace.BsDatepickerDirective, i2__namespace.BsDatepickerInputDirective], encapsulation: 2 }); }
|
|
2231
|
-
}
|
|
2232
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(DateComponent, [{
|
|
2233
|
-
type: i0.Component,
|
|
2234
|
-
args: [{ standalone: true, imports: [base.WmComponentsModule, DateTimePickerComponent, i2$1.IMaskModule, i2.BsDatepickerModule], selector: '[wmDate]', providers: [
|
|
2235
|
-
base.provideAs(DateComponent, i2$2.NG_VALUE_ACCESSOR, true),
|
|
2236
|
-
base.provideAs(DateComponent, i2$2.NG_VALIDATORS, true),
|
|
2237
|
-
base.provideAsWidgetRef(DateComponent)
|
|
2238
|
-
], template: "<input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n #dateInput\n [imask]=\"mask\"\n [unmask]=\"true\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event); updateIMask()\"\n (blur)=\"onInputBlur($event)\"\n [disabled]=\"disabled || readonly\"\n [autofocus]=\"autofocus\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (change)=\"onDisplayDateChange($event)\"\n (keydown)=\"this._triggeredByUser = true; onDisplayKeydown($event);\">\n\n<span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n</span>\n<div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n [tabindex]=\"-1\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [container]=\"containerTarget || '.wm-app'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isOpen\"\n #datepicker=\"bsDatepicker\"\n bsDatepicker\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n placement=\"bottom right\"\n [isDisabled]=\"disabled || readonly\"\n [bsValue]=\"bsDataValue\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n (bsValueChange)=\"onDateChange($event)\">\n</div>\n\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode=\"DATE\"\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDataValue\"\n (change)=\"onDateChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n [tabindex]=\"tabindex || 0\"\n (click)=\"!(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : arialabel || 'Choose Date'\"\n role=\"button\">\n </div>\n}\n" }]
|
|
2239
|
-
}], () => [{ type: i0__namespace.Injector }, { type: i0__namespace.ChangeDetectorRef }, { type: i1$1__namespace.AppDefaults }, { type: undefined, decorators: [{
|
|
2240
|
-
type: i0.Inject,
|
|
2241
|
-
args: ['EXPLICIT_CONTEXT']
|
|
2242
|
-
}, {
|
|
2243
|
-
type: i0.Optional
|
|
2244
|
-
}] }], { bsDatePickerDirective: [{
|
|
2245
|
-
type: i0.ViewChild,
|
|
2246
|
-
args: [i2.BsDatepickerDirective]
|
|
2247
|
-
}], imask: [{
|
|
2248
|
-
type: i0.ViewChild,
|
|
2249
|
-
args: ['dateInput', { read: i2$1.IMaskDirective }]
|
|
2250
|
-
}] }); })();
|
|
2251
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(DateComponent, { className: "DateComponent", filePath: "date/date.component.ts", lineNumber: 46 }); })();
|
|
2252
|
-
|
|
2253
|
-
const dateTimeProps = new Map([
|
|
2254
|
-
['autofocus', base.PROP_BOOLEAN],
|
|
2255
|
-
['class', base.PROP_STRING],
|
|
2256
|
-
['dataentrymode', { value: 'default', ...base.PROP_STRING }],
|
|
2257
|
-
['datavaluesource', base.PROP_ANY],
|
|
2258
|
-
['datavalue', base.PROP_STRING],
|
|
2259
|
-
['datepattern', base.PROP_STRING],
|
|
2260
|
-
['disabled', base.PROP_BOOLEAN],
|
|
2261
|
-
['excludedays', base.PROP_STRING],
|
|
2262
|
-
['excludedates', base.PROP_STRING],
|
|
2263
|
-
['hint', base.PROP_STRING],
|
|
2264
|
-
['arialabel', base.PROP_STRING],
|
|
2265
|
-
['hourstep', { value: 1, ...base.PROP_NUMBER }],
|
|
2266
|
-
['maxdate', base.PROP_STRING],
|
|
2267
|
-
['mindate', base.PROP_STRING],
|
|
2268
|
-
['minutestep', { value: 15, ...base.PROP_NUMBER }],
|
|
2269
|
-
['name', base.PROP_STRING],
|
|
2270
|
-
['outputformat', { value: 'timestamp', ...base.PROP_STRING }],
|
|
2271
|
-
['placeholder', { value: 'Select date time', ...base.PROP_STRING }],
|
|
2272
|
-
['readonly', base.PROP_BOOLEAN],
|
|
2273
|
-
['required', base.PROP_BOOLEAN],
|
|
2274
|
-
['secondsstep', { value: 1, ...base.PROP_NUMBER }],
|
|
2275
|
-
['shortcutkey', base.PROP_STRING],
|
|
2276
|
-
['show', { value: true, ...base.PROP_BOOLEAN }],
|
|
2277
|
-
['showdropdownon', { value: 'default', ...base.PROP_STRING }],
|
|
2278
|
-
['showbuttonbar', base.PROP_BOOLEAN],
|
|
2279
|
-
['showcustompicker', { value: false, ...base.PROP_BOOLEAN }],
|
|
2280
|
-
['showindevice', { displayType: 'inline-block', value: 'all', ...base.PROP_STRING }],
|
|
2281
|
-
['showweeks', base.PROP_BOOLEAN],
|
|
2282
|
-
['tabindex', { value: 0, ...base.PROP_NUMBER }],
|
|
2283
|
-
['timestamp', base.PROP_STRING],
|
|
2284
|
-
['selectfromothermonth', { value: true, ...base.PROP_BOOLEAN }],
|
|
2285
|
-
['todaybutton', { value: true, ...base.PROP_BOOLEAN }],
|
|
2286
|
-
['clearbutton', { value: true, ...base.PROP_BOOLEAN }],
|
|
2287
|
-
['adaptiveposition', { value: true, ...base.PROP_BOOLEAN }],
|
|
2288
|
-
['todaybuttonlabel', { value: 'LABEL_TODAY_DATE', ...base.PROP_STRING }],
|
|
2289
|
-
['clearbuttonlabel', { value: 'LABEL_CLEAR_DATE', ...base.PROP_STRING }],
|
|
2290
|
-
['showampmbuttons', { value: false, ...base.PROP_BOOLEAN }]
|
|
2291
|
-
]);
|
|
2292
|
-
const registerProps$1 = () => {
|
|
2293
|
-
base.register('wm-datetime', dateTimeProps);
|
|
2294
|
-
base.registerFormWidget(i1$1.FormWidgetType.DATETIME, new Map(dateTimeProps));
|
|
2295
|
-
base.registerFormWidget(i1$1.FormWidgetType.TIMESTAMP, new Map(dateTimeProps));
|
|
2296
|
-
};
|
|
2297
|
-
|
|
2298
|
-
const _c0$1 = ["wmDateTime", ""];
|
|
2299
|
-
const _c1$1 = () => ({ standalone: true });
|
|
2300
|
-
const _c2$1 = a0 => ({ "showbuttons": a0 });
|
|
2301
|
-
const _c3$1 = a0 => ({ "active btn-secondary": a0 });
|
|
2302
|
-
function DatetimeComponent_div_10_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
2303
|
-
const _r4 = i0__namespace.ɵɵgetCurrentView();
|
|
2304
|
-
i0__namespace.ɵɵelementStart(0, "div", 13)(1, "button", 14);
|
|
2305
|
-
i0__namespace.ɵɵlistener("click", function DatetimeComponent_div_10_Conditional_2_Template_button_click_1_listener() { i0__namespace.ɵɵrestoreView(_r4); const ctx_r2 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r2.setPeriod("AM")); });
|
|
2306
|
-
i0__namespace.ɵɵtext(2);
|
|
2307
|
-
i0__namespace.ɵɵelementEnd();
|
|
2308
|
-
i0__namespace.ɵɵelement(3, "br");
|
|
2309
|
-
i0__namespace.ɵɵelementStart(4, "button", 15);
|
|
2310
|
-
i0__namespace.ɵɵlistener("click", function DatetimeComponent_div_10_Conditional_2_Template_button_click_4_listener() { i0__namespace.ɵɵrestoreView(_r4); const ctx_r2 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r2.setPeriod("PM")); });
|
|
2311
|
-
i0__namespace.ɵɵtext(5);
|
|
2312
|
-
i0__namespace.ɵɵelementEnd()();
|
|
2313
|
-
} if (rf & 2) {
|
|
2314
|
-
const ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
2315
|
-
i0__namespace.ɵɵadvance();
|
|
2316
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c3$1, ctx_r2.getPeriod() === "AM"));
|
|
2317
|
-
i0__namespace.ɵɵadvance();
|
|
2318
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r2.appLocale.LABEL_AM || "AM");
|
|
2319
|
-
i0__namespace.ɵɵadvance(2);
|
|
2320
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c3$1, ctx_r2.getPeriod() === "PM"));
|
|
2321
|
-
i0__namespace.ɵɵadvance();
|
|
2322
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r2.appLocale.LABEL_PM || "PM");
|
|
2323
|
-
} }
|
|
2324
|
-
function DatetimeComponent_div_10_Template(rf, ctx) { if (rf & 1) {
|
|
2325
|
-
const _r2 = i0__namespace.ɵɵgetCurrentView();
|
|
2326
|
-
i0__namespace.ɵɵelementStart(0, "div", 11);
|
|
2327
|
-
i0__namespace.ɵɵlistener("click", function DatetimeComponent_div_10_Template_div_click_0_listener($event) { i0__namespace.ɵɵrestoreView(_r2); const ctx_r2 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r2.preventTpClose($event)); });
|
|
2328
|
-
i0__namespace.ɵɵelementStart(1, "timepicker", 12);
|
|
2329
|
-
i0__namespace.ɵɵtwoWayListener("ngModelChange", function DatetimeComponent_div_10_Template_timepicker_ngModelChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r2); const ctx_r2 = i0__namespace.ɵɵnextContext(); i0__namespace.ɵɵtwoWayBindingSet(ctx_r2.bsTimeValue, $event) || (ctx_r2.bsTimeValue = $event); return i0__namespace.ɵɵresetView($event); });
|
|
2330
|
-
i0__namespace.ɵɵlistener("isValid", function DatetimeComponent_div_10_Template_timepicker_isValid_1_listener($event) { i0__namespace.ɵɵrestoreView(_r2); const ctx_r2 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r2.isValid($event)); })("ngModelChange", function DatetimeComponent_div_10_Template_timepicker_ngModelChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r2); const ctx_r2 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r2.onModelUpdate($event, "time")); });
|
|
2331
|
-
i0__namespace.ɵɵelementEnd();
|
|
2332
|
-
i0__namespace.ɵɵtemplate(2, DatetimeComponent_div_10_Conditional_2_Template, 6, 8, "div", 13);
|
|
2333
|
-
i0__namespace.ɵɵelementEnd();
|
|
2334
|
-
} if (rf & 2) {
|
|
2335
|
-
const ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
2336
|
-
i0__namespace.ɵɵadvance();
|
|
2337
|
-
i0__namespace.ɵɵproperty("showMeridian", ctx_r2.ismeridian)("readonlyInput", ctx_r2.disabled || ctx_r2.readonly || ctx_r2.isCurrentDate);
|
|
2338
|
-
i0__namespace.ɵɵtwoWayProperty("ngModel", ctx_r2.bsTimeValue);
|
|
2339
|
-
i0__namespace.ɵɵproperty("ngModelOptions", i0__namespace.ɵɵpureFunction0(14, _c1$1))("min", ctx_r2.minTime)("max", ctx_r2.maxTime)("hourStep", ctx_r2.hourstep)("minuteStep", ctx_r2.minutestep)("secondsStep", ctx_r2.secondsstep)("mousewheel", true)("arrowkeys", true)("showSeconds", ctx_r2.showseconds)("ngClass", i0__namespace.ɵɵpureFunction1(15, _c2$1, ctx_r2.showampmbuttons));
|
|
2340
|
-
i0__namespace.ɵɵadvance();
|
|
2341
|
-
i0__namespace.ɵɵconditional(ctx_r2.ismeridian && ctx_r2.showampmbuttons ? 2 : -1);
|
|
2342
|
-
} }
|
|
2343
|
-
function DatetimeComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
2344
|
-
const _r5 = i0__namespace.ɵɵgetCurrentView();
|
|
2345
|
-
i0__namespace.ɵɵelementStart(0, "wm-datetimepicker", 16);
|
|
2346
|
-
i0__namespace.ɵɵlistener("change", function DatetimeComponent_Conditional_11_Template_wm_datetimepicker_change_0_listener($event) { i0__namespace.ɵɵrestoreView(_r5); const ctx_r2 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r2.onModelUpdate($event, "date")); });
|
|
2347
|
-
i0__namespace.ɵɵelementEnd();
|
|
2348
|
-
i0__namespace.ɵɵelementStart(1, "div", 17);
|
|
2349
|
-
i0__namespace.ɵɵlistener("click", function DatetimeComponent_Conditional_11_Template_div_click_1_listener() { i0__namespace.ɵɵrestoreView(_r5); const ctx_r2 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(!(ctx_r2.disabled || ctx_r2.readonly) && ctx_r2.showDatePickerModal(ctx_r2.bsDateValue)); })("focus", function DatetimeComponent_Conditional_11_Template_div_focus_1_listener($event) { i0__namespace.ɵɵrestoreView(_r5); const ctx_r2 = i0__namespace.ɵɵnextContext(); ctx_r2.onDateTimeInputFocus(true); return i0__namespace.ɵɵresetView(ctx_r2.invokeOnFocus($event)); })("blur", function DatetimeComponent_Conditional_11_Template_div_blur_1_listener($event) { i0__namespace.ɵɵrestoreView(_r5); const ctx_r2 = i0__namespace.ɵɵnextContext(); ctx_r2.onDateTimeInputBlur(); return i0__namespace.ɵɵresetView(ctx_r2.invokeOnTouched($event)); });
|
|
2350
|
-
i0__namespace.ɵɵelementEnd();
|
|
2351
|
-
} if (rf & 2) {
|
|
2352
|
-
const ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
2353
|
-
i0__namespace.ɵɵproperty("config", ctx_r2._dateOptions)("placement", ctx_r2.modal)("excludedDaysToDisable", ctx_r2.excludedDaysToDisable)("excludedDatesToDisable", ctx_r2.excludedDatesToDisable)("displayFormat", ctx_r2.dateInputFormat)("value", ctx_r2.bsDateValue);
|
|
2354
|
-
i0__namespace.ɵɵadvance();
|
|
2355
|
-
i0__namespace.ɵɵproperty("tabindex", ctx_r2.tabindex || 0);
|
|
2356
|
-
i0__namespace.ɵɵattribute("aria-label", ctx_r2.displayValue ? "Change Date " + ctx_r2.displayValue : ctx_r2.arialabel || "Choose Date");
|
|
2357
|
-
} }
|
|
2358
|
-
const moment$1 = momentLib__namespace.default || window['moment'];
|
|
2359
|
-
const DEFAULT_CLS$1 = 'app-datetime input-group';
|
|
2360
|
-
const WIDGET_CONFIG$1 = { widgetType: 'wm-datetime', hostClass: DEFAULT_CLS$1 };
|
|
2361
|
-
const CURRENT_DATE = 'CURRENT_DATE';
|
|
2362
|
-
class DatetimeComponent extends BaseDateTimeComponent {
|
|
2363
|
-
static { this.initializeProps = registerProps$1(); }
|
|
2364
|
-
get timestamp() {
|
|
2365
|
-
return this.proxyModel ? this.proxyModel.valueOf() : undefined;
|
|
2366
|
-
}
|
|
2367
|
-
get dateInputFormat() {
|
|
2368
|
-
return this._dateOptions.dateInputFormat || 'yyyy-MM-ddTHH:mm:ss';
|
|
2369
|
-
}
|
|
2370
|
-
/**
|
|
2371
|
-
* The displayValue is the display value of the bsDateTimeValue after applying the datePattern on it.
|
|
2372
|
-
* @returns {any|string}
|
|
2373
|
-
*/
|
|
2374
|
-
get displayValue() {
|
|
2375
|
-
const display = i1$1.getFormattedDate(this.datePipe, this.proxyModel, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this) || '';
|
|
2376
|
-
return this.safeReplaceMeridians(display);
|
|
2377
|
-
}
|
|
2378
|
-
get nativeDisplayValue() {
|
|
2379
|
-
return i1$1.getFormattedDate(this.datePipe, this.proxyModel, 'yyyy-MM-ddTHH:mm:ss', this.timeZone, this.key, this.isCurrentDate, this) || '';
|
|
2380
|
-
}
|
|
2381
|
-
// @ts-ignore
|
|
2382
|
-
get datavalue() {
|
|
2383
|
-
if (this.isCurrentDate && !this.proxyModel) {
|
|
2384
|
-
return CURRENT_DATE;
|
|
2385
|
-
}
|
|
2386
|
-
return i1$1.getFormattedDate(this.datePipe, this.proxyModel, this.outputformat, this.timeZone, null, null, this);
|
|
2387
|
-
}
|
|
2388
|
-
/**Todo[Shubham]: needs to be redefined
|
|
2389
|
-
* This property sets the default value for the date selection
|
|
2390
|
-
*/
|
|
2391
|
-
// @ts-ignore
|
|
2392
|
-
set datavalue(newVal) {
|
|
2393
|
-
if (newVal === CURRENT_DATE) {
|
|
2394
|
-
this.isCurrentDate = true;
|
|
2395
|
-
this.setTimeInterval();
|
|
2396
|
-
}
|
|
2397
|
-
else {
|
|
2398
|
-
this.proxyModel = newVal ? i1$1.getDateObj(newVal, { isNativePicker: this.loadNativeDateInput }, this.timeZone) : undefined;
|
|
2399
|
-
this.clearTimeInterval();
|
|
2400
|
-
this.isCurrentDate = false;
|
|
2401
|
-
}
|
|
2402
|
-
this.bsTimeValue = this.bsDateValue = this.proxyModel;
|
|
2403
|
-
this.cdRef.detectChanges();
|
|
2404
|
-
}
|
|
2405
|
-
constructor(inj, ngZone, cdRef, appDefaults, app, explicitContext) {
|
|
2406
|
-
super(inj, WIDGET_CONFIG$1, explicitContext);
|
|
2407
|
-
this.ngZone = ngZone;
|
|
2408
|
-
this.cdRef = cdRef;
|
|
2409
|
-
this.appDefaults = appDefaults;
|
|
2410
|
-
this.isEnterPressedOnDateInput = false;
|
|
2411
|
-
/**
|
|
2412
|
-
* This property checks if the timePicker is Open
|
|
2413
|
-
*/
|
|
2414
|
-
this.isTimeOpen = false;
|
|
2415
|
-
/**
|
|
2416
|
-
* This property checks if the datePicker is Open
|
|
2417
|
-
*/
|
|
2418
|
-
this.isDateOpen = false;
|
|
2419
|
-
/**
|
|
2420
|
-
* This property is set to TRUE if the time component value is set to CURRENT_TIME; In this case the timer keeps changing the time value until the widget is available.
|
|
2421
|
-
*/
|
|
2422
|
-
this.isCurrentDate = false;
|
|
2423
|
-
this._debouncedOnChange = lodashEs.debounce(this.invokeOnChange, 10);
|
|
2424
|
-
this.registerDestroyListener(() => this.clearTimeInterval());
|
|
2425
|
-
base.styler(this.nativeElement, this);
|
|
2426
|
-
this.app = app;
|
|
2427
|
-
this.dateContainerCls = `app-date-${this.widgetId}`;
|
|
2428
|
-
this._dateOptions.containerClass = `app-date ${this.dateContainerCls}`;
|
|
2429
|
-
this._dateOptions.showWeekNumbers = false;
|
|
2430
|
-
this.datepattern = this.appDefaults.dateTimeFormat || i1$1.getDisplayDateTimeFormat(i1$1.FormWidgetType.DATETIME);
|
|
2431
|
-
this.updateFormat('datepattern');
|
|
2432
|
-
}
|
|
2433
|
-
/**
|
|
2434
|
-
* This is an internal method used to maintain a time interval to update the time model when the data value is set to CURRENT_TIME
|
|
2435
|
-
*/
|
|
2436
|
-
setTimeInterval() {
|
|
2437
|
-
if (this.timeinterval) {
|
|
2438
|
-
return;
|
|
2439
|
-
}
|
|
2440
|
-
this.timeinterval = setInterval(() => {
|
|
2441
|
-
const currentTime = this.timeZone ? i1$1.getMomentLocaleObject(this.timeZone) : new Date();
|
|
2442
|
-
this.onModelUpdate(currentTime);
|
|
2443
|
-
}, 1000);
|
|
2444
|
-
}
|
|
2445
|
-
/**
|
|
2446
|
-
* This is an internal method used to clear the time interval created
|
|
2447
|
-
*/
|
|
2448
|
-
clearTimeInterval() {
|
|
2449
|
-
if (this.timeinterval) {
|
|
2450
|
-
clearInterval(this.timeinterval);
|
|
2451
|
-
this.timeinterval = null;
|
|
2452
|
-
}
|
|
2453
|
-
}
|
|
2454
|
-
/**
|
|
2455
|
-
* This is an internal method to toggle the time picker
|
|
2456
|
-
*/
|
|
2457
|
-
toggleTimePicker(newVal, $event) {
|
|
2458
|
-
if (this.loadNativeDateInput) {
|
|
2459
|
-
this.onDateTimeInputFocus();
|
|
2460
|
-
return;
|
|
2461
|
-
}
|
|
2462
|
-
this.isTimeOpen = newVal;
|
|
2463
|
-
if ($event && $event.type === 'click') {
|
|
2464
|
-
this.invokeEventCallback('click', { $event: $event });
|
|
2465
|
-
}
|
|
2466
|
-
this.addTimepickerClickListener(this.isTimeOpen);
|
|
2467
|
-
}
|
|
2468
|
-
addTimepickerClickListener(skipListener) {
|
|
2469
|
-
if (!skipListener) {
|
|
2470
|
-
return;
|
|
2471
|
-
}
|
|
2472
|
-
const bodyElement = document.querySelector('body');
|
|
2473
|
-
setTimeout(() => {
|
|
2474
|
-
const dropdownElement = $(bodyElement).find('>bs-dropdown-container .dropdown-menu').get(0);
|
|
2475
|
-
this.deregisterTimepickeEventListener = i1$1.addEventListenerOnElement(bodyElement, dropdownElement, this.nativeElement, 'click', this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
2476
|
-
this.toggleTimePicker(false);
|
|
2477
|
-
}, 0 /* EVENT_LIFE.ONCE */, true);
|
|
2478
|
-
}, 350);
|
|
2479
|
-
}
|
|
2480
|
-
/**
|
|
2481
|
-
* This function sets the value isOpen/isTimeOpen (i.e when datepicker popup is closed) based on widget type(i.e DateTime, Time)
|
|
2482
|
-
* @param val - isOpen/isTimeOpen is set based on the timepicker popup is open/closed
|
|
2483
|
-
*/
|
|
2484
|
-
setIsTimeOpen(val) {
|
|
2485
|
-
this.isTimeOpen = val;
|
|
2486
|
-
}
|
|
2487
|
-
hideTimepickerDropdown() {
|
|
2488
|
-
this.invokeOnTouched();
|
|
2489
|
-
this.toggleTimePicker(false);
|
|
2490
|
-
if (this.deregisterTimepickeEventListener) {
|
|
2491
|
-
this.deregisterTimepickeEventListener();
|
|
2492
|
-
}
|
|
2493
|
-
const parentEl = $(this.nativeElement).closest('.app-composite-widget.caption-floating');
|
|
2494
|
-
if (parentEl.length > 0) {
|
|
2495
|
-
this.app.notify('captionPositionAnimate', { displayVal: this.displayValue, nativeEl: parentEl });
|
|
2496
|
-
}
|
|
2497
|
-
}
|
|
2498
|
-
/**
|
|
2499
|
-
* This is an internal method to add a click listener once the time dropdown is open
|
|
2500
|
-
*/
|
|
2501
|
-
onTimepickerOpen() {
|
|
2502
|
-
// adding class for time widget dropdown menu
|
|
2503
|
-
const tpElements = document.querySelectorAll('timepicker');
|
|
2504
|
-
lodashEs.forEach(tpElements, (element) => {
|
|
2505
|
-
i1$1.addClass(element.parentElement, 'app-datetime', true);
|
|
2506
|
-
});
|
|
2507
|
-
if (this.bsDropdown && (this.dateNotInRange || this.invalidDateTimeFormat)) {
|
|
2508
|
-
this.bsTimeValue = null;
|
|
2509
|
-
}
|
|
2510
|
-
this.bsDatePickerDirective.hide();
|
|
2511
|
-
this.focusTimePickerPopover(this);
|
|
2512
|
-
this.bindTimePickerKeyboardEvents();
|
|
2513
|
-
i1$1.adjustContainerPosition($('bs-dropdown-container'), this.nativeElement, this.bsDropdown._dropdown, $('bs-dropdown-container .dropdown-menu'));
|
|
2514
|
-
i1$1.adjustContainerRightEdges($('bs-dropdown-container'), this.nativeElement, this.bsDropdown._dropdown, $('bs-dropdown-container .dropdown-menu'));
|
|
2515
|
-
}
|
|
2516
|
-
onDatePickerOpen() {
|
|
2517
|
-
this.isDateOpen = !this.isDateOpen;
|
|
2518
|
-
this.toggleTimePicker(false);
|
|
2519
|
-
// We are using the two input tags(To maintain the modal and proxy modal) for the date control.
|
|
2520
|
-
// So actual bootstrap input target width we made it to 0 so bootstrap calculating the calendar container top position impropery.
|
|
2521
|
-
// To fix the container top position set the width 1px;
|
|
2522
|
-
this.$element.find('.model-holder').width('1px');
|
|
2523
|
-
const dpContainerEl = $('bs-datepicker-container');
|
|
2524
|
-
dpContainerEl.attr('aria-label', 'Use Arrow keys to navigate dates, Choose Date from datepicker');
|
|
2525
|
-
$('.bs-calendar-container').removeAttr('role');
|
|
2526
|
-
const datePickerContainer = $('.bs-datepicker-container')[0];
|
|
2527
|
-
this.focusTrap = base.setFocusTrap(datePickerContainer, true);
|
|
2528
|
-
this.focusTrap.activate();
|
|
2529
|
-
this.bsDateValue ? this.activeDate = this.bsDateValue : this.activeDate = new Date();
|
|
2530
|
-
if (!this.bsDateValue) {
|
|
2531
|
-
this.hightlightToday(this.activeDate);
|
|
2532
|
-
}
|
|
2533
|
-
this.addDatepickerKeyboardEvents(this, true);
|
|
2534
|
-
i1$1.adjustContainerPosition($('bs-datepicker-container'), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
2535
|
-
}
|
|
2536
|
-
/**
|
|
2537
|
-
* This is an internal method to update the model
|
|
2538
|
-
*/
|
|
2539
|
-
onModelUpdate(newVal, type) {
|
|
2540
|
-
if (type === 'date') {
|
|
2541
|
-
this.invalidDateTimeFormat = false;
|
|
2542
|
-
const formatted = i1$1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this);
|
|
2543
|
-
if (this.safeReplaceMeridians(formatted) === this.displayValue) {
|
|
2544
|
-
$(this.nativeElement).find('.display-input').val(this.displayValue);
|
|
2545
|
-
}
|
|
2546
|
-
}
|
|
2547
|
-
if (newVal && !this.bsDateValue && this.timeZone) {
|
|
2548
|
-
newVal = i1$1.getMomentLocaleObject(this.timeZone, newVal);
|
|
2549
|
-
}
|
|
2550
|
-
// min date and max date validation in web.
|
|
2551
|
-
// if invalid dates are entered, device is showing validation message.
|
|
2552
|
-
this.minDateMaxDateValidationOnInput(newVal);
|
|
2553
|
-
if (!newVal) {
|
|
2554
|
-
// Set timevalue as 00:00:00 if we remove any one from hours/minutes/seconds field in timepicker after selecting date
|
|
2555
|
-
if (this.bsDateValue && this.bsTimePicker && (this.bsTimePicker.hours === '' || this.bsTimePicker.minutes === '' || this.bsTimePicker.seconds === '')) {
|
|
2556
|
-
this.bsDateValue = this.bsTimeValue = this.proxyModel = moment$1(this.bsDateValue).startOf('day').toDate();
|
|
2557
|
-
}
|
|
2558
|
-
else {
|
|
2559
|
-
this.bsDateValue = this.bsTimeValue = this.proxyModel = undefined;
|
|
2560
|
-
}
|
|
2561
|
-
// When the datavalue is manually cleared, both newval and datavalue are undefined but prevDataValue exists - trigger change cb
|
|
2562
|
-
if (newVal !== this.datavalue || (!this.datavalue && this.prevDatavalue)) {
|
|
2563
|
-
this._debouncedOnChange(this.datavalue, {}, true);
|
|
2564
|
-
}
|
|
2565
|
-
return;
|
|
2566
|
-
}
|
|
2567
|
-
if (type === 'date') {
|
|
2568
|
-
if (this.isDateOpen) {
|
|
2569
|
-
this.toggleTimePicker(true);
|
|
2570
|
-
}
|
|
2571
|
-
}
|
|
2572
|
-
if (!this.dateNotInRange && !this.invalidDateTimeFormat) {
|
|
2573
|
-
this.proxyModel = newVal;
|
|
2574
|
-
if (this.proxyModel) {
|
|
2575
|
-
this.bsDateValue = this.bsTimeValue = newVal;
|
|
2576
|
-
}
|
|
2577
|
-
if (this.datavalue === this.getPrevDataValue()) {
|
|
2578
|
-
const time = i1$1.getFormattedDate(this.datePipe, this.datavalue, this.datepattern, this.timeZone, null, null, this) || '';
|
|
2579
|
-
$(this.nativeElement).find('.display-input').val(time?.replace(this.meridians[0], this.am)?.replace(this.meridians[1], this.pm));
|
|
2580
|
-
}
|
|
2581
|
-
}
|
|
2582
|
-
else {
|
|
2583
|
-
this.proxyModel = newVal;
|
|
2584
|
-
}
|
|
2585
|
-
this._debouncedOnChange(this.datavalue, {}, true);
|
|
2586
|
-
this.cdRef.detectChanges();
|
|
2587
|
-
// Update timepicker with formatted time, when timezone is provided.
|
|
2588
|
-
const timePickerFields = $('.bs-timepicker-field');
|
|
2589
|
-
if (this.timeZone && this.key === 'datetimestamp' && timePickerFields.length) {
|
|
2590
|
-
const formattedDate = i1$1.getFormattedDate(this.datePipe, newVal, this.getTimePattern(), this.timeZone, this.key, null, this);
|
|
2591
|
-
this.updateTimepickerFields(this.safeReplaceMeridians(formattedDate), timePickerFields);
|
|
2592
|
-
}
|
|
2593
|
-
}
|
|
2594
|
-
// deduces the timepattern from datepattern set in the studio
|
|
2595
|
-
getTimePattern() {
|
|
2596
|
-
let timepattern;
|
|
2597
|
-
const timePatternStartIndex = this.datepattern.toLowerCase().indexOf('h');
|
|
2598
|
-
let timePatternEndIndex = this.datepattern.toLowerCase().indexOf(':ss');
|
|
2599
|
-
if (timePatternEndIndex > -1) {
|
|
2600
|
-
// adding the index to +3 to incluse :ss
|
|
2601
|
-
timePatternEndIndex += 3;
|
|
2602
|
-
}
|
|
2603
|
-
else {
|
|
2604
|
-
timePatternEndIndex = this.datepattern.toLowerCase().indexOf(':mm');
|
|
2605
|
-
// adding the index to +3 to incluse :mm
|
|
2606
|
-
if (timePatternEndIndex > -1) {
|
|
2607
|
-
timePatternEndIndex += 3;
|
|
2608
|
-
}
|
|
2609
|
-
}
|
|
2610
|
-
const hasMeridian = this.datepattern.toLowerCase().indexOf('a');
|
|
2611
|
-
timepattern = this.datepattern.substr(timePatternStartIndex, timePatternEndIndex);
|
|
2612
|
-
if (hasMeridian > -1)
|
|
2613
|
-
timepattern += ' a';
|
|
2614
|
-
return timepattern;
|
|
2615
|
-
}
|
|
2616
|
-
updateTimepickerFields(date, timePickerFields) {
|
|
2617
|
-
const meridianField = $('timepicker button.text-center');
|
|
2618
|
-
const formattedArr = date.split(' ');
|
|
2619
|
-
const formattedTime = formattedArr[0].split(':');
|
|
2620
|
-
for (let i = 0; i < timePickerFields.length; i++) {
|
|
2621
|
-
timePickerFields[i].value = formattedTime[i];
|
|
2622
|
-
}
|
|
2623
|
-
if (meridianField?.html()?.trim() !== formattedArr[1]) {
|
|
2624
|
-
meridianField.text(formattedArr[1]);
|
|
2625
|
-
}
|
|
2626
|
-
}
|
|
2627
|
-
/**
|
|
2628
|
-
* This is an internal method used to Prevent time picker close while changing time value
|
|
2629
|
-
*/
|
|
2630
|
-
preventTpClose($event) {
|
|
2631
|
-
$event.stopImmediatePropagation();
|
|
2632
|
-
}
|
|
2633
|
-
/**
|
|
2634
|
-
* This is an internal method used to toggle the dropdown of the date widget
|
|
2635
|
-
*/
|
|
2636
|
-
toggleDpDropdown($event, skipFocus = false) {
|
|
2637
|
-
if (this.loadNativeDateInput) {
|
|
2638
|
-
//Fixes click event getting triggred twice in Mobile devices.
|
|
2639
|
-
if (!skipFocus) {
|
|
2640
|
-
this.onDateTimeInputFocus();
|
|
2641
|
-
}
|
|
2642
|
-
return;
|
|
2643
|
-
}
|
|
2644
|
-
if ($event.type === 'click') {
|
|
2645
|
-
this.invokeEventCallback('click', { $event: $event });
|
|
2646
|
-
//this.focusOnInputEl();
|
|
2647
|
-
}
|
|
2648
|
-
if ($event.target && $($event.target).is('input') && !(this.isDropDownDisplayEnabledOnInput(this.showdropdownon))) {
|
|
2649
|
-
$event.stopPropagation();
|
|
2650
|
-
return;
|
|
2651
|
-
}
|
|
2652
|
-
if (this.bsDatePickerDirective && (this.dateNotInRange || this.invalidDateTimeFormat)) {
|
|
2653
|
-
this.bsDatePickerDirective._bsValue = null;
|
|
2654
|
-
}
|
|
2655
|
-
this.bsDatePickerDirective.toggle();
|
|
2656
|
-
this.addBodyClickListener(this.bsDatePickerDirective.isOpen);
|
|
2657
|
-
}
|
|
2658
|
-
addBodyClickListener(skipListener) {
|
|
2659
|
-
if (!skipListener) {
|
|
2660
|
-
return;
|
|
2661
|
-
}
|
|
2662
|
-
const bodyElement = document.querySelector('body');
|
|
2663
|
-
setTimeout(() => {
|
|
2664
|
-
const bsDateContainerElement = bodyElement.querySelector(`.${this.dateContainerCls}`);
|
|
2665
|
-
this.deregisterDatepickerEventListener = i1$1.addEventListenerOnElement(bodyElement, bsDateContainerElement, this.nativeElement, 'click', this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
2666
|
-
this.bsDatePickerDirective.hide();
|
|
2667
|
-
}, 0 /* EVENT_LIFE.ONCE */, true);
|
|
2668
|
-
}, 350);
|
|
2669
|
-
}
|
|
2670
|
-
hideDatepickerDropdown() {
|
|
2671
|
-
this.isDateOpen = false;
|
|
2672
|
-
this.focusTrap?.deactivate();
|
|
2673
|
-
this.invokeOnTouched();
|
|
2674
|
-
this.bsDatePickerDirective.hide();
|
|
2675
|
-
// To open the timepicker menu when user wants to update time without changing the date.
|
|
2676
|
-
if (this.bsDateValue) {
|
|
2677
|
-
this.toggleTimePicker(true);
|
|
2678
|
-
}
|
|
2679
|
-
this.isEnterPressedOnDateInput = false;
|
|
2680
|
-
if (this.deregisterDatepickerEventListener) {
|
|
2681
|
-
this.deregisterDatepickerEventListener();
|
|
2682
|
-
}
|
|
2683
|
-
const parentEl = $(this.nativeElement).closest('.app-composite-widget.caption-floating');
|
|
2684
|
-
if (parentEl.length > 0) {
|
|
2685
|
-
this.app.notify('captionPositionAnimate', { displayVal: this.displayValue, nativeEl: parentEl });
|
|
2686
|
-
}
|
|
2687
|
-
this.blurDateInput(this.isDateOpen);
|
|
2688
|
-
}
|
|
2689
|
-
onDateChange($event, isNativePicker) {
|
|
2690
|
-
if (this.isEnterPressedOnDateInput) {
|
|
2691
|
-
this.isEnterPressedOnDateInput = false;
|
|
2692
|
-
return;
|
|
2693
|
-
}
|
|
2694
|
-
let newVal = $event.target.value.trim();
|
|
2695
|
-
newVal = newVal ? i1$1.getNativeDateObject(newVal?.replace(this.am, this.meridians[0])?.replace(this.pm, this.meridians[1]), { pattern: this.loadNativeDateInput ? this.outputformat : this.datepattern, meridians: this.meridians, isNativePicker: this.loadNativeDateInput }) : undefined;
|
|
2696
|
-
// datetime pattern validation
|
|
2697
|
-
// if invalid pattern is entered, device is showing an error.
|
|
2698
|
-
if (!this.formatValidation(newVal, $event.target.value, isNativePicker)) {
|
|
2699
|
-
return;
|
|
2700
|
-
}
|
|
2701
|
-
// min date and max date validation in mobile view.
|
|
2702
|
-
// if invalid dates are entered, device is showing an alert.
|
|
2703
|
-
if (isNativePicker && this.minDateMaxDateValidationOnInput(newVal, $event, this.displayValue, isNativePicker)) {
|
|
2704
|
-
return;
|
|
2705
|
-
}
|
|
2706
|
-
this.invalidDateTimeFormat = false;
|
|
2707
|
-
this.onModelUpdate(newVal);
|
|
2708
|
-
}
|
|
2709
|
-
/**
|
|
2710
|
-
* This is an internal method triggered when pressing key on the datetime input
|
|
2711
|
-
*/
|
|
2712
|
-
onDisplayKeydown(event) {
|
|
2713
|
-
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
2714
|
-
event.stopPropagation();
|
|
2715
|
-
let newVal = event.target.value.trim();
|
|
2716
|
-
if (event.key === 'Enter' || event.key === 'ArrowDown') {
|
|
2717
|
-
newVal = newVal ? i1$1.getNativeDateObject(newVal, { pattern: this.loadNativeDateInput ? this.outputformat : this.datepattern, meridians: this.meridians }) : undefined;
|
|
2718
|
-
event.preventDefault();
|
|
2719
|
-
const formattedDate = i1$1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this);
|
|
2720
|
-
const formattedDateWithMeridians = this.safeReplaceMeridians(formattedDate);
|
|
2721
|
-
const inputVal = event.target.value.trim();
|
|
2722
|
-
if (inputVal && this.datepattern === 'timestamp') {
|
|
2723
|
-
if (!lodashEs.isNaN(inputVal) && lodashEs.parseInt(inputVal) !== formattedDate) {
|
|
2724
|
-
this.invalidDateTimeFormat = true;
|
|
2725
|
-
this.invokeOnChange(this.datavalue, event, false);
|
|
2726
|
-
}
|
|
2727
|
-
}
|
|
2728
|
-
else if (inputVal && inputVal !== formattedDateWithMeridians) {
|
|
2729
|
-
this.invalidDateTimeFormat = true;
|
|
2730
|
-
this.invokeOnChange(this.datavalue, event, false);
|
|
2731
|
-
}
|
|
2732
|
-
else {
|
|
2733
|
-
this.invalidDateTimeFormat = false;
|
|
2734
|
-
this.isEnterPressedOnDateInput = true;
|
|
2735
|
-
this.bsDatePickerDirective.bsValue = newVal;
|
|
2736
|
-
}
|
|
2737
|
-
this.toggleDpDropdown(event);
|
|
2738
|
-
}
|
|
2739
|
-
else {
|
|
2740
|
-
this.hideDatepickerDropdown();
|
|
2741
|
-
this.hideTimepickerDropdown();
|
|
2742
|
-
}
|
|
2743
|
-
}
|
|
2744
|
-
else {
|
|
2745
|
-
this.hideDatepickerDropdown();
|
|
2746
|
-
this.hideTimepickerDropdown();
|
|
2747
|
-
}
|
|
2748
|
-
}
|
|
2749
|
-
isValid(event) {
|
|
2750
|
-
if (!event) {
|
|
2751
|
-
const enteredDate = $(this.nativeElement).find('input').val()?.replace(this.am, this.meridians[0])?.replace(this.pm, this.meridians[1]);
|
|
2752
|
-
const newVal = i1$1.getNativeDateObject(enteredDate, { pattern: this.loadNativeDateInput ? this.outputformat : this.datepattern, meridians: this.meridians, isNativePicker: this.loadNativeDateInput });
|
|
2753
|
-
if (!this.formatValidation(newVal, enteredDate)) {
|
|
2754
|
-
return;
|
|
2755
|
-
}
|
|
2756
|
-
}
|
|
2757
|
-
}
|
|
2758
|
-
// change and blur events are added from the template
|
|
2759
|
-
handleEvent(node, eventName, callback, locals) {
|
|
2760
|
-
if (!lodashEs.includes(['blur', 'focus', 'change', 'click'], eventName)) {
|
|
2761
|
-
super.handleEvent(node, eventName, callback, locals);
|
|
2762
|
-
}
|
|
2763
|
-
}
|
|
2764
|
-
onInputBlur($event) {
|
|
2765
|
-
if (!$($event.relatedTarget).hasClass('current-date')) {
|
|
2766
|
-
this.invokeOnTouched();
|
|
2767
|
-
this.invokeEventCallback('blur', { $event });
|
|
2768
|
-
}
|
|
2769
|
-
}
|
|
2770
|
-
static { this.ɵfac = function DatetimeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DatetimeComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i0__namespace.NgZone), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.AppDefaults), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.App), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
|
|
2771
|
-
static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: DatetimeComponent, selectors: [["", "wmDateTime", ""]], viewQuery: function DatetimeComponent_Query(rf, ctx) { if (rf & 1) {
|
|
2772
|
-
i0__namespace.ɵɵviewQuery(i2.BsDatepickerDirective, 5);
|
|
2773
|
-
} if (rf & 2) {
|
|
2774
|
-
let _t;
|
|
2775
|
-
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.bsDatePickerDirective = _t.first);
|
|
2776
|
-
} }, standalone: true, features: [i0__namespace.ɵɵProvidersFeature([
|
|
2777
|
-
base.provideAs(DatetimeComponent, i2$2.NG_VALUE_ACCESSOR, true),
|
|
2778
|
-
base.provideAs(DatetimeComponent, i2$2.NG_VALIDATORS, true),
|
|
2779
|
-
base.provideAsWidgetRef(DatetimeComponent),
|
|
2780
|
-
{ provide: i5.TimepickerConfig, deps: [i1$1.AbstractI18nService], useFactory: getTimepickerConfig }
|
|
2781
|
-
]), i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵStandaloneFeature], attrs: _c0$1, decls: 12, vars: 31, consts: [["datepicker", "bsDatepicker"], ["dropdown", "", "autoClose", "false", 2, "display", "inherit", 3, "onShown", "isOpen", "container"], ["focus-target", "", "type", "text", 1, "form-control", "app-textbox", "display-input", 3, "click", "focus", "blur", "change", "keydown", "name", "tabindex", "value", "autofocus", "disabled", "required", "readOnly"], [1, "input-group-btn"], ["type", "button", "aria-haspopup", "true", 1, "btn", "btn-default", "btn-date", 3, "click", "tabindex", "disabled"], ["aria-hidden", "true", 1, "app-icon", "wm-sl-l", "sl-calendar"], ["type", "button", "aria-label", "Select time", "aria-haspopup", "true", "aria-expanded", "false", 1, "btn", "btn-default", "btn-time", 3, "click", "tabindex", "disabled"], ["aria-hidden", "true", 1, "app-icon", "wm-sl-l", "sl-time"], [2, "width", "0", "display", "inline-block"], ["aria-label", "datepicker dropdownmenu", "aria-controls", "date", "focus-target", "", "placement", "bottom right", "bsDatepicker", "", 1, "model-holder", 3, "onShown", "onHidden", "bsValueChange", "tabindex", "container", "bsConfig", "isOpen", "daysDisabled", "datesDisabled", "isDisabled", "bsValue"], ["class", "dropdown-menu", "aria-label", "timepicker dropdown", "aria-controls", "time", 3, "click", 4, "dropdownMenu"], ["aria-label", "timepicker dropdown", "aria-controls", "time", 1, "dropdown-menu", 3, "click"], [1, "model-holder", 3, "ngModelChange", "isValid", "showMeridian", "readonlyInput", "ngModel", "ngModelOptions", "min", "max", "hourStep", "minuteStep", "secondsStep", "mousewheel", "arrowkeys", "showSeconds", "ngClass"], [1, "ampm-toggle", "text-center"], [1, "meridian-btn", "mb-1", 3, "click", "ngClass"], [1, "meridian-btn", 3, "click", "ngClass"], ["dateTimePicker", "", 3, "change", "config", "placement", "excludedDaysToDisable", "excludedDatesToDisable", "displayFormat", "value"], ["role", "button", 1, "mobile-input", "mobile-datepicker-container", 3, "click", "focus", "blur", "tabindex"]], template: function DatetimeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2782
|
-
const _r1 = i0__namespace.ɵɵgetCurrentView();
|
|
2783
|
-
i0__namespace.ɵɵelementStart(0, "div", 1);
|
|
2784
|
-
i0__namespace.ɵɵlistener("onShown", function DatetimeComponent_Template_div_onShown_0_listener() { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.onTimepickerOpen()); });
|
|
2785
|
-
i0__namespace.ɵɵelementStart(1, "input", 2);
|
|
2786
|
-
i0__namespace.ɵɵlistener("click", function DatetimeComponent_Template_input_click_1_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.toggleDpDropdown($event, true)); })("focus", function DatetimeComponent_Template_input_focus_1_listener($event) { i0__namespace.ɵɵrestoreView(_r1); ctx.onDateTimeInputFocus(); return i0__namespace.ɵɵresetView(ctx.invokeOnFocus($event)); })("blur", function DatetimeComponent_Template_input_blur_1_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.onInputBlur($event)); })("change", function DatetimeComponent_Template_input_change_1_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.onDateChange($event)); })("keydown", function DatetimeComponent_Template_input_keydown_1_listener($event) { i0__namespace.ɵɵrestoreView(_r1); ctx._triggeredByUser = true; return i0__namespace.ɵɵresetView(ctx.onDisplayKeydown($event)); });
|
|
2787
|
-
i0__namespace.ɵɵelementEnd();
|
|
2788
|
-
i0__namespace.ɵɵelementStart(2, "span", 3)(3, "button", 4);
|
|
2789
|
-
i0__namespace.ɵɵlistener("click", function DatetimeComponent_Template_button_click_3_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.toggleDpDropdown($event, false)); });
|
|
2790
|
-
i0__namespace.ɵɵelement(4, "i", 5);
|
|
2791
|
-
i0__namespace.ɵɵelementEnd();
|
|
2792
|
-
i0__namespace.ɵɵelementStart(5, "button", 6);
|
|
2793
|
-
i0__namespace.ɵɵlistener("click", function DatetimeComponent_Template_button_click_5_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.toggleTimePicker(!ctx.isTimeOpen, $event)); });
|
|
2794
|
-
i0__namespace.ɵɵelement(6, "i", 7);
|
|
2795
|
-
i0__namespace.ɵɵelementEnd()();
|
|
2796
|
-
i0__namespace.ɵɵelementStart(7, "div", 8)(8, "input", 9, 0);
|
|
2797
|
-
i0__namespace.ɵɵlistener("onShown", function DatetimeComponent_Template_input_onShown_8_listener() { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.onDatePickerOpen()); })("onHidden", function DatetimeComponent_Template_input_onHidden_8_listener() { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.hideDatepickerDropdown()); })("bsValueChange", function DatetimeComponent_Template_input_bsValueChange_8_listener($event) { i0__namespace.ɵɵrestoreView(_r1); return i0__namespace.ɵɵresetView(ctx.onModelUpdate($event, "date")); });
|
|
2798
|
-
i0__namespace.ɵɵelementEnd()();
|
|
2799
|
-
i0__namespace.ɵɵtemplate(10, DatetimeComponent_div_10_Template, 3, 17, "div", 10);
|
|
2800
|
-
i0__namespace.ɵɵelementEnd();
|
|
2801
|
-
i0__namespace.ɵɵtemplate(11, DatetimeComponent_Conditional_11_Template, 2, 8);
|
|
2802
|
-
} if (rf & 2) {
|
|
2803
|
-
i0__namespace.ɵɵproperty("isOpen", ctx.isTimeOpen)("container", "body");
|
|
2804
|
-
i0__namespace.ɵɵadvance();
|
|
2805
|
-
i0__namespace.ɵɵproperty("name", ctx.name)("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("value", ctx.displayValue)("autofocus", ctx.autofocus)("disabled", ctx.disabled || ctx.readonly || ctx.isCurrentDate)("required", ctx.required)("readOnly", ctx.isReadOnly);
|
|
2806
|
-
i0__namespace.ɵɵattribute("aria-label", ctx.arialabel)("aria-hidden", !!ctx.loadNativeDateInput)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey);
|
|
2807
|
-
i0__namespace.ɵɵadvance(2);
|
|
2808
|
-
i0__namespace.ɵɵproperty("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("disabled", ctx.disabled || ctx.readonly || ctx.isCurrentDate);
|
|
2809
|
-
i0__namespace.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput)("aria-label", ctx.displayValue ? "Change Date " + ctx.displayValue : "Choose date by pressing enter")("aria-expanded", ctx.isDateOpen);
|
|
2810
|
-
i0__namespace.ɵɵadvance(2);
|
|
2811
|
-
i0__namespace.ɵɵproperty("tabindex", ctx.loadNativeDateInput ? "-1" : ctx.tabindex)("disabled", ctx.disabled || ctx.readonly || ctx.isCurrentDate);
|
|
2812
|
-
i0__namespace.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput);
|
|
2813
|
-
i0__namespace.ɵɵadvance(3);
|
|
2814
|
-
i0__namespace.ɵɵproperty("tabindex", -1)("container", ctx.containerTarget || ".wm-app")("bsConfig", ctx._dateOptions)("isOpen", ctx.isDateOpen)("daysDisabled", ctx.excludedDaysToDisable)("datesDisabled", ctx.excludedDatesToDisable)("isDisabled", ctx.disabled || ctx.readonly || ctx.isCurrentDate)("bsValue", ctx.bsDateValue);
|
|
2815
|
-
i0__namespace.ɵɵattribute("aria-hidden", !!ctx.loadNativeDateInput);
|
|
2816
|
-
i0__namespace.ɵɵadvance(3);
|
|
2817
|
-
i0__namespace.ɵɵconditional(ctx.loadNativeDateInput ? 11 : -1);
|
|
2818
|
-
} }, dependencies: [base.WmComponentsModule, i2$2.FormsModule, i2$2__namespace.NgControlStatus, i2$2__namespace.NgModel, DateTimePickerComponent, i3.BsDropdownModule, i3__namespace.BsDropdownMenuDirective, i3__namespace.BsDropdownDirective, i2.BsDatepickerModule, i2__namespace.BsDatepickerDirective, i2__namespace.BsDatepickerInputDirective, i5.TimepickerModule, i5__namespace.TimepickerComponent, i6.CommonModule, i6__namespace.NgClass], encapsulation: 2 }); }
|
|
2819
|
-
}
|
|
2820
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(DatetimeComponent, [{
|
|
2821
|
-
type: i0.Component,
|
|
2822
|
-
args: [{ standalone: true, imports: [base.WmComponentsModule, i2$2.FormsModule, DateTimePickerComponent, i3.BsDropdownModule, i2.BsDatepickerModule, i5.TimepickerModule, i6.CommonModule], selector: '[wmDateTime]', providers: [
|
|
2823
|
-
base.provideAs(DatetimeComponent, i2$2.NG_VALUE_ACCESSOR, true),
|
|
2824
|
-
base.provideAs(DatetimeComponent, i2$2.NG_VALIDATORS, true),
|
|
2825
|
-
base.provideAsWidgetRef(DatetimeComponent),
|
|
2826
|
-
{ provide: i5.TimepickerConfig, deps: [i1$1.AbstractI18nService], useFactory: getTimepickerConfig }
|
|
2827
|
-
], template: "<div dropdown\n [isOpen]=\"isTimeOpen\"\n autoClose=\"false\"\n [container]=\"'body'\"\n (onShown)=\"onTimepickerOpen()\"\n style=\"display: inherit;\">\n <input class=\"form-control app-textbox display-input\"\n [attr.aria-label]=\"arialabel\"\n focus-target\n [name]=\"name\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n type=\"text\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event);\"\n (blur)=\"onInputBlur($event)\"\n (change)=\"onDateChange($event)\"\n [autofocus]=\"autofocus\"\n [disabled]=\"disabled || readonly || isCurrentDate\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n (keydown)=\"this._triggeredByUser = true; onDisplayKeydown($event)\">\n\n <span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-date\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly || isCurrentDate\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isDateOpen\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly || isCurrentDate\"\n aria-label=\"Select time\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"toggleTimePicker(!isTimeOpen, $event)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-time\"></i>\n </button>\n </span>\n <div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n focus-target\n [tabindex]=\"-1\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [container]=\"containerTarget || '.wm-app'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isDateOpen\"\n placement=\"bottom right\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]=\"disabled || readonly || isCurrentDate\"\n [bsValue]=\"bsDateValue\"\n (bsValueChange)=\"onModelUpdate($event, 'date')\">\n </div>\n <div *dropdownMenu\n class=\"dropdown-menu\"\n aria-label=\"timepicker dropdown\"\n aria-controls=\"time\"\n (click)=\"preventTpClose($event)\">\n <timepicker class=\"model-holder\"\n [showMeridian]=\"ismeridian\"\n [readonlyInput]=\"disabled || readonly || isCurrentDate\"\n [(ngModel)]=\"bsTimeValue\"\n [ngModelOptions]=\"{standalone: true}\"\n [min]=\"minTime\"\n [max]=\"maxTime\"\n [hourStep]=\"hourstep\"\n [minuteStep]=\"minutestep\"\n [secondsStep]=\"secondsstep\"\n [mousewheel]=\"true\"\n [arrowkeys]=\"true\"\n (isValid)=\"isValid($event)\"\n [showSeconds]=\"showseconds\"\n (ngModelChange)=\"onModelUpdate($event, 'time')\"\n [ngClass]=\"{ 'showbuttons': showampmbuttons }\"></timepicker>\n @if (ismeridian && showampmbuttons) {\n <div class=\"ampm-toggle text-center\">\n <button class=\"meridian-btn mb-1\" [ngClass]=\"{ 'active btn-secondary': getPeriod() === 'AM' }\" (click)=\"setPeriod('AM')\">{{appLocale.LABEL_AM ||\"AM\"}}</button><br>\n <button class=\"meridian-btn\" [ngClass]=\"{ 'active btn-secondary': getPeriod() === 'PM' }\" (click)=\"setPeriod('PM')\">{{appLocale.LABEL_PM ||\"PM\"}}</button>\n </div>\n }\n </div>\n </div>\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDateValue\"\n (change)=\"onModelUpdate($event, 'date')\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n [tabindex]=\"tabindex || 0\"\n (click)=\"!(disabled || readonly) && showDatePickerModal(bsDateValue)\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : arialabel || 'Choose Date'\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event)\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n role=\"button\">\n </div>\n}\n" }]
|
|
2828
|
-
}], () => [{ type: i0__namespace.Injector }, { type: i0__namespace.NgZone }, { type: i0__namespace.ChangeDetectorRef }, { type: i1$1__namespace.AppDefaults }, { type: i1$1__namespace.App }, { type: undefined, decorators: [{
|
|
2829
|
-
type: i0.Inject,
|
|
2830
|
-
args: ['EXPLICIT_CONTEXT']
|
|
2831
|
-
}, {
|
|
2832
|
-
type: i0.Optional
|
|
2833
|
-
}] }], { bsDatePickerDirective: [{
|
|
2834
|
-
type: i0.ViewChild,
|
|
2835
|
-
args: [i2.BsDatepickerDirective]
|
|
2836
|
-
}] }); })();
|
|
2837
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(DatetimeComponent, { className: "DatetimeComponent", filePath: "date-time/date-time.component.ts", lineNumber: 64 }); })();
|
|
2838
|
-
|
|
2839
|
-
const timeProps = new Map([
|
|
2840
|
-
['autofocus', base.PROP_BOOLEAN],
|
|
2841
|
-
['class', base.PROP_STRING],
|
|
2842
|
-
['dataentrymode', { value: 'default', ...base.PROP_STRING }],
|
|
2843
|
-
['datavaluesource', base.PROP_ANY],
|
|
2844
|
-
['datavalue', base.PROP_STRING],
|
|
2845
|
-
['disabled', base.PROP_BOOLEAN],
|
|
2846
|
-
['hint', base.PROP_STRING],
|
|
2847
|
-
['arialabel', base.PROP_STRING],
|
|
2848
|
-
['hourstep', { value: 1, ...base.PROP_NUMBER }],
|
|
2849
|
-
['maxtime', base.PROP_STRING],
|
|
2850
|
-
['mintime', base.PROP_STRING],
|
|
2851
|
-
['minutestep', { value: 15, ...base.PROP_NUMBER }],
|
|
2852
|
-
['name', base.PROP_STRING],
|
|
2853
|
-
['outputformat', { value: 'HH:mm:ss', ...base.PROP_STRING }],
|
|
2854
|
-
['placeholder', { value: 'Select time', ...base.PROP_STRING }],
|
|
2855
|
-
['readonly', base.PROP_BOOLEAN],
|
|
2856
|
-
['required', base.PROP_BOOLEAN],
|
|
2857
|
-
['shortcutkey', base.PROP_STRING],
|
|
2858
|
-
['show', { value: true, ...base.PROP_BOOLEAN }],
|
|
2859
|
-
['showdropdownon', { value: 'default', ...base.PROP_STRING }],
|
|
2860
|
-
['showcustompicker', { value: false, ...base.PROP_BOOLEAN }],
|
|
2861
|
-
['secondsstep', { value: 1, ...base.PROP_NUMBER }],
|
|
2862
|
-
['tabindex', { value: 0, ...base.PROP_NUMBER }],
|
|
2863
|
-
['timepattern', base.PROP_STRING],
|
|
2864
|
-
['timestamp', base.PROP_STRING],
|
|
2865
|
-
['showampmbuttons', { value: false, ...base.PROP_BOOLEAN }]
|
|
2866
|
-
]);
|
|
2867
|
-
const registerProps = () => {
|
|
2868
|
-
base.register('wm-time', timeProps);
|
|
2869
|
-
base.registerFormWidget(i1$1.FormWidgetType.TIME, new Map(timeProps));
|
|
2870
|
-
};
|
|
2871
|
-
|
|
2872
|
-
const _c0 = ["wmTime", ""];
|
|
2873
|
-
const _c1 = () => ({ standalone: true });
|
|
2874
|
-
const _c2 = a0 => ({ "showbuttons": a0 });
|
|
2875
|
-
const _c3 = a0 => ({ "active btn-secondary": a0 });
|
|
2876
|
-
function TimeComponent_div_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
2877
|
-
const _r3 = i0__namespace.ɵɵgetCurrentView();
|
|
2878
|
-
i0__namespace.ɵɵelementStart(0, "div", 8)(1, "button", 9);
|
|
2879
|
-
i0__namespace.ɵɵlistener("click", function TimeComponent_div_5_Conditional_2_Template_button_click_1_listener() { i0__namespace.ɵɵrestoreView(_r3); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.setPeriod("AM")); });
|
|
2880
|
-
i0__namespace.ɵɵtext(2);
|
|
2881
|
-
i0__namespace.ɵɵelementEnd();
|
|
2882
|
-
i0__namespace.ɵɵelement(3, "br");
|
|
2883
|
-
i0__namespace.ɵɵelementStart(4, "button", 10);
|
|
2884
|
-
i0__namespace.ɵɵlistener("click", function TimeComponent_div_5_Conditional_2_Template_button_click_4_listener() { i0__namespace.ɵɵrestoreView(_r3); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.setPeriod("PM")); });
|
|
2885
|
-
i0__namespace.ɵɵtext(5);
|
|
2886
|
-
i0__namespace.ɵɵelementEnd()();
|
|
2887
|
-
} if (rf & 2) {
|
|
2888
|
-
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
2889
|
-
i0__namespace.ɵɵadvance();
|
|
2890
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c3, ctx_r1.getPeriod() === "AM"));
|
|
2891
|
-
i0__namespace.ɵɵadvance();
|
|
2892
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r1.appLocale.LABEL_AM || "AM");
|
|
2893
|
-
i0__namespace.ɵɵadvance(2);
|
|
2894
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c3, ctx_r1.getPeriod() === "PM"));
|
|
2895
|
-
i0__namespace.ɵɵadvance();
|
|
2896
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r1.appLocale.LABEL_PM || "PM");
|
|
2897
|
-
} }
|
|
2898
|
-
function TimeComponent_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
2899
|
-
const _r1 = i0__namespace.ɵɵgetCurrentView();
|
|
2900
|
-
i0__namespace.ɵɵelementStart(0, "div", 6);
|
|
2901
|
-
i0__namespace.ɵɵlistener("click", function TimeComponent_div_5_Template_div_click_0_listener($event) { i0__namespace.ɵɵrestoreView(_r1); const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.preventTpClose($event)); });
|
|
2902
|
-
i0__namespace.ɵɵelementStart(1, "timepicker", 7);
|
|
2903
|
-
i0__namespace.ɵɵtwoWayListener("ngModelChange", function TimeComponent_div_5_Template_timepicker_ngModelChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r1); const ctx_r1 = i0__namespace.ɵɵnextContext(); i0__namespace.ɵɵtwoWayBindingSet(ctx_r1.bsTimeValue, $event) || (ctx_r1.bsTimeValue = $event); return i0__namespace.ɵɵresetView($event); });
|
|
2904
|
-
i0__namespace.ɵɵlistener("isValid", function TimeComponent_div_5_Template_timepicker_isValid_1_listener($event) { i0__namespace.ɵɵrestoreView(_r1); const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.isValid($event)); })("ngModelChange", function TimeComponent_div_5_Template_timepicker_ngModelChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r1); const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.onTimeChange($event)); });
|
|
2905
|
-
i0__namespace.ɵɵelementEnd();
|
|
2906
|
-
i0__namespace.ɵɵtemplate(2, TimeComponent_div_5_Conditional_2_Template, 6, 8, "div", 8);
|
|
2907
|
-
i0__namespace.ɵɵelementEnd();
|
|
2908
|
-
} if (rf & 2) {
|
|
2909
|
-
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
2910
|
-
i0__namespace.ɵɵadvance();
|
|
2911
|
-
i0__namespace.ɵɵproperty("showMeridian", ctx_r1.ismeridian)("readonlyInput", ctx_r1.isDisabled);
|
|
2912
|
-
i0__namespace.ɵɵtwoWayProperty("ngModel", ctx_r1.bsTimeValue);
|
|
2913
|
-
i0__namespace.ɵɵproperty("ngModelOptions", i0__namespace.ɵɵpureFunction0(15, _c1))("disabled", ctx_r1.disabled || ctx_r1.readonly || ctx_r1.isCurrentTime)("min", ctx_r1.minTime)("max", ctx_r1.maxTime)("hourStep", ctx_r1.hourstep)("minuteStep", ctx_r1.minutestep)("secondsStep", ctx_r1.secondsstep)("mousewheel", true)("arrowkeys", true)("showSeconds", ctx_r1.showseconds)("ngClass", i0__namespace.ɵɵpureFunction1(16, _c2, ctx_r1.showampmbuttons));
|
|
2914
|
-
i0__namespace.ɵɵadvance();
|
|
2915
|
-
i0__namespace.ɵɵconditional(ctx_r1.ismeridian && ctx_r1.showampmbuttons ? 2 : -1);
|
|
2916
|
-
} }
|
|
2917
|
-
function TimeComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
2918
|
-
const _r4 = i0__namespace.ɵɵgetCurrentView();
|
|
2919
|
-
i0__namespace.ɵɵelementStart(0, "wm-datetimepicker", 11);
|
|
2920
|
-
i0__namespace.ɵɵlistener("change", function TimeComponent_Conditional_6_Template_wm_datetimepicker_change_0_listener($event) { i0__namespace.ɵɵrestoreView(_r4); const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.onTimeChange($event)); });
|
|
2921
|
-
i0__namespace.ɵɵelementEnd();
|
|
2922
|
-
i0__namespace.ɵɵelementStart(1, "div", 12);
|
|
2923
|
-
i0__namespace.ɵɵlistener("click", function TimeComponent_Conditional_6_Template_div_click_1_listener() { i0__namespace.ɵɵrestoreView(_r4); const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(!(ctx_r1.disabled || ctx_r1.readonly) && ctx_r1.showDatePickerModal(ctx_r1.bsTimeValue)); })("focus", function TimeComponent_Conditional_6_Template_div_focus_1_listener($event) { i0__namespace.ɵɵrestoreView(_r4); const ctx_r1 = i0__namespace.ɵɵnextContext(); ctx_r1.onDateTimeInputFocus(true); ctx_r1.invokeOnFocus($event); return i0__namespace.ɵɵresetView(ctx_r1.assignModel()); })("blur", function TimeComponent_Conditional_6_Template_div_blur_1_listener($event) { i0__namespace.ɵɵrestoreView(_r4); const ctx_r1 = i0__namespace.ɵɵnextContext(); ctx_r1.onDateTimeInputBlur(); return i0__namespace.ɵɵresetView(ctx_r1.invokeOnTouched($event)); });
|
|
2924
|
-
i0__namespace.ɵɵelementEnd();
|
|
2925
|
-
} if (rf & 2) {
|
|
2926
|
-
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
2927
|
-
i0__namespace.ɵɵproperty("minTime", ctx_r1.minTime)("maxTime", ctx_r1.maxTime)("placement", ctx_r1.modal)("displayFormat", ctx_r1.timepattern)("value", ctx_r1.bsTimeValue);
|
|
2928
|
-
i0__namespace.ɵɵadvance();
|
|
2929
|
-
i0__namespace.ɵɵattribute("aria-label", ctx_r1.displayValue ? "Change time " + ctx_r1.displayValue : ctx_r1.arialabel || "Select time");
|
|
2930
|
-
} }
|
|
2931
|
-
const moment = momentLib__namespace.default || window['moment'];
|
|
2932
|
-
const CURRENT_TIME = 'CURRENT_TIME';
|
|
2933
|
-
const DEFAULT_CLS = 'input-group app-timeinput';
|
|
2934
|
-
const WIDGET_CONFIG = { widgetType: 'wm-time', hostClass: DEFAULT_CLS };
|
|
2935
|
-
class TimeComponent extends BaseDateTimeComponent {
|
|
2936
|
-
static { this.initializeProps = registerProps(); }
|
|
2937
|
-
get timestamp() {
|
|
2938
|
-
return this.bsTimeValue ? this.bsTimeValue.valueOf() : undefined;
|
|
2939
|
-
}
|
|
2940
|
-
// @ts-ignore
|
|
2941
|
-
get datavalue() {
|
|
2942
|
-
if (this.isCurrentTime && !this.bsTimeValue) {
|
|
2943
|
-
return CURRENT_TIME;
|
|
2944
|
-
}
|
|
2945
|
-
return i1$1.getFormattedDate(this.datePipe, this.bsTimeValue, this.outputformat, this.timeZone, null, null, this) || '';
|
|
2946
|
-
}
|
|
2947
|
-
/**Todo[Shubham]: needs to be redefined
|
|
2948
|
-
* This property sets the default value for the time selection
|
|
2949
|
-
*/
|
|
2950
|
-
// @ts-ignore
|
|
2951
|
-
set datavalue(newVal) {
|
|
2952
|
-
if (newVal) {
|
|
2953
|
-
if (newVal === CURRENT_TIME) {
|
|
2954
|
-
this.isCurrentTime = true;
|
|
2955
|
-
this.setTimeInterval();
|
|
2956
|
-
}
|
|
2957
|
-
else {
|
|
2958
|
-
this.clearTimeInterval();
|
|
2959
|
-
this.bsTimeValue = i1$1.getNativeDateObject(newVal, { pattern: this.loadNativeDateInput ? this.outputformat : undefined, isNativePicker: this.loadNativeDateInput });
|
|
2960
|
-
this.isCurrentTime = false;
|
|
2961
|
-
this.mintimeMaxtimeValidation();
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
else {
|
|
2965
|
-
this.bsTimeValue = undefined;
|
|
2966
|
-
this.clearTimeInterval();
|
|
2967
|
-
this.isCurrentTime = false;
|
|
2968
|
-
}
|
|
2969
|
-
this.invokeOnChange(this.datavalue);
|
|
2970
|
-
i1$1.$appDigest();
|
|
2971
|
-
}
|
|
2972
|
-
get displayValue() {
|
|
2973
|
-
const display = i1$1.getFormattedDate(this.datePipe, this.bsTimeValue, this.timepattern, this.timeZone, null, null, this) || '';
|
|
2974
|
-
return this.safeReplaceMeridians(display);
|
|
2975
|
-
}
|
|
2976
|
-
get nativeDisplayValue() {
|
|
2977
|
-
return i1$1.getFormattedDate(this.datePipe, this.bsTimeValue, 'HH:mm:ss', this.timeZone, null, null, this) || '';
|
|
2978
|
-
}
|
|
2979
|
-
constructor(inj, ngZone, appDefaults, app, explicitContext) {
|
|
2980
|
-
super(inj, WIDGET_CONFIG, explicitContext);
|
|
2981
|
-
this.ngZone = ngZone;
|
|
2982
|
-
this.appDefaults = appDefaults;
|
|
2983
|
-
/**
|
|
2984
|
-
* This is an internal property used to toggle the timepicker dropdown
|
|
2985
|
-
*/
|
|
2986
|
-
this.status = { isopen: false };
|
|
2987
|
-
base.styler(this.nativeElement, this);
|
|
2988
|
-
/**
|
|
2989
|
-
* Destroy the timer once the date widget is gone
|
|
2990
|
-
*/
|
|
2991
|
-
this.registerDestroyListener(() => this.clearTimeInterval());
|
|
2992
|
-
this.timepattern = this.appDefaults.timeFormat || i1$1.getDisplayDateTimeFormat(i1$1.FormWidgetType.TIME);
|
|
2993
|
-
this.updateFormat('timepattern');
|
|
2994
|
-
this.app = app;
|
|
2995
|
-
}
|
|
2996
|
-
onPropertyChange(key, nv, ov) {
|
|
2997
|
-
if (key === 'tabindex') {
|
|
2998
|
-
return;
|
|
2999
|
-
}
|
|
3000
|
-
if (key === 'timepattern') {
|
|
3001
|
-
this.updateFormat('timepattern');
|
|
3002
|
-
}
|
|
3003
|
-
if (key === 'mintime') {
|
|
3004
|
-
this.minTime = i1$1.getNativeDateObject(nv, { pattern: this.loadNativeDateInput ? this.outputformat : undefined, isNativePicker: this.loadNativeDateInput }); // TODO it is supposed to be time conversion, not to the day
|
|
3005
|
-
this.mintimeMaxtimeValidation();
|
|
3006
|
-
}
|
|
3007
|
-
else if (key === 'maxtime') {
|
|
3008
|
-
this.maxTime = i1$1.getNativeDateObject(nv, { pattern: this.loadNativeDateInput ? this.outputformat : undefined, isNativePicker: this.loadNativeDateInput });
|
|
3009
|
-
this.mintimeMaxtimeValidation();
|
|
3010
|
-
}
|
|
3011
|
-
else {
|
|
3012
|
-
super.onPropertyChange(key, nv, ov);
|
|
3013
|
-
}
|
|
3014
|
-
}
|
|
3015
|
-
setValidateType(min, max, val) {
|
|
3016
|
-
if (this.timeNotInRange) {
|
|
3017
|
-
if (val < min) {
|
|
3018
|
-
this.validateType = 'mintime';
|
|
3019
|
-
}
|
|
3020
|
-
else if (val > max) {
|
|
3021
|
-
this.validateType = 'maxtime';
|
|
3022
|
-
}
|
|
3023
|
-
}
|
|
3024
|
-
}
|
|
3025
|
-
/**
|
|
3026
|
-
* This is an internal method used to validate mintime and maxtime
|
|
3027
|
-
*/
|
|
3028
|
-
mintimeMaxtimeValidation() {
|
|
3029
|
-
this.timeNotInRange = this.minTime && this.maxTime && (this.bsTimeValue < this.minTime || this.bsTimeValue > this.maxTime);
|
|
3030
|
-
this.setValidateType(this.minTime, this.maxTime, this.bsTimeValue);
|
|
3031
|
-
this.invokeOnChange(this.datavalue, undefined, false);
|
|
3032
|
-
}
|
|
3033
|
-
/**
|
|
3034
|
-
* This is an internal method used to toggle the dropdown of the time widget
|
|
3035
|
-
*/
|
|
3036
|
-
toggleDropdown($event, skipFocus = false) {
|
|
3037
|
-
if (this.loadNativeDateInput) {
|
|
3038
|
-
//Fixes click event getting triggred twice in Mobile devices.
|
|
3039
|
-
if (!skipFocus) {
|
|
3040
|
-
this.onDateTimeInputFocus();
|
|
3041
|
-
}
|
|
3042
|
-
return;
|
|
3043
|
-
}
|
|
3044
|
-
if ($event.type === 'click') {
|
|
3045
|
-
this.invokeEventCallback('click', { $event: $event });
|
|
3046
|
-
//this.focusOnInputEl();
|
|
3047
|
-
}
|
|
3048
|
-
if ($event.target && $($event.target).is('input') && !(this.isDropDownDisplayEnabledOnInput(this.showdropdownon))) {
|
|
3049
|
-
return;
|
|
3050
|
-
}
|
|
3051
|
-
this.ngZone.run(() => {
|
|
3052
|
-
this.status.isopen = !this.status.isopen;
|
|
3053
|
-
});
|
|
3054
|
-
this.addBodyClickListener(this.status.isopen);
|
|
3055
|
-
}
|
|
3056
|
-
/**
|
|
3057
|
-
* This is an internal method used to Prevent time picker close while changing time value
|
|
3058
|
-
*/
|
|
3059
|
-
preventTpClose($event) {
|
|
3060
|
-
$event.stopImmediatePropagation();
|
|
3061
|
-
const parentEl = $(this.nativeElement).closest('.app-composite-widget.caption-floating');
|
|
3062
|
-
if (parentEl.length > 0) {
|
|
3063
|
-
this.app.notify('captionPositionAnimate', { displayVal: this.displayValue, nativeEl: parentEl });
|
|
3064
|
-
}
|
|
3065
|
-
}
|
|
3066
|
-
addBodyClickListener(skipListener) {
|
|
3067
|
-
if (!skipListener) {
|
|
3068
|
-
return;
|
|
3069
|
-
}
|
|
3070
|
-
const bodyElement = document.querySelector('body');
|
|
3071
|
-
setTimeout(() => {
|
|
3072
|
-
const dropdownElement = $(bodyElement).find('>bs-dropdown-container .dropdown-menu').get(0);
|
|
3073
|
-
this.deregisterEventListener = i1$1.addEventListenerOnElement(bodyElement, dropdownElement, this.nativeElement, 'click', this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
3074
|
-
this.status.isopen = false;
|
|
3075
|
-
}, 0 /* EVENT_LIFE.ONCE */, true);
|
|
3076
|
-
}, 350);
|
|
3077
|
-
}
|
|
3078
|
-
/**
|
|
3079
|
-
* This is an internal method triggered when pressing key on the time input
|
|
3080
|
-
*/
|
|
3081
|
-
onDisplayKeydown(event) {
|
|
3082
|
-
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
3083
|
-
event.stopPropagation();
|
|
3084
|
-
if (event.key === 'Enter' || event.key === 'ArrowDown') {
|
|
3085
|
-
event.preventDefault();
|
|
3086
|
-
this.toggleDropdown(event);
|
|
3087
|
-
}
|
|
3088
|
-
else {
|
|
3089
|
-
this.hideTimepickerDropdown();
|
|
3090
|
-
}
|
|
3091
|
-
}
|
|
3092
|
-
else {
|
|
3093
|
-
this.hideTimepickerDropdown();
|
|
3094
|
-
}
|
|
3095
|
-
}
|
|
3096
|
-
/**
|
|
3097
|
-
* This is an internal method triggered when the time input changes
|
|
3098
|
-
*/
|
|
3099
|
-
onDisplayTimeChange($event) {
|
|
3100
|
-
const newVal = i1$1.getNativeDateObject($event.target.value?.replace(this.am, this.meridians[0])?.replace(this.pm, this.meridians[1]), { meridians: this.meridians, pattern: this.loadNativeDateInput ? this.outputformat : undefined, isNativePicker: this.loadNativeDateInput });
|
|
3101
|
-
// time pattern validation
|
|
3102
|
-
// if invalid pattern is entered, device is showing an error.
|
|
3103
|
-
if (!this.formatValidation(newVal, $event.target.value)) {
|
|
3104
|
-
return;
|
|
3105
|
-
}
|
|
3106
|
-
this.invalidDateTimeFormat = false;
|
|
3107
|
-
this.onTimeChange(newVal);
|
|
3108
|
-
}
|
|
3109
|
-
onInputBlur($event) {
|
|
3110
|
-
if (!$($event.relatedTarget).hasClass('bs-timepicker-field')) {
|
|
3111
|
-
this.invokeOnTouched();
|
|
3112
|
-
this.invokeEventCallback('blur', { $event });
|
|
3113
|
-
}
|
|
3114
|
-
}
|
|
3115
|
-
/**
|
|
3116
|
-
* This is an internal method used to execute the on time change functionality
|
|
3117
|
-
*/
|
|
3118
|
-
onTimeChange(newVal, isNativePicker) {
|
|
3119
|
-
let timeValue, timeInputValue, minTimeMeridian;
|
|
3120
|
-
// For nativePicker, newVal is event, get the dateobject from the event.
|
|
3121
|
-
if (isNativePicker) {
|
|
3122
|
-
newVal = i1$1.getNativeDateObject(newVal.target.value, { pattern: this.loadNativeDateInput ? this.outputformat : undefined, isNativePicker: this.loadNativeDateInput });
|
|
3123
|
-
}
|
|
3124
|
-
if (newVal) {
|
|
3125
|
-
// if the newVal is valid but not in the given range then highlight the input field
|
|
3126
|
-
this.timeNotInRange = this.minTime && this.maxTime && (newVal < this.minTime || newVal > this.maxTime);
|
|
3127
|
-
this.setValidateType(this.minTime, this.maxTime, newVal);
|
|
3128
|
-
if (!this.timeNotInRange) {
|
|
3129
|
-
this.bsTimeValue = newVal;
|
|
3130
|
-
}
|
|
3131
|
-
} // sometimes library is not returning the correct value when the min and max time are given, displaying the datavalue based on the value given by the user
|
|
3132
|
-
else if (this.bsTimePicker && this.bsTimePicker.min && this.bsTimePicker.max) {
|
|
3133
|
-
minTimeMeridian = moment(new Date(this.bsTimePicker.min)).format('A');
|
|
3134
|
-
moment(new Date(this.bsTimePicker.max)).format('A');
|
|
3135
|
-
timeValue = this.bsTimePicker.hours + ':' + (this.bsTimePicker.minutes || 0) + ':' + (this.bsTimePicker.seconds || 0) + (this.bsTimePicker.showMeridian ? (' ' + minTimeMeridian) : '');
|
|
3136
|
-
timeInputValue = i1$1.getNativeDateObject(timeValue, { pattern: this.loadNativeDateInput ? this.outputformat : undefined, isNativePicker: this.loadNativeDateInput });
|
|
3137
|
-
this.bsTimePicker.meridian = minTimeMeridian?.replace(this.meridians[0], this.am)?.replace(this.meridians[1], this.pm);
|
|
3138
|
-
this.timeNotInRange = this.bsTimePicker.min > timeInputValue || this.bsTimePicker.max < timeInputValue;
|
|
3139
|
-
if (this.timeNotInRange || this.invalidDateTimeFormat) {
|
|
3140
|
-
this.bsTimeValue = this.getPrevDataValue();
|
|
3141
|
-
setTimeout(() => {
|
|
3142
|
-
const timeStr = i1$1.getFormattedDate(this.datePipe, timeValue, this.timepattern, this.timeZone, null, null, this) || '';
|
|
3143
|
-
$(this.nativeElement).find('.display-input').val(this.safeReplaceMeridians(timeStr));
|
|
3144
|
-
});
|
|
3145
|
-
}
|
|
3146
|
-
this.setValidateType(this.bsTimePicker.min, this.bsTimePicker.max, timeInputValue);
|
|
3147
|
-
if (!this.timeNotInRange) {
|
|
3148
|
-
this.bsTimeValue = timeInputValue;
|
|
3149
|
-
}
|
|
3150
|
-
}
|
|
3151
|
-
// Update UI display if value hasn't changed
|
|
3152
|
-
if (!this.timeNotInRange && this.datavalue === this.getPrevDataValue()) {
|
|
3153
|
-
const displayTime = i1$1.getFormattedDate(this.datePipe, this.datavalue, this.timepattern, this.timeZone, null, null, this) || '';
|
|
3154
|
-
$(this.nativeElement).find('.display-input').val(this.safeReplaceMeridians(displayTime));
|
|
3155
|
-
}
|
|
3156
|
-
this.invokeOnTouched();
|
|
3157
|
-
this.invokeOnChange(this.datavalue, {}, true);
|
|
3158
|
-
}
|
|
3159
|
-
/**
|
|
3160
|
-
* This is an internal method used to maintain a time interval to update the time model when the data value is set to CURRENT_TIME
|
|
3161
|
-
*/
|
|
3162
|
-
setTimeInterval() {
|
|
3163
|
-
if (this.timeinterval) {
|
|
3164
|
-
return;
|
|
3165
|
-
}
|
|
3166
|
-
this.timeinterval = setInterval(() => {
|
|
3167
|
-
const now = this.timeZone ? i1$1.getMomentLocaleObject(this.timeZone) : new Date();
|
|
3168
|
-
now.setSeconds(now.getSeconds() + 1);
|
|
3169
|
-
this.datavalue = CURRENT_TIME;
|
|
3170
|
-
this.onTimeChange(now);
|
|
3171
|
-
}, 1000);
|
|
3172
|
-
}
|
|
3173
|
-
/**
|
|
3174
|
-
* This is an internal method used to clear the time interval created
|
|
3175
|
-
*/
|
|
3176
|
-
clearTimeInterval() {
|
|
3177
|
-
if (this.timeinterval) {
|
|
3178
|
-
clearInterval(this.timeinterval);
|
|
3179
|
-
this.timeinterval = null;
|
|
3180
|
-
}
|
|
3181
|
-
}
|
|
3182
|
-
/**
|
|
3183
|
-
* This function sets the value isOpen/isTimeOpen (i.e when datepicker popup is closed) based on widget type(i.e DateTime, Time)
|
|
3184
|
-
* @param val - isOpen/isTimeOpen is set based on the timepicker popup is open/closed
|
|
3185
|
-
*/
|
|
3186
|
-
setIsTimeOpen(val) {
|
|
3187
|
-
this.status.isopen = val;
|
|
3188
|
-
}
|
|
3189
|
-
// Change event is registered from the template, Prevent the framework from registering one more event
|
|
3190
|
-
handleEvent(node, eventName, eventCallback, locals) {
|
|
3191
|
-
if (!lodashEs.includes(['blur', 'focus', 'change', 'click'], eventName)) {
|
|
3192
|
-
super.handleEvent(node, eventName, eventCallback, locals);
|
|
3193
|
-
}
|
|
3194
|
-
}
|
|
3195
|
-
hideTimepickerDropdown() {
|
|
3196
|
-
this.invokeOnTouched();
|
|
3197
|
-
this.status.isopen = false;
|
|
3198
|
-
if (this.deregisterEventListener) {
|
|
3199
|
-
this.deregisterEventListener();
|
|
3200
|
-
}
|
|
3201
|
-
this.removeKeyupListener();
|
|
3202
|
-
const parentEl = $(this.nativeElement).closest('.app-composite-widget.caption-floating');
|
|
3203
|
-
if (parentEl.length > 0) {
|
|
3204
|
-
this.app.notify('captionPositionAnimate', { displayVal: this.displayValue, nativeEl: parentEl });
|
|
3205
|
-
}
|
|
3206
|
-
this.blurDateInput(true);
|
|
3207
|
-
}
|
|
3208
|
-
isValid(event) {
|
|
3209
|
-
if (!event) {
|
|
3210
|
-
const enteredDate = $(this.nativeElement).find('input').val()?.replace(this.am, this.meridians[0])?.replace(this.pm, this.meridians[1]);
|
|
3211
|
-
const newVal = i1$1.getNativeDateObject(enteredDate, { meridians: this.meridians, pattern: this.loadNativeDateInput ? this.outputformat : undefined, isNativePicker: this.loadNativeDateInput });
|
|
3212
|
-
if (!this.formatValidation(newVal, enteredDate)) {
|
|
3213
|
-
return;
|
|
3214
|
-
}
|
|
3215
|
-
}
|
|
3216
|
-
}
|
|
3217
|
-
/**
|
|
3218
|
-
* This is an internal method to add css class for dropdown while opening the time dropdown
|
|
3219
|
-
*/
|
|
3220
|
-
onShown() {
|
|
3221
|
-
const tpElements = document.querySelectorAll('timepicker');
|
|
3222
|
-
lodashEs.forEach(tpElements, element => {
|
|
3223
|
-
i1$1.addClass(element.parentElement, 'app-datetime', true);
|
|
3224
|
-
});
|
|
3225
|
-
if (this.bsDropdown && (this.timeNotInRange || this.invalidDateTimeFormat)) {
|
|
3226
|
-
this.bsTimeValue = null;
|
|
3227
|
-
}
|
|
3228
|
-
this.focusTimePickerPopover(this);
|
|
3229
|
-
this.bindTimePickerKeyboardEvents();
|
|
3230
|
-
i1$1.adjustContainerPosition($('bs-dropdown-container'), this.nativeElement, this.bsDropdown._dropdown, $('bs-dropdown-container .dropdown-menu'));
|
|
3231
|
-
}
|
|
3232
|
-
assignModel() {
|
|
3233
|
-
if (!this.displayInputElem) {
|
|
3234
|
-
this.displayInputElem = this.getMobileInput();
|
|
3235
|
-
}
|
|
3236
|
-
this.displayInputElem.value = lodashEs.get(this, 'nativeDisplayValue');
|
|
3237
|
-
}
|
|
3238
|
-
static { this.ɵfac = function TimeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimeComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i0__namespace.NgZone), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.AppDefaults), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.App), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
|
|
3239
|
-
static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: TimeComponent, selectors: [["", "wmTime", ""]], standalone: true, features: [i0__namespace.ɵɵProvidersFeature([
|
|
3240
|
-
base.provideAs(TimeComponent, i2$2.NG_VALUE_ACCESSOR, true),
|
|
3241
|
-
base.provideAs(TimeComponent, i2$2.NG_VALIDATORS, true),
|
|
3242
|
-
base.provideAsWidgetRef(TimeComponent),
|
|
3243
|
-
{ provide: i5.TimepickerConfig, deps: [i1$1.AbstractI18nService], useFactory: getTimepickerConfig }
|
|
3244
|
-
]), i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵStandaloneFeature], attrs: _c0, decls: 7, vars: 16, consts: [["dropdown", "", 2, "display", "inherit", 3, "onShown", "onHidden", "isOpen", "container"], ["focus-target", "", "type", "text", "role", "timer", 1, "form-control", "app-textbox", "display-input", 3, "click", "focus", "blur", "change", "keydown", "tabindex", "name", "value", "disabled", "autofocus", "required", "readOnly"], [1, "input-group-btn", "dropdown-toggle"], ["type", "button", "aria-label", "Select time", "aria-haspopup", "true", "aria-expanded", "false", 1, "btn", "btn-default", "btn-date", 3, "click", "tabindex", "disabled"], ["aria-hidden", "true", 1, "app-icon", "wm-sl-l", "sl-time"], ["class", "dropdown-menu", 3, "click", 4, "dropdownMenu"], [1, "dropdown-menu", 3, "click"], [1, "model-holder", 3, "ngModelChange", "isValid", "showMeridian", "readonlyInput", "ngModel", "ngModelOptions", "disabled", "min", "max", "hourStep", "minuteStep", "secondsStep", "mousewheel", "arrowkeys", "showSeconds", "ngClass"], [1, "ampm-toggle", "text-center"], [1, "meridian-btn", "mb-1", 3, "click", "ngClass"], [1, "meridian-btn", 3, "click", "ngClass"], ["dateTimePicker", "", "mode", "TIME", 3, "change", "minTime", "maxTime", "placement", "displayFormat", "value"], ["tabindex", "1000000", "role", "button", 1, "mobile-input", "mobile-datepicker-container", 3, "click", "focus", "blur"]], template: function TimeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3245
|
-
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
3246
|
-
i0__namespace.ɵɵlistener("onShown", function TimeComponent_Template_div_onShown_0_listener() { return ctx.onShown(); })("onHidden", function TimeComponent_Template_div_onHidden_0_listener() { return ctx.hideTimepickerDropdown(); });
|
|
3247
|
-
i0__namespace.ɵɵelementStart(1, "input", 1);
|
|
3248
|
-
i0__namespace.ɵɵlistener("click", function TimeComponent_Template_input_click_1_listener($event) { return ctx.toggleDropdown($event, true); })("focus", function TimeComponent_Template_input_focus_1_listener($event) { ctx.onDateTimeInputFocus(); return ctx.invokeOnFocus($event); })("blur", function TimeComponent_Template_input_blur_1_listener($event) { return ctx.onInputBlur($event); })("change", function TimeComponent_Template_input_change_1_listener($event) { return ctx.onDisplayTimeChange($event); })("keydown", function TimeComponent_Template_input_keydown_1_listener($event) { ctx._triggeredByUser = true; return ctx.onDisplayKeydown($event); });
|
|
3249
|
-
i0__namespace.ɵɵelementEnd();
|
|
3250
|
-
i0__namespace.ɵɵelementStart(2, "span", 2)(3, "button", 3);
|
|
3251
|
-
i0__namespace.ɵɵlistener("click", function TimeComponent_Template_button_click_3_listener($event) { return ctx.toggleDropdown($event, false); });
|
|
3252
|
-
i0__namespace.ɵɵelement(4, "i", 4);
|
|
3253
|
-
i0__namespace.ɵɵelementEnd()();
|
|
3254
|
-
i0__namespace.ɵɵtemplate(5, TimeComponent_div_5_Template, 3, 18, "div", 5);
|
|
3255
|
-
i0__namespace.ɵɵelementEnd();
|
|
3256
|
-
i0__namespace.ɵɵtemplate(6, TimeComponent_Conditional_6_Template, 2, 6);
|
|
3257
|
-
} if (rf & 2) {
|
|
3258
|
-
i0__namespace.ɵɵproperty("isOpen", ctx.status.isopen)("container", "body");
|
|
3259
|
-
i0__namespace.ɵɵadvance();
|
|
3260
|
-
i0__namespace.ɵɵproperty("tabindex", ctx.tabindex)("name", ctx.name)("value", ctx.displayValue)("disabled", ctx.disabled || ctx.readonly || ctx.isCurrentTime)("autofocus", ctx.autofocus)("required", ctx.required)("readOnly", ctx.isReadOnly);
|
|
3261
|
-
i0__namespace.ɵɵattribute("aria-label", ctx.arialabel)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-atomic", ctx.isCurrentTime ? "true" : "false");
|
|
3262
|
-
i0__namespace.ɵɵadvance(2);
|
|
3263
|
-
i0__namespace.ɵɵproperty("tabindex", ctx.tabindex)("disabled", ctx.disabled || ctx.readonly || ctx.isCurrentTime);
|
|
3264
|
-
i0__namespace.ɵɵadvance(3);
|
|
3265
|
-
i0__namespace.ɵɵconditional(ctx.loadNativeDateInput ? 6 : -1);
|
|
3266
|
-
} }, dependencies: [base.WmComponentsModule, i2$2.FormsModule, i2$2__namespace.NgControlStatus, i2$2__namespace.NgModel, DateTimePickerComponent, i3.BsDropdownModule, i3__namespace.BsDropdownMenuDirective, i3__namespace.BsDropdownDirective, i5.TimepickerModule, i5__namespace.TimepickerComponent, i6.CommonModule, i6__namespace.NgClass], encapsulation: 2 }); }
|
|
3267
|
-
}
|
|
3268
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(TimeComponent, [{
|
|
3269
|
-
type: i0.Component,
|
|
3270
|
-
args: [{ standalone: true, imports: [base.WmComponentsModule, i2$2.FormsModule, DateTimePickerComponent, i3.BsDropdownModule, i5.TimepickerModule, i6.CommonModule], selector: '[wmTime]', providers: [
|
|
3271
|
-
base.provideAs(TimeComponent, i2$2.NG_VALUE_ACCESSOR, true),
|
|
3272
|
-
base.provideAs(TimeComponent, i2$2.NG_VALIDATORS, true),
|
|
3273
|
-
base.provideAsWidgetRef(TimeComponent),
|
|
3274
|
-
{ provide: i5.TimepickerConfig, deps: [i1$1.AbstractI18nService], useFactory: getTimepickerConfig }
|
|
3275
|
-
], template: "<div dropdown [isOpen]=\"status.isopen\" (onShown)=\"onShown()\" (onHidden)=\"hideTimepickerDropdown()\" [container]=\"'body'\" style=\"display: inherit\">\n <input [attr.aria-label]=\"arialabel\" class=\"form-control app-textbox display-input\"\n focus-target\n [tabindex]=\"tabindex\"\n [name]=\"name\"\n type=\"text\"\n role=\"timer\"\n [value]=\"displayValue\"\n [disabled]=\"disabled || readonly || isCurrentTime\"\n [autofocus]=\"autofocus\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-atomic]=\"isCurrentTime ? 'true' : 'false'\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n (click)=\"toggleDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event);\"\n (blur)=\"onInputBlur($event)\"\n (change)=\"onDisplayTimeChange($event)\"\n (keydown)=\"this._triggeredByUser = true; onDisplayKeydown($event)\">\n <span class=\"input-group-btn dropdown-toggle\">\n <button type=\"button\" class=\"btn btn-default btn-date\" [tabindex]=\"tabindex\" [disabled]=\"disabled || readonly || isCurrentTime\" aria-label=\"Select time\" aria-haspopup=\"true\" aria-expanded=\"false\" (click)=\"toggleDropdown($event, false)\"><i aria-hidden=\"true\" class=\"app-icon wm-sl-l sl-time\"></i></button>\n </span>\n <div *dropdownMenu class=\"dropdown-menu\" (click)=\"preventTpClose($event)\">\n <timepicker class=\"model-holder\"\n [showMeridian]=\"ismeridian\"\n [readonlyInput]=\"isDisabled\"\n [(ngModel)]=\"bsTimeValue\"\n [ngModelOptions]=\"{standalone: true}\"\n [disabled]=\"disabled || readonly || isCurrentTime\"\n [min]=\"minTime\"\n [max]=\"maxTime\"\n [hourStep]=\"hourstep\"\n [minuteStep]=\"minutestep\"\n [secondsStep]=\"secondsstep\"\n [mousewheel]=\"true\"\n [arrowkeys]=\"true\"\n (isValid)=\"isValid($event)\"\n [showSeconds]=\"showseconds\" (ngModelChange)=\"onTimeChange($event)\"\n [ngClass]=\"{ 'showbuttons': showampmbuttons }\"></timepicker>\n @if (ismeridian && showampmbuttons) {\n <div class=\"ampm-toggle text-center\">\n <button class=\"meridian-btn mb-1\" [ngClass]=\"{ 'active btn-secondary': getPeriod() === 'AM' }\" (click)=\"setPeriod('AM')\">{{appLocale.LABEL_AM ||\"AM\"}}</button><br>\n <button class=\"meridian-btn\" [ngClass]=\"{ 'active btn-secondary': getPeriod() === 'PM' }\" (click)=\"setPeriod('PM')\">{{appLocale.LABEL_PM ||\"PM\"}}</button>\n </div>\n }\n </div>\n</div>\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode=\"TIME\"\n [minTime]=\"minTime\"\n [maxTime]=\"maxTime\"\n [placement]=\"modal\"\n [displayFormat]=\"timepattern\"\n [value]=\"bsTimeValue\"\n (change)=\"onTimeChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n tabindex=\"1000000\"\n (click)=\"!(disabled || readonly) && showDatePickerModal(bsTimeValue)\"\n [attr.aria-label]=\"displayValue ? 'Change time ' + displayValue : arialabel || 'Select time'\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event); assignModel()\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n role=\"button\">\n </div>\n}\n" }]
|
|
3276
|
-
}], () => [{ type: i0__namespace.Injector }, { type: i0__namespace.NgZone }, { type: i1$1__namespace.AppDefaults }, { type: i1$1__namespace.App }, { type: undefined, decorators: [{
|
|
3277
|
-
type: i0.Inject,
|
|
3278
|
-
args: ['EXPLICIT_CONTEXT']
|
|
3279
|
-
}, {
|
|
3280
|
-
type: i0.Optional
|
|
3281
|
-
}] }], null); })();
|
|
3282
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(TimeComponent, { className: "TimeComponent", filePath: "time/time.component.ts", lineNumber: 50 }); })();
|
|
3283
|
-
|
|
3284
|
-
exports.DateComponent = DateComponent;
|
|
3285
|
-
exports.DateTimePickerComponent = DateTimePickerComponent;
|
|
3286
|
-
exports.DatetimeComponent = DatetimeComponent;
|
|
3287
|
-
exports.PickerComponent = PickerComponent;
|
|
3288
|
-
exports.PickerGroupComponent = PickerGroupComponent;
|
|
3289
|
-
exports.TimeComponent = TimeComponent;
|
|
3290
|
-
exports.TimePickerComponent = TimePickerComponent;
|
|
3291
|
-
|
|
3292
|
-
}));
|