@wavemaker-ai/app-ng-runtime 12.0.2-rc.647771 → 12.1.0-rc.647821
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,521 +1,627 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('angular-imask'), require('@angular/core'), require('@angular/forms'), require('ngx-bootstrap/datepicker'), require('@wm/core'), require('@wm/components/base'), require('@wm/components/input/epoch/base-date-time'), require('imask'), require('moment'), require('lodash-es'), require('@wm/components/input/epoch/date-time-picker')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'angular-imask', '@angular/core', '@angular/forms', 'ngx-bootstrap/datepicker', '@wm/core', '@wm/components/base', '@wm/components/input/epoch/base-date-time', 'imask', 'moment', 'lodash-es', '@wm/components/input/epoch/date-time-picker'], 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.date = {}), global.angularIMask, global.ng.core, global.ng.forms, global.ngxBootstrap.datepicker, global.wm.core, global.wm.components.base, global.wm.components.input.epoch.baseDateTime, global.IMask, global.momentLib, global._, global.wm.components.input.epoch.dateTimePicker));
|
|
5
5
|
})(this, (function (exports, i2, i0, forms, i3, i1, base, baseDateTime, IMask, momentLib, lodashEs, dateTimePicker) { '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
|
-
|
|
24
|
+
var i2__namespace = /*#__PURE__*/_interopNamespaceDefault(i2);
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);
|
|
26
|
+
var i3__namespace = /*#__PURE__*/_interopNamespaceDefault(i3);
|
|
27
|
+
var i1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1);
|
|
28
|
+
var momentLib__namespace = /*#__PURE__*/_interopNamespaceDefault(momentLib);
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
30
|
+
const dateProps = /* @__PURE__ */ new Map([
|
|
31
|
+
["autofocus", base.PROP_BOOLEAN],
|
|
32
|
+
["class", base.PROP_STRING],
|
|
33
|
+
["dataentrymode", {
|
|
34
|
+
value: "default",
|
|
35
|
+
...base.PROP_STRING
|
|
36
|
+
}],
|
|
37
|
+
["datavaluesource", base.PROP_ANY],
|
|
38
|
+
["datavalue", base.PROP_STRING],
|
|
39
|
+
["datepattern", base.PROP_STRING],
|
|
40
|
+
["disabled", base.PROP_BOOLEAN],
|
|
41
|
+
["excludedays", base.PROP_STRING],
|
|
42
|
+
["excludedates", base.PROP_STRING],
|
|
43
|
+
["hint", base.PROP_STRING],
|
|
44
|
+
["arialabel", base.PROP_STRING],
|
|
45
|
+
["maxdate", base.PROP_STRING],
|
|
46
|
+
["mindate", base.PROP_STRING],
|
|
47
|
+
["name", base.PROP_STRING],
|
|
48
|
+
["outputformat", {
|
|
49
|
+
value: "yyyy-MM-dd",
|
|
50
|
+
...base.PROP_STRING
|
|
51
|
+
}],
|
|
52
|
+
["placeholder", {
|
|
53
|
+
value: "Select Date",
|
|
54
|
+
...base.PROP_STRING
|
|
55
|
+
}],
|
|
56
|
+
["readonly", base.PROP_BOOLEAN],
|
|
57
|
+
["required", base.PROP_BOOLEAN],
|
|
58
|
+
["shortcutkey", base.PROP_STRING],
|
|
59
|
+
["show", {
|
|
60
|
+
value: true,
|
|
61
|
+
...base.PROP_BOOLEAN
|
|
62
|
+
}],
|
|
63
|
+
["showdropdownon", {
|
|
64
|
+
value: "default",
|
|
65
|
+
...base.PROP_STRING
|
|
66
|
+
}],
|
|
67
|
+
["showbuttonbar", {
|
|
68
|
+
value: true,
|
|
69
|
+
...base.PROP_BOOLEAN
|
|
70
|
+
}],
|
|
71
|
+
["showcustompicker", {
|
|
72
|
+
value: false,
|
|
73
|
+
...base.PROP_BOOLEAN
|
|
74
|
+
}],
|
|
75
|
+
["showindevice", {
|
|
76
|
+
displayType: "inline-block",
|
|
77
|
+
value: "all",
|
|
78
|
+
...base.PROP_STRING
|
|
79
|
+
}],
|
|
80
|
+
["showweeks", {
|
|
81
|
+
value: false,
|
|
82
|
+
...base.PROP_BOOLEAN
|
|
83
|
+
}],
|
|
84
|
+
["tabindex", {
|
|
85
|
+
value: 0,
|
|
86
|
+
...base.PROP_NUMBER
|
|
87
|
+
}],
|
|
88
|
+
["selectfromothermonth", {
|
|
89
|
+
value: true,
|
|
90
|
+
...base.PROP_BOOLEAN
|
|
91
|
+
}],
|
|
92
|
+
["todaybutton", {
|
|
93
|
+
value: true,
|
|
94
|
+
...base.PROP_BOOLEAN
|
|
95
|
+
}],
|
|
96
|
+
["clearbutton", {
|
|
97
|
+
value: true,
|
|
98
|
+
...base.PROP_BOOLEAN
|
|
99
|
+
}],
|
|
100
|
+
["adaptiveposition", {
|
|
101
|
+
value: true,
|
|
102
|
+
...base.PROP_BOOLEAN
|
|
103
|
+
}],
|
|
104
|
+
["todaybuttonlabel", {
|
|
105
|
+
value: "LABEL_TODAY_DATE",
|
|
106
|
+
...base.PROP_STRING
|
|
107
|
+
}],
|
|
108
|
+
["clearbuttonlabel", {
|
|
109
|
+
value: "LABEL_CLEAR_DATE",
|
|
110
|
+
...base.PROP_STRING
|
|
111
|
+
}],
|
|
112
|
+
["showdateformatasplaceholder", base.PROP_BOOLEAN],
|
|
113
|
+
["viewmode", {
|
|
114
|
+
value: "day",
|
|
115
|
+
...base.PROP_STRING
|
|
116
|
+
}]
|
|
117
|
+
]);
|
|
118
|
+
const registerProps = () => {
|
|
119
|
+
base.register("wm-date", dateProps);
|
|
120
|
+
base.registerFormWidget(i1.FormWidgetType.DATE, new Map(dateProps));
|
|
121
|
+
};
|
|
122
|
+
const moment = momentLib__namespace.default || window["moment"];
|
|
123
|
+
function validateTheMaskedDate(format, locale) {
|
|
124
|
+
if (format == "timestamp") return false;
|
|
125
|
+
let modifiedFormat = format.toUpperCase().replace(/E/g, "d");
|
|
126
|
+
if (modifiedFormat.split("D").length - 1 === 1) modifiedFormat = modifiedFormat.replace("D", "DD");
|
|
127
|
+
if (modifiedFormat.split("M").length - 1 === 1) modifiedFormat = modifiedFormat.replace("M", "MM");
|
|
128
|
+
const parseFn = (str) => {
|
|
129
|
+
return moment(str, modifiedFormat).toDate();
|
|
130
|
+
};
|
|
131
|
+
const formatFn = (date) => {
|
|
132
|
+
return moment(date, modifiedFormat).format(modifiedFormat);
|
|
133
|
+
};
|
|
134
|
+
return {
|
|
135
|
+
mask: Date,
|
|
136
|
+
pattern: modifiedFormat,
|
|
137
|
+
format: formatFn,
|
|
138
|
+
parse: parseFn,
|
|
139
|
+
blocks: {
|
|
140
|
+
YYYY: {
|
|
141
|
+
mask: IMask.MaskedRange,
|
|
142
|
+
from: 1900,
|
|
143
|
+
to: 9999,
|
|
144
|
+
placeholderChar: "Y",
|
|
145
|
+
maxLength: 4
|
|
146
|
+
},
|
|
147
|
+
YYY: {
|
|
148
|
+
mask: IMask.MaskedRange,
|
|
149
|
+
from: 900,
|
|
150
|
+
to: 999,
|
|
151
|
+
placeholderChar: "Y",
|
|
152
|
+
maxLength: 3
|
|
153
|
+
},
|
|
154
|
+
YY: {
|
|
155
|
+
mask: IMask.MaskedRange,
|
|
156
|
+
from: 0,
|
|
157
|
+
to: 99,
|
|
158
|
+
placeholderChar: "Y",
|
|
159
|
+
maxLength: 2
|
|
160
|
+
},
|
|
161
|
+
Y: {
|
|
162
|
+
mask: IMask.MaskedRange,
|
|
163
|
+
from: 1900,
|
|
164
|
+
to: 9999,
|
|
165
|
+
placeholderChar: "Y",
|
|
166
|
+
maxLength: 4
|
|
167
|
+
},
|
|
168
|
+
M: {
|
|
169
|
+
mask: IMask.MaskedRange,
|
|
170
|
+
from: 1,
|
|
171
|
+
to: 12,
|
|
172
|
+
placeholderChar: "M",
|
|
173
|
+
maxLength: 2
|
|
174
|
+
},
|
|
175
|
+
MM: {
|
|
176
|
+
mask: IMask.MaskedRange,
|
|
177
|
+
from: 1,
|
|
178
|
+
to: 12,
|
|
179
|
+
placeholderChar: "M",
|
|
180
|
+
maxLength: 2
|
|
181
|
+
},
|
|
182
|
+
MMM: {
|
|
183
|
+
mask: IMask.MaskedEnum,
|
|
184
|
+
enum: Array.from({ length: 12 }, (_, i) => new Date(0, i).toLocaleString(locale, { month: "short" })),
|
|
185
|
+
placeholderChar: "M",
|
|
186
|
+
maxLength: 3
|
|
187
|
+
},
|
|
188
|
+
MMMM: {
|
|
189
|
+
mask: IMask.MaskedEnum,
|
|
190
|
+
enum: Array.from({ length: 12 }, (_, i) => new Date(0, i).toLocaleString(locale, { month: "long" })),
|
|
191
|
+
placeholderChar: "M",
|
|
192
|
+
maxLength: 4
|
|
193
|
+
},
|
|
194
|
+
DD: {
|
|
195
|
+
mask: IMask.MaskedRange,
|
|
196
|
+
from: 1,
|
|
197
|
+
to: 31,
|
|
198
|
+
placeholderChar: "D",
|
|
199
|
+
maxLength: 2
|
|
200
|
+
},
|
|
201
|
+
D: {
|
|
202
|
+
mask: IMask.MaskedRange,
|
|
203
|
+
from: 1,
|
|
204
|
+
to: 31,
|
|
205
|
+
placeholderChar: "D",
|
|
206
|
+
maxLength: 2
|
|
207
|
+
},
|
|
208
|
+
ddd: {
|
|
209
|
+
mask: IMask.MaskedEnum,
|
|
210
|
+
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(locale, { weekday: "short" })),
|
|
211
|
+
placeholderChar: "E",
|
|
212
|
+
maxLength: 3
|
|
213
|
+
},
|
|
214
|
+
dddd: {
|
|
215
|
+
mask: IMask.MaskedEnum,
|
|
216
|
+
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(locale, { weekday: "long" })),
|
|
217
|
+
placeholderChar: "E",
|
|
218
|
+
minLength: 6
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
autofix: true,
|
|
222
|
+
lazy: false,
|
|
223
|
+
overwrite: true,
|
|
224
|
+
skipInvalid: true
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
const CURRENT_DATE = "CURRENT_DATE";
|
|
228
|
+
const WIDGET_CONFIG = {
|
|
229
|
+
widgetType: "wm-date",
|
|
230
|
+
hostClass: "app-date input-group"
|
|
231
|
+
};
|
|
232
|
+
var DateComponent = class DateComponent extends baseDateTime.BaseDateTimeComponent {
|
|
233
|
+
static {
|
|
234
|
+
this.initializeProps = registerProps();
|
|
235
|
+
}
|
|
236
|
+
get timestamp() {
|
|
237
|
+
return this.bsDataValue ? this.bsDataValue.valueOf() : void 0;
|
|
238
|
+
}
|
|
239
|
+
get dateInputFormat() {
|
|
240
|
+
return this._dateOptions.dateInputFormat || "yyyy-MM-dd";
|
|
241
|
+
}
|
|
242
|
+
get displayValue() {
|
|
243
|
+
if (this.showdateformatasplaceholder && this.imask?.maskRef && this.maskDateInputFormat) return i1.getFormattedDate(this.datePipe, this.bsDataValue, this.maskDateInputFormat, this.timeZone, null, this.isCurrentDate, this) || "";
|
|
244
|
+
return i1.getFormattedDate(this.datePipe, this.bsDataValue, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this) || "";
|
|
245
|
+
}
|
|
246
|
+
get nativeDisplayValue() {
|
|
247
|
+
return i1.getFormattedDate(this.datePipe, this.bsDataValue, "yyyy-MM-dd", this.timeZone, null, this.isCurrentDate, this) || "";
|
|
248
|
+
}
|
|
249
|
+
get datavalue() {
|
|
250
|
+
return i1.getFormattedDate(this.datePipe, this.bsDataValue, this.outputformat, this.timeZone, null, this.isCurrentDate, this) || "";
|
|
251
|
+
}
|
|
252
|
+
set datavalue(newVal) {
|
|
253
|
+
if (newVal === CURRENT_DATE) {
|
|
254
|
+
setTimeout(() => {
|
|
255
|
+
this.bsDataValue = this.timeZone ? i1.getMomentLocaleObject(this.timeZone) : /* @__PURE__ */ new Date();
|
|
256
|
+
}, 50);
|
|
257
|
+
this.isCurrentDate = true;
|
|
258
|
+
} else {
|
|
259
|
+
this.bsDataValue = newVal ? i1.getDateObj(newVal, { isNativePicker: this.loadNativeDateInput }, this.timeZone) : void 0;
|
|
260
|
+
this.isCurrentDate = false;
|
|
261
|
+
}
|
|
262
|
+
this.invokeOnChange(this.datavalue, void 0, true);
|
|
263
|
+
this.cdRef.detectChanges();
|
|
264
|
+
}
|
|
265
|
+
constructor(inj, cdRef, appDefaults, explicitContext) {
|
|
266
|
+
super(inj, WIDGET_CONFIG, explicitContext);
|
|
267
|
+
this.cdRef = cdRef;
|
|
268
|
+
this.appDefaults = appDefaults;
|
|
269
|
+
this.isOpen = false;
|
|
270
|
+
this.isEnterPressedOnDateInput = false;
|
|
271
|
+
this.showdateformatasplaceholder = false;
|
|
272
|
+
base.styler(this.nativeElement, this);
|
|
273
|
+
this.dateContainerCls = `app-date-${this.widgetId}`;
|
|
274
|
+
this._dateOptions.containerClass = `app-date ${this.dateContainerCls}`;
|
|
275
|
+
this._dateOptions.showWeekNumbers = false;
|
|
276
|
+
this._dateOptions.customTodayClass = "current-date";
|
|
277
|
+
this._bsDefaultLoadCheck = true;
|
|
278
|
+
this.datepattern = this.appDefaults.dateFormat || i1.getDisplayDateTimeFormat(i1.FormWidgetType.DATE);
|
|
279
|
+
this.updateFormat("datepattern");
|
|
280
|
+
}
|
|
281
|
+
onDisplayDateChange($event, isNativePicker = false) {
|
|
282
|
+
this.updateIMask();
|
|
283
|
+
if (this.isEnterPressedOnDateInput) {
|
|
284
|
+
this.isEnterPressedOnDateInput = false;
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
let inputVal = $event.target.value;
|
|
288
|
+
if (this.showdateformatasplaceholder && inputVal === this.maskDateInputFormatPlaceholder) inputVal = "";
|
|
289
|
+
const newVal = i1.getDateObj(inputVal, {
|
|
290
|
+
pattern: this.datepattern,
|
|
291
|
+
isNativePicker
|
|
292
|
+
});
|
|
293
|
+
if (!this.formatValidation(newVal, inputVal, isNativePicker)) return;
|
|
294
|
+
if (isNativePicker && this.minDateMaxDateValidationOnInput(newVal, $event, this.displayValue, isNativePicker)) return;
|
|
295
|
+
this.setDataValue(newVal);
|
|
296
|
+
}
|
|
297
|
+
setDataValue(newVal) {
|
|
298
|
+
this.invalidDateTimeFormat = false;
|
|
299
|
+
this.minDateMaxDateValidationOnInput(newVal);
|
|
300
|
+
if (i1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this) === this.displayValue) $(this.nativeElement).find(".display-input").val(this.displayValue);
|
|
301
|
+
if (!this.dateNotInRange) {
|
|
302
|
+
if (newVal) {
|
|
303
|
+
this.bsDataValue = newVal;
|
|
304
|
+
this.updateIMask();
|
|
305
|
+
} else this.bsDataValue = void 0;
|
|
306
|
+
if (this.datavalue === this.getPrevDataValue()) {
|
|
307
|
+
const date = i1.getFormattedDate(this.datePipe, this.datavalue, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this);
|
|
308
|
+
$(this.nativeElement).find(".display-input").val(date);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
this.invokeOnChange(this.datavalue, {}, true);
|
|
312
|
+
}
|
|
313
|
+
onDatePickerOpen() {
|
|
314
|
+
this.isOpen = true;
|
|
315
|
+
this.activeDate = this.bsDataValue ? this.bsDataValue : this.timeZone ? i1.getMomentLocaleObject(this.timeZone) : /* @__PURE__ */ new Date();
|
|
316
|
+
this.updateIMask();
|
|
317
|
+
if (this.bsDatePickerDirective && (this.dateNotInRange || this.invalidDateTimeFormat)) this.bsDatePickerDirective._bsValue = null;
|
|
318
|
+
this.$element.find(".model-holder").width("1px");
|
|
319
|
+
$("bs-datepicker-container").attr("aria-label", "Use Arrow keys to navigate dates, Choose Date from datepicker");
|
|
320
|
+
$(".bs-calendar-container").removeAttr("role");
|
|
321
|
+
const datePickerContainer = $(".bs-datepicker-container")[0];
|
|
322
|
+
this.focusTrap = base.setFocusTrap(datePickerContainer, true);
|
|
323
|
+
try {
|
|
324
|
+
this.focusTrap.activate();
|
|
325
|
+
} catch (e) {}
|
|
326
|
+
this.addDatepickerKeyboardEvents(this, false);
|
|
327
|
+
i1.adjustContainerPosition($("bs-datepicker-container"), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
328
|
+
i1.adjustContainerRightEdges($("bs-datepicker-container"), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
329
|
+
if (this.timeZone) {
|
|
330
|
+
const todayBtn = document.querySelector(`.${this.dateContainerCls} .bs-datepicker-buttons .btn-today-wrapper button`);
|
|
331
|
+
const setTodayTZHandler = (event) => {
|
|
332
|
+
const todayTZ = i1.getMomentLocaleObject(this.timeZone);
|
|
333
|
+
if (new Date(this.bsDataValue).toDateString() !== new Date(todayTZ).toDateString()) this.bsDataValue = todayTZ;
|
|
334
|
+
todayBtn.removeEventListener("click", setTodayTZHandler);
|
|
335
|
+
};
|
|
336
|
+
todayBtn.addEventListener("click", setTodayTZHandler);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
onInputBlur($event) {
|
|
340
|
+
this.updateIMask();
|
|
341
|
+
if (!$($event.relatedTarget).hasClass("current-date")) {
|
|
342
|
+
this.invokeOnTouched();
|
|
343
|
+
this.invokeEventCallback("blur", { $event });
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
updateIMask() {
|
|
347
|
+
this.imask?.maskRef?.updateValue();
|
|
348
|
+
}
|
|
349
|
+
hideDatepickerDropdown() {
|
|
350
|
+
this.invokeOnTouched();
|
|
351
|
+
this.isOpen = false;
|
|
352
|
+
this.focusTrap?.deactivate();
|
|
353
|
+
this.isEnterPressedOnDateInput = false;
|
|
354
|
+
if (this.deregisterEventListener) this.deregisterEventListener();
|
|
355
|
+
this.blurDateInput(this.isOpen);
|
|
356
|
+
}
|
|
357
|
+
handleEvent(node, eventName, callback, locals) {
|
|
358
|
+
if (!lodashEs.includes([
|
|
359
|
+
"blur",
|
|
360
|
+
"focus",
|
|
361
|
+
"change",
|
|
362
|
+
"click"
|
|
363
|
+
], eventName)) super.handleEvent(node, eventName, callback, locals);
|
|
364
|
+
}
|
|
365
|
+
toggleDpDropdown($event, skipFocus = false) {
|
|
366
|
+
if (this.loadNativeDateInput) {
|
|
367
|
+
if (!skipFocus) this.onDateTimeInputFocus();
|
|
368
|
+
}
|
|
369
|
+
if ($event.type === "click") this.invokeEventCallback("click", { $event });
|
|
370
|
+
if ($event.target && $($event.target).is("input") && !this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
371
|
+
$event.stopPropagation();
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
this.bsDatePickerDirective.toggle();
|
|
375
|
+
this.addBodyClickListener(this.bsDatePickerDirective.isOpen);
|
|
376
|
+
}
|
|
377
|
+
addBodyClickListener(skipListener) {
|
|
378
|
+
if (!skipListener) return;
|
|
379
|
+
const bodyElement = document.querySelector("body");
|
|
380
|
+
setTimeout(() => {
|
|
381
|
+
const bsDateContainerElement = bodyElement.querySelector(`.${this.dateContainerCls}`);
|
|
382
|
+
this.deregisterEventListener = i1.addEventListenerOnElement(bodyElement, bsDateContainerElement, this.nativeElement, "click", this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
383
|
+
this.isOpen = false;
|
|
384
|
+
}, 0, true);
|
|
385
|
+
}, 350);
|
|
386
|
+
}
|
|
387
|
+
onDisplayKeydown(event) {
|
|
388
|
+
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
389
|
+
event.stopPropagation();
|
|
390
|
+
if (event.key === "Enter") {
|
|
391
|
+
const newVal = i1.getDateObj(event.target.value, { pattern: this.datepattern });
|
|
392
|
+
event.preventDefault();
|
|
393
|
+
const formattedDate = i1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this);
|
|
394
|
+
let inputVal = event.target.value.trim();
|
|
395
|
+
if (this.showdateformatasplaceholder && inputVal === this.maskDateInputFormatPlaceholder) inputVal = "";
|
|
396
|
+
if (inputVal && this.datepattern === "timestamp") {
|
|
397
|
+
if (!lodashEs.isNaN(inputVal) && lodashEs.parseInt(inputVal) !== formattedDate) {
|
|
398
|
+
this.invalidDateTimeFormat = true;
|
|
399
|
+
this.invokeOnChange(this.datavalue, event, false);
|
|
400
|
+
}
|
|
401
|
+
} else if (inputVal && inputVal !== formattedDate) {
|
|
402
|
+
this.invalidDateTimeFormat = true;
|
|
403
|
+
this.invokeOnChange(this.datavalue, event, false);
|
|
404
|
+
} else {
|
|
405
|
+
this.invalidDateTimeFormat = false;
|
|
406
|
+
this.isEnterPressedOnDateInput = true;
|
|
407
|
+
this.bsDatePickerDirective.bsValue = inputVal ? newVal : "";
|
|
408
|
+
this.updateIMask();
|
|
409
|
+
}
|
|
410
|
+
this.toggleDpDropdown(event);
|
|
411
|
+
} else this.hideDatepickerDropdown();
|
|
412
|
+
} else this.hideDatepickerDropdown();
|
|
413
|
+
}
|
|
414
|
+
onDateChange(newVal) {
|
|
415
|
+
if (this._bsDefaultLoadCheck) {
|
|
416
|
+
this._bsDefaultLoadCheck = false;
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
this.setDataValue(newVal);
|
|
420
|
+
}
|
|
421
|
+
onPropertyChange(key, nv, ov) {
|
|
422
|
+
if (key === "showdateformatasplaceholder") {
|
|
423
|
+
this.showdateformatasplaceholder = nv;
|
|
424
|
+
this.imask?.destroyMask();
|
|
425
|
+
if (this.showdateformatasplaceholder && this.datepattern !== "timestamp") {
|
|
426
|
+
this.mask = validateTheMaskedDate(this.datepattern, this.selectedLocale);
|
|
427
|
+
this.maskDateInputFormat = this.dateInputFormat;
|
|
428
|
+
this.maskDateInputFormat = this.dateInputFormat.split("d").length - 1 === 1 ? this.maskDateInputFormat.replace("d", "dd") : this.maskDateInputFormat;
|
|
429
|
+
this.maskDateInputFormat = this.dateInputFormat.split("M").length - 1 === 1 ? this.maskDateInputFormat.replace("M", "MM") : this.maskDateInputFormat;
|
|
430
|
+
this.maskDateInputFormatPlaceholder = this.maskDateInputFormat.toUpperCase().replace("EEEE", "EEEEEE").replace("MMMM", "MMM");
|
|
431
|
+
this.updateIMask();
|
|
432
|
+
}
|
|
433
|
+
} else super.onPropertyChange(key, nv, ov);
|
|
434
|
+
}
|
|
435
|
+
ngOnDestroy() {
|
|
436
|
+
if (this.deregisterEventListener) {
|
|
437
|
+
this.deregisterEventListener();
|
|
438
|
+
this.deregisterEventListener = null;
|
|
439
|
+
}
|
|
440
|
+
this.bsDatePickerDirective = null;
|
|
441
|
+
this.imask = null;
|
|
442
|
+
if (this.focusTrap) {
|
|
443
|
+
this.focusTrap.deactivate();
|
|
444
|
+
this.focusTrap = null;
|
|
445
|
+
}
|
|
446
|
+
if (this.removeKeyupListener) {
|
|
447
|
+
this.removeKeyupListener();
|
|
448
|
+
this.removeKeyupListener = null;
|
|
449
|
+
}
|
|
450
|
+
super.ngOnDestroy();
|
|
451
|
+
}
|
|
452
|
+
static {
|
|
453
|
+
this.ɵfac = i0__namespace.ɵɵngDeclareFactory({
|
|
454
|
+
minVersion: "12.0.0",
|
|
455
|
+
version: "22.2.1",
|
|
456
|
+
ngImport: i0__namespace,
|
|
457
|
+
type: DateComponent,
|
|
458
|
+
deps: [
|
|
459
|
+
{ token: i0__namespace.Injector },
|
|
460
|
+
{ token: i0__namespace.ChangeDetectorRef },
|
|
461
|
+
{ token: i1__namespace.AppDefaults },
|
|
462
|
+
{
|
|
463
|
+
token: "EXPLICIT_CONTEXT",
|
|
464
|
+
optional: true
|
|
465
|
+
}
|
|
466
|
+
],
|
|
467
|
+
target: i0__namespace.ɵɵFactoryTarget.Component
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
static {
|
|
471
|
+
this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({
|
|
472
|
+
minVersion: "17.0.0",
|
|
473
|
+
version: "22.2.1",
|
|
474
|
+
type: DateComponent,
|
|
475
|
+
isStandalone: true,
|
|
476
|
+
selector: "[wmDate]",
|
|
477
|
+
providers: [
|
|
478
|
+
base.provideAs(DateComponent, forms.NG_VALUE_ACCESSOR, true),
|
|
479
|
+
base.provideAs(DateComponent, forms.NG_VALIDATORS, true),
|
|
480
|
+
base.provideAsWidgetRef(DateComponent)
|
|
481
|
+
],
|
|
482
|
+
viewQueries: [{
|
|
483
|
+
propertyName: "bsDatePickerDirective",
|
|
484
|
+
first: true,
|
|
485
|
+
predicate: i3.BsDatepickerDirective,
|
|
486
|
+
descendants: true
|
|
487
|
+
}, {
|
|
488
|
+
propertyName: "imask",
|
|
489
|
+
first: true,
|
|
490
|
+
predicate: ["dateInput"],
|
|
491
|
+
descendants: true,
|
|
492
|
+
read: i2.IMaskDirective
|
|
493
|
+
}],
|
|
494
|
+
usesInheritance: true,
|
|
495
|
+
ngImport: i0__namespace,
|
|
496
|
+
template: "<input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n #dateInput\n [imask]=\"mask\"\n [unmask]=\"true\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event); updateIMask()\"\n (blur)=\"onInputBlur($event)\"\n [disabled]=\"disabled || readonly\"\n [autofocus]=\"autofocus\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (change)=\"onDisplayDateChange($event)\"\n (keydown)=\"_triggeredByUser = true; onDisplayKeydown($event);\">\n\n<span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n</span>\n<div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n [tabindex]=\"-1\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [container]=\"containerTarget || '.wm-app'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isOpen\"\n #datepicker=\"bsDatepicker\"\n bsDatepicker\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n placement=\"bottom right\"\n [isDisabled]=\"disabled || readonly\"\n [bsValue]=\"bsDataValue\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n (bsValueChange)=\"onDateChange($event)\">\n</div>\n\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode=\"DATE\"\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDataValue\"\n (change)=\"onDateChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n [tabindex]=\"tabindex || 0\"\n (click)=\"!(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (keydown.enter)=\"!(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (keydown.space)=\"$event.preventDefault(); !(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : arialabel || 'Choose Date'\"\n role=\"button\">\n </div>\n}\n",
|
|
497
|
+
dependencies: [
|
|
498
|
+
{
|
|
499
|
+
kind: "component",
|
|
500
|
+
type: dateTimePicker.DateTimePickerComponent,
|
|
501
|
+
selector: "wm-datetimepicker",
|
|
502
|
+
inputs: [
|
|
503
|
+
"mode",
|
|
504
|
+
"placement",
|
|
505
|
+
"minTime",
|
|
506
|
+
"maxTime",
|
|
507
|
+
"_displayFormat",
|
|
508
|
+
"excludedDatesToDisable",
|
|
509
|
+
"value",
|
|
510
|
+
"config",
|
|
511
|
+
"excludedDaysToDisable",
|
|
512
|
+
"displayFormat"
|
|
513
|
+
],
|
|
514
|
+
outputs: ["change"]
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
kind: "ngmodule",
|
|
518
|
+
type: i2.IMaskModule
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
kind: "directive",
|
|
522
|
+
type: i2__namespace.IMaskDirective,
|
|
523
|
+
selector: "[imask]",
|
|
524
|
+
inputs: [
|
|
525
|
+
"imask",
|
|
526
|
+
"unmask",
|
|
527
|
+
"imaskElement"
|
|
528
|
+
],
|
|
529
|
+
outputs: ["accept", "complete"],
|
|
530
|
+
exportAs: ["imask"]
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
kind: "ngmodule",
|
|
534
|
+
type: i3.BsDatepickerModule
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
kind: "directive",
|
|
538
|
+
type: i3__namespace.BsDatepickerDirective,
|
|
539
|
+
selector: "[bsDatepicker]",
|
|
540
|
+
inputs: [
|
|
541
|
+
"placement",
|
|
542
|
+
"triggers",
|
|
543
|
+
"outsideClick",
|
|
544
|
+
"container",
|
|
545
|
+
"outsideEsc",
|
|
546
|
+
"isDisabled",
|
|
547
|
+
"minDate",
|
|
548
|
+
"maxDate",
|
|
549
|
+
"ignoreMinMaxErrors",
|
|
550
|
+
"minMode",
|
|
551
|
+
"daysDisabled",
|
|
552
|
+
"datesDisabled",
|
|
553
|
+
"datesEnabled",
|
|
554
|
+
"dateCustomClasses",
|
|
555
|
+
"dateTooltipTexts",
|
|
556
|
+
"isOpen",
|
|
557
|
+
"bsValue",
|
|
558
|
+
"bsConfig"
|
|
559
|
+
],
|
|
560
|
+
outputs: [
|
|
561
|
+
"onShown",
|
|
562
|
+
"onHidden",
|
|
563
|
+
"bsValueChange"
|
|
564
|
+
],
|
|
565
|
+
exportAs: ["bsDatepicker"]
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
kind: "directive",
|
|
569
|
+
type: i3__namespace.BsDatepickerInputDirective,
|
|
570
|
+
selector: "input[bsDatepicker]"
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
changeDetection: i0__namespace.ChangeDetectionStrategy.Eager
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
i0__namespace.ɵɵngDeclareClassMetadata({
|
|
578
|
+
minVersion: "12.0.0",
|
|
579
|
+
version: "22.2.1",
|
|
580
|
+
ngImport: i0__namespace,
|
|
581
|
+
type: DateComponent,
|
|
582
|
+
decorators: [{
|
|
583
|
+
type: i0.Component,
|
|
584
|
+
args: [{
|
|
585
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
586
|
+
standalone: true,
|
|
587
|
+
imports: [
|
|
588
|
+
dateTimePicker.DateTimePickerComponent,
|
|
589
|
+
i2.IMaskModule,
|
|
590
|
+
i3.BsDatepickerModule
|
|
591
|
+
],
|
|
592
|
+
selector: "[wmDate]",
|
|
593
|
+
providers: [
|
|
594
|
+
base.provideAs(DateComponent, forms.NG_VALUE_ACCESSOR, true),
|
|
595
|
+
base.provideAs(DateComponent, forms.NG_VALIDATORS, true),
|
|
596
|
+
base.provideAsWidgetRef(DateComponent)
|
|
597
|
+
],
|
|
598
|
+
template: "<input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n #dateInput\n [imask]=\"mask\"\n [unmask]=\"true\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event); updateIMask()\"\n (blur)=\"onInputBlur($event)\"\n [disabled]=\"disabled || readonly\"\n [autofocus]=\"autofocus\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (change)=\"onDisplayDateChange($event)\"\n (keydown)=\"_triggeredByUser = true; onDisplayKeydown($event);\">\n\n<span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n</span>\n<div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n [tabindex]=\"-1\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [container]=\"containerTarget || '.wm-app'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isOpen\"\n #datepicker=\"bsDatepicker\"\n bsDatepicker\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n placement=\"bottom right\"\n [isDisabled]=\"disabled || readonly\"\n [bsValue]=\"bsDataValue\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n (bsValueChange)=\"onDateChange($event)\">\n</div>\n\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode=\"DATE\"\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDataValue\"\n (change)=\"onDateChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n [tabindex]=\"tabindex || 0\"\n (click)=\"!(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (keydown.enter)=\"!(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (keydown.space)=\"$event.preventDefault(); !(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : arialabel || 'Choose Date'\"\n role=\"button\">\n </div>\n}\n"
|
|
599
|
+
}]
|
|
600
|
+
}],
|
|
601
|
+
ctorParameters: () => [
|
|
602
|
+
{ type: i0__namespace.Injector },
|
|
603
|
+
{ type: i0__namespace.ChangeDetectorRef },
|
|
604
|
+
{ type: i1__namespace.AppDefaults },
|
|
605
|
+
{
|
|
606
|
+
type: void 0,
|
|
607
|
+
decorators: [{
|
|
608
|
+
type: i0.Inject,
|
|
609
|
+
args: ["EXPLICIT_CONTEXT"]
|
|
610
|
+
}, { type: i0.Optional }]
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
propDecorators: {
|
|
614
|
+
bsDatePickerDirective: [{
|
|
615
|
+
type: i0.ViewChild,
|
|
616
|
+
args: [i3.BsDatepickerDirective]
|
|
617
|
+
}],
|
|
618
|
+
imask: [{
|
|
619
|
+
type: i0.ViewChild,
|
|
620
|
+
args: ["dateInput", { read: i2.IMaskDirective }]
|
|
621
|
+
}]
|
|
622
|
+
}
|
|
623
|
+
});
|
|
70
624
|
|
|
71
|
-
|
|
72
|
-
function validateTheMaskedDate(format, locale) {
|
|
73
|
-
if (format == 'timestamp') {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
let modifiedFormat = format.toUpperCase().replace(/E/g, 'd');
|
|
77
|
-
if ((modifiedFormat.split('D').length - 1) === 1) {
|
|
78
|
-
modifiedFormat = modifiedFormat.replace('D', 'DD');
|
|
79
|
-
}
|
|
80
|
-
if ((modifiedFormat.split('M').length - 1) === 1) {
|
|
81
|
-
modifiedFormat = modifiedFormat.replace('M', 'MM');
|
|
82
|
-
}
|
|
83
|
-
const parseFn = str => {
|
|
84
|
-
return moment(str, modifiedFormat).toDate();
|
|
85
|
-
};
|
|
86
|
-
const formatFn = date => {
|
|
87
|
-
return moment(date, modifiedFormat).format(modifiedFormat);
|
|
88
|
-
};
|
|
89
|
-
return {
|
|
90
|
-
mask: Date,
|
|
91
|
-
pattern: modifiedFormat,
|
|
92
|
-
format: formatFn,
|
|
93
|
-
parse: parseFn,
|
|
94
|
-
blocks: {
|
|
95
|
-
YYYY: {
|
|
96
|
-
mask: IMask.MaskedRange,
|
|
97
|
-
from: 1900,
|
|
98
|
-
to: 9999,
|
|
99
|
-
placeholderChar: 'Y',
|
|
100
|
-
maxLength: 4,
|
|
101
|
-
},
|
|
102
|
-
YYY: {
|
|
103
|
-
mask: IMask.MaskedRange,
|
|
104
|
-
from: 900,
|
|
105
|
-
to: 999,
|
|
106
|
-
placeholderChar: 'Y',
|
|
107
|
-
maxLength: 3,
|
|
108
|
-
},
|
|
109
|
-
YY: {
|
|
110
|
-
mask: IMask.MaskedRange,
|
|
111
|
-
from: 0,
|
|
112
|
-
to: 99,
|
|
113
|
-
placeholderChar: 'Y',
|
|
114
|
-
maxLength: 2,
|
|
115
|
-
},
|
|
116
|
-
Y: {
|
|
117
|
-
mask: IMask.MaskedRange,
|
|
118
|
-
from: 1900,
|
|
119
|
-
to: 9999,
|
|
120
|
-
placeholderChar: 'Y',
|
|
121
|
-
maxLength: 4,
|
|
122
|
-
},
|
|
123
|
-
M: {
|
|
124
|
-
mask: IMask.MaskedRange,
|
|
125
|
-
from: 1,
|
|
126
|
-
to: 12,
|
|
127
|
-
placeholderChar: 'M',
|
|
128
|
-
maxLength: 2,
|
|
129
|
-
},
|
|
130
|
-
MM: {
|
|
131
|
-
mask: IMask.MaskedRange,
|
|
132
|
-
from: 1,
|
|
133
|
-
to: 12,
|
|
134
|
-
placeholderChar: 'M',
|
|
135
|
-
maxLength: 2,
|
|
136
|
-
},
|
|
137
|
-
MMM: {
|
|
138
|
-
mask: IMask.MaskedEnum,
|
|
139
|
-
enum: Array.from({ length: 12 }, (_, i) => new Date(0, i).toLocaleString(locale, { month: 'short' })),
|
|
140
|
-
placeholderChar: 'M',
|
|
141
|
-
maxLength: 3,
|
|
142
|
-
},
|
|
143
|
-
MMMM: {
|
|
144
|
-
mask: IMask.MaskedEnum,
|
|
145
|
-
enum: Array.from({ length: 12 }, (_, i) => new Date(0, i).toLocaleString(locale, { month: 'long' })),
|
|
146
|
-
placeholderChar: "M",
|
|
147
|
-
maxLength: 4
|
|
148
|
-
},
|
|
149
|
-
DD: {
|
|
150
|
-
mask: IMask.MaskedRange,
|
|
151
|
-
from: 1,
|
|
152
|
-
to: 31,
|
|
153
|
-
placeholderChar: 'D',
|
|
154
|
-
maxLength: 2,
|
|
155
|
-
},
|
|
156
|
-
D: {
|
|
157
|
-
mask: IMask.MaskedRange,
|
|
158
|
-
from: 1,
|
|
159
|
-
to: 31,
|
|
160
|
-
placeholderChar: 'D',
|
|
161
|
-
maxLength: 2,
|
|
162
|
-
},
|
|
163
|
-
ddd: {
|
|
164
|
-
mask: IMask.MaskedEnum,
|
|
165
|
-
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(locale, { weekday: 'short' })),
|
|
166
|
-
placeholderChar: 'E',
|
|
167
|
-
maxLength: 3,
|
|
168
|
-
},
|
|
169
|
-
dddd: {
|
|
170
|
-
mask: IMask.MaskedEnum,
|
|
171
|
-
enum: Array.from({ length: 7 }, (_, i) => new Date(0, 0, i + 1).toLocaleString(locale, { weekday: 'long' })),
|
|
172
|
-
placeholderChar: 'E',
|
|
173
|
-
minLength: 6,
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
autofix: true,
|
|
177
|
-
lazy: false,
|
|
178
|
-
overwrite: true,
|
|
179
|
-
skipInvalid: true
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const CURRENT_DATE = 'CURRENT_DATE';
|
|
184
|
-
const DEFAULT_CLS = 'app-date input-group';
|
|
185
|
-
const WIDGET_CONFIG = {
|
|
186
|
-
widgetType: 'wm-date',
|
|
187
|
-
hostClass: DEFAULT_CLS
|
|
188
|
-
};
|
|
189
|
-
class DateComponent extends baseDateTime.BaseDateTimeComponent {
|
|
190
|
-
static { this.initializeProps = registerProps(); }
|
|
191
|
-
get timestamp() {
|
|
192
|
-
return this.bsDataValue ? this.bsDataValue.valueOf() : undefined;
|
|
193
|
-
}
|
|
194
|
-
get dateInputFormat() {
|
|
195
|
-
return this._dateOptions.dateInputFormat || 'yyyy-MM-dd';
|
|
196
|
-
}
|
|
197
|
-
get displayValue() {
|
|
198
|
-
if (this.showdateformatasplaceholder && this.imask?.maskRef && this.maskDateInputFormat) {
|
|
199
|
-
return i1.getFormattedDate(this.datePipe, this.bsDataValue, this.maskDateInputFormat, this.timeZone, null, this.isCurrentDate, this) || '';
|
|
200
|
-
}
|
|
201
|
-
return i1.getFormattedDate(this.datePipe, this.bsDataValue, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this) || '';
|
|
202
|
-
}
|
|
203
|
-
get nativeDisplayValue() {
|
|
204
|
-
return i1.getFormattedDate(this.datePipe, this.bsDataValue, 'yyyy-MM-dd', this.timeZone, null, this.isCurrentDate, this) || '';
|
|
205
|
-
}
|
|
206
|
-
// @ts-ignore
|
|
207
|
-
get datavalue() {
|
|
208
|
-
return i1.getFormattedDate(this.datePipe, this.bsDataValue, this.outputformat, this.timeZone, null, this.isCurrentDate, this) || '';
|
|
209
|
-
}
|
|
210
|
-
// Todo[Shubham]: needs to be redefined
|
|
211
|
-
// sets the dataValue and computes the display model values
|
|
212
|
-
// @ts-ignore
|
|
213
|
-
set datavalue(newVal) {
|
|
214
|
-
if (newVal === CURRENT_DATE) {
|
|
215
|
-
setTimeout(() => {
|
|
216
|
-
this.bsDataValue = this.timeZone ? i1.getMomentLocaleObject(this.timeZone) : new Date();
|
|
217
|
-
}, 50);
|
|
218
|
-
this.isCurrentDate = true;
|
|
219
|
-
}
|
|
220
|
-
else {
|
|
221
|
-
this.bsDataValue = newVal ? i1.getDateObj(newVal, { isNativePicker: this.loadNativeDateInput }, this.timeZone) : undefined;
|
|
222
|
-
this.isCurrentDate = false;
|
|
223
|
-
}
|
|
224
|
-
// update the previous datavalue.
|
|
225
|
-
this.invokeOnChange(this.datavalue, undefined, true);
|
|
226
|
-
this.cdRef.detectChanges();
|
|
227
|
-
}
|
|
228
|
-
// TODO use BsLocaleService to set the current user's locale to see the localized labels
|
|
229
|
-
constructor(inj, cdRef, appDefaults, explicitContext) {
|
|
230
|
-
super(inj, WIDGET_CONFIG, explicitContext);
|
|
231
|
-
this.cdRef = cdRef;
|
|
232
|
-
this.appDefaults = appDefaults;
|
|
233
|
-
this.isOpen = false;
|
|
234
|
-
this.isEnterPressedOnDateInput = false;
|
|
235
|
-
this.showdateformatasplaceholder = false;
|
|
236
|
-
base.styler(this.nativeElement, this);
|
|
237
|
-
this.dateContainerCls = `app-date-${this.widgetId}`;
|
|
238
|
-
this._dateOptions.containerClass = `app-date ${this.dateContainerCls}`;
|
|
239
|
-
this._dateOptions.showWeekNumbers = false;
|
|
240
|
-
this._dateOptions.customTodayClass = 'current-date';
|
|
241
|
-
this._bsDefaultLoadCheck = true;
|
|
242
|
-
this.datepattern = this.appDefaults.dateFormat || i1.getDisplayDateTimeFormat(i1.FormWidgetType.DATE);
|
|
243
|
-
this.updateFormat('datepattern');
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* This is an internal method triggered when the date input changes
|
|
247
|
-
*/
|
|
248
|
-
onDisplayDateChange($event, isNativePicker = false) {
|
|
249
|
-
this.updateIMask();
|
|
250
|
-
if (this.isEnterPressedOnDateInput) {
|
|
251
|
-
this.isEnterPressedOnDateInput = false;
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
let inputVal = $event.target.value;
|
|
255
|
-
// When the input is cleared, the input value becomes maskDateInputFormatPlaceholder. This causes a validation error.
|
|
256
|
-
// When the input value is equal to maskDateInputFormatPlaceholder, it means that the input is in an empty state.
|
|
257
|
-
if (this.showdateformatasplaceholder && inputVal === this.maskDateInputFormatPlaceholder) {
|
|
258
|
-
inputVal = "";
|
|
259
|
-
}
|
|
260
|
-
const newVal = i1.getDateObj(inputVal, { pattern: this.datepattern, isNativePicker: isNativePicker });
|
|
261
|
-
// date pattern validation
|
|
262
|
-
// if invalid pattern is entered, device is showing an error.
|
|
263
|
-
if (!this.formatValidation(newVal, inputVal, isNativePicker)) {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
// min date and max date validation in mobile view.
|
|
267
|
-
// if invalid dates are entered, device is showing an alert.
|
|
268
|
-
if (isNativePicker && this.minDateMaxDateValidationOnInput(newVal, $event, this.displayValue, isNativePicker)) {
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
this.setDataValue(newVal);
|
|
272
|
-
}
|
|
273
|
-
// sets the dataValue and computes the display model values
|
|
274
|
-
setDataValue(newVal) {
|
|
275
|
-
this.invalidDateTimeFormat = false;
|
|
276
|
-
// min date and max date validation in web.
|
|
277
|
-
// if invalid dates are entered, device is showing validation message.
|
|
278
|
-
this.minDateMaxDateValidationOnInput(newVal);
|
|
279
|
-
if (i1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this) === this.displayValue) {
|
|
280
|
-
$(this.nativeElement).find('.display-input').val(this.displayValue);
|
|
281
|
-
}
|
|
282
|
-
if (!this.dateNotInRange) {
|
|
283
|
-
if (newVal) {
|
|
284
|
-
this.bsDataValue = newVal;
|
|
285
|
-
this.updateIMask();
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
this.bsDataValue = undefined;
|
|
289
|
-
}
|
|
290
|
-
if (this.datavalue === this.getPrevDataValue()) {
|
|
291
|
-
const date = i1.getFormattedDate(this.datePipe, this.datavalue, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this);
|
|
292
|
-
$(this.nativeElement).find('.display-input').val(date);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
this.invokeOnChange(this.datavalue, {}, true);
|
|
296
|
-
}
|
|
297
|
-
onDatePickerOpen() {
|
|
298
|
-
this.isOpen = true;
|
|
299
|
-
this.activeDate = this.bsDataValue ? this.bsDataValue : (this.timeZone ? i1.getMomentLocaleObject(this.timeZone) : new Date());
|
|
300
|
-
// if (!this.bsDataValue) {
|
|
301
|
-
// this.hightlightToday(this.activeDate);
|
|
302
|
-
// }
|
|
303
|
-
this.updateIMask();
|
|
304
|
-
if (this.bsDatePickerDirective && (this.dateNotInRange || this.invalidDateTimeFormat)) {
|
|
305
|
-
this.bsDatePickerDirective._bsValue = null;
|
|
306
|
-
}
|
|
307
|
-
// We are using the two input tags(To maintain the modal and proxy modal) for the date control.
|
|
308
|
-
// So actual bootstrap input target width we made it to 0, so bootstrap calculating the calendar container top position improperly.
|
|
309
|
-
// To fix the container top position set the width 1px;
|
|
310
|
-
this.$element.find('.model-holder').width('1px');
|
|
311
|
-
const dpContainerEl = $('bs-datepicker-container');
|
|
312
|
-
dpContainerEl.attr('aria-label', 'Use Arrow keys to navigate dates, Choose Date from datepicker');
|
|
313
|
-
$('.bs-calendar-container').removeAttr('role');
|
|
314
|
-
const datePickerContainer = $('.bs-datepicker-container')[0];
|
|
315
|
-
this.focusTrap = base.setFocusTrap(datePickerContainer, true);
|
|
316
|
-
try {
|
|
317
|
-
// focus-trap throws if the container has no tabbable node yet (e.g. calendar still rendering);
|
|
318
|
-
// that shouldn't stop the picker from opening.
|
|
319
|
-
this.focusTrap.activate();
|
|
320
|
-
}
|
|
321
|
-
catch (e) {
|
|
322
|
-
}
|
|
323
|
-
this.addDatepickerKeyboardEvents(this, false);
|
|
324
|
-
i1.adjustContainerPosition($('bs-datepicker-container'), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
325
|
-
i1.adjustContainerRightEdges($('bs-datepicker-container'), this.nativeElement, this.bsDatePickerDirective._datepicker);
|
|
326
|
-
if (this.timeZone) {
|
|
327
|
-
const todayBtn = document.querySelector(`.${this.dateContainerCls} .bs-datepicker-buttons .btn-today-wrapper button`);
|
|
328
|
-
const setTodayTZHandler = (event) => {
|
|
329
|
-
const todayTZ = i1.getMomentLocaleObject(this.timeZone);
|
|
330
|
-
if (new Date(this.bsDataValue).toDateString() !== new Date(todayTZ).toDateString()) {
|
|
331
|
-
this.bsDataValue = todayTZ;
|
|
332
|
-
}
|
|
333
|
-
todayBtn.removeEventListener('click', setTodayTZHandler);
|
|
334
|
-
};
|
|
335
|
-
todayBtn.addEventListener('click', setTodayTZHandler);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
onInputBlur($event) {
|
|
339
|
-
this.updateIMask();
|
|
340
|
-
if (!$($event.relatedTarget).hasClass('current-date')) {
|
|
341
|
-
this.invokeOnTouched();
|
|
342
|
-
this.invokeEventCallback('blur', { $event });
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
updateIMask() {
|
|
346
|
-
this.imask?.maskRef?.updateValue();
|
|
347
|
-
}
|
|
348
|
-
hideDatepickerDropdown() {
|
|
349
|
-
this.invokeOnTouched();
|
|
350
|
-
this.isOpen = false;
|
|
351
|
-
this.focusTrap?.deactivate();
|
|
352
|
-
this.isEnterPressedOnDateInput = false;
|
|
353
|
-
if (this.deregisterEventListener) {
|
|
354
|
-
this.deregisterEventListener();
|
|
355
|
-
}
|
|
356
|
-
this.blurDateInput(this.isOpen);
|
|
357
|
-
}
|
|
358
|
-
// change and blur events are added from the template
|
|
359
|
-
handleEvent(node, eventName, callback, locals) {
|
|
360
|
-
if (!lodashEs.includes(['blur', 'focus', 'change', 'click'], eventName)) {
|
|
361
|
-
super.handleEvent(node, eventName, callback, locals);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* This is an internal method used to toggle the dropdown of the date widget
|
|
366
|
-
*/
|
|
367
|
-
toggleDpDropdown($event, skipFocus = false) {
|
|
368
|
-
if (this.loadNativeDateInput) {
|
|
369
|
-
// Fixes click event getting triggred twice in Mobile devices.
|
|
370
|
-
if (!skipFocus) {
|
|
371
|
-
this.onDateTimeInputFocus();
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
if ($event.type === 'click') {
|
|
375
|
-
this.invokeEventCallback('click', { $event: $event });
|
|
376
|
-
// this.focusOnInputEl();
|
|
377
|
-
}
|
|
378
|
-
if ($event.target && $($event.target).is('input') && !(this.isDropDownDisplayEnabledOnInput(this.showdropdownon))) {
|
|
379
|
-
$event.stopPropagation();
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
this.bsDatePickerDirective.toggle();
|
|
383
|
-
this.addBodyClickListener(this.bsDatePickerDirective.isOpen);
|
|
384
|
-
}
|
|
385
|
-
addBodyClickListener(skipListener) {
|
|
386
|
-
if (!skipListener) {
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
const bodyElement = document.querySelector('body');
|
|
390
|
-
setTimeout(() => {
|
|
391
|
-
const bsDateContainerElement = bodyElement.querySelector(`.${this.dateContainerCls}`);
|
|
392
|
-
this.deregisterEventListener = i1.addEventListenerOnElement(bodyElement, bsDateContainerElement, this.nativeElement, 'click', this.isDropDownDisplayEnabledOnInput(this.showdropdownon), () => {
|
|
393
|
-
this.isOpen = false;
|
|
394
|
-
}, 0 /* EVENT_LIFE.ONCE */, true);
|
|
395
|
-
}, 350);
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* This is an internal method triggered when pressing key on the date input
|
|
399
|
-
*/
|
|
400
|
-
onDisplayKeydown(event) {
|
|
401
|
-
if (this.isDropDownDisplayEnabledOnInput(this.showdropdownon)) {
|
|
402
|
-
event.stopPropagation();
|
|
403
|
-
if (event.key === 'Enter') {
|
|
404
|
-
const newVal = i1.getDateObj(event.target.value, { pattern: this.datepattern });
|
|
405
|
-
event.preventDefault();
|
|
406
|
-
const formattedDate = i1.getFormattedDate(this.datePipe, newVal, this.dateInputFormat, this.timeZone, null, this.isCurrentDate, this);
|
|
407
|
-
let inputVal = event.target.value.trim();
|
|
408
|
-
if (this.showdateformatasplaceholder && inputVal === this.maskDateInputFormatPlaceholder) {
|
|
409
|
-
inputVal = "";
|
|
410
|
-
}
|
|
411
|
-
if (inputVal && this.datepattern === 'timestamp') {
|
|
412
|
-
if (!lodashEs.isNaN(inputVal) && lodashEs.parseInt(inputVal) !== formattedDate) {
|
|
413
|
-
this.invalidDateTimeFormat = true;
|
|
414
|
-
this.invokeOnChange(this.datavalue, event, false);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
else if (inputVal && inputVal !== formattedDate) {
|
|
418
|
-
this.invalidDateTimeFormat = true;
|
|
419
|
-
this.invokeOnChange(this.datavalue, event, false);
|
|
420
|
-
}
|
|
421
|
-
else {
|
|
422
|
-
this.invalidDateTimeFormat = false;
|
|
423
|
-
this.isEnterPressedOnDateInput = true;
|
|
424
|
-
this.bsDatePickerDirective.bsValue = inputVal ? newVal : '';
|
|
425
|
-
this.updateIMask();
|
|
426
|
-
}
|
|
427
|
-
this.toggleDpDropdown(event);
|
|
428
|
-
}
|
|
429
|
-
else {
|
|
430
|
-
this.hideDatepickerDropdown();
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
else {
|
|
434
|
-
this.hideDatepickerDropdown();
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* This is an internal method triggered when the date selection changes
|
|
439
|
-
*/
|
|
440
|
-
onDateChange(newVal) {
|
|
441
|
-
/**
|
|
442
|
-
* Ngx-bootstrap upgrade : To avoid the page load datechange event;
|
|
443
|
-
* TODO:
|
|
444
|
-
* https://github.com/valor-software/ngx-bootstrap/issues/6016
|
|
445
|
-
* For above issue, once we get the solution from Ngx-Bootstrap team, remove the _bsDefaultLoadCheck check and update accordingly.
|
|
446
|
-
* */
|
|
447
|
-
if (this._bsDefaultLoadCheck) {
|
|
448
|
-
this._bsDefaultLoadCheck = false;
|
|
449
|
-
return;
|
|
450
|
-
}
|
|
451
|
-
this.setDataValue(newVal);
|
|
452
|
-
}
|
|
453
|
-
onPropertyChange(key, nv, ov) {
|
|
454
|
-
if (key === 'showdateformatasplaceholder') {
|
|
455
|
-
this.showdateformatasplaceholder = nv;
|
|
456
|
-
this.imask?.destroyMask();
|
|
457
|
-
if (this.showdateformatasplaceholder && this.datepattern !== 'timestamp') {
|
|
458
|
-
this.mask = validateTheMaskedDate(this.datepattern, this.selectedLocale);
|
|
459
|
-
this.maskDateInputFormat = this.dateInputFormat;
|
|
460
|
-
this.maskDateInputFormat = (this.dateInputFormat.split('d').length - 1) === 1 ? this.maskDateInputFormat.replace('d', 'dd') : this.maskDateInputFormat;
|
|
461
|
-
this.maskDateInputFormat = (this.dateInputFormat.split('M').length - 1) === 1 ? this.maskDateInputFormat.replace('M', 'MM') : this.maskDateInputFormat;
|
|
462
|
-
this.maskDateInputFormatPlaceholder = this.maskDateInputFormat.toUpperCase().replace('EEEE', 'EEEEEE').replace('MMMM', 'MMM');
|
|
463
|
-
this.updateIMask();
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
else {
|
|
467
|
-
super.onPropertyChange(key, nv, ov);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
ngOnDestroy() {
|
|
471
|
-
// MEMORY LEAK FIX: Clean up event listener deregister function
|
|
472
|
-
if (this.deregisterEventListener) {
|
|
473
|
-
this.deregisterEventListener();
|
|
474
|
-
this.deregisterEventListener = null;
|
|
475
|
-
}
|
|
476
|
-
// MEMORY LEAK FIX: Clear ViewChild references
|
|
477
|
-
this.bsDatePickerDirective = null;
|
|
478
|
-
this.imask = null;
|
|
479
|
-
// MEMORY LEAK FIX: Deactivate focus trap if active
|
|
480
|
-
if (this.focusTrap) {
|
|
481
|
-
this.focusTrap.deactivate();
|
|
482
|
-
this.focusTrap = null;
|
|
483
|
-
}
|
|
484
|
-
// MEMORY LEAK FIX: Clear removeKeyupListener if set
|
|
485
|
-
if (this.removeKeyupListener) {
|
|
486
|
-
this.removeKeyupListener();
|
|
487
|
-
this.removeKeyupListener = null;
|
|
488
|
-
}
|
|
489
|
-
// Call parent ngOnDestroy (BaseDateTimeComponent has cleanup)
|
|
490
|
-
super.ngOnDestroy();
|
|
491
|
-
}
|
|
492
|
-
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: DateComponent, deps: [{ token: i0__namespace.Injector }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.AppDefaults }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
|
|
493
|
-
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: DateComponent, isStandalone: true, selector: "[wmDate]", providers: [
|
|
494
|
-
base.provideAs(DateComponent, forms.NG_VALUE_ACCESSOR, true),
|
|
495
|
-
base.provideAs(DateComponent, forms.NG_VALIDATORS, true),
|
|
496
|
-
base.provideAsWidgetRef(DateComponent)
|
|
497
|
-
], viewQueries: [{ propertyName: "bsDatePickerDirective", first: true, predicate: i3.BsDatepickerDirective, descendants: true }, { propertyName: "imask", first: true, predicate: ["dateInput"], descendants: true, read: i2.IMaskDirective }], usesInheritance: true, ngImport: i0__namespace, template: "<input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n #dateInput\n [imask]=\"mask\"\n [unmask]=\"true\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event); updateIMask()\"\n (blur)=\"onInputBlur($event)\"\n [disabled]=\"disabled || readonly\"\n [autofocus]=\"autofocus\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (change)=\"onDisplayDateChange($event)\"\n (keydown)=\"_triggeredByUser = true; onDisplayKeydown($event);\">\n\n<span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n</span>\n<div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n [tabindex]=\"-1\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [container]=\"containerTarget || '.wm-app'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isOpen\"\n #datepicker=\"bsDatepicker\"\n bsDatepicker\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n placement=\"bottom right\"\n [isDisabled]=\"disabled || readonly\"\n [bsValue]=\"bsDataValue\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n (bsValueChange)=\"onDateChange($event)\">\n</div>\n\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode=\"DATE\"\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDataValue\"\n (change)=\"onDateChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n [tabindex]=\"tabindex || 0\"\n (click)=\"!(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (keydown.enter)=\"!(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (keydown.space)=\"$event.preventDefault(); !(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : arialabel || 'Choose Date'\"\n role=\"button\">\n </div>\n}\n", dependencies: [{ kind: "component", type: dateTimePicker.DateTimePickerComponent, selector: "wm-datetimepicker", inputs: ["mode", "placement", "config", "minTime", "maxTime", "_displayFormat", "excludedDatesToDisable", "value", "excludedDaysToDisable", "displayFormat"], outputs: ["change"] }, { kind: "ngmodule", type: i2.IMaskModule }, { kind: "directive", type: i2__namespace.IMaskDirective, selector: "[imask]", inputs: ["imask", "unmask", "imaskElement"], outputs: ["accept", "complete"], exportAs: ["imask"] }, { kind: "ngmodule", type: i3.BsDatepickerModule }, { kind: "directive", type: i3__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: i3__namespace.BsDatepickerInputDirective, selector: "input[bsDatepicker]" }] }); }
|
|
498
|
-
}
|
|
499
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: DateComponent, decorators: [{
|
|
500
|
-
type: i0.Component,
|
|
501
|
-
args: [{ standalone: true, imports: [dateTimePicker.DateTimePickerComponent, i2.IMaskModule, i3.BsDatepickerModule], selector: '[wmDate]', providers: [
|
|
502
|
-
base.provideAs(DateComponent, forms.NG_VALUE_ACCESSOR, true),
|
|
503
|
-
base.provideAs(DateComponent, forms.NG_VALIDATORS, true),
|
|
504
|
-
base.provideAsWidgetRef(DateComponent)
|
|
505
|
-
], template: "<input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n #dateInput\n [imask]=\"mask\"\n [unmask]=\"true\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event); updateIMask()\"\n (blur)=\"onInputBlur($event)\"\n [disabled]=\"disabled || readonly\"\n [autofocus]=\"autofocus\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (change)=\"onDisplayDateChange($event)\"\n (keydown)=\"_triggeredByUser = true; onDisplayKeydown($event);\">\n\n<span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"loadNativeDateInput ? '-1' : tabindex\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [disabled]=\"disabled || readonly\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n</span>\n<div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n [tabindex]=\"-1\"\n [attr.aria-hidden]=\"!!loadNativeDateInput\"\n [container]=\"containerTarget || '.wm-app'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isOpen\"\n #datepicker=\"bsDatepicker\"\n bsDatepicker\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n placement=\"bottom right\"\n [isDisabled]=\"disabled || readonly\"\n [bsValue]=\"bsDataValue\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n (bsValueChange)=\"onDateChange($event)\">\n</div>\n\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode=\"DATE\"\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDataValue\"\n (change)=\"onDateChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n [tabindex]=\"tabindex || 0\"\n (click)=\"!(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (keydown.enter)=\"!(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (keydown.space)=\"$event.preventDefault(); !(disabled || readonly) && showDatePickerModal(bsDataValue)\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : arialabel || 'Choose Date'\"\n role=\"button\">\n </div>\n}\n" }]
|
|
506
|
-
}], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.AppDefaults }, { type: undefined, decorators: [{
|
|
507
|
-
type: i0.Inject,
|
|
508
|
-
args: ['EXPLICIT_CONTEXT']
|
|
509
|
-
}, {
|
|
510
|
-
type: i0.Optional
|
|
511
|
-
}] }], propDecorators: { bsDatePickerDirective: [{
|
|
512
|
-
type: i0.ViewChild,
|
|
513
|
-
args: [i3.BsDatepickerDirective]
|
|
514
|
-
}], imask: [{
|
|
515
|
-
type: i0.ViewChild,
|
|
516
|
-
args: ['dateInput', { read: i2.IMaskDirective }]
|
|
517
|
-
}] } });
|
|
518
|
-
|
|
519
|
-
exports.DateComponent = DateComponent;
|
|
625
|
+
exports.DateComponent = DateComponent;
|
|
520
626
|
|
|
521
627
|
}));
|