@wavemaker/app-ng-runtime 11.13.0-rc.6255 → 11.14.0-rc.232

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