@wavemaker-ai/app-ng-runtime 12.0.2-rc.647771 → 12.1.0-rc.347
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 +2489 -2963
- package/build-task/fesm2022/index.mjs +2307 -2786
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/build-task/types/index.d.ts +401 -844
- package/components/advanced/carousel/bundles/index.umd.js +387 -344
- package/components/advanced/carousel/fesm2022/index.mjs +363 -325
- package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
- package/components/advanced/carousel/types/index.d.ts +85 -86
- package/components/advanced/custom/bundles/index.umd.js +298 -249
- package/components/advanced/custom/fesm2022/index.mjs +280 -236
- package/components/advanced/custom/fesm2022/index.mjs.map +1 -1
- package/components/advanced/custom/types/index.d.ts +49 -49
- package/components/advanced/login/bundles/index.umd.js +177 -127
- package/components/advanced/login/fesm2022/index.mjs +162 -117
- package/components/advanced/login/fesm2022/index.mjs.map +1 -1
- package/components/advanced/login/types/index.d.ts +33 -34
- package/components/advanced/marquee/bundles/index.umd.js +93 -63
- package/components/advanced/marquee/fesm2022/index.mjs +73 -48
- package/components/advanced/marquee/fesm2022/index.mjs.map +1 -1
- package/components/advanced/marquee/types/index.d.ts +11 -12
- package/components/base/bundles/index.umd.js +5515 -6359
- package/components/base/fesm2022/index.mjs +5169 -6027
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/types/index.d.ts +1198 -1154
- package/components/basic/anchor/bundles/index.umd.js +273 -195
- package/components/basic/anchor/fesm2022/index.mjs +251 -178
- package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
- package/components/basic/anchor/types/index.d.ts +40 -41
- package/components/basic/audio/bundles/index.umd.js +124 -75
- package/components/basic/audio/fesm2022/index.mjs +104 -60
- package/components/basic/audio/fesm2022/index.mjs.map +1 -1
- package/components/basic/audio/types/index.d.ts +22 -23
- package/components/basic/html/bundles/index.umd.js +144 -113
- package/components/basic/html/fesm2022/index.mjs +125 -99
- package/components/basic/html/fesm2022/index.mjs.map +1 -1
- package/components/basic/html/types/index.d.ts +20 -17
- package/components/basic/icon/bundles/index.umd.js +144 -72
- package/components/basic/icon/fesm2022/index.mjs +124 -57
- package/components/basic/icon/fesm2022/index.mjs.map +1 -1
- package/components/basic/icon/types/index.d.ts +18 -19
- package/components/basic/iframe/bundles/index.umd.js +143 -93
- package/components/basic/iframe/fesm2022/index.mjs +124 -79
- package/components/basic/iframe/fesm2022/index.mjs.map +1 -1
- package/components/basic/iframe/types/index.d.ts +28 -29
- package/components/basic/label/bundles/index.umd.js +136 -120
- package/components/basic/label/fesm2022/index.mjs +118 -107
- package/components/basic/label/fesm2022/index.mjs.map +1 -1
- package/components/basic/label/types/index.d.ts +14 -15
- package/components/basic/picture/bundles/index.umd.js +171 -130
- package/components/basic/picture/fesm2022/index.mjs +152 -116
- package/components/basic/picture/fesm2022/index.mjs.map +1 -1
- package/components/basic/picture/types/index.d.ts +21 -22
- package/components/basic/progress/progress-bar/bundles/index.umd.js +211 -160
- package/components/basic/progress/progress-bar/fesm2022/index.mjs +193 -147
- package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-bar/types/index.d.ts +45 -41
- package/components/basic/progress/progress-circle/bundles/index.umd.js +294 -165
- package/components/basic/progress/progress-circle/fesm2022/index.mjs +274 -150
- package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-circle/types/index.d.ts +41 -42
- package/components/basic/progress/progress-utils/bundles/index.umd.js +27 -29
- package/components/basic/progress/progress-utils/fesm2022/index.mjs +18 -25
- package/components/basic/progress/progress-utils/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-utils/types/index.d.ts +3 -5
- package/components/basic/rich-text-editor/bundles/index.umd.js +294 -228
- package/components/basic/rich-text-editor/fesm2022/index.mjs +275 -214
- package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
- package/components/basic/rich-text-editor/types/index.d.ts +55 -56
- package/components/basic/search/bundles/index.umd.js +1129 -1090
- package/components/basic/search/fesm2022/index.mjs +1117 -1083
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/types/index.d.ts +132 -130
- package/components/basic/spinner/bundles/index.umd.js +216 -120
- package/components/basic/spinner/fesm2022/index.mjs +201 -110
- package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
- package/components/basic/spinner/types/index.d.ts +30 -31
- package/components/basic/tree/bundles/index.umd.js +756 -756
- package/components/basic/tree/fesm2022/index.mjs +740 -745
- package/components/basic/tree/fesm2022/index.mjs.map +1 -1
- package/components/basic/tree/types/index.d.ts +106 -97
- package/components/basic/video/bundles/index.umd.js +164 -108
- package/components/basic/video/fesm2022/index.mjs +145 -94
- package/components/basic/video/fesm2022/index.mjs.map +1 -1
- package/components/basic/video/types/index.d.ts +29 -30
- package/components/chart/bundles/index.umd.js +1768 -1737
- package/components/chart/fesm2022/index.mjs +1713 -1728
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/chart/types/index.d.ts +102 -104
- package/components/containers/accordion/bundles/index.umd.js +522 -494
- package/components/containers/accordion/fesm2022/index.mjs +502 -479
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/types/index.d.ts +116 -116
- package/components/containers/layout-grid/bundles/index.umd.js +260 -164
- package/components/containers/layout-grid/fesm2022/index.mjs +231 -140
- package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
- package/components/containers/layout-grid/types/index.d.ts +30 -27
- package/components/containers/linear-layout/bundles/index.umd.js +220 -178
- package/components/containers/linear-layout/fesm2022/index.mjs +193 -156
- package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
- package/components/containers/linear-layout/types/index.d.ts +26 -26
- package/components/containers/panel/bundles/index.umd.js +343 -215
- package/components/containers/panel/fesm2022/index.mjs +330 -207
- package/components/containers/panel/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/types/index.d.ts +48 -49
- package/components/containers/tabs/bundles/index.umd.js +832 -779
- package/components/containers/tabs/fesm2022/index.mjs +811 -763
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/tabs/types/index.d.ts +134 -126
- package/components/containers/tile/bundles/index.umd.js +93 -60
- package/components/containers/tile/fesm2022/index.mjs +75 -47
- package/components/containers/tile/fesm2022/index.mjs.map +1 -1
- package/components/containers/tile/types/index.d.ts +11 -12
- package/components/containers/wizard/bundles/index.umd.js +1096 -1078
- package/components/containers/wizard/fesm2022/index.mjs +1069 -1056
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/types/index.d.ts +258 -252
- package/components/data/card/bundles/index.umd.js +439 -229
- package/components/data/card/fesm2022/index.mjs +408 -203
- package/components/data/card/fesm2022/index.mjs.map +1 -1
- package/components/data/card/types/index.d.ts +50 -48
- package/components/data/form/bundles/index.umd.js +3392 -3339
- package/components/data/form/fesm2022/index.mjs +3350 -3304
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/types/index.d.ts +561 -482
- package/components/data/list/bundles/index.umd.js +1523 -1601
- package/components/data/list/fesm2022/index.mjs +1507 -1590
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/types/index.d.ts +300 -283
- package/components/data/live-table/bundles/index.umd.js +299 -280
- package/components/data/live-table/fesm2022/index.mjs +284 -270
- package/components/data/live-table/fesm2022/index.mjs.map +1 -1
- package/components/data/live-table/types/index.d.ts +42 -39
- package/components/data/pagination/bundles/index.umd.js +848 -881
- package/components/data/pagination/fesm2022/index.mjs +835 -879
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/types/index.d.ts +110 -106
- package/components/data/table/bundles/index.umd.js +4977 -5042
- package/components/data/table/fesm2022/index.mjs +4937 -5007
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/types/index.d.ts +770 -736
- package/components/dialogs/alert-dialog/bundles/index.umd.js +259 -118
- package/components/dialogs/alert-dialog/fesm2022/index.mjs +243 -109
- package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/alert-dialog/types/index.d.ts +31 -26
- package/components/dialogs/confirm-dialog/bundles/index.umd.js +250 -121
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs +236 -114
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/confirm-dialog/types/index.d.ts +34 -29
- package/components/dialogs/default/bundles/index.umd.js +509 -373
- package/components/dialogs/default/fesm2022/index.mjs +485 -354
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/default/types/index.d.ts +129 -86
- package/components/dialogs/design-dialog/bundles/index.umd.js +320 -142
- package/components/dialogs/design-dialog/fesm2022/index.mjs +305 -132
- package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/design-dialog/types/index.d.ts +31 -20
- package/components/dialogs/iframe-dialog/bundles/index.umd.js +258 -111
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs +245 -105
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/iframe-dialog/types/index.d.ts +27 -22
- package/components/dialogs/login-dialog/bundles/index.umd.js +139 -106
- package/components/dialogs/login-dialog/fesm2022/index.mjs +125 -97
- package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/login-dialog/types/index.d.ts +27 -26
- package/components/dialogs/partial-dialog/bundles/index.umd.js +302 -149
- package/components/dialogs/partial-dialog/fesm2022/index.mjs +289 -143
- package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/partial-dialog/types/index.d.ts +37 -32
- package/components/input/base-form/bundles/index.umd.js +143 -139
- package/components/input/base-form/fesm2022/index.mjs +129 -130
- package/components/input/base-form/fesm2022/index.mjs.map +1 -1
- package/components/input/base-form/types/index.d.ts +28 -29
- package/components/input/base-form-custom/bundles/index.umd.js +107 -121
- package/components/input/base-form-custom/fesm2022/index.mjs +88 -107
- package/components/input/base-form-custom/fesm2022/index.mjs.map +1 -1
- package/components/input/base-form-custom/types/index.d.ts +23 -26
- package/components/input/button/bundles/index.umd.js +177 -89
- package/components/input/button/fesm2022/index.mjs +158 -75
- package/components/input/button/fesm2022/index.mjs.map +1 -1
- package/components/input/button/types/index.d.ts +24 -25
- package/components/input/button-group/bundles/index.umd.js +110 -72
- package/components/input/button-group/fesm2022/index.mjs +90 -57
- package/components/input/button-group/fesm2022/index.mjs.map +1 -1
- package/components/input/button-group/types/index.d.ts +13 -14
- package/components/input/calendar/bundles/index.umd.js +615 -647
- package/components/input/calendar/fesm2022/index.mjs +596 -649
- package/components/input/calendar/fesm2022/index.mjs.map +1 -1
- package/components/input/calendar/types/index.d.ts +130 -131
- package/components/input/caption-position/bundles/index.umd.js +175 -188
- package/components/input/caption-position/fesm2022/index.mjs +159 -177
- package/components/input/caption-position/fesm2022/index.mjs.map +1 -1
- package/components/input/caption-position/types/index.d.ts +31 -34
- package/components/input/checkbox/bundles/index.umd.js +339 -200
- package/components/input/checkbox/fesm2022/index.mjs +319 -185
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
- package/components/input/checkbox/types/index.d.ts +46 -41
- package/components/input/checkboxset/bundles/index.umd.js +256 -170
- package/components/input/checkboxset/fesm2022/index.mjs +242 -161
- package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
- package/components/input/checkboxset/types/index.d.ts +26 -27
- package/components/input/chips/bundles/index.umd.js +721 -733
- package/components/input/chips/fesm2022/index.mjs +706 -723
- package/components/input/chips/fesm2022/index.mjs.map +1 -1
- package/components/input/chips/types/index.d.ts +101 -90
- package/components/input/color-picker/bundles/index.umd.js +312 -137
- package/components/input/color-picker/fesm2022/index.mjs +296 -126
- package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/color-picker/types/index.d.ts +35 -36
- package/components/input/composite/bundles/index.umd.js +127 -112
- package/components/input/composite/fesm2022/index.mjs +106 -96
- package/components/input/composite/fesm2022/index.mjs.map +1 -1
- package/components/input/composite/types/index.d.ts +26 -27
- package/components/input/currency/bundles/index.umd.js +237 -104
- package/components/input/currency/fesm2022/index.mjs +219 -91
- package/components/input/currency/fesm2022/index.mjs.map +1 -1
- package/components/input/currency/types/index.d.ts +30 -31
- package/components/input/dataset-aware-form/bundles/index.umd.js +298 -346
- package/components/input/dataset-aware-form/fesm2022/index.mjs +286 -339
- package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -1
- package/components/input/dataset-aware-form/types/index.d.ts +80 -80
- package/components/input/epoch/base-date-time/bundles/index.umd.js +809 -1081
- package/components/input/epoch/base-date-time/fesm2022/index.mjs +796 -1073
- package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/base-date-time/types/index.d.ts +244 -247
- package/components/input/epoch/date/bundles/index.umd.js +619 -513
- package/components/input/epoch/date/fesm2022/index.mjs +604 -503
- package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date/types/index.d.ts +63 -64
- package/components/input/epoch/date-time/bundles/index.umd.js +682 -511
- package/components/input/epoch/date-time/fesm2022/index.mjs +672 -506
- package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time/types/index.d.ts +111 -112
- package/components/input/epoch/date-time-picker/bundles/index.umd.js +417 -321
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs +405 -314
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time-picker/types/index.d.ts +135 -80
- package/components/input/epoch/picker/bundles/index.umd.js +201 -148
- package/components/input/epoch/picker/fesm2022/index.mjs +183 -135
- package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/picker/types/index.d.ts +46 -38
- package/components/input/epoch/time/bundles/index.umd.js +534 -392
- package/components/input/epoch/time/fesm2022/index.mjs +523 -386
- package/components/input/epoch/time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/time/types/index.d.ts +107 -108
- package/components/input/file-upload/bundles/index.umd.js +500 -477
- package/components/input/file-upload/fesm2022/index.mjs +484 -466
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/types/index.d.ts +110 -109
- package/components/input/number/bundles/index.umd.js +241 -101
- package/components/input/number/fesm2022/index.mjs +224 -89
- package/components/input/number/fesm2022/index.mjs.map +1 -1
- package/components/input/number/types/index.d.ts +28 -29
- package/components/input/radioset/bundles/index.umd.js +240 -156
- package/components/input/radioset/fesm2022/index.mjs +226 -147
- package/components/input/radioset/fesm2022/index.mjs.map +1 -1
- package/components/input/radioset/types/index.d.ts +25 -26
- package/components/input/rating/bundles/index.umd.js +353 -266
- package/components/input/rating/fesm2022/index.mjs +337 -255
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/types/index.d.ts +52 -53
- package/components/input/select/bundles/index.umd.js +295 -217
- package/components/input/select/fesm2022/index.mjs +280 -207
- package/components/input/select/fesm2022/index.mjs.map +1 -1
- package/components/input/select/types/index.d.ts +38 -39
- package/components/input/slider/bundles/index.umd.js +316 -197
- package/components/input/slider/fesm2022/index.mjs +297 -183
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/types/index.d.ts +43 -44
- package/components/input/switch/bundles/index.umd.js +257 -219
- package/components/input/switch/fesm2022/index.mjs +243 -210
- package/components/input/switch/fesm2022/index.mjs.map +1 -1
- package/components/input/switch/types/index.d.ts +34 -35
- package/components/input/text/bundles/index.umd.js +1585 -1120
- package/components/input/text/fesm2022/index.mjs +1542 -1082
- package/components/input/text/fesm2022/index.mjs.map +1 -1
- package/components/input/text/types/index.d.ts +313 -310
- package/components/input/textarea/bundles/index.umd.js +224 -100
- package/components/input/textarea/fesm2022/index.mjs +207 -88
- package/components/input/textarea/fesm2022/index.mjs.map +1 -1
- package/components/input/textarea/types/index.d.ts +32 -33
- package/components/navigation/breadcrumb/bundles/index.umd.js +205 -131
- package/components/navigation/breadcrumb/fesm2022/index.mjs +188 -118
- package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
- package/components/navigation/breadcrumb/types/index.d.ts +29 -28
- package/components/navigation/menu/bundles/index.umd.js +1461 -950
- package/components/navigation/menu/fesm2022/index.mjs +1416 -910
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/menu/types/index.d.ts +220 -193
- package/components/navigation/navbar/bundles/index.umd.js +172 -79
- package/components/navigation/navbar/fesm2022/index.mjs +155 -67
- package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
- package/components/navigation/navbar/types/index.d.ts +19 -20
- package/components/navigation/popover/bundles/index.umd.js +543 -519
- package/components/navigation/popover/fesm2022/index.mjs +524 -505
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/types/index.d.ts +86 -86
- package/components/page/default/bundles/index.umd.js +634 -451
- package/components/page/default/fesm2022/index.mjs +600 -422
- package/components/page/default/fesm2022/index.mjs.map +1 -1
- package/components/page/default/types/index.d.ts +123 -119
- package/components/page/footer/bundles/index.umd.js +91 -63
- package/components/page/footer/fesm2022/index.mjs +71 -48
- package/components/page/footer/fesm2022/index.mjs.map +1 -1
- package/components/page/footer/types/index.d.ts +11 -12
- package/components/page/header/bundles/index.umd.js +96 -59
- package/components/page/header/fesm2022/index.mjs +76 -44
- package/components/page/header/fesm2022/index.mjs.map +1 -1
- package/components/page/header/types/index.d.ts +12 -13
- package/components/page/left-panel/bundles/index.umd.js +405 -407
- package/components/page/left-panel/fesm2022/index.mjs +386 -393
- package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/left-panel/types/index.d.ts +47 -40
- package/components/page/right-panel/bundles/index.umd.js +115 -78
- package/components/page/right-panel/fesm2022/index.mjs +96 -64
- package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/right-panel/types/index.d.ts +14 -13
- package/components/page/top-nav/bundles/index.umd.js +91 -60
- package/components/page/top-nav/fesm2022/index.mjs +73 -47
- package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
- package/components/page/top-nav/types/index.d.ts +11 -12
- package/components/prefab/bundles/index.umd.js +253 -173
- package/components/prefab/fesm2022/index.mjs +233 -158
- package/components/prefab/fesm2022/index.mjs.map +1 -1
- package/components/prefab/types/index.d.ts +35 -33
- package/core/bundles/index.umd.js +4466 -5642
- package/core/fesm2022/index.mjs +3997 -5202
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/types/index.d.ts +1785 -1808
- package/http/bundles/index.umd.js +339 -413
- package/http/fesm2022/index.mjs +323 -402
- package/http/fesm2022/index.mjs.map +1 -1
- package/http/types/index.d.ts +107 -112
- package/locales/moment/am-et.js +73 -0
- package/locales/moment/bm.js +2 -0
- package/locales/moment/ca.js +1 -1
- package/locales/moment/de-at.js +29 -1
- package/locales/moment/de-ch.js +29 -1
- package/locales/moment/de.js +29 -1
- package/locales/moment/hu.js +3 -3
- package/locales/moment/id.js +12 -1
- package/locales/moment/ka.js +1 -1
- package/locales/moment/mk.js +0 -1
- package/locales/moment/nl-be.js +1 -1
- package/locales/moment/pl.js +1 -1
- package/locales/moment/ps.js +188 -0
- package/locales/moment/pt-br.js +14 -6
- package/locales/moment/sv.js +1 -1
- package/locales/moment/sw.js +56 -14
- package/locales/moment/uk.js +5 -4
- package/locales/moment/uz-latn.js +1 -1
- package/locales/moment/uz.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/oAuth/bundles/index.umd.js +326 -483
- package/oAuth/fesm2022/index.mjs +267 -429
- package/oAuth/fesm2022/index.mjs.map +1 -1
- package/oAuth/types/index.d.ts +22 -26
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +6380 -6093
- package/runtime/base/fesm2022/index.mjs +6368 -6107
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/types/index.d.ts +1336 -1359
- package/runtime/dynamic/bundles/index.umd.js +1215 -851
- package/runtime/dynamic/fesm2022/index.mjs +1253 -898
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/runtime/dynamic/types/index.d.ts +140 -128
- package/scripts/datatable/datatable.js +20 -30
- package/security/bundles/index.umd.js +297 -438
- package/security/fesm2022/index.mjs +282 -443
- package/security/fesm2022/index.mjs.map +1 -1
- package/security/types/index.d.ts +127 -130
- package/swipey/bundles/index.umd.js +57 -48
- package/swipey/fesm2022/index.mjs +55 -50
- package/swipey/fesm2022/index.mjs.map +1 -1
- package/swipey/types/index.d.ts +19 -21
- package/transpiler/bundles/index.umd.js +1174 -811
- package/transpiler/fesm2022/index.mjs +1109 -757
- package/transpiler/fesm2022/index.mjs.map +1 -1
- package/transpiler/types/index.d.ts +32 -36
- package/variables/bundles/index.umd.js +2226 -3245
- package/variables/fesm2022/index.mjs +2117 -3237
- package/variables/fesm2022/index.mjs.map +1 -1
- package/variables/types/index.d.ts +410 -393
- package/build-task/.npmignore +0 -2
- package/components/advanced/carousel/.npmignore +0 -2
- package/components/advanced/custom/.npmignore +0 -2
- package/components/advanced/login/.npmignore +0 -2
- package/components/advanced/marquee/.npmignore +0 -2
- package/components/base/.npmignore +0 -2
- package/components/basic/anchor/.npmignore +0 -2
- package/components/basic/audio/.npmignore +0 -2
- package/components/basic/html/.npmignore +0 -2
- package/components/basic/icon/.npmignore +0 -2
- package/components/basic/iframe/.npmignore +0 -2
- package/components/basic/label/.npmignore +0 -2
- package/components/basic/picture/.npmignore +0 -2
- package/components/basic/progress/progress-bar/.npmignore +0 -2
- package/components/basic/progress/progress-circle/.npmignore +0 -2
- package/components/basic/progress/progress-utils/.npmignore +0 -2
- package/components/basic/rich-text-editor/.npmignore +0 -2
- package/components/basic/search/.npmignore +0 -2
- package/components/basic/spinner/.npmignore +0 -2
- package/components/basic/tree/.npmignore +0 -2
- package/components/basic/video/.npmignore +0 -2
- package/components/chart/.npmignore +0 -2
- package/components/containers/accordion/.npmignore +0 -2
- package/components/containers/layout-grid/.npmignore +0 -2
- package/components/containers/linear-layout/.npmignore +0 -2
- package/components/containers/panel/.npmignore +0 -2
- package/components/containers/tabs/.npmignore +0 -2
- package/components/containers/tile/.npmignore +0 -2
- package/components/containers/wizard/.npmignore +0 -2
- package/components/data/card/.npmignore +0 -2
- package/components/data/form/.npmignore +0 -2
- package/components/data/list/.npmignore +0 -2
- package/components/data/live-table/.npmignore +0 -2
- package/components/data/pagination/.npmignore +0 -2
- package/components/data/table/.npmignore +0 -2
- package/components/dialogs/alert-dialog/.npmignore +0 -2
- package/components/dialogs/confirm-dialog/.npmignore +0 -2
- package/components/dialogs/default/.npmignore +0 -2
- package/components/dialogs/design-dialog/.npmignore +0 -2
- package/components/dialogs/iframe-dialog/.npmignore +0 -2
- package/components/dialogs/login-dialog/.npmignore +0 -2
- package/components/dialogs/partial-dialog/.npmignore +0 -2
- package/components/input/base-form/.npmignore +0 -2
- package/components/input/base-form-custom/.npmignore +0 -2
- package/components/input/button/.npmignore +0 -2
- package/components/input/button-group/.npmignore +0 -2
- package/components/input/calendar/.npmignore +0 -2
- package/components/input/caption-position/.npmignore +0 -2
- package/components/input/checkbox/.npmignore +0 -2
- package/components/input/checkboxset/.npmignore +0 -2
- package/components/input/chips/.npmignore +0 -2
- package/components/input/color-picker/.npmignore +0 -2
- package/components/input/composite/.npmignore +0 -2
- package/components/input/currency/.npmignore +0 -2
- package/components/input/dataset-aware-form/.npmignore +0 -2
- package/components/input/epoch/base-date-time/.npmignore +0 -2
- package/components/input/epoch/date/.npmignore +0 -2
- package/components/input/epoch/date-time/.npmignore +0 -2
- package/components/input/epoch/date-time-picker/.npmignore +0 -2
- package/components/input/epoch/picker/.npmignore +0 -2
- package/components/input/epoch/time/.npmignore +0 -2
- package/components/input/file-upload/.npmignore +0 -2
- package/components/input/number/.npmignore +0 -2
- package/components/input/radioset/.npmignore +0 -2
- package/components/input/rating/.npmignore +0 -2
- package/components/input/select/.npmignore +0 -2
- package/components/input/slider/.npmignore +0 -2
- package/components/input/switch/.npmignore +0 -2
- package/components/input/text/.npmignore +0 -2
- package/components/input/textarea/.npmignore +0 -2
- package/components/navigation/breadcrumb/.npmignore +0 -2
- package/components/navigation/menu/.npmignore +0 -2
- package/components/navigation/navbar/.npmignore +0 -2
- package/components/navigation/popover/.npmignore +0 -2
- package/components/page/default/.npmignore +0 -2
- package/components/page/footer/.npmignore +0 -2
- package/components/page/header/.npmignore +0 -2
- package/components/page/left-panel/.npmignore +0 -2
- package/components/page/right-panel/.npmignore +0 -2
- package/components/page/top-nav/.npmignore +0 -2
- package/components/prefab/.npmignore +0 -2
- package/core/.npmignore +0 -2
- package/http/.npmignore +0 -2
- package/oAuth/.npmignore +0 -2
- package/runtime/base/.npmignore +0 -2
- package/runtime/dynamic/.npmignore +0 -2
- package/security/.npmignore +0 -2
- package/swipey/.npmignore +0 -2
- package/transpiler/.npmignore +0 -2
- package/variables/.npmignore +0 -2
|
@@ -1,519 +1,690 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/forms'), require('@angular/common'), require('@wm/components/input/epoch/date-time-picker'), require('@angular/core'), require('ngx-bootstrap/datepicker'), require('ngx-bootstrap/timepicker'), require('@wm/core'), require('@wm/components/base'), require('@wm/components/input/epoch/base-date-time'), require('lodash-es'), require('ngx-bootstrap/dropdown'), require('moment')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@angular/forms', '@angular/common', '@wm/components/input/epoch/date-time-picker', '@angular/core', 'ngx-bootstrap/datepicker', 'ngx-bootstrap/timepicker', '@wm/core', '@wm/components/base', '@wm/components/input/epoch/base-date-time', 'lodash-es', 'ngx-bootstrap/dropdown', 'moment'], 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.input.epoch || {}, global.wm.components.input.epoch.dateTime = {}), global.ng.forms, global.ng.common, global.wm.components.input.epoch.dateTimePicker, global.ng.core, global.ngxBootstrap.datepicker, global.ngxBootstrap.timepicker, global.wm.core, global.wm.components.base, global.wm.components.input.epoch.baseDateTime, global._, global.ngxBootstrap.dropdown, global.momentLib));
|
|
5
5
|
})(this, (function (exports, i2, i6, dateTimePicker, i0, i4, i5, i1, base, baseDateTime, lodashEs, i3, momentLib) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
var i2__namespace = /*#__PURE__*/_interopNamespaceDefault(i2);
|
|
25
|
+
var i6__namespace = /*#__PURE__*/_interopNamespaceDefault(i6);
|
|
26
|
+
var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);
|
|
27
|
+
var i4__namespace = /*#__PURE__*/_interopNamespaceDefault(i4);
|
|
28
|
+
var i5__namespace = /*#__PURE__*/_interopNamespaceDefault(i5);
|
|
29
|
+
var i1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1);
|
|
30
|
+
var i3__namespace = /*#__PURE__*/_interopNamespaceDefault(i3);
|
|
31
|
+
var momentLib__namespace = /*#__PURE__*/_interopNamespaceDefault(momentLib);
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
33
|
+
const dateTimeProps = /* @__PURE__ */ new Map([
|
|
34
|
+
["autofocus", base.PROP_BOOLEAN],
|
|
35
|
+
["class", base.PROP_STRING],
|
|
36
|
+
["dataentrymode", {
|
|
37
|
+
value: "default",
|
|
38
|
+
...base.PROP_STRING
|
|
39
|
+
}],
|
|
40
|
+
["datavaluesource", base.PROP_ANY],
|
|
41
|
+
["datavalue", base.PROP_STRING],
|
|
42
|
+
["datepattern", base.PROP_STRING],
|
|
43
|
+
["disabled", base.PROP_BOOLEAN],
|
|
44
|
+
["excludedays", base.PROP_STRING],
|
|
45
|
+
["excludedates", base.PROP_STRING],
|
|
46
|
+
["hint", base.PROP_STRING],
|
|
47
|
+
["arialabel", base.PROP_STRING],
|
|
48
|
+
["hourstep", {
|
|
49
|
+
value: 1,
|
|
50
|
+
...base.PROP_NUMBER
|
|
51
|
+
}],
|
|
52
|
+
["maxdate", base.PROP_STRING],
|
|
53
|
+
["mindate", base.PROP_STRING],
|
|
54
|
+
["minutestep", {
|
|
55
|
+
value: 15,
|
|
56
|
+
...base.PROP_NUMBER
|
|
57
|
+
}],
|
|
58
|
+
["name", base.PROP_STRING],
|
|
59
|
+
["outputformat", {
|
|
60
|
+
value: "timestamp",
|
|
61
|
+
...base.PROP_STRING
|
|
62
|
+
}],
|
|
63
|
+
["placeholder", {
|
|
64
|
+
value: "Select date time",
|
|
65
|
+
...base.PROP_STRING
|
|
66
|
+
}],
|
|
67
|
+
["readonly", base.PROP_BOOLEAN],
|
|
68
|
+
["required", base.PROP_BOOLEAN],
|
|
69
|
+
["secondsstep", {
|
|
70
|
+
value: 1,
|
|
71
|
+
...base.PROP_NUMBER
|
|
72
|
+
}],
|
|
73
|
+
["shortcutkey", base.PROP_STRING],
|
|
74
|
+
["show", {
|
|
75
|
+
value: true,
|
|
76
|
+
...base.PROP_BOOLEAN
|
|
77
|
+
}],
|
|
78
|
+
["showdropdownon", {
|
|
79
|
+
value: "default",
|
|
80
|
+
...base.PROP_STRING
|
|
81
|
+
}],
|
|
82
|
+
["showbuttonbar", base.PROP_BOOLEAN],
|
|
83
|
+
["showcustompicker", {
|
|
84
|
+
value: false,
|
|
85
|
+
...base.PROP_BOOLEAN
|
|
86
|
+
}],
|
|
87
|
+
["showindevice", {
|
|
88
|
+
displayType: "inline-block",
|
|
89
|
+
value: "all",
|
|
90
|
+
...base.PROP_STRING
|
|
91
|
+
}],
|
|
92
|
+
["showweeks", base.PROP_BOOLEAN],
|
|
93
|
+
["tabindex", {
|
|
94
|
+
value: 0,
|
|
95
|
+
...base.PROP_NUMBER
|
|
96
|
+
}],
|
|
97
|
+
["timestamp", base.PROP_STRING],
|
|
98
|
+
["selectfromothermonth", {
|
|
99
|
+
value: true,
|
|
100
|
+
...base.PROP_BOOLEAN
|
|
101
|
+
}],
|
|
102
|
+
["todaybutton", {
|
|
103
|
+
value: true,
|
|
104
|
+
...base.PROP_BOOLEAN
|
|
105
|
+
}],
|
|
106
|
+
["clearbutton", {
|
|
107
|
+
value: true,
|
|
108
|
+
...base.PROP_BOOLEAN
|
|
109
|
+
}],
|
|
110
|
+
["adaptiveposition", {
|
|
111
|
+
value: true,
|
|
112
|
+
...base.PROP_BOOLEAN
|
|
113
|
+
}],
|
|
114
|
+
["todaybuttonlabel", {
|
|
115
|
+
value: "LABEL_TODAY_DATE",
|
|
116
|
+
...base.PROP_STRING
|
|
117
|
+
}],
|
|
118
|
+
["clearbuttonlabel", {
|
|
119
|
+
value: "LABEL_CLEAR_DATE",
|
|
120
|
+
...base.PROP_STRING
|
|
121
|
+
}],
|
|
122
|
+
["showampmbuttons", {
|
|
123
|
+
value: false,
|
|
124
|
+
...base.PROP_BOOLEAN
|
|
125
|
+
}]
|
|
126
|
+
]);
|
|
127
|
+
const registerProps = () => {
|
|
128
|
+
base.register("wm-datetime", dateTimeProps);
|
|
129
|
+
base.registerFormWidget(i1.FormWidgetType.DATETIME, new Map(dateTimeProps));
|
|
130
|
+
base.registerFormWidget(i1.FormWidgetType.TIMESTAMP, new Map(dateTimeProps));
|
|
131
|
+
};
|
|
132
|
+
const moment = momentLib__namespace.default || window["moment"];
|
|
133
|
+
const WIDGET_CONFIG = {
|
|
134
|
+
widgetType: "wm-datetime",
|
|
135
|
+
hostClass: "app-datetime input-group"
|
|
136
|
+
};
|
|
137
|
+
const CURRENT_DATE = "CURRENT_DATE";
|
|
138
|
+
var DatetimeComponent = class DatetimeComponent extends baseDateTime.BaseDateTimeComponent {
|
|
139
|
+
static {
|
|
140
|
+
this.initializeProps = registerProps();
|
|
141
|
+
}
|
|
142
|
+
get timestamp() {
|
|
143
|
+
return this.proxyModel ? this.proxyModel.valueOf() : void 0;
|
|
144
|
+
}
|
|
145
|
+
get dateInputFormat() {
|
|
146
|
+
return this._dateOptions.dateInputFormat || "yyyy-MM-ddTHH:mm:ss";
|
|
147
|
+
}
|
|
148
|
+
get displayValue() {
|
|
149
|
+
const display = i1.getFormattedDate(this.datePipe, this.proxyModel, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this) || "";
|
|
150
|
+
return this.safeReplaceMeridians(display);
|
|
151
|
+
}
|
|
152
|
+
get nativeDisplayValue() {
|
|
153
|
+
return i1.getFormattedDate(this.datePipe, this.proxyModel, "yyyy-MM-ddTHH:mm:ss", this.timeZone, this.key, this.isCurrentDate, this) || "";
|
|
154
|
+
}
|
|
155
|
+
get datavalue() {
|
|
156
|
+
if (this.isCurrentDate && !this.proxyModel) return CURRENT_DATE;
|
|
157
|
+
return i1.getFormattedDate(this.datePipe, this.proxyModel, this.outputformat, this.timeZone, null, null, this);
|
|
158
|
+
}
|
|
159
|
+
set datavalue(newVal) {
|
|
160
|
+
if (newVal === CURRENT_DATE) {
|
|
161
|
+
this.isCurrentDate = true;
|
|
162
|
+
this.setTimeInterval();
|
|
163
|
+
} else {
|
|
164
|
+
this.proxyModel = newVal ? i1.getDateObj(newVal, { isNativePicker: this.loadNativeDateInput }, this.timeZone) : void 0;
|
|
165
|
+
this.clearTimeInterval();
|
|
166
|
+
this.isCurrentDate = false;
|
|
167
|
+
}
|
|
168
|
+
this.bsTimeValue = this.bsDateValue = this.proxyModel;
|
|
169
|
+
this.cdRef.detectChanges();
|
|
170
|
+
}
|
|
171
|
+
constructor(inj, ngZone, cdRef, appDefaults, app, explicitContext) {
|
|
172
|
+
super(inj, WIDGET_CONFIG, explicitContext);
|
|
173
|
+
this.ngZone = ngZone;
|
|
174
|
+
this.cdRef = cdRef;
|
|
175
|
+
this.appDefaults = appDefaults;
|
|
176
|
+
this.isEnterPressedOnDateInput = false;
|
|
177
|
+
this.isTimeOpen = false;
|
|
178
|
+
this.isDateOpen = false;
|
|
179
|
+
this.isCurrentDate = false;
|
|
180
|
+
this._debouncedOnChange = lodashEs.debounce(this.invokeOnChange, 10);
|
|
181
|
+
this.registerDestroyListener(() => this.clearTimeInterval());
|
|
182
|
+
base.styler(this.nativeElement, this);
|
|
183
|
+
this.app = app;
|
|
184
|
+
this.dateContainerCls = `app-date-${this.widgetId}`;
|
|
185
|
+
this._dateOptions.containerClass = `app-date ${this.dateContainerCls}`;
|
|
186
|
+
this._dateOptions.showWeekNumbers = false;
|
|
187
|
+
this._dateOptions.customTodayClass = "current-date";
|
|
188
|
+
this.datepattern = this.appDefaults.dateTimeFormat || i1.getDisplayDateTimeFormat(i1.FormWidgetType.DATETIME);
|
|
189
|
+
this.updateFormat("datepattern");
|
|
190
|
+
}
|
|
191
|
+
setTimeInterval() {
|
|
192
|
+
if (this.timeinterval) return;
|
|
193
|
+
this.timeinterval = setInterval(() => {
|
|
194
|
+
const currentTime = this.timeZone ? i1.getMomentLocaleObject(this.timeZone) : /* @__PURE__ */ new Date();
|
|
195
|
+
this.onModelUpdate(currentTime);
|
|
196
|
+
}, 1e3);
|
|
197
|
+
}
|
|
198
|
+
clearTimeInterval() {
|
|
199
|
+
if (this.timeinterval) {
|
|
200
|
+
clearInterval(this.timeinterval);
|
|
201
|
+
this.timeinterval = null;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
toggleTimePicker(newVal, $event) {
|
|
205
|
+
if (this.loadNativeDateInput) {
|
|
206
|
+
this.onDateTimeInputFocus();
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
this.isTimeOpen = newVal;
|
|
210
|
+
if ($event && $event.type === "click") this.invokeEventCallback("click", { $event });
|
|
211
|
+
this.addTimepickerClickListener(this.isTimeOpen);
|
|
212
|
+
}
|
|
213
|
+
addTimepickerClickListener(skipListener) {
|
|
214
|
+
if (!skipListener) return;
|
|
215
|
+
const bodyElement = document.querySelector("body");
|
|
216
|
+
setTimeout(() => {
|
|
217
|
+
const dropdownElement = $(bodyElement).find(">bs-dropdown-container .dropdown-menu").get(0);
|
|
218
|
+
this.deregisterTimepickeEventListener = i1.addEventListenerOnElement(bodyElement, dropdownElement, this.nativeElement, "click", this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
219
|
+
this.toggleTimePicker(false);
|
|
220
|
+
}, 0, true);
|
|
221
|
+
}, 350);
|
|
222
|
+
}
|
|
223
|
+
setIsTimeOpen(val) {
|
|
224
|
+
this.isTimeOpen = val;
|
|
225
|
+
}
|
|
226
|
+
hideTimepickerDropdown() {
|
|
227
|
+
this.invokeOnTouched();
|
|
228
|
+
this.toggleTimePicker(false);
|
|
229
|
+
if (this.deregisterTimepickeEventListener) this.deregisterTimepickeEventListener();
|
|
230
|
+
const parentEl = $(this.nativeElement).closest(".app-composite-widget.caption-floating");
|
|
231
|
+
if (parentEl.length > 0) this.app.notify("captionPositionAnimate", {
|
|
232
|
+
displayVal: this.displayValue,
|
|
233
|
+
nativeEl: parentEl
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
onTimepickerOpen() {
|
|
237
|
+
const tpElements = document.querySelectorAll("timepicker");
|
|
238
|
+
lodashEs.forEach(tpElements, (element) => {
|
|
239
|
+
i1.addClass(element.parentElement, "app-datetime", true);
|
|
240
|
+
});
|
|
241
|
+
if (this.bsDropdown && (this.dateNotInRange || this.invalidDateTimeFormat)) this.bsTimeValue = null;
|
|
242
|
+
this.bsDatePickerDirective.hide();
|
|
243
|
+
this.focusTimePickerPopover(this);
|
|
244
|
+
this.bindTimePickerKeyboardEvents();
|
|
245
|
+
i1.adjustContainerPosition($("bs-dropdown-container"), this.nativeElement, this.bsDropdown._dropdown, $("bs-dropdown-container .dropdown-menu"));
|
|
246
|
+
}
|
|
247
|
+
onDatePickerOpen() {
|
|
248
|
+
this.isDateOpen = !this.isDateOpen;
|
|
249
|
+
this.toggleTimePicker(false);
|
|
250
|
+
this.$element.find(".model-holder").width("1px");
|
|
251
|
+
$("bs-datepicker-container").attr("aria-label", "Use Arrow keys to navigate dates, Choose Date from datepicker");
|
|
252
|
+
$(".bs-calendar-container").removeAttr("role");
|
|
253
|
+
const datePickerContainer = $(".bs-datepicker-container")[0];
|
|
254
|
+
this.focusTrap = base.setFocusTrap(datePickerContainer, true);
|
|
255
|
+
this.focusTrap.activate();
|
|
256
|
+
this.bsDateValue ? this.activeDate = this.bsDateValue : this.activeDate = /* @__PURE__ */ new Date();
|
|
257
|
+
this.addDatepickerKeyboardEvents(this, true);
|
|
258
|
+
i1.adjustContainerPosition($("bs-datepicker-container"), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
259
|
+
}
|
|
260
|
+
onModelUpdate(newVal, type) {
|
|
261
|
+
if (type === "date") {
|
|
262
|
+
this.invalidDateTimeFormat = false;
|
|
263
|
+
const formatted = i1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this);
|
|
264
|
+
if (this.safeReplaceMeridians(formatted) === this.displayValue) $(this.nativeElement).find(".display-input").val(this.displayValue);
|
|
265
|
+
}
|
|
266
|
+
if (newVal && !this.bsDateValue && this.timeZone) newVal = i1.getMomentLocaleObject(this.timeZone, newVal);
|
|
267
|
+
this.minDateMaxDateValidationOnInput(newVal);
|
|
268
|
+
if (!newVal) {
|
|
269
|
+
if (this.bsDateValue && this.bsTimePicker && (this.bsTimePicker.hours === "" || this.bsTimePicker.minutes === "" || this.bsTimePicker.seconds === "")) this.bsDateValue = this.bsTimeValue = this.proxyModel = moment(this.bsDateValue).startOf("day").toDate();
|
|
270
|
+
else this.bsDateValue = this.bsTimeValue = this.proxyModel = void 0;
|
|
271
|
+
if (newVal !== this.datavalue || !this.datavalue && this.prevDatavalue) this._debouncedOnChange(this.datavalue, {}, true);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (type === "date") {
|
|
275
|
+
if (this.isDateOpen) this.toggleTimePicker(true);
|
|
276
|
+
}
|
|
277
|
+
if (!this.dateNotInRange && !this.invalidDateTimeFormat) {
|
|
278
|
+
this.proxyModel = newVal;
|
|
279
|
+
this.bsDateValue = this.bsTimeValue = newVal;
|
|
280
|
+
if (this.datavalue === this.getPrevDataValue()) {
|
|
281
|
+
const time = i1.getFormattedDate(this.datePipe, this.datavalue, this.datepattern, this.timeZone, null, null, this) || "";
|
|
282
|
+
$(this.nativeElement).find(".display-input").val(time?.replace(this.meridians[0], this.am)?.replace(this.meridians[1], this.pm));
|
|
283
|
+
}
|
|
284
|
+
} else this.proxyModel = newVal;
|
|
285
|
+
this._debouncedOnChange(this.datavalue, {}, true);
|
|
286
|
+
this.cdRef.detectChanges();
|
|
287
|
+
const timePickerFields = $(".bs-timepicker-field");
|
|
288
|
+
if (this.timeZone && this.key === "datetimestamp" && timePickerFields.length) {
|
|
289
|
+
const formattedDate = i1.getFormattedDate(this.datePipe, newVal, this.getTimePattern(), this.timeZone, this.key, null, this);
|
|
290
|
+
this.updateTimepickerFields(this.safeReplaceMeridians(formattedDate), timePickerFields);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
getTimePattern() {
|
|
294
|
+
let timepattern;
|
|
295
|
+
const timePatternStartIndex = this.datepattern.toLowerCase().indexOf("h");
|
|
296
|
+
let timePatternEndIndex = this.datepattern.toLowerCase().indexOf(":ss");
|
|
297
|
+
if (timePatternEndIndex > -1) timePatternEndIndex += 3;
|
|
298
|
+
else {
|
|
299
|
+
timePatternEndIndex = this.datepattern.toLowerCase().indexOf(":mm");
|
|
300
|
+
if (timePatternEndIndex > -1) timePatternEndIndex += 3;
|
|
301
|
+
}
|
|
302
|
+
const hasMeridian = this.datepattern.toLowerCase().indexOf("a");
|
|
303
|
+
timepattern = this.datepattern.substr(timePatternStartIndex, timePatternEndIndex);
|
|
304
|
+
if (hasMeridian > -1) timepattern += " a";
|
|
305
|
+
return timepattern;
|
|
306
|
+
}
|
|
307
|
+
updateTimepickerFields(date, timePickerFields) {
|
|
308
|
+
const meridianField = $("timepicker button.text-center");
|
|
309
|
+
const formattedArr = date.split(" ");
|
|
310
|
+
const formattedTime = formattedArr[0].split(":");
|
|
311
|
+
for (let i = 0; i < timePickerFields.length; i++) timePickerFields[i].value = formattedTime[i];
|
|
312
|
+
if (meridianField?.html()?.trim() !== formattedArr[1]) meridianField.text(formattedArr[1]);
|
|
313
|
+
}
|
|
314
|
+
preventTpClose($event) {
|
|
315
|
+
$event.stopImmediatePropagation();
|
|
316
|
+
}
|
|
317
|
+
toggleDpDropdown($event, skipFocus = false) {
|
|
318
|
+
if (this.loadNativeDateInput) {
|
|
319
|
+
if (!skipFocus) this.onDateTimeInputFocus();
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if ($event.type === "click") this.invokeEventCallback("click", { $event });
|
|
323
|
+
if ($event.target && $($event.target).is("input") && !this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
324
|
+
$event.stopPropagation();
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (this.bsDatePickerDirective && (this.dateNotInRange || this.invalidDateTimeFormat)) this.bsDatePickerDirective._bsValue = null;
|
|
328
|
+
this.bsDatePickerDirective.toggle();
|
|
329
|
+
this.addBodyClickListener(this.bsDatePickerDirective.isOpen);
|
|
330
|
+
}
|
|
331
|
+
addBodyClickListener(skipListener) {
|
|
332
|
+
if (!skipListener) return;
|
|
333
|
+
const bodyElement = document.querySelector("body");
|
|
334
|
+
setTimeout(() => {
|
|
335
|
+
const bsDateContainerElement = bodyElement.querySelector(`.${this.dateContainerCls}`);
|
|
336
|
+
this.deregisterDatepickerEventListener = i1.addEventListenerOnElement(bodyElement, bsDateContainerElement, this.nativeElement, "click", this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
337
|
+
this.bsDatePickerDirective.hide();
|
|
338
|
+
}, 0, true);
|
|
339
|
+
}, 350);
|
|
340
|
+
}
|
|
341
|
+
hideDatepickerDropdown() {
|
|
342
|
+
this.isDateOpen = false;
|
|
343
|
+
this.focusTrap?.deactivate();
|
|
344
|
+
this.invokeOnTouched();
|
|
345
|
+
this.bsDatePickerDirective.hide();
|
|
346
|
+
if (this.bsDateValue) this.toggleTimePicker(true);
|
|
347
|
+
this.isEnterPressedOnDateInput = false;
|
|
348
|
+
if (this.deregisterDatepickerEventListener) this.deregisterDatepickerEventListener();
|
|
349
|
+
const parentEl = $(this.nativeElement).closest(".app-composite-widget.caption-floating");
|
|
350
|
+
if (parentEl.length > 0) this.app.notify("captionPositionAnimate", {
|
|
351
|
+
displayVal: this.displayValue,
|
|
352
|
+
nativeEl: parentEl
|
|
353
|
+
});
|
|
354
|
+
this.blurDateInput(this.isDateOpen);
|
|
355
|
+
}
|
|
356
|
+
onDateChange($event, isNativePicker) {
|
|
357
|
+
if (this.isEnterPressedOnDateInput) {
|
|
358
|
+
this.isEnterPressedOnDateInput = false;
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
let newVal = $event.target.value.trim();
|
|
362
|
+
newVal = newVal ? i1.getNativeDateObject(newVal?.replace(this.am, this.meridians[0])?.replace(this.pm, this.meridians[1]), {
|
|
363
|
+
pattern: this.loadNativeDateInput ? this.outputformat : this.datepattern,
|
|
364
|
+
meridians: this.meridians,
|
|
365
|
+
isNativePicker: this.loadNativeDateInput
|
|
366
|
+
}) : void 0;
|
|
367
|
+
if (!this.formatValidation(newVal, $event.target.value, isNativePicker)) return;
|
|
368
|
+
if (isNativePicker && this.minDateMaxDateValidationOnInput(newVal, $event, this.displayValue, isNativePicker)) return;
|
|
369
|
+
this.invalidDateTimeFormat = false;
|
|
370
|
+
this.onModelUpdate(newVal);
|
|
371
|
+
}
|
|
372
|
+
onDisplayKeydown(event) {
|
|
373
|
+
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
374
|
+
event.stopPropagation();
|
|
375
|
+
let newVal = event.target.value.trim();
|
|
376
|
+
if (event.key === "Enter" || event.key === "ArrowDown") {
|
|
377
|
+
newVal = newVal ? i1.getNativeDateObject(newVal, {
|
|
378
|
+
pattern: this.loadNativeDateInput ? this.outputformat : this.datepattern,
|
|
379
|
+
meridians: this.meridians
|
|
380
|
+
}) : void 0;
|
|
381
|
+
event.preventDefault();
|
|
382
|
+
const formattedDate = i1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this);
|
|
383
|
+
const formattedDateWithMeridians = this.safeReplaceMeridians(formattedDate);
|
|
384
|
+
const inputVal = event.target.value.trim();
|
|
385
|
+
if (inputVal && this.datepattern === "timestamp") {
|
|
386
|
+
if (!lodashEs.isNaN(inputVal) && lodashEs.parseInt(inputVal) !== formattedDate) {
|
|
387
|
+
this.invalidDateTimeFormat = true;
|
|
388
|
+
this.invokeOnChange(this.datavalue, event, false);
|
|
389
|
+
}
|
|
390
|
+
} else if (inputVal && inputVal !== formattedDateWithMeridians) {
|
|
391
|
+
this.invalidDateTimeFormat = true;
|
|
392
|
+
this.invokeOnChange(this.datavalue, event, false);
|
|
393
|
+
} else {
|
|
394
|
+
this.invalidDateTimeFormat = false;
|
|
395
|
+
this.isEnterPressedOnDateInput = true;
|
|
396
|
+
this.bsDatePickerDirective.bsValue = newVal;
|
|
397
|
+
}
|
|
398
|
+
this.toggleDpDropdown(event);
|
|
399
|
+
} else {
|
|
400
|
+
this.hideDatepickerDropdown();
|
|
401
|
+
this.hideTimepickerDropdown();
|
|
402
|
+
}
|
|
403
|
+
} else {
|
|
404
|
+
this.hideDatepickerDropdown();
|
|
405
|
+
this.hideTimepickerDropdown();
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
isValid(event) {
|
|
409
|
+
if (!event) {
|
|
410
|
+
const enteredDate = $(this.nativeElement).find("input").val()?.replace(this.am, this.meridians[0])?.replace(this.pm, this.meridians[1]);
|
|
411
|
+
const newVal = i1.getNativeDateObject(enteredDate, {
|
|
412
|
+
pattern: this.loadNativeDateInput ? this.outputformat : this.datepattern,
|
|
413
|
+
meridians: this.meridians,
|
|
414
|
+
isNativePicker: this.loadNativeDateInput
|
|
415
|
+
});
|
|
416
|
+
if (!this.formatValidation(newVal, enteredDate)) return;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
handleEvent(node, eventName, callback, locals) {
|
|
420
|
+
if (!lodashEs.includes([
|
|
421
|
+
"blur",
|
|
422
|
+
"focus",
|
|
423
|
+
"change",
|
|
424
|
+
"click"
|
|
425
|
+
], eventName)) super.handleEvent(node, eventName, callback, locals);
|
|
426
|
+
}
|
|
427
|
+
onInputBlur($event) {
|
|
428
|
+
if (!$($event.relatedTarget).hasClass("current-date")) {
|
|
429
|
+
this.invokeOnTouched();
|
|
430
|
+
this.invokeEventCallback("blur", { $event });
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
static {
|
|
434
|
+
this.ɵfac = i0__namespace.ɵɵngDeclareFactory({
|
|
435
|
+
minVersion: "12.0.0",
|
|
436
|
+
version: "22.2.1",
|
|
437
|
+
ngImport: i0__namespace,
|
|
438
|
+
type: DatetimeComponent,
|
|
439
|
+
deps: [
|
|
440
|
+
{ token: i0__namespace.Injector },
|
|
441
|
+
{ token: i0__namespace.NgZone },
|
|
442
|
+
{ token: i0__namespace.ChangeDetectorRef },
|
|
443
|
+
{ token: i1__namespace.AppDefaults },
|
|
444
|
+
{ token: i1__namespace.App },
|
|
445
|
+
{
|
|
446
|
+
token: "EXPLICIT_CONTEXT",
|
|
447
|
+
optional: true
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
target: i0__namespace.ɵɵFactoryTarget.Component
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
static {
|
|
454
|
+
this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({
|
|
455
|
+
minVersion: "17.0.0",
|
|
456
|
+
version: "22.2.1",
|
|
457
|
+
type: DatetimeComponent,
|
|
458
|
+
isStandalone: true,
|
|
459
|
+
selector: "[wmDateTime]",
|
|
460
|
+
providers: [
|
|
461
|
+
base.provideAs(DatetimeComponent, i2.NG_VALUE_ACCESSOR, true),
|
|
462
|
+
base.provideAs(DatetimeComponent, i2.NG_VALIDATORS, true),
|
|
463
|
+
base.provideAsWidgetRef(DatetimeComponent),
|
|
464
|
+
{
|
|
465
|
+
provide: i5.TimepickerConfig,
|
|
466
|
+
deps: [i1.AbstractI18nService],
|
|
467
|
+
useFactory: baseDateTime.getTimepickerConfig
|
|
468
|
+
}
|
|
469
|
+
],
|
|
470
|
+
viewQueries: [{
|
|
471
|
+
propertyName: "bsDatePickerDirective",
|
|
472
|
+
first: true,
|
|
473
|
+
predicate: i4.BsDatepickerDirective,
|
|
474
|
+
descendants: true
|
|
475
|
+
}],
|
|
476
|
+
usesInheritance: true,
|
|
477
|
+
ngImport: i0__namespace,
|
|
478
|
+
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)=\"_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",
|
|
479
|
+
dependencies: [
|
|
480
|
+
{
|
|
481
|
+
kind: "ngmodule",
|
|
482
|
+
type: i2.FormsModule
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
kind: "directive",
|
|
486
|
+
type: i2__namespace.NgControlStatus,
|
|
487
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
kind: "directive",
|
|
491
|
+
type: i2__namespace.NgModel,
|
|
492
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
493
|
+
inputs: [
|
|
494
|
+
"name",
|
|
495
|
+
"disabled",
|
|
496
|
+
"ngModel",
|
|
497
|
+
"ngModelOptions"
|
|
498
|
+
],
|
|
499
|
+
outputs: ["ngModelChange"],
|
|
500
|
+
exportAs: ["ngModel"]
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
kind: "component",
|
|
504
|
+
type: dateTimePicker.DateTimePickerComponent,
|
|
505
|
+
selector: "wm-datetimepicker",
|
|
506
|
+
inputs: [
|
|
507
|
+
"mode",
|
|
508
|
+
"placement",
|
|
509
|
+
"minTime",
|
|
510
|
+
"maxTime",
|
|
511
|
+
"_displayFormat",
|
|
512
|
+
"excludedDatesToDisable",
|
|
513
|
+
"value",
|
|
514
|
+
"config",
|
|
515
|
+
"excludedDaysToDisable",
|
|
516
|
+
"displayFormat"
|
|
517
|
+
],
|
|
518
|
+
outputs: ["change"]
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
kind: "ngmodule",
|
|
522
|
+
type: i3.BsDropdownModule
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
kind: "directive",
|
|
526
|
+
type: i3__namespace.BsDropdownMenuDirective,
|
|
527
|
+
selector: "[bsDropdownMenu],[dropdownMenu]",
|
|
528
|
+
exportAs: ["bs-dropdown-menu"]
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
kind: "directive",
|
|
532
|
+
type: i3__namespace.BsDropdownDirective,
|
|
533
|
+
selector: "[bsDropdown], [dropdown]",
|
|
534
|
+
inputs: [
|
|
535
|
+
"placement",
|
|
536
|
+
"triggers",
|
|
537
|
+
"container",
|
|
538
|
+
"dropup",
|
|
539
|
+
"autoClose",
|
|
540
|
+
"isAnimated",
|
|
541
|
+
"insideClick",
|
|
542
|
+
"isDisabled",
|
|
543
|
+
"isOpen"
|
|
544
|
+
],
|
|
545
|
+
outputs: [
|
|
546
|
+
"isOpenChange",
|
|
547
|
+
"onShown",
|
|
548
|
+
"onHidden"
|
|
549
|
+
],
|
|
550
|
+
exportAs: ["bs-dropdown"]
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
kind: "ngmodule",
|
|
554
|
+
type: i4.BsDatepickerModule
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
kind: "directive",
|
|
558
|
+
type: i4__namespace.BsDatepickerDirective,
|
|
559
|
+
selector: "[bsDatepicker]",
|
|
560
|
+
inputs: [
|
|
561
|
+
"placement",
|
|
562
|
+
"triggers",
|
|
563
|
+
"outsideClick",
|
|
564
|
+
"container",
|
|
565
|
+
"outsideEsc",
|
|
566
|
+
"isDisabled",
|
|
567
|
+
"minDate",
|
|
568
|
+
"maxDate",
|
|
569
|
+
"ignoreMinMaxErrors",
|
|
570
|
+
"minMode",
|
|
571
|
+
"daysDisabled",
|
|
572
|
+
"datesDisabled",
|
|
573
|
+
"datesEnabled",
|
|
574
|
+
"dateCustomClasses",
|
|
575
|
+
"dateTooltipTexts",
|
|
576
|
+
"isOpen",
|
|
577
|
+
"bsValue",
|
|
578
|
+
"bsConfig"
|
|
579
|
+
],
|
|
580
|
+
outputs: [
|
|
581
|
+
"onShown",
|
|
582
|
+
"onHidden",
|
|
583
|
+
"bsValueChange"
|
|
584
|
+
],
|
|
585
|
+
exportAs: ["bsDatepicker"]
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
kind: "directive",
|
|
589
|
+
type: i4__namespace.BsDatepickerInputDirective,
|
|
590
|
+
selector: "input[bsDatepicker]"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
kind: "ngmodule",
|
|
594
|
+
type: i5.TimepickerModule
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
kind: "component",
|
|
598
|
+
type: i5__namespace.TimepickerComponent,
|
|
599
|
+
selector: "timepicker",
|
|
600
|
+
inputs: [
|
|
601
|
+
"hourStep",
|
|
602
|
+
"minuteStep",
|
|
603
|
+
"secondsStep",
|
|
604
|
+
"readonlyInput",
|
|
605
|
+
"disabled",
|
|
606
|
+
"mousewheel",
|
|
607
|
+
"arrowkeys",
|
|
608
|
+
"showSpinners",
|
|
609
|
+
"showMeridian",
|
|
610
|
+
"showMinutes",
|
|
611
|
+
"showSeconds",
|
|
612
|
+
"meridians",
|
|
613
|
+
"min",
|
|
614
|
+
"max",
|
|
615
|
+
"hoursPlaceholder",
|
|
616
|
+
"minutesPlaceholder",
|
|
617
|
+
"secondsPlaceholder"
|
|
618
|
+
],
|
|
619
|
+
outputs: ["isValid", "meridianChange"]
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
kind: "ngmodule",
|
|
623
|
+
type: i6.CommonModule
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
kind: "directive",
|
|
627
|
+
type: i6__namespace.NgClass,
|
|
628
|
+
selector: "[ngClass]",
|
|
629
|
+
inputs: ["class", "ngClass"]
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
changeDetection: i0__namespace.ChangeDetectionStrategy.Eager
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
i0__namespace.ɵɵngDeclareClassMetadata({
|
|
637
|
+
minVersion: "12.0.0",
|
|
638
|
+
version: "22.2.1",
|
|
639
|
+
ngImport: i0__namespace,
|
|
640
|
+
type: DatetimeComponent,
|
|
641
|
+
decorators: [{
|
|
642
|
+
type: i0.Component,
|
|
643
|
+
args: [{
|
|
644
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
645
|
+
standalone: true,
|
|
646
|
+
imports: [
|
|
647
|
+
i2.FormsModule,
|
|
648
|
+
dateTimePicker.DateTimePickerComponent,
|
|
649
|
+
i3.BsDropdownModule,
|
|
650
|
+
i4.BsDatepickerModule,
|
|
651
|
+
i5.TimepickerModule,
|
|
652
|
+
i6.CommonModule
|
|
653
|
+
],
|
|
654
|
+
selector: "[wmDateTime]",
|
|
655
|
+
providers: [
|
|
656
|
+
base.provideAs(DatetimeComponent, i2.NG_VALUE_ACCESSOR, true),
|
|
657
|
+
base.provideAs(DatetimeComponent, i2.NG_VALIDATORS, true),
|
|
658
|
+
base.provideAsWidgetRef(DatetimeComponent),
|
|
659
|
+
{
|
|
660
|
+
provide: i5.TimepickerConfig,
|
|
661
|
+
deps: [i1.AbstractI18nService],
|
|
662
|
+
useFactory: baseDateTime.getTimepickerConfig
|
|
663
|
+
}
|
|
664
|
+
],
|
|
665
|
+
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)=\"_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"
|
|
666
|
+
}]
|
|
667
|
+
}],
|
|
668
|
+
ctorParameters: () => [
|
|
669
|
+
{ type: i0__namespace.Injector },
|
|
670
|
+
{ type: i0__namespace.NgZone },
|
|
671
|
+
{ type: i0__namespace.ChangeDetectorRef },
|
|
672
|
+
{ type: i1__namespace.AppDefaults },
|
|
673
|
+
{ type: i1__namespace.App },
|
|
674
|
+
{
|
|
675
|
+
type: void 0,
|
|
676
|
+
decorators: [{
|
|
677
|
+
type: i0.Inject,
|
|
678
|
+
args: ["EXPLICIT_CONTEXT"]
|
|
679
|
+
}, { type: i0.Optional }]
|
|
680
|
+
}
|
|
681
|
+
],
|
|
682
|
+
propDecorators: { bsDatePickerDirective: [{
|
|
683
|
+
type: i0.ViewChild,
|
|
684
|
+
args: [i4.BsDatepickerDirective]
|
|
685
|
+
}] }
|
|
686
|
+
});
|
|
77
687
|
|
|
78
|
-
|
|
79
|
-
const DEFAULT_CLS = 'app-datetime input-group';
|
|
80
|
-
const WIDGET_CONFIG = { widgetType: 'wm-datetime', hostClass: DEFAULT_CLS };
|
|
81
|
-
const CURRENT_DATE = 'CURRENT_DATE';
|
|
82
|
-
class DatetimeComponent extends baseDateTime.BaseDateTimeComponent {
|
|
83
|
-
static { this.initializeProps = registerProps(); }
|
|
84
|
-
get timestamp() {
|
|
85
|
-
return this.proxyModel ? this.proxyModel.valueOf() : undefined;
|
|
86
|
-
}
|
|
87
|
-
get dateInputFormat() {
|
|
88
|
-
return this._dateOptions.dateInputFormat || 'yyyy-MM-ddTHH:mm:ss';
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* The displayValue is the display value of the bsDateTimeValue after applying the datePattern on it.
|
|
92
|
-
* @returns {any|string}
|
|
93
|
-
*/
|
|
94
|
-
get displayValue() {
|
|
95
|
-
const display = i1.getFormattedDate(this.datePipe, this.proxyModel, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this) || '';
|
|
96
|
-
return this.safeReplaceMeridians(display);
|
|
97
|
-
}
|
|
98
|
-
get nativeDisplayValue() {
|
|
99
|
-
return i1.getFormattedDate(this.datePipe, this.proxyModel, 'yyyy-MM-ddTHH:mm:ss', this.timeZone, this.key, this.isCurrentDate, this) || '';
|
|
100
|
-
}
|
|
101
|
-
// @ts-ignore
|
|
102
|
-
get datavalue() {
|
|
103
|
-
if (this.isCurrentDate && !this.proxyModel) {
|
|
104
|
-
return CURRENT_DATE;
|
|
105
|
-
}
|
|
106
|
-
return i1.getFormattedDate(this.datePipe, this.proxyModel, this.outputformat, this.timeZone, null, null, this);
|
|
107
|
-
}
|
|
108
|
-
/**Todo[Shubham]: needs to be redefined
|
|
109
|
-
* This property sets the default value for the date selection
|
|
110
|
-
*/
|
|
111
|
-
// @ts-ignore
|
|
112
|
-
set datavalue(newVal) {
|
|
113
|
-
if (newVal === CURRENT_DATE) {
|
|
114
|
-
this.isCurrentDate = true;
|
|
115
|
-
this.setTimeInterval();
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
this.proxyModel = newVal ? i1.getDateObj(newVal, { isNativePicker: this.loadNativeDateInput }, this.timeZone) : undefined;
|
|
119
|
-
this.clearTimeInterval();
|
|
120
|
-
this.isCurrentDate = false;
|
|
121
|
-
}
|
|
122
|
-
this.bsTimeValue = this.bsDateValue = this.proxyModel;
|
|
123
|
-
this.cdRef.detectChanges();
|
|
124
|
-
}
|
|
125
|
-
constructor(inj, ngZone, cdRef, appDefaults, app, explicitContext) {
|
|
126
|
-
super(inj, WIDGET_CONFIG, explicitContext);
|
|
127
|
-
this.ngZone = ngZone;
|
|
128
|
-
this.cdRef = cdRef;
|
|
129
|
-
this.appDefaults = appDefaults;
|
|
130
|
-
this.isEnterPressedOnDateInput = false;
|
|
131
|
-
/**
|
|
132
|
-
* This property checks if the timePicker is Open
|
|
133
|
-
*/
|
|
134
|
-
this.isTimeOpen = false;
|
|
135
|
-
/**
|
|
136
|
-
* This property checks if the datePicker is Open
|
|
137
|
-
*/
|
|
138
|
-
this.isDateOpen = false;
|
|
139
|
-
/**
|
|
140
|
-
* 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.
|
|
141
|
-
*/
|
|
142
|
-
this.isCurrentDate = false;
|
|
143
|
-
this._debouncedOnChange = lodashEs.debounce(this.invokeOnChange, 10);
|
|
144
|
-
this.registerDestroyListener(() => this.clearTimeInterval());
|
|
145
|
-
base.styler(this.nativeElement, this);
|
|
146
|
-
this.app = app;
|
|
147
|
-
this.dateContainerCls = `app-date-${this.widgetId}`;
|
|
148
|
-
this._dateOptions.containerClass = `app-date ${this.dateContainerCls}`;
|
|
149
|
-
this._dateOptions.showWeekNumbers = false;
|
|
150
|
-
this._dateOptions.customTodayClass = 'current-date';
|
|
151
|
-
this.datepattern = this.appDefaults.dateTimeFormat || i1.getDisplayDateTimeFormat(i1.FormWidgetType.DATETIME);
|
|
152
|
-
this.updateFormat('datepattern');
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* 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
|
|
156
|
-
*/
|
|
157
|
-
setTimeInterval() {
|
|
158
|
-
if (this.timeinterval) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
this.timeinterval = setInterval(() => {
|
|
162
|
-
const currentTime = this.timeZone ? i1.getMomentLocaleObject(this.timeZone) : new Date();
|
|
163
|
-
this.onModelUpdate(currentTime);
|
|
164
|
-
}, 1000);
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* This is an internal method used to clear the time interval created
|
|
168
|
-
*/
|
|
169
|
-
clearTimeInterval() {
|
|
170
|
-
if (this.timeinterval) {
|
|
171
|
-
clearInterval(this.timeinterval);
|
|
172
|
-
this.timeinterval = null;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* This is an internal method to toggle the time picker
|
|
177
|
-
*/
|
|
178
|
-
toggleTimePicker(newVal, $event) {
|
|
179
|
-
if (this.loadNativeDateInput) {
|
|
180
|
-
this.onDateTimeInputFocus();
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
this.isTimeOpen = newVal;
|
|
184
|
-
if ($event && $event.type === 'click') {
|
|
185
|
-
this.invokeEventCallback('click', { $event: $event });
|
|
186
|
-
}
|
|
187
|
-
this.addTimepickerClickListener(this.isTimeOpen);
|
|
188
|
-
}
|
|
189
|
-
addTimepickerClickListener(skipListener) {
|
|
190
|
-
if (!skipListener) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
const bodyElement = document.querySelector('body');
|
|
194
|
-
setTimeout(() => {
|
|
195
|
-
const dropdownElement = $(bodyElement).find('>bs-dropdown-container .dropdown-menu').get(0);
|
|
196
|
-
this.deregisterTimepickeEventListener = i1.addEventListenerOnElement(bodyElement, dropdownElement, this.nativeElement, 'click', this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
197
|
-
this.toggleTimePicker(false);
|
|
198
|
-
}, 0 /* EVENT_LIFE.ONCE */, true);
|
|
199
|
-
}, 350);
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* This function sets the value isOpen/isTimeOpen (i.e when datepicker popup is closed) based on widget type(i.e DateTime, Time)
|
|
203
|
-
* @param val - isOpen/isTimeOpen is set based on the timepicker popup is open/closed
|
|
204
|
-
*/
|
|
205
|
-
setIsTimeOpen(val) {
|
|
206
|
-
this.isTimeOpen = val;
|
|
207
|
-
}
|
|
208
|
-
hideTimepickerDropdown() {
|
|
209
|
-
this.invokeOnTouched();
|
|
210
|
-
this.toggleTimePicker(false);
|
|
211
|
-
if (this.deregisterTimepickeEventListener) {
|
|
212
|
-
this.deregisterTimepickeEventListener();
|
|
213
|
-
}
|
|
214
|
-
const parentEl = $(this.nativeElement).closest('.app-composite-widget.caption-floating');
|
|
215
|
-
if (parentEl.length > 0) {
|
|
216
|
-
this.app.notify('captionPositionAnimate', { displayVal: this.displayValue, nativeEl: parentEl });
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* This is an internal method to add a click listener once the time dropdown is open
|
|
221
|
-
*/
|
|
222
|
-
onTimepickerOpen() {
|
|
223
|
-
// adding class for time widget dropdown menu
|
|
224
|
-
const tpElements = document.querySelectorAll('timepicker');
|
|
225
|
-
lodashEs.forEach(tpElements, (element) => {
|
|
226
|
-
i1.addClass(element.parentElement, 'app-datetime', true);
|
|
227
|
-
});
|
|
228
|
-
if (this.bsDropdown && (this.dateNotInRange || this.invalidDateTimeFormat)) {
|
|
229
|
-
this.bsTimeValue = null;
|
|
230
|
-
}
|
|
231
|
-
this.bsDatePickerDirective.hide();
|
|
232
|
-
this.focusTimePickerPopover(this);
|
|
233
|
-
this.bindTimePickerKeyboardEvents();
|
|
234
|
-
i1.adjustContainerPosition($('bs-dropdown-container'), this.nativeElement, this.bsDropdown._dropdown, $('bs-dropdown-container .dropdown-menu'));
|
|
235
|
-
// adjustContainerRightEdges($('bs-dropdown-container'), this.nativeElement, this.bsDropdown._dropdown, $('bs-dropdown-container .dropdown-menu'));
|
|
236
|
-
}
|
|
237
|
-
onDatePickerOpen() {
|
|
238
|
-
this.isDateOpen = !this.isDateOpen;
|
|
239
|
-
this.toggleTimePicker(false);
|
|
240
|
-
// We are using the two input tags(To maintain the modal and proxy modal) for the date control.
|
|
241
|
-
// So actual bootstrap input target width we made it to 0 so bootstrap calculating the calendar container top position impropery.
|
|
242
|
-
// To fix the container top position set the width 1px;
|
|
243
|
-
this.$element.find('.model-holder').width('1px');
|
|
244
|
-
const dpContainerEl = $('bs-datepicker-container');
|
|
245
|
-
dpContainerEl.attr('aria-label', 'Use Arrow keys to navigate dates, Choose Date from datepicker');
|
|
246
|
-
$('.bs-calendar-container').removeAttr('role');
|
|
247
|
-
const datePickerContainer = $('.bs-datepicker-container')[0];
|
|
248
|
-
this.focusTrap = base.setFocusTrap(datePickerContainer, true);
|
|
249
|
-
this.focusTrap.activate();
|
|
250
|
-
this.bsDateValue ? this.activeDate = this.bsDateValue : this.activeDate = new Date();
|
|
251
|
-
// if (!this.bsDateValue) {
|
|
252
|
-
// this.hightlightToday(this.activeDate);
|
|
253
|
-
// }
|
|
254
|
-
this.addDatepickerKeyboardEvents(this, true);
|
|
255
|
-
i1.adjustContainerPosition($('bs-datepicker-container'), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* This is an internal method to update the model
|
|
259
|
-
*/
|
|
260
|
-
onModelUpdate(newVal, type) {
|
|
261
|
-
if (type === 'date') {
|
|
262
|
-
this.invalidDateTimeFormat = false;
|
|
263
|
-
const formatted = i1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this);
|
|
264
|
-
if (this.safeReplaceMeridians(formatted) === this.displayValue) {
|
|
265
|
-
$(this.nativeElement).find('.display-input').val(this.displayValue);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
if (newVal && !this.bsDateValue && this.timeZone) {
|
|
269
|
-
newVal = i1.getMomentLocaleObject(this.timeZone, newVal);
|
|
270
|
-
}
|
|
271
|
-
// min date and max date validation in web.
|
|
272
|
-
// if invalid dates are entered, device is showing validation message.
|
|
273
|
-
this.minDateMaxDateValidationOnInput(newVal);
|
|
274
|
-
if (!newVal) {
|
|
275
|
-
// Set timevalue as 00:00:00 if we remove any one from hours/minutes/seconds field in timepicker after selecting date
|
|
276
|
-
if (this.bsDateValue && this.bsTimePicker && (this.bsTimePicker.hours === '' || this.bsTimePicker.minutes === '' || this.bsTimePicker.seconds === '')) {
|
|
277
|
-
this.bsDateValue = this.bsTimeValue = this.proxyModel = moment(this.bsDateValue).startOf('day').toDate();
|
|
278
|
-
}
|
|
279
|
-
else {
|
|
280
|
-
this.bsDateValue = this.bsTimeValue = this.proxyModel = undefined;
|
|
281
|
-
}
|
|
282
|
-
// When the datavalue is manually cleared, both newval and datavalue are undefined but prevDataValue exists - trigger change cb
|
|
283
|
-
if (newVal !== this.datavalue || (!this.datavalue && this.prevDatavalue)) {
|
|
284
|
-
this._debouncedOnChange(this.datavalue, {}, true);
|
|
285
|
-
}
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
if (type === 'date') {
|
|
289
|
-
if (this.isDateOpen) {
|
|
290
|
-
this.toggleTimePicker(true);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
if (!this.dateNotInRange && !this.invalidDateTimeFormat) {
|
|
294
|
-
this.proxyModel = newVal;
|
|
295
|
-
if (this.proxyModel) {
|
|
296
|
-
this.bsDateValue = this.bsTimeValue = newVal;
|
|
297
|
-
}
|
|
298
|
-
if (this.datavalue === this.getPrevDataValue()) {
|
|
299
|
-
const time = i1.getFormattedDate(this.datePipe, this.datavalue, this.datepattern, this.timeZone, null, null, this) || '';
|
|
300
|
-
$(this.nativeElement).find('.display-input').val(time?.replace(this.meridians[0], this.am)?.replace(this.meridians[1], this.pm));
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
this.proxyModel = newVal;
|
|
305
|
-
}
|
|
306
|
-
this._debouncedOnChange(this.datavalue, {}, true);
|
|
307
|
-
this.cdRef.detectChanges();
|
|
308
|
-
// Update timepicker with formatted time, when timezone is provided.
|
|
309
|
-
const timePickerFields = $('.bs-timepicker-field');
|
|
310
|
-
if (this.timeZone && this.key === 'datetimestamp' && timePickerFields.length) {
|
|
311
|
-
const formattedDate = i1.getFormattedDate(this.datePipe, newVal, this.getTimePattern(), this.timeZone, this.key, null, this);
|
|
312
|
-
this.updateTimepickerFields(this.safeReplaceMeridians(formattedDate), timePickerFields);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
// deduces the timepattern from datepattern set in the studio
|
|
316
|
-
getTimePattern() {
|
|
317
|
-
let timepattern;
|
|
318
|
-
const timePatternStartIndex = this.datepattern.toLowerCase().indexOf('h');
|
|
319
|
-
let timePatternEndIndex = this.datepattern.toLowerCase().indexOf(':ss');
|
|
320
|
-
if (timePatternEndIndex > -1) {
|
|
321
|
-
// adding the index to +3 to incluse :ss
|
|
322
|
-
timePatternEndIndex += 3;
|
|
323
|
-
}
|
|
324
|
-
else {
|
|
325
|
-
timePatternEndIndex = this.datepattern.toLowerCase().indexOf(':mm');
|
|
326
|
-
// adding the index to +3 to incluse :mm
|
|
327
|
-
if (timePatternEndIndex > -1) {
|
|
328
|
-
timePatternEndIndex += 3;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
const hasMeridian = this.datepattern.toLowerCase().indexOf('a');
|
|
332
|
-
timepattern = this.datepattern.substr(timePatternStartIndex, timePatternEndIndex);
|
|
333
|
-
if (hasMeridian > -1)
|
|
334
|
-
timepattern += ' a';
|
|
335
|
-
return timepattern;
|
|
336
|
-
}
|
|
337
|
-
updateTimepickerFields(date, timePickerFields) {
|
|
338
|
-
const meridianField = $('timepicker button.text-center');
|
|
339
|
-
const formattedArr = date.split(' ');
|
|
340
|
-
const formattedTime = formattedArr[0].split(':');
|
|
341
|
-
for (let i = 0; i < timePickerFields.length; i++) {
|
|
342
|
-
timePickerFields[i].value = formattedTime[i];
|
|
343
|
-
}
|
|
344
|
-
if (meridianField?.html()?.trim() !== formattedArr[1]) {
|
|
345
|
-
meridianField.text(formattedArr[1]);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* This is an internal method used to Prevent time picker close while changing time value
|
|
350
|
-
*/
|
|
351
|
-
preventTpClose($event) {
|
|
352
|
-
$event.stopImmediatePropagation();
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* This is an internal method used to toggle the dropdown of the date widget
|
|
356
|
-
*/
|
|
357
|
-
toggleDpDropdown($event, skipFocus = false) {
|
|
358
|
-
if (this.loadNativeDateInput) {
|
|
359
|
-
//Fixes click event getting triggred twice in Mobile devices.
|
|
360
|
-
if (!skipFocus) {
|
|
361
|
-
this.onDateTimeInputFocus();
|
|
362
|
-
}
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
if ($event.type === 'click') {
|
|
366
|
-
this.invokeEventCallback('click', { $event: $event });
|
|
367
|
-
//this.focusOnInputEl();
|
|
368
|
-
}
|
|
369
|
-
if ($event.target && $($event.target).is('input') && !(this.isDropDownDisplayEnabledOnInput(this.showdropdownon))) {
|
|
370
|
-
$event.stopPropagation();
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
if (this.bsDatePickerDirective && (this.dateNotInRange || this.invalidDateTimeFormat)) {
|
|
374
|
-
this.bsDatePickerDirective._bsValue = null;
|
|
375
|
-
}
|
|
376
|
-
this.bsDatePickerDirective.toggle();
|
|
377
|
-
this.addBodyClickListener(this.bsDatePickerDirective.isOpen);
|
|
378
|
-
}
|
|
379
|
-
addBodyClickListener(skipListener) {
|
|
380
|
-
if (!skipListener) {
|
|
381
|
-
return;
|
|
382
|
-
}
|
|
383
|
-
const bodyElement = document.querySelector('body');
|
|
384
|
-
setTimeout(() => {
|
|
385
|
-
const bsDateContainerElement = bodyElement.querySelector(`.${this.dateContainerCls}`);
|
|
386
|
-
this.deregisterDatepickerEventListener = i1.addEventListenerOnElement(bodyElement, bsDateContainerElement, this.nativeElement, 'click', this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
387
|
-
this.bsDatePickerDirective.hide();
|
|
388
|
-
}, 0 /* EVENT_LIFE.ONCE */, true);
|
|
389
|
-
}, 350);
|
|
390
|
-
}
|
|
391
|
-
hideDatepickerDropdown() {
|
|
392
|
-
this.isDateOpen = false;
|
|
393
|
-
this.focusTrap?.deactivate();
|
|
394
|
-
this.invokeOnTouched();
|
|
395
|
-
this.bsDatePickerDirective.hide();
|
|
396
|
-
// To open the timepicker menu when user wants to update time without changing the date.
|
|
397
|
-
if (this.bsDateValue) {
|
|
398
|
-
this.toggleTimePicker(true);
|
|
399
|
-
}
|
|
400
|
-
this.isEnterPressedOnDateInput = false;
|
|
401
|
-
if (this.deregisterDatepickerEventListener) {
|
|
402
|
-
this.deregisterDatepickerEventListener();
|
|
403
|
-
}
|
|
404
|
-
const parentEl = $(this.nativeElement).closest('.app-composite-widget.caption-floating');
|
|
405
|
-
if (parentEl.length > 0) {
|
|
406
|
-
this.app.notify('captionPositionAnimate', { displayVal: this.displayValue, nativeEl: parentEl });
|
|
407
|
-
}
|
|
408
|
-
this.blurDateInput(this.isDateOpen);
|
|
409
|
-
}
|
|
410
|
-
onDateChange($event, isNativePicker) {
|
|
411
|
-
if (this.isEnterPressedOnDateInput) {
|
|
412
|
-
this.isEnterPressedOnDateInput = false;
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
let newVal = $event.target.value.trim();
|
|
416
|
-
newVal = newVal ? i1.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;
|
|
417
|
-
// datetime pattern validation
|
|
418
|
-
// if invalid pattern is entered, device is showing an error.
|
|
419
|
-
if (!this.formatValidation(newVal, $event.target.value, isNativePicker)) {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
// min date and max date validation in mobile view.
|
|
423
|
-
// if invalid dates are entered, device is showing an alert.
|
|
424
|
-
if (isNativePicker && this.minDateMaxDateValidationOnInput(newVal, $event, this.displayValue, isNativePicker)) {
|
|
425
|
-
return;
|
|
426
|
-
}
|
|
427
|
-
this.invalidDateTimeFormat = false;
|
|
428
|
-
this.onModelUpdate(newVal);
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* This is an internal method triggered when pressing key on the datetime input
|
|
432
|
-
*/
|
|
433
|
-
onDisplayKeydown(event) {
|
|
434
|
-
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
435
|
-
event.stopPropagation();
|
|
436
|
-
let newVal = event.target.value.trim();
|
|
437
|
-
if (event.key === 'Enter' || event.key === 'ArrowDown') {
|
|
438
|
-
newVal = newVal ? i1.getNativeDateObject(newVal, { pattern: this.loadNativeDateInput ? this.outputformat : this.datepattern, meridians: this.meridians }) : undefined;
|
|
439
|
-
event.preventDefault();
|
|
440
|
-
const formattedDate = i1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, this.key, this.isCurrentDate, this);
|
|
441
|
-
const formattedDateWithMeridians = this.safeReplaceMeridians(formattedDate);
|
|
442
|
-
const inputVal = event.target.value.trim();
|
|
443
|
-
if (inputVal && this.datepattern === 'timestamp') {
|
|
444
|
-
if (!lodashEs.isNaN(inputVal) && lodashEs.parseInt(inputVal) !== formattedDate) {
|
|
445
|
-
this.invalidDateTimeFormat = true;
|
|
446
|
-
this.invokeOnChange(this.datavalue, event, false);
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
else if (inputVal && inputVal !== formattedDateWithMeridians) {
|
|
450
|
-
this.invalidDateTimeFormat = true;
|
|
451
|
-
this.invokeOnChange(this.datavalue, event, false);
|
|
452
|
-
}
|
|
453
|
-
else {
|
|
454
|
-
this.invalidDateTimeFormat = false;
|
|
455
|
-
this.isEnterPressedOnDateInput = true;
|
|
456
|
-
this.bsDatePickerDirective.bsValue = newVal;
|
|
457
|
-
}
|
|
458
|
-
this.toggleDpDropdown(event);
|
|
459
|
-
}
|
|
460
|
-
else {
|
|
461
|
-
this.hideDatepickerDropdown();
|
|
462
|
-
this.hideTimepickerDropdown();
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
else {
|
|
466
|
-
this.hideDatepickerDropdown();
|
|
467
|
-
this.hideTimepickerDropdown();
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
isValid(event) {
|
|
471
|
-
if (!event) {
|
|
472
|
-
const enteredDate = $(this.nativeElement).find('input').val()?.replace(this.am, this.meridians[0])?.replace(this.pm, this.meridians[1]);
|
|
473
|
-
const newVal = i1.getNativeDateObject(enteredDate, { pattern: this.loadNativeDateInput ? this.outputformat : this.datepattern, meridians: this.meridians, isNativePicker: this.loadNativeDateInput });
|
|
474
|
-
if (!this.formatValidation(newVal, enteredDate)) {
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
// change and blur events are added from the template
|
|
480
|
-
handleEvent(node, eventName, callback, locals) {
|
|
481
|
-
if (!lodashEs.includes(['blur', 'focus', 'change', 'click'], eventName)) {
|
|
482
|
-
super.handleEvent(node, eventName, callback, locals);
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
onInputBlur($event) {
|
|
486
|
-
if (!$($event.relatedTarget).hasClass('current-date')) {
|
|
487
|
-
this.invokeOnTouched();
|
|
488
|
-
this.invokeEventCallback('blur', { $event });
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: DatetimeComponent, deps: [{ token: i0__namespace.Injector }, { token: i0__namespace.NgZone }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.AppDefaults }, { token: i1__namespace.App }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
|
|
492
|
-
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: DatetimeComponent, isStandalone: true, selector: "[wmDateTime]", providers: [
|
|
493
|
-
base.provideAs(DatetimeComponent, i2.NG_VALUE_ACCESSOR, true),
|
|
494
|
-
base.provideAs(DatetimeComponent, i2.NG_VALIDATORS, true),
|
|
495
|
-
base.provideAsWidgetRef(DatetimeComponent),
|
|
496
|
-
{ provide: i5.TimepickerConfig, deps: [i1.AbstractI18nService], useFactory: baseDateTime.getTimepickerConfig }
|
|
497
|
-
], viewQueries: [{ propertyName: "bsDatePickerDirective", first: true, predicate: i4.BsDatepickerDirective, descendants: true }], usesInheritance: true, ngImport: i0__namespace, 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)=\"_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", dependencies: [{ kind: "ngmodule", type: i2.FormsModule }, { kind: "directive", type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: dateTimePicker.DateTimePickerComponent, selector: "wm-datetimepicker", inputs: ["mode", "placement", "config", "minTime", "maxTime", "_displayFormat", "excludedDatesToDisable", "value", "excludedDaysToDisable", "displayFormat"], outputs: ["change"] }, { kind: "ngmodule", type: i3.BsDropdownModule }, { kind: "directive", type: i3__namespace.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i3__namespace.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: i4.BsDatepickerModule }, { kind: "directive", type: i4__namespace.BsDatepickerDirective, selector: "[bsDatepicker]", inputs: ["placement", "triggers", "outsideClick", "container", "outsideEsc", "isDisabled", "minDate", "maxDate", "ignoreMinMaxErrors", "minMode", "daysDisabled", "datesDisabled", "datesEnabled", "dateCustomClasses", "dateTooltipTexts", "isOpen", "bsValue", "bsConfig"], outputs: ["onShown", "onHidden", "bsValueChange"], exportAs: ["bsDatepicker"] }, { kind: "directive", type: i4__namespace.BsDatepickerInputDirective, selector: "input[bsDatepicker]" }, { kind: "ngmodule", type: i5.TimepickerModule }, { kind: "component", type: i5__namespace.TimepickerComponent, selector: "timepicker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowkeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder"], outputs: ["isValid", "meridianChange"] }, { kind: "ngmodule", type: i6.CommonModule }, { kind: "directive", type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
498
|
-
}
|
|
499
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: DatetimeComponent, decorators: [{
|
|
500
|
-
type: i0.Component,
|
|
501
|
-
args: [{ standalone: true, imports: [i2.FormsModule, dateTimePicker.DateTimePickerComponent, i3.BsDropdownModule, i4.BsDatepickerModule, i5.TimepickerModule, i6.CommonModule], selector: '[wmDateTime]', providers: [
|
|
502
|
-
base.provideAs(DatetimeComponent, i2.NG_VALUE_ACCESSOR, true),
|
|
503
|
-
base.provideAs(DatetimeComponent, i2.NG_VALIDATORS, true),
|
|
504
|
-
base.provideAsWidgetRef(DatetimeComponent),
|
|
505
|
-
{ provide: i5.TimepickerConfig, deps: [i1.AbstractI18nService], useFactory: baseDateTime.getTimepickerConfig }
|
|
506
|
-
], 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)=\"_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" }]
|
|
507
|
-
}], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: i0__namespace.NgZone }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.AppDefaults }, { type: i1__namespace.App }, { type: undefined, decorators: [{
|
|
508
|
-
type: i0.Inject,
|
|
509
|
-
args: ['EXPLICIT_CONTEXT']
|
|
510
|
-
}, {
|
|
511
|
-
type: i0.Optional
|
|
512
|
-
}] }], propDecorators: { bsDatePickerDirective: [{
|
|
513
|
-
type: i0.ViewChild,
|
|
514
|
-
args: [i4.BsDatepickerDirective]
|
|
515
|
-
}] } });
|
|
516
|
-
|
|
517
|
-
exports.DatetimeComponent = DatetimeComponent;
|
|
688
|
+
exports.DatetimeComponent = DatetimeComponent;
|
|
518
689
|
|
|
519
690
|
}));
|