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

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 (1024) 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 +4272 -4243
  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/widgets/common/container/container.directive.mjs +154 -1
  50. package/components/base/esm2022/widgets/common/container/container.props.mjs +7 -2
  51. package/components/base/esm2022/widgets/common/redraw/redrawable.directive.mjs +1 -1
  52. package/components/base/fesm2022/index.mjs +4280 -4251
  53. package/components/base/fesm2022/index.mjs.map +1 -1
  54. package/components/base/package.json +2 -2
  55. package/components/base/pipes/custom-pipes.d.ts +4 -2
  56. package/components/base/pipes/wm-pipe.d.ts +1 -1
  57. package/components/base/public_api.d.ts +0 -1
  58. package/components/base/widgets/common/container/container.directive.d.ts +9 -0
  59. package/components/base/widgets/common/pull-to-refresh/pull-to-refresh.d.ts +0 -2
  60. package/components/basic/anchor/bundles/index.umd.js +192 -0
  61. package/components/basic/anchor/esm2022/anchor.component.mjs +143 -0
  62. package/components/basic/anchor/esm2022/anchor.props.mjs +27 -0
  63. package/components/basic/anchor/esm2022/index.mjs +5 -0
  64. package/components/basic/anchor/esm2022/public_api.mjs +2 -0
  65. package/components/basic/anchor/fesm2022/index.mjs +175 -0
  66. package/components/basic/anchor/fesm2022/index.mjs.map +1 -0
  67. package/components/basic/{progress → anchor}/index.d.ts +1 -1
  68. package/components/basic/{default → anchor}/package.json +1 -4
  69. package/components/basic/anchor/public_api.d.ts +1 -0
  70. package/components/basic/audio/bundles/index.umd.js +83 -0
  71. package/components/basic/audio/esm2022/audio.component.mjs +41 -0
  72. package/components/basic/audio/esm2022/audio.props.mjs +19 -0
  73. package/components/{input/epoch → basic/audio}/esm2022/index.mjs +1 -1
  74. package/components/basic/audio/esm2022/public_api.mjs +2 -0
  75. package/components/basic/audio/fesm2022/index.mjs +65 -0
  76. package/components/basic/audio/fesm2022/index.mjs.map +1 -0
  77. package/components/{input/epoch → basic/audio}/index.d.ts +1 -1
  78. package/components/{input/default → basic/audio}/package.json +2 -5
  79. package/components/basic/audio/public_api.d.ts +1 -0
  80. package/components/basic/html/bundles/index.umd.js +110 -0
  81. package/components/basic/html/esm2022/html.directive.mjs +76 -0
  82. package/components/basic/html/esm2022/html.props.mjs +12 -0
  83. package/components/basic/html/esm2022/index.mjs +5 -0
  84. package/components/basic/html/esm2022/public_api.mjs +2 -0
  85. package/components/basic/html/fesm2022/index.mjs +93 -0
  86. package/components/basic/html/fesm2022/index.mjs.map +1 -0
  87. package/components/basic/{default → html}/index.d.ts +1 -1
  88. package/components/{input/epoch → basic/html}/package.json +1 -4
  89. package/components/basic/html/public_api.d.ts +1 -0
  90. package/components/basic/icon/bundles/index.umd.js +80 -0
  91. package/components/basic/icon/esm2022/icon.component.mjs +38 -0
  92. package/components/basic/icon/esm2022/icon.props.mjs +19 -0
  93. package/components/basic/icon/esm2022/index.mjs +5 -0
  94. package/components/basic/icon/esm2022/public_api.mjs +2 -0
  95. package/components/basic/icon/fesm2022/index.mjs +62 -0
  96. package/components/basic/icon/fesm2022/index.mjs.map +1 -0
  97. package/components/{input/default → basic/icon}/index.d.ts +1 -1
  98. package/components/basic/{progress → icon}/package.json +1 -4
  99. package/components/basic/icon/public_api.d.ts +1 -0
  100. package/components/basic/iframe/.npmignore +2 -0
  101. package/components/basic/iframe/bundles/index.umd.js +101 -0
  102. package/components/basic/iframe/esm2022/iframe.component.mjs +65 -0
  103. package/components/basic/iframe/esm2022/iframe.props.mjs +15 -0
  104. package/components/basic/iframe/esm2022/index.mjs +5 -0
  105. package/components/basic/iframe/esm2022/public_api.mjs +2 -0
  106. package/components/basic/iframe/fesm2022/index.mjs +84 -0
  107. package/components/basic/iframe/fesm2022/index.mjs.map +1 -0
  108. package/components/basic/iframe/index.d.ts +5 -0
  109. package/components/basic/iframe/package.json +20 -0
  110. package/components/basic/iframe/public_api.d.ts +1 -0
  111. package/components/basic/label/.npmignore +2 -0
  112. package/components/basic/label/bundles/index.umd.js +109 -0
  113. package/components/basic/label/esm2022/index.mjs +5 -0
  114. package/components/basic/label/esm2022/label.directive.mjs +71 -0
  115. package/components/basic/label/esm2022/label.props.mjs +17 -0
  116. package/components/basic/label/esm2022/public_api.mjs +2 -0
  117. package/components/basic/label/fesm2022/index.mjs +93 -0
  118. package/components/basic/label/fesm2022/index.mjs.map +1 -0
  119. package/components/basic/label/index.d.ts +5 -0
  120. package/components/basic/{default/label → label}/label.directive.d.ts +1 -1
  121. package/components/basic/label/package.json +20 -0
  122. package/components/basic/label/public_api.d.ts +1 -0
  123. package/components/basic/picture/.npmignore +2 -0
  124. package/components/basic/picture/bundles/index.umd.js +138 -0
  125. package/components/basic/{default → picture}/esm2022/index.mjs +1 -1
  126. package/components/basic/picture/esm2022/picture.directive.mjs +93 -0
  127. package/components/basic/picture/esm2022/picture.props.mjs +23 -0
  128. package/components/basic/picture/esm2022/public_api.mjs +2 -0
  129. package/components/basic/picture/fesm2022/index.mjs +121 -0
  130. package/components/basic/picture/fesm2022/index.mjs.map +1 -0
  131. package/components/basic/picture/index.d.ts +5 -0
  132. package/components/basic/picture/package.json +20 -0
  133. package/components/basic/picture/public_api.d.ts +1 -0
  134. package/components/basic/progress/progress-bar/.npmignore +2 -0
  135. package/components/basic/progress/progress-bar/bundles/index.umd.js +170 -0
  136. package/components/basic/progress/progress-bar/esm2022/index.mjs +5 -0
  137. package/components/basic/progress/progress-bar/esm2022/progress-bar.component.mjs +130 -0
  138. package/components/basic/progress/{esm2022/progress-bar → progress-bar/esm2022}/progress-bar.props.mjs +1 -1
  139. package/components/basic/progress/progress-bar/esm2022/public_api.mjs +2 -0
  140. package/components/basic/progress/progress-bar/fesm2022/index.mjs +154 -0
  141. package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -0
  142. package/components/basic/progress/progress-bar/index.d.ts +5 -0
  143. package/components/basic/progress/progress-bar/package.json +20 -0
  144. package/components/basic/progress/progress-bar/public_api.d.ts +1 -0
  145. package/components/basic/progress/progress-circle/.npmignore +2 -0
  146. package/components/basic/progress/progress-circle/bundles/index.umd.js +161 -0
  147. package/components/basic/progress/progress-circle/esm2022/index.mjs +5 -0
  148. package/components/basic/progress/progress-circle/esm2022/progress-circle.component.mjs +120 -0
  149. package/components/basic/progress/{esm2022/progress-circle → progress-circle/esm2022}/progress-circle.props.mjs +1 -1
  150. package/components/basic/progress/progress-circle/esm2022/public_api.mjs +2 -0
  151. package/components/basic/progress/progress-circle/fesm2022/index.mjs +145 -0
  152. package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -0
  153. package/components/basic/progress/progress-circle/index.d.ts +5 -0
  154. package/components/basic/progress/progress-circle/package.json +20 -0
  155. package/components/basic/progress/progress-circle/public_api.d.ts +1 -0
  156. package/components/basic/progress/progress-utils/.npmignore +2 -0
  157. package/components/basic/progress/progress-utils/bundles/index.umd.js +35 -0
  158. package/components/basic/progress/progress-utils/esm2022/index.mjs +5 -0
  159. package/components/basic/progress/progress-utils/esm2022/progress-utils.mjs +25 -0
  160. package/components/basic/progress/progress-utils/esm2022/public_api.mjs +2 -0
  161. package/components/basic/progress/progress-utils/fesm2022/index.mjs +32 -0
  162. package/components/basic/progress/progress-utils/fesm2022/index.mjs.map +1 -0
  163. package/components/basic/progress/progress-utils/index.d.ts +5 -0
  164. package/components/basic/progress/progress-utils/package.json +20 -0
  165. package/components/basic/progress/progress-utils/public_api.d.ts +1 -0
  166. package/components/basic/rich-text-editor/bundles/index.umd.js +23 -40
  167. package/components/basic/rich-text-editor/esm2022/rich-text-editor.component.mjs +19 -38
  168. package/components/basic/rich-text-editor/fesm2022/index.mjs +21 -39
  169. package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
  170. package/components/basic/rich-text-editor/package.json +0 -3
  171. package/components/basic/rich-text-editor/rich-text-editor.component.d.ts +1 -1
  172. package/components/basic/search/bundles/index.umd.js +109 -313
  173. package/components/basic/search/esm2022/scrollable.directive.mjs +13 -14
  174. package/components/basic/search/esm2022/search.component.mjs +40 -246
  175. package/components/basic/search/fesm2022/index.mjs +52 -256
  176. package/components/basic/search/fesm2022/index.mjs.map +1 -1
  177. package/components/basic/search/package.json +0 -3
  178. package/components/basic/search/scrollable.directive.d.ts +2 -3
  179. package/components/basic/search/search.component.d.ts +1 -1
  180. package/components/basic/spinner/.npmignore +2 -0
  181. package/components/basic/spinner/bundles/index.umd.js +118 -0
  182. package/components/{input/default → basic/spinner}/esm2022/index.mjs +1 -1
  183. package/components/basic/spinner/esm2022/public_api.mjs +2 -0
  184. package/components/basic/spinner/esm2022/spinner.component.mjs +79 -0
  185. package/components/basic/spinner/esm2022/spinner.props.mjs +20 -0
  186. package/components/basic/spinner/fesm2022/index.mjs +103 -0
  187. package/components/basic/spinner/fesm2022/index.mjs.map +1 -0
  188. package/components/basic/spinner/index.d.ts +5 -0
  189. package/components/basic/spinner/package.json +20 -0
  190. package/components/basic/spinner/public_api.d.ts +1 -0
  191. package/components/basic/tree/bundles/index.umd.js +34 -38
  192. package/components/basic/tree/esm2022/tree.component.mjs +31 -36
  193. package/components/basic/tree/fesm2022/index.mjs +32 -36
  194. package/components/basic/tree/fesm2022/index.mjs.map +1 -1
  195. package/components/basic/tree/package.json +0 -3
  196. package/components/basic/video/.npmignore +2 -0
  197. package/components/basic/video/bundles/index.umd.js +116 -0
  198. package/components/basic/video/esm2022/index.mjs +5 -0
  199. package/components/basic/video/esm2022/public_api.mjs +2 -0
  200. package/components/basic/video/esm2022/video.component.mjs +70 -0
  201. package/components/basic/video/esm2022/video.props.mjs +24 -0
  202. package/components/basic/video/fesm2022/index.mjs +99 -0
  203. package/components/basic/video/fesm2022/index.mjs.map +1 -0
  204. package/components/basic/video/index.d.ts +5 -0
  205. package/components/basic/video/package.json +20 -0
  206. package/components/basic/video/public_api.d.ts +1 -0
  207. package/components/chart/bundles/index.umd.js +22 -75
  208. package/components/chart/esm2022/chart.component.mjs +20 -74
  209. package/components/chart/fesm2022/index.mjs +21 -74
  210. package/components/chart/fesm2022/index.mjs.map +1 -1
  211. package/components/chart/package.json +0 -3
  212. package/components/containers/accordion/bundles/index.umd.js +45 -100
  213. package/components/containers/accordion/esm2022/accordion-pane/accordion-pane.component.mjs +19 -70
  214. package/components/containers/accordion/esm2022/accordion.directive.mjs +24 -29
  215. package/components/containers/accordion/fesm2022/index.mjs +43 -98
  216. package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
  217. package/components/containers/accordion/package.json +0 -3
  218. package/components/containers/layout-grid/bundles/index.umd.js +60 -60
  219. package/components/containers/layout-grid/esm2022/layout-grid-column/layout-grid-column.directive.mjs +23 -23
  220. package/components/containers/layout-grid/esm2022/layout-grid-row/layout-grid-row.directive.mjs +20 -20
  221. package/components/containers/layout-grid/esm2022/layout-grid.directive.mjs +20 -20
  222. package/components/containers/layout-grid/fesm2022/index.mjs +61 -61
  223. package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
  224. package/components/containers/layout-grid/package.json +0 -3
  225. package/components/containers/linear-layout/bundles/index.umd.js +38 -38
  226. package/components/containers/linear-layout/esm2022/linear-layout-item/linear-layout-item.directive.mjs +20 -20
  227. package/components/containers/linear-layout/esm2022/linear-layout.directive.mjs +20 -20
  228. package/components/containers/linear-layout/fesm2022/index.mjs +39 -39
  229. package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
  230. package/components/containers/linear-layout/package.json +0 -3
  231. package/components/containers/panel/bundles/index.umd.js +62 -223
  232. package/components/containers/panel/esm2022/panel.component.mjs +29 -190
  233. package/components/containers/panel/fesm2022/index.mjs +29 -190
  234. package/components/containers/panel/fesm2022/index.mjs.map +1 -1
  235. package/components/containers/panel/package.json +0 -3
  236. package/components/containers/tabs/bundles/index.umd.js +95 -204
  237. package/components/containers/tabs/esm2022/tab-pane/tab-pane.component.mjs +34 -51
  238. package/components/containers/tabs/esm2022/tabs.component.mjs +29 -123
  239. package/components/containers/tabs/fesm2022/index.mjs +61 -170
  240. package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
  241. package/components/containers/tabs/package.json +0 -3
  242. package/components/containers/tabs/tab-pane/tab-pane.component.d.ts +3 -4
  243. package/components/containers/tile/bundles/index.umd.js +19 -19
  244. package/components/containers/tile/esm2022/tile.directive.mjs +20 -20
  245. package/components/containers/tile/fesm2022/index.mjs +20 -20
  246. package/components/containers/tile/fesm2022/index.mjs.map +1 -1
  247. package/components/containers/tile/package.json +0 -3
  248. package/components/containers/wizard/bundles/index.umd.js +119 -302
  249. package/components/containers/wizard/esm2022/wizard-action/wizard-action.directive.mjs +21 -21
  250. package/components/containers/wizard/esm2022/wizard-step/wizard-step.component.mjs +32 -45
  251. package/components/containers/wizard/esm2022/wizard.component.mjs +30 -201
  252. package/components/containers/wizard/fesm2022/index.mjs +81 -264
  253. package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
  254. package/components/containers/wizard/package.json +0 -3
  255. package/components/containers/wizard/wizard.component.d.ts +1 -1
  256. package/components/data/card/bundles/index.umd.js +108 -208
  257. package/components/data/card/esm2022/card-actions/card-actions.directive.mjs +15 -15
  258. package/components/data/card/esm2022/card-content/card-content.component.mjs +19 -34
  259. package/components/data/card/esm2022/card-footer/card-footer.directive.mjs +15 -15
  260. package/components/data/card/esm2022/card.component.mjs +21 -107
  261. package/components/data/card/fesm2022/index.mjs +67 -167
  262. package/components/data/card/fesm2022/index.mjs.map +1 -1
  263. package/components/data/card/package.json +0 -3
  264. package/components/data/form/bundles/index.umd.js +287 -467
  265. package/components/data/form/esm2022/form-action/form-action.directive.mjs +22 -22
  266. package/components/data/form/esm2022/form-field/form-field.directive.mjs +80 -91
  267. package/components/data/form/esm2022/form-widget.directive.mjs +31 -31
  268. package/components/data/form/esm2022/form.component.mjs +88 -251
  269. package/components/data/form/esm2022/form.props.mjs +1 -1
  270. package/components/data/form/esm2022/live-actions/dependson.directive.mjs +19 -24
  271. package/components/data/form/esm2022/live-actions/live-actions.directive.mjs +15 -15
  272. package/components/data/form/esm2022/live-filter/live-filter.directive.mjs +15 -15
  273. package/components/data/form/esm2022/live-form/live-form.directive.mjs +23 -25
  274. package/components/data/form/fesm2022/index.mjs +288 -468
  275. package/components/data/form/fesm2022/index.mjs.map +1 -1
  276. package/components/data/form/package.json +0 -3
  277. package/components/data/list/bundles/index.umd.js +80 -360
  278. package/components/data/list/esm2022/list-item.directive.mjs +27 -34
  279. package/components/data/list/esm2022/list.animator.mjs +1 -1
  280. package/components/data/list/esm2022/list.component.mjs +55 -330
  281. package/components/data/list/esm2022/list.props.mjs +1 -1
  282. package/components/data/list/fesm2022/index.mjs +79 -358
  283. package/components/data/list/fesm2022/index.mjs.map +1 -1
  284. package/components/data/list/list-item.directive.d.ts +3 -3
  285. package/components/data/list/list.component.d.ts +2 -4
  286. package/components/data/list/package.json +0 -3
  287. package/components/data/live-table/bundles/index.umd.js +28 -39
  288. package/components/data/live-table/esm2022/live-table.component.mjs +25 -37
  289. package/components/data/live-table/fesm2022/index.mjs +26 -37
  290. package/components/data/live-table/fesm2022/index.mjs.map +1 -1
  291. package/components/data/live-table/package.json +0 -3
  292. package/components/data/pagination/bundles/index.umd.js +33 -505
  293. package/components/data/pagination/esm2022/pagination.component.mjs +33 -507
  294. package/components/data/pagination/esm2022/pagination.props.mjs +1 -1
  295. package/components/data/pagination/fesm2022/index.mjs +32 -505
  296. package/components/data/pagination/fesm2022/index.mjs.map +1 -1
  297. package/components/data/pagination/package.json +0 -3
  298. package/components/data/pagination/pagination.component.d.ts +1 -1
  299. package/components/data/table/bundles/index.umd.js +310 -457
  300. package/components/data/table/esm2022/table-action/table-action.directive.mjs +22 -22
  301. package/components/data/table/esm2022/table-column/table-column.directive.mjs +50 -71
  302. package/components/data/table/esm2022/table-column/table-column.props.mjs +1 -1
  303. package/components/data/table/esm2022/table-column-group/table-column-group.directive.mjs +26 -26
  304. package/components/data/table/esm2022/table-cud.directive.mjs +15 -15
  305. package/components/data/table/esm2022/table-filter.directive.mjs +16 -16
  306. package/components/data/table/esm2022/table-row/table-row.directive.mjs +24 -24
  307. package/components/data/table/esm2022/table-row-action/table-row-action.directive.mjs +29 -29
  308. package/components/data/table/esm2022/table.component.mjs +135 -263
  309. package/components/data/table/esm2022/table.props.mjs +2 -1
  310. package/components/data/table/fesm2022/index.mjs +312 -459
  311. package/components/data/table/fesm2022/index.mjs.map +1 -1
  312. package/components/data/table/package.json +0 -3
  313. package/components/data/table/table-column/table-column.directive.d.ts +1 -1
  314. package/components/data/table/table.component.d.ts +3 -0
  315. package/components/dialogs/alert-dialog/bundles/index.umd.js +50 -79
  316. package/components/dialogs/alert-dialog/esm2022/alert-dialog.component.mjs +32 -62
  317. package/components/dialogs/alert-dialog/fesm2022/index.mjs +32 -61
  318. package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
  319. package/components/dialogs/alert-dialog/package.json +0 -3
  320. package/components/dialogs/confirm-dialog/bundles/index.umd.js +36 -72
  321. package/components/dialogs/confirm-dialog/esm2022/confirm-dialog.component.mjs +34 -71
  322. package/components/dialogs/confirm-dialog/fesm2022/index.mjs +35 -71
  323. package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
  324. package/components/dialogs/confirm-dialog/package.json +0 -3
  325. package/components/dialogs/default/bundles/index.umd.js +85 -232
  326. package/components/dialogs/default/esm2022/base-dialog.mjs +14 -14
  327. package/components/dialogs/default/esm2022/dialog-body/dialog-body.directive.mjs +16 -18
  328. package/components/dialogs/default/esm2022/dialog-footer/dialog-footer.directive.mjs +20 -20
  329. package/components/dialogs/default/esm2022/dialog-header/dialog-header.component.mjs +34 -179
  330. package/components/dialogs/default/fesm2022/index.mjs +80 -227
  331. package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  332. package/components/dialogs/default/package.json +0 -3
  333. package/components/dialogs/design-dialog/bundles/index.umd.js +52 -108
  334. package/components/dialogs/design-dialog/esm2022/dialog.component.mjs +50 -107
  335. package/components/dialogs/design-dialog/fesm2022/index.mjs +51 -107
  336. package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
  337. package/components/dialogs/design-dialog/package.json +0 -3
  338. package/components/dialogs/iframe-dialog/bundles/index.umd.js +33 -81
  339. package/components/dialogs/iframe-dialog/esm2022/iframe-dialog.component.mjs +32 -82
  340. package/components/dialogs/iframe-dialog/fesm2022/index.mjs +33 -82
  341. package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
  342. package/components/dialogs/iframe-dialog/package.json +0 -3
  343. package/components/dialogs/login-dialog/bundles/index.umd.js +22 -29
  344. package/components/dialogs/login-dialog/esm2022/login-dialog.directive.mjs +23 -30
  345. package/components/dialogs/login-dialog/fesm2022/index.mjs +23 -30
  346. package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
  347. package/components/dialogs/login-dialog/package.json +0 -3
  348. package/components/dialogs/partial-dialog/bundles/index.umd.js +39 -85
  349. package/components/dialogs/partial-dialog/esm2022/partial-dialog.component.mjs +38 -85
  350. package/components/dialogs/partial-dialog/fesm2022/index.mjs +39 -85
  351. package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
  352. package/components/dialogs/partial-dialog/package.json +0 -3
  353. package/components/input/base-form/.npmignore +2 -0
  354. package/components/input/base-form/bundles/index.umd.js +133 -0
  355. package/components/input/base-form/esm2022/base-form.component.mjs +110 -0
  356. package/components/input/base-form/esm2022/index.mjs +5 -0
  357. package/components/input/base-form/esm2022/public_api.mjs +2 -0
  358. package/components/input/base-form/fesm2022/index.mjs +117 -0
  359. package/components/input/base-form/fesm2022/index.mjs.map +1 -0
  360. package/components/input/base-form/index.d.ts +5 -0
  361. package/components/input/base-form/package.json +20 -0
  362. package/components/input/base-form/public_api.d.ts +1 -0
  363. package/components/input/base-form-custom/.npmignore +2 -0
  364. package/components/input/{default → base-form-custom}/base-form-custom.component.d.ts +1 -1
  365. package/components/input/base-form-custom/bundles/index.umd.js +118 -0
  366. package/components/input/base-form-custom/esm2022/base-form-custom.component.mjs +94 -0
  367. package/components/input/base-form-custom/esm2022/index.mjs +5 -0
  368. package/components/input/base-form-custom/esm2022/public_api.mjs +2 -0
  369. package/components/input/base-form-custom/fesm2022/index.mjs +101 -0
  370. package/components/input/base-form-custom/fesm2022/index.mjs.map +1 -0
  371. package/components/input/base-form-custom/index.d.ts +5 -0
  372. package/components/input/base-form-custom/package.json +20 -0
  373. package/components/input/base-form-custom/public_api.d.ts +1 -0
  374. package/components/input/button/.npmignore +2 -0
  375. package/components/input/button/bundles/index.umd.js +98 -0
  376. package/components/input/button/esm2022/button.component.mjs +50 -0
  377. package/components/input/button/esm2022/button.props.mjs +26 -0
  378. package/components/input/button/esm2022/index.mjs +5 -0
  379. package/components/input/button/esm2022/public_api.mjs +2 -0
  380. package/components/input/button/fesm2022/index.mjs +81 -0
  381. package/components/input/button/fesm2022/index.mjs.map +1 -0
  382. package/components/input/button/index.d.ts +5 -0
  383. package/components/input/button/package.json +20 -0
  384. package/components/input/button/public_api.d.ts +1 -0
  385. package/components/input/button-group/.npmignore +2 -0
  386. package/components/input/button-group/bundles/index.umd.js +80 -0
  387. package/components/input/button-group/esm2022/button-group.directive.mjs +47 -0
  388. package/components/input/button-group/esm2022/button-group.props.mjs +10 -0
  389. package/components/input/button-group/esm2022/index.mjs +5 -0
  390. package/components/input/button-group/esm2022/public_api.mjs +2 -0
  391. package/components/input/button-group/fesm2022/index.mjs +62 -0
  392. package/components/input/button-group/fesm2022/index.mjs.map +1 -0
  393. package/components/input/button-group/index.d.ts +5 -0
  394. package/components/input/button-group/package.json +20 -0
  395. package/components/input/button-group/public_api.d.ts +1 -0
  396. package/components/input/calendar/bundles/index.umd.js +25 -38
  397. package/components/input/calendar/esm2022/calendar.component.mjs +22 -36
  398. package/components/input/calendar/fesm2022/index.mjs +23 -36
  399. package/components/input/calendar/fesm2022/index.mjs.map +1 -1
  400. package/components/input/calendar/package.json +0 -3
  401. package/components/input/caption-position/.npmignore +2 -0
  402. package/components/input/caption-position/bundles/index.umd.js +196 -0
  403. package/components/input/caption-position/esm2022/caption-position.directive.mjs +172 -0
  404. package/components/input/caption-position/esm2022/index.mjs +5 -0
  405. package/components/input/caption-position/esm2022/public_api.mjs +2 -0
  406. package/components/input/caption-position/fesm2022/index.mjs +178 -0
  407. package/components/input/caption-position/fesm2022/index.mjs.map +1 -0
  408. package/components/input/caption-position/index.d.ts +5 -0
  409. package/components/input/caption-position/package.json +20 -0
  410. package/components/input/caption-position/public_api.d.ts +1 -0
  411. package/components/input/checkbox/.npmignore +2 -0
  412. package/components/input/checkbox/bundles/index.umd.js +190 -0
  413. package/components/input/{default/checkbox → checkbox}/checkbox.component.d.ts +1 -1
  414. package/components/input/checkbox/esm2022/checkbox.component.mjs +145 -0
  415. package/components/input/checkbox/esm2022/checkbox.props.mjs +27 -0
  416. package/components/{basic/progress → input/checkbox}/esm2022/index.mjs +1 -1
  417. package/components/input/checkbox/esm2022/public_api.mjs +2 -0
  418. package/components/input/checkbox/fesm2022/index.mjs +175 -0
  419. package/components/input/checkbox/fesm2022/index.mjs.map +1 -0
  420. package/components/input/checkbox/index.d.ts +5 -0
  421. package/components/input/checkbox/package.json +20 -0
  422. package/components/input/checkbox/public_api.d.ts +1 -0
  423. package/components/input/checkboxset/.npmignore +2 -0
  424. package/components/input/checkboxset/bundles/index.umd.js +151 -0
  425. package/components/input/{default/checkboxset → checkboxset}/checkboxset.component.d.ts +1 -1
  426. package/components/input/checkboxset/esm2022/checkboxset.component.mjs +99 -0
  427. package/components/input/checkboxset/esm2022/checkboxset.props.mjs +35 -0
  428. package/components/input/checkboxset/esm2022/index.mjs +5 -0
  429. package/components/input/checkboxset/esm2022/public_api.mjs +2 -0
  430. package/components/input/checkboxset/fesm2022/index.mjs +138 -0
  431. package/components/input/checkboxset/fesm2022/index.mjs.map +1 -0
  432. package/components/input/checkboxset/index.d.ts +5 -0
  433. package/components/input/checkboxset/package.json +20 -0
  434. package/components/input/checkboxset/public_api.d.ts +1 -0
  435. package/components/input/chips/bundles/index.umd.js +94 -153
  436. package/components/input/chips/chips.component.d.ts +1 -1
  437. package/components/input/chips/esm2022/chips.component.mjs +41 -101
  438. package/components/input/chips/fesm2022/index.mjs +42 -101
  439. package/components/input/chips/fesm2022/index.mjs.map +1 -1
  440. package/components/input/chips/package.json +0 -3
  441. package/components/input/color-picker/bundles/index.umd.js +35 -74
  442. package/components/input/color-picker/color-picker.component.d.ts +2 -2
  443. package/components/input/color-picker/esm2022/color-picker.component.mjs +34 -75
  444. package/components/input/color-picker/fesm2022/index.mjs +36 -75
  445. package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
  446. package/components/input/color-picker/package.json +0 -3
  447. package/components/input/composite/.npmignore +2 -0
  448. package/components/input/composite/bundles/index.umd.js +111 -0
  449. package/components/input/composite/esm2022/composite.directive.mjs +79 -0
  450. package/components/input/composite/esm2022/composite.props.mjs +10 -0
  451. package/components/input/composite/esm2022/index.mjs +5 -0
  452. package/components/input/composite/esm2022/public_api.mjs +2 -0
  453. package/components/input/composite/fesm2022/index.mjs +94 -0
  454. package/components/input/composite/fesm2022/index.mjs.map +1 -0
  455. package/components/input/composite/index.d.ts +5 -0
  456. package/components/input/composite/package.json +20 -0
  457. package/components/input/composite/public_api.d.ts +1 -0
  458. package/components/input/currency/bundles/index.umd.js +31 -52
  459. package/components/input/currency/currency.component.d.ts +1 -1
  460. package/components/input/currency/esm2022/currency.component.mjs +28 -50
  461. package/components/input/currency/fesm2022/index.mjs +30 -51
  462. package/components/input/currency/fesm2022/index.mjs.map +1 -1
  463. package/components/input/currency/package.json +0 -3
  464. package/components/input/dataset-aware-form/.npmignore +2 -0
  465. package/components/input/dataset-aware-form/bundles/index.umd.js +328 -0
  466. package/components/input/{default → dataset-aware-form}/dataset-aware-form.component.d.ts +1 -1
  467. package/components/input/dataset-aware-form/esm2022/dataset-aware-form.component.mjs +307 -0
  468. package/components/input/dataset-aware-form/esm2022/index.mjs +5 -0
  469. package/components/input/dataset-aware-form/esm2022/public_api.mjs +2 -0
  470. package/components/input/dataset-aware-form/fesm2022/index.mjs +314 -0
  471. package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -0
  472. package/components/input/dataset-aware-form/index.d.ts +5 -0
  473. package/components/input/dataset-aware-form/package.json +20 -0
  474. package/components/input/dataset-aware-form/public_api.d.ts +1 -0
  475. package/components/input/epoch/base-date-time/.npmignore +2 -0
  476. package/components/input/epoch/{base-date-time.component.d.ts → base-date-time/base-date-time.component.d.ts} +1 -1
  477. package/components/input/epoch/base-date-time/bundles/index.umd.js +1086 -0
  478. package/components/input/epoch/{esm2022 → base-date-time/esm2022}/base-date-time.component.mjs +22 -31
  479. package/components/input/epoch/base-date-time/esm2022/index.mjs +5 -0
  480. package/components/input/epoch/base-date-time/esm2022/public_api.mjs +2 -0
  481. package/components/input/epoch/base-date-time/fesm2022/index.mjs +1077 -0
  482. package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -0
  483. package/components/input/epoch/base-date-time/index.d.ts +5 -0
  484. package/components/input/epoch/base-date-time/package.json +20 -0
  485. package/components/input/epoch/base-date-time/public_api.d.ts +1 -0
  486. package/components/input/epoch/date/.npmignore +2 -0
  487. package/components/input/epoch/date/bundles/index.umd.js +492 -0
  488. package/components/input/epoch/date/date.component.d.ts +2 -2
  489. package/components/input/epoch/date/esm2022/date.component.mjs +322 -0
  490. package/components/input/epoch/{esm2022/date → date/esm2022}/date.props.mjs +1 -1
  491. package/components/input/epoch/{esm2022/date → date/esm2022}/imaskUtil.mjs +1 -1
  492. package/components/input/epoch/date/esm2022/index.mjs +5 -0
  493. package/components/input/epoch/date/esm2022/public_api.mjs +2 -0
  494. package/components/input/epoch/date/fesm2022/index.mjs +482 -0
  495. package/components/input/epoch/date/fesm2022/index.mjs.map +1 -0
  496. package/components/input/epoch/date/index.d.ts +5 -0
  497. package/components/input/epoch/date/package.json +20 -0
  498. package/components/input/epoch/date/public_api.d.ts +1 -0
  499. package/components/input/epoch/date-time/.npmignore +2 -0
  500. package/components/input/epoch/date-time/bundles/index.umd.js +518 -0
  501. package/components/input/epoch/date-time/date-time.component.d.ts +1 -1
  502. package/components/input/epoch/date-time/esm2022/date-time.component.mjs +458 -0
  503. package/components/input/epoch/{esm2022/date-time → date-time/esm2022}/date-time.props.mjs +1 -1
  504. package/components/input/epoch/date-time/esm2022/index.mjs +5 -0
  505. package/components/input/epoch/date-time/esm2022/public_api.mjs +2 -0
  506. package/components/input/epoch/date-time/fesm2022/index.mjs +509 -0
  507. package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -0
  508. package/components/input/epoch/date-time/index.d.ts +5 -0
  509. package/components/input/epoch/date-time/package.json +20 -0
  510. package/components/input/epoch/date-time/public_api.d.ts +1 -0
  511. package/components/input/epoch/date-time-picker/.npmignore +2 -0
  512. package/components/input/epoch/date-time-picker/bundles/index.umd.js +453 -0
  513. package/components/input/epoch/date-time-picker/esm2022/date-time-picker.component.mjs +433 -0
  514. package/components/input/epoch/date-time-picker/esm2022/index.mjs +5 -0
  515. package/components/input/epoch/date-time-picker/esm2022/public_api.mjs +2 -0
  516. package/components/input/epoch/date-time-picker/fesm2022/index.mjs +439 -0
  517. package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -0
  518. package/components/input/epoch/date-time-picker/index.d.ts +5 -0
  519. package/components/input/epoch/date-time-picker/package.json +20 -0
  520. package/components/input/epoch/date-time-picker/public_api.d.ts +1 -0
  521. package/components/input/epoch/picker/.npmignore +2 -0
  522. package/components/input/epoch/picker/bundles/index.umd.js +192 -0
  523. package/components/input/epoch/picker/esm2022/index.mjs +5 -0
  524. package/components/input/epoch/picker/esm2022/picker.component.mjs +165 -0
  525. package/components/input/epoch/picker/esm2022/public_api.mjs +3 -0
  526. package/components/input/epoch/picker/fesm2022/index.mjs +172 -0
  527. package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -0
  528. package/components/input/epoch/picker/index.d.ts +5 -0
  529. package/components/input/epoch/picker/package.json +20 -0
  530. package/components/input/epoch/picker/public_api.d.ts +2 -0
  531. package/components/input/epoch/time/.npmignore +2 -0
  532. package/components/input/epoch/time/bundles/index.umd.js +397 -0
  533. package/components/input/epoch/time/esm2022/index.mjs +5 -0
  534. package/components/input/epoch/time/esm2022/public_api.mjs +2 -0
  535. package/components/input/epoch/time/esm2022/time.component.mjs +348 -0
  536. package/components/input/epoch/{esm2022/time → time/esm2022}/time.props.mjs +1 -1
  537. package/components/input/epoch/time/fesm2022/index.mjs +387 -0
  538. package/components/input/epoch/time/fesm2022/index.mjs.map +1 -0
  539. package/components/input/epoch/time/index.d.ts +5 -0
  540. package/components/input/epoch/time/package.json +20 -0
  541. package/components/input/epoch/time/public_api.d.ts +1 -0
  542. package/components/input/epoch/time/time.component.d.ts +1 -1
  543. package/components/input/file-upload/bundles/index.umd.js +56 -348
  544. package/components/input/file-upload/esm2022/file-upload.component.mjs +20 -313
  545. package/components/input/file-upload/fesm2022/index.mjs +20 -312
  546. package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  547. package/components/input/file-upload/package.json +0 -3
  548. package/components/input/number/.npmignore +2 -0
  549. package/components/input/number/bundles/index.umd.js +101 -0
  550. package/components/input/number/esm2022/index.mjs +5 -0
  551. package/components/input/number/esm2022/number.component.mjs +49 -0
  552. package/components/input/number/esm2022/number.props.mjs +35 -0
  553. package/components/input/number/esm2022/public_api.mjs +2 -0
  554. package/components/input/number/fesm2022/index.mjs +87 -0
  555. package/components/input/number/fesm2022/index.mjs.map +1 -0
  556. package/components/input/number/index.d.ts +5 -0
  557. package/components/input/{default/number → number}/number.component.d.ts +1 -1
  558. package/components/input/number/package.json +20 -0
  559. package/components/input/number/public_api.d.ts +1 -0
  560. package/components/input/radioset/.npmignore +2 -0
  561. package/components/input/radioset/bundles/index.umd.js +136 -0
  562. package/components/input/radioset/esm2022/index.mjs +5 -0
  563. package/components/input/radioset/esm2022/public_api.mjs +2 -0
  564. package/components/input/radioset/esm2022/radioset.component.mjs +84 -0
  565. package/components/input/radioset/esm2022/radioset.props.mjs +35 -0
  566. package/components/input/radioset/fesm2022/index.mjs +123 -0
  567. package/components/input/radioset/fesm2022/index.mjs.map +1 -0
  568. package/components/input/radioset/index.d.ts +5 -0
  569. package/components/input/radioset/package.json +20 -0
  570. package/components/input/radioset/public_api.d.ts +1 -0
  571. package/components/input/{default/radioset → radioset}/radioset.component.d.ts +1 -1
  572. package/components/input/rating/bundles/index.umd.js +49 -103
  573. package/components/input/rating/esm2022/rating.component.mjs +24 -79
  574. package/components/input/rating/fesm2022/index.mjs +25 -79
  575. package/components/input/rating/fesm2022/index.mjs.map +1 -1
  576. package/components/input/rating/package.json +0 -3
  577. package/components/input/rating/rating.component.d.ts +1 -1
  578. package/components/input/select/.npmignore +2 -0
  579. package/components/input/select/bundles/index.umd.js +219 -0
  580. package/components/input/select/esm2022/index.mjs +5 -0
  581. package/components/input/select/esm2022/public_api.mjs +2 -0
  582. package/components/input/select/esm2022/select.component.mjs +166 -0
  583. package/components/input/select/esm2022/select.props.mjs +36 -0
  584. package/components/input/select/fesm2022/index.mjs +205 -0
  585. package/components/input/select/fesm2022/index.mjs.map +1 -0
  586. package/components/input/select/index.d.ts +5 -0
  587. package/components/input/select/package.json +20 -0
  588. package/components/input/select/public_api.d.ts +1 -0
  589. package/components/input/{default/select → select}/select.component.d.ts +1 -1
  590. package/components/input/slider/bundles/index.umd.js +44 -111
  591. package/components/input/slider/esm2022/slider.component.mjs +25 -95
  592. package/components/input/slider/esm2022/slider.props.mjs +1 -1
  593. package/components/input/slider/fesm2022/index.mjs +25 -93
  594. package/components/input/slider/fesm2022/index.mjs.map +1 -1
  595. package/components/input/slider/package.json +0 -3
  596. package/components/input/slider/slider.component.d.ts +2 -2
  597. package/components/input/switch/.npmignore +2 -0
  598. package/components/input/switch/bundles/index.umd.js +204 -0
  599. package/components/input/switch/esm2022/index.mjs +5 -0
  600. package/components/input/switch/esm2022/public_api.mjs +2 -0
  601. package/components/input/switch/esm2022/switch.component.mjs +159 -0
  602. package/components/input/switch/esm2022/switch.props.mjs +28 -0
  603. package/components/input/switch/fesm2022/index.mjs +191 -0
  604. package/components/input/switch/fesm2022/index.mjs.map +1 -0
  605. package/components/input/switch/index.d.ts +5 -0
  606. package/components/input/switch/package.json +20 -0
  607. package/components/input/switch/public_api.d.ts +1 -0
  608. package/components/input/{default/switch → switch}/switch.component.d.ts +1 -1
  609. package/components/input/text/.npmignore +2 -0
  610. package/components/input/{default/text/base → text/base-input}/base-input.d.ts +1 -1
  611. package/components/input/text/bundles/index.umd.js +1070 -0
  612. package/components/input/text/esm2022/base-input/base-input.mjs +93 -0
  613. package/components/input/text/esm2022/index.mjs +5 -0
  614. package/components/input/text/esm2022/input-calendar/input-calendar.component.mjs +46 -0
  615. package/components/input/text/esm2022/input-calendar/input-calendar.props.mjs +30 -0
  616. package/components/input/text/esm2022/input-color/input-color.component.mjs +46 -0
  617. package/components/input/text/esm2022/input-color/input-color.props.mjs +27 -0
  618. package/components/input/text/esm2022/input-email/input-email.component.mjs +46 -0
  619. package/components/input/text/esm2022/input-email/input-email.props.mjs +29 -0
  620. package/components/input/text/esm2022/input-number/input-number.component.mjs +56 -0
  621. package/components/input/text/esm2022/input-number/input-number.props.mjs +32 -0
  622. package/components/input/text/esm2022/input-text/input-text.component.mjs +121 -0
  623. package/components/input/text/esm2022/input-text/input-text.props.mjs +46 -0
  624. package/components/input/text/esm2022/number-locale/number-locale.mjs +539 -0
  625. package/components/input/text/esm2022/public_api.mjs +8 -0
  626. package/components/input/text/fesm2022/index.mjs +1054 -0
  627. package/components/input/text/fesm2022/index.mjs.map +1 -0
  628. package/components/input/text/index.d.ts +5 -0
  629. package/components/input/{default/text/calendar → text/input-calendar}/input-calendar.component.d.ts +1 -1
  630. package/components/input/{default/text/color → text/input-color}/input-color.component.d.ts +1 -1
  631. package/components/input/{default/text/email → text/input-email}/input-email.component.d.ts +1 -1
  632. package/components/input/{default/text/number → text/input-number}/input-number.component.d.ts +1 -1
  633. package/components/input/{default/text/text → text/input-text}/input-text.component.d.ts +1 -1
  634. package/components/input/{default/text/locale → text/number-locale}/number-locale.d.ts +1 -1
  635. package/components/input/text/package.json +20 -0
  636. package/components/input/text/public_api.d.ts +7 -0
  637. package/components/input/textarea/.npmignore +2 -0
  638. package/components/input/textarea/bundles/index.umd.js +101 -0
  639. package/components/input/textarea/esm2022/index.mjs +5 -0
  640. package/components/input/textarea/esm2022/public_api.mjs +2 -0
  641. package/components/input/textarea/esm2022/textarea.component.mjs +53 -0
  642. package/components/input/textarea/esm2022/textarea.props.mjs +30 -0
  643. package/components/input/textarea/fesm2022/index.mjs +87 -0
  644. package/components/input/textarea/fesm2022/index.mjs.map +1 -0
  645. package/components/input/textarea/index.d.ts +5 -0
  646. package/components/input/textarea/package.json +20 -0
  647. package/components/input/textarea/public_api.d.ts +1 -0
  648. package/components/input/{default/textarea → textarea}/textarea.component.d.ts +1 -1
  649. package/components/navigation/breadcrumb/bundles/index.umd.js +37 -79
  650. package/components/navigation/breadcrumb/esm2022/breadcrumb.component.mjs +20 -64
  651. package/components/navigation/breadcrumb/fesm2022/index.mjs +21 -64
  652. package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
  653. package/components/navigation/breadcrumb/package.json +0 -3
  654. package/components/navigation/menu/bundles/index.umd.js +247 -442
  655. package/components/navigation/menu/esm2022/menu-adapator.component.mjs +14 -19
  656. package/components/navigation/menu/esm2022/menu-dropdown/menu-dropdown.component.mjs +13 -29
  657. package/components/navigation/menu/esm2022/menu-dropdown-item/menu-dropdown-item.component.mjs +43 -100
  658. package/components/navigation/menu/esm2022/menu.component.mjs +53 -104
  659. package/components/navigation/menu/esm2022/nav/nav-item/nav-item.directive.mjs +30 -37
  660. package/components/navigation/menu/esm2022/nav/nav.component.mjs +20 -88
  661. package/components/navigation/menu/esm2022/nav/navigation-control.directive.mjs +14 -14
  662. package/components/navigation/menu/fesm2022/index.mjs +174 -369
  663. package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  664. package/components/navigation/menu/menu-dropdown/menu-dropdown.component.d.ts +2 -3
  665. package/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +3 -3
  666. package/components/navigation/menu/package.json +0 -3
  667. package/components/navigation/navbar/bundles/index.umd.js +32 -83
  668. package/components/navigation/navbar/esm2022/navbar.component.mjs +20 -72
  669. package/components/navigation/navbar/fesm2022/index.mjs +20 -71
  670. package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
  671. package/components/navigation/navbar/package.json +0 -3
  672. package/components/navigation/popover/bundles/index.umd.js +31 -59
  673. package/components/navigation/popover/esm2022/popover.component.mjs +29 -58
  674. package/components/navigation/popover/fesm2022/index.mjs +31 -59
  675. package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
  676. package/components/navigation/popover/package.json +0 -3
  677. package/components/page/default/bundles/index.umd.js +109 -123
  678. package/components/page/default/esm2022/content/content.component.mjs +16 -25
  679. package/components/page/default/esm2022/layout.directive.mjs +21 -21
  680. package/components/page/default/esm2022/page-content/page-content.component.mjs +16 -23
  681. package/components/page/default/esm2022/page.directive.mjs +21 -21
  682. package/components/page/default/esm2022/router-outlet.directive.mjs +20 -20
  683. package/components/page/default/esm2022/spa-page.directive.mjs +21 -21
  684. package/components/page/default/fesm2022/index.mjs +111 -125
  685. package/components/page/default/fesm2022/index.mjs.map +1 -1
  686. package/components/page/default/package.json +0 -3
  687. package/components/page/footer/bundles/index.umd.js +20 -20
  688. package/components/page/footer/esm2022/footer.directive.mjs +21 -21
  689. package/components/page/footer/fesm2022/index.mjs +21 -21
  690. package/components/page/footer/fesm2022/index.mjs.map +1 -1
  691. package/components/page/footer/package.json +0 -3
  692. package/components/page/header/bundles/index.umd.js +19 -26
  693. package/components/page/header/esm2022/header.component.mjs +16 -24
  694. package/components/page/header/fesm2022/index.mjs +17 -24
  695. package/components/page/header/fesm2022/index.mjs.map +1 -1
  696. package/components/page/header/package.json +0 -3
  697. package/components/page/left-panel/bundles/index.umd.js +30 -30
  698. package/components/page/left-panel/esm2022/left-panel.directive.mjs +31 -31
  699. package/components/page/left-panel/fesm2022/index.mjs +31 -31
  700. package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
  701. package/components/page/left-panel/package.json +0 -3
  702. package/components/page/right-panel/bundles/index.umd.js +23 -23
  703. package/components/page/right-panel/esm2022/right-panel.directive.mjs +24 -24
  704. package/components/page/right-panel/fesm2022/index.mjs +24 -24
  705. package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
  706. package/components/page/right-panel/package.json +0 -3
  707. package/components/page/top-nav/bundles/index.umd.js +20 -20
  708. package/components/page/top-nav/esm2022/top-nav.directive.mjs +21 -21
  709. package/components/page/top-nav/fesm2022/index.mjs +21 -21
  710. package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
  711. package/components/page/top-nav/package.json +0 -3
  712. package/components/prefab/bundles/index.umd.js +41 -41
  713. package/components/prefab/esm2022/prefab-container/prefab-container.directive.mjs +20 -20
  714. package/components/prefab/esm2022/prefab.directive.mjs +23 -23
  715. package/components/prefab/fesm2022/index.mjs +42 -42
  716. package/components/prefab/fesm2022/index.mjs.map +1 -1
  717. package/components/prefab/package.json +0 -3
  718. package/core/bundles/index.umd.js +80 -61
  719. package/core/esm2022/services/constant.service.mjs +7 -7
  720. package/core/esm2022/services/custom-icons-loader.service.mjs +7 -7
  721. package/core/esm2022/services/field-type.service.mjs +7 -7
  722. package/core/esm2022/services/field-widget.service.mjs +7 -7
  723. package/core/esm2022/services/pagination.service.mjs +7 -7
  724. package/core/esm2022/services/script-loader.service.mjs +7 -7
  725. package/core/esm2022/services/state-persistence.service.mjs +7 -7
  726. package/core/esm2022/services/user-custom-pipe-manager.service.mjs +7 -7
  727. package/core/esm2022/services/utils.service.mjs +7 -7
  728. package/core/esm2022/services/viewport.service.mjs +7 -7
  729. package/core/esm2022/types/types.mjs +1 -1
  730. package/core/esm2022/utils/build-utils.mjs +21 -2
  731. package/core/fesm2022/index.mjs +80 -61
  732. package/core/fesm2022/index.mjs.map +1 -1
  733. package/core/package.json +3 -6
  734. package/core/types/types.d.ts +2 -1
  735. package/http/bundles/index.umd.js +8 -8
  736. package/http/esm2022/http.service.mjs +9 -9
  737. package/http/fesm2022/index.mjs +8 -8
  738. package/http/fesm2022/index.mjs.map +1 -1
  739. package/http/package.json +2 -5
  740. package/locales/moment/ar-dz.js +8 -8
  741. package/locales/moment/ar-ly.js +8 -8
  742. package/locales/moment/ar-ps.js +123 -0
  743. package/locales/moment/ar.js +8 -8
  744. package/locales/moment/be.js +2 -2
  745. package/locales/moment/bs.js +14 -4
  746. package/locales/moment/ca.js +6 -6
  747. package/locales/moment/cs.js +5 -4
  748. package/locales/moment/cv.js +2 -2
  749. package/locales/moment/en-au.js +6 -6
  750. package/locales/moment/en-ca.js +6 -6
  751. package/locales/moment/en-gb.js +6 -6
  752. package/locales/moment/en-ie.js +6 -6
  753. package/locales/moment/en-il.js +6 -6
  754. package/locales/moment/en-in.js +6 -6
  755. package/locales/moment/en-nz.js +6 -6
  756. package/locales/moment/en-sg.js +6 -6
  757. package/locales/moment/it.js +4 -4
  758. package/locales/moment/ku-kmr.js +125 -0
  759. package/locales/moment/lt.js +2 -2
  760. package/locales/moment/me.js +2 -2
  761. package/locales/moment/nb.js +4 -4
  762. package/locales/moment/nl-be.js +1 -1
  763. package/locales/moment/nl.js +1 -1
  764. package/locales/moment/oc-lnc.js +6 -6
  765. package/locales/moment/ru.js +2 -2
  766. package/locales/moment/sv.js +6 -6
  767. package/locales/moment/tet.js +6 -6
  768. package/locales/moment/tlh.js +8 -8
  769. package/locales/moment/tzl.js +2 -2
  770. package/locales/moment/uk.js +4 -4
  771. package/locales/moment/x-pseudo.js +6 -6
  772. package/locales/moment-timezone/moment-timezone-with-data.js +2 -2
  773. package/npm-shrinkwrap.json +2 -2
  774. package/oAuth/bundles/index.umd.js +5 -5
  775. package/oAuth/esm2022/oAuth.service.mjs +6 -6
  776. package/oAuth/fesm2022/index.mjs +5 -5
  777. package/oAuth/fesm2022/index.mjs.map +1 -1
  778. package/oAuth/package.json +2 -5
  779. package/package-lock.json +2 -2
  780. package/package.json +1 -1
  781. package/runtime/base/bundles/index.umd.js +3162 -3100
  782. package/runtime/base/components/empty-component/empty-page.component.d.ts +1 -0
  783. package/runtime/base/esm2022/components/app-component/app.component.mjs +14 -95
  784. package/runtime/base/esm2022/components/app-spinner.component.mjs +34 -45
  785. package/runtime/base/esm2022/components/base-custom-widget.component.mjs +8 -7
  786. package/runtime/base/esm2022/components/base-layout.component.mjs +14 -21
  787. package/runtime/base/esm2022/components/base-page.component.mjs +12 -19
  788. package/runtime/base/esm2022/components/base-partial.component.mjs +9 -14
  789. package/runtime/base/esm2022/components/base-prefab.component.mjs +9 -14
  790. package/runtime/base/esm2022/components/base-spa-page.component.mjs +12 -19
  791. package/runtime/base/esm2022/components/custom-toaster.component.mjs +30 -52
  792. package/runtime/base/esm2022/components/empty-component/empty-page.component.mjs +33 -15
  793. package/runtime/base/esm2022/components/prefab-preview.component.mjs +19 -26
  794. package/runtime/base/esm2022/directives/accessroles.directive.mjs +17 -17
  795. package/runtime/base/esm2022/directives/prefab.directive.mjs +15 -15
  796. package/runtime/base/esm2022/guards/auth.guard.mjs +6 -6
  797. package/runtime/base/esm2022/guards/can-deactivate-page.guard.mjs +11 -11
  798. package/runtime/base/esm2022/guards/page-not-found.guard.mjs +6 -6
  799. package/runtime/base/esm2022/guards/role.guard.mjs +6 -6
  800. package/runtime/base/esm2022/overrides/wm_dom_renderer.mjs +12 -12
  801. package/runtime/base/esm2022/overrides/wm_shared_styles_host.mjs +14 -14
  802. package/runtime/base/esm2022/public_api.mjs +5 -2
  803. package/runtime/base/esm2022/resolves/app-before-load.resolve.mjs +22 -0
  804. package/runtime/base/esm2022/resolves/app-extension.resolve.mjs +6 -6
  805. package/runtime/base/esm2022/resolves/app-js.resolve.mjs +6 -6
  806. package/runtime/base/esm2022/resolves/app-variables.resolve.mjs +9 -9
  807. package/runtime/base/esm2022/resolves/i18n.resolve.mjs +6 -6
  808. package/runtime/base/esm2022/resolves/metadata.resolve.mjs +9 -9
  809. package/runtime/base/esm2022/resolves/security-config.resolve.mjs +9 -9
  810. package/runtime/base/esm2022/runtime-base.module.mjs +457 -316
  811. package/runtime/base/esm2022/services/app-defaults.service.mjs +6 -6
  812. package/runtime/base/esm2022/services/app.manager.service.mjs +25 -9
  813. package/runtime/base/esm2022/services/app.service.mjs +39 -18
  814. package/runtime/base/esm2022/services/dynamic-component-ref-provider.service.mjs +6 -6
  815. package/runtime/base/esm2022/services/http-interceptor.services.mjs +6 -6
  816. package/runtime/base/esm2022/services/i18n.service.mjs +37 -34
  817. package/runtime/base/esm2022/services/navigation.service.mjs +6 -6
  818. package/runtime/base/esm2022/services/pipe-provider.service.mjs +13 -13
  819. package/runtime/base/esm2022/services/pipe.service.mjs +10 -8
  820. package/runtime/base/esm2022/services/prefab-manager.service.mjs +6 -6
  821. package/runtime/base/esm2022/services/spinner.service.mjs +6 -6
  822. package/runtime/base/esm2022/services/toaster.service.mjs +6 -6
  823. package/runtime/base/esm2022/util/fragment-monitor.mjs +6 -6
  824. package/runtime/base/esm2022/util/utils.mjs +15 -1
  825. package/runtime/base/esm2022/util/wm-route-reuse-strategy.mjs +1 -1
  826. package/runtime/base/fesm2022/index.mjs +3145 -3071
  827. package/runtime/base/fesm2022/index.mjs.map +1 -1
  828. package/runtime/base/package.json +2 -5
  829. package/runtime/base/public_api.d.ts +4 -1
  830. package/runtime/base/resolves/app-before-load.resolve.d.ts +11 -0
  831. package/runtime/base/runtime-base.module.d.ts +96 -59
  832. package/runtime/base/services/app.manager.service.d.ts +2 -1
  833. package/runtime/base/services/app.service.d.ts +3 -2
  834. package/runtime/base/services/i18n.service.d.ts +2 -1
  835. package/runtime/base/util/utils.d.ts +2 -1
  836. package/runtime/dynamic/app/app.config.d.ts +1 -1
  837. package/runtime/dynamic/app/services/app-variables-provider.service.d.ts +3 -1
  838. package/runtime/dynamic/bundles/index.umd.js +145 -114
  839. package/runtime/dynamic/esm2022/app/app.config.mjs +11 -10
  840. package/runtime/dynamic/esm2022/app/app.module.mjs +35 -5
  841. package/runtime/dynamic/esm2022/app/app.routes.mjs +2 -11
  842. package/runtime/dynamic/esm2022/app/components/page-wrapper.component.mjs +11 -16
  843. package/runtime/dynamic/esm2022/app/services/app-extension.service.mjs +9 -9
  844. package/runtime/dynamic/esm2022/app/services/app-js-provider.service.mjs +9 -9
  845. package/runtime/dynamic/esm2022/app/services/app-resource-manager.service.mjs +6 -6
  846. package/runtime/dynamic/esm2022/app/services/app-variables-provider.service.mjs +15 -11
  847. package/runtime/dynamic/esm2022/app/services/component-ref-provider.service.mjs +57 -8
  848. package/runtime/dynamic/esm2022/app/services/customwidget-config-provider.service.mjs +6 -6
  849. package/runtime/dynamic/esm2022/app/services/prefab-config-provider.service.mjs +6 -6
  850. package/runtime/dynamic/fesm2022/index.mjs +143 -88
  851. package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
  852. package/runtime/dynamic/package.json +2 -5
  853. package/scripts/datatable/datatable.js +26 -5
  854. package/scripts/jquery-ui/ui/widgets/droppable.js +3 -3
  855. package/scripts/jquery-ui/ui/widgets/resizable.js +72 -19
  856. package/scripts/jquery-ui/ui/widgets/sortable.js +9 -16
  857. package/security/bundles/index.umd.js +5 -5
  858. package/security/esm2022/security.service.mjs +6 -6
  859. package/security/fesm2022/index.mjs +5 -5
  860. package/security/fesm2022/index.mjs.map +1 -1
  861. package/security/package.json +2 -5
  862. package/swipey/fesm2022/index.mjs.map +1 -1
  863. package/swipey/package.json +2 -5
  864. package/transpiler/build.d.ts +1 -1
  865. package/transpiler/bundles/index.umd.js +94 -56
  866. package/transpiler/esm2022/build.mjs +5 -2
  867. package/transpiler/esm2022/imports.mjs +92 -57
  868. package/transpiler/fesm2022/index.mjs +94 -56
  869. package/transpiler/fesm2022/index.mjs.map +1 -1
  870. package/transpiler/package.json +3 -6
  871. package/variables/bundles/index.umd.js +20 -10
  872. package/variables/constants/variables.constants.d.ts +9 -0
  873. package/variables/esm2022/constants/variables.constants.mjs +10 -1
  874. package/variables/esm2022/service/metadata-service/metadata.service.mjs +6 -6
  875. package/variables/esm2022/service/variables.service.mjs +6 -6
  876. package/variables/fesm2022/index.mjs +20 -11
  877. package/variables/fesm2022/index.mjs.map +1 -1
  878. package/variables/package.json +2 -5
  879. package/variables/service/variables.service.d.ts +1 -1
  880. package/build-task/esm2022/basic/default/anchor/anchor.build.mjs +0 -15
  881. package/build-task/esm2022/basic/default/audio/audio.build.mjs +0 -10
  882. package/build-task/esm2022/basic/default/html/html.build.mjs +0 -15
  883. package/build-task/esm2022/basic/default/icon/icon.build.mjs +0 -10
  884. package/build-task/esm2022/basic/default/iframe/iframe.build.mjs +0 -10
  885. package/build-task/esm2022/basic/default/label/label.build.mjs +0 -25
  886. package/build-task/esm2022/basic/default/picture/picture.build.mjs +0 -14
  887. package/build-task/esm2022/basic/default/spinner/spinner.build.mjs +0 -15
  888. package/build-task/esm2022/basic/default/video/video.build.mjs +0 -10
  889. package/components/base/components.module.d.ts +0 -25
  890. package/components/base/esm2022/components.module.mjs +0 -152
  891. package/components/basic/default/bundles/index.umd.js +0 -1036
  892. package/components/basic/default/esm2022/anchor/anchor.component.mjs +0 -198
  893. package/components/basic/default/esm2022/anchor/anchor.props.mjs +0 -27
  894. package/components/basic/default/esm2022/audio/audio.component.mjs +0 -59
  895. package/components/basic/default/esm2022/audio/audio.props.mjs +0 -19
  896. package/components/basic/default/esm2022/html/html.directive.mjs +0 -76
  897. package/components/basic/default/esm2022/html/html.props.mjs +0 -12
  898. package/components/basic/default/esm2022/icon/icon.component.mjs +0 -70
  899. package/components/basic/default/esm2022/icon/icon.props.mjs +0 -19
  900. package/components/basic/default/esm2022/iframe/iframe.component.mjs +0 -85
  901. package/components/basic/default/esm2022/iframe/iframe.props.mjs +0 -15
  902. package/components/basic/default/esm2022/label/label.directive.mjs +0 -71
  903. package/components/basic/default/esm2022/label/label.props.mjs +0 -17
  904. package/components/basic/default/esm2022/picture/picture.directive.mjs +0 -95
  905. package/components/basic/default/esm2022/picture/picture.props.mjs +0 -23
  906. package/components/basic/default/esm2022/public_api.mjs +0 -10
  907. package/components/basic/default/esm2022/spinner/spinner.component.mjs +0 -130
  908. package/components/basic/default/esm2022/spinner/spinner.props.mjs +0 -20
  909. package/components/basic/default/esm2022/video/video.component.mjs +0 -113
  910. package/components/basic/default/esm2022/video/video.props.mjs +0 -24
  911. package/components/basic/default/fesm2022/index.mjs +0 -1012
  912. package/components/basic/default/fesm2022/index.mjs.map +0 -1
  913. package/components/basic/default/public_api.d.ts +0 -9
  914. package/components/basic/progress/bundles/index.umd.js +0 -361
  915. package/components/basic/progress/esm2022/progress-bar/progress-bar.component.mjs +0 -154
  916. package/components/basic/progress/esm2022/progress-circle/progress-circle.component.mjs +0 -132
  917. package/components/basic/progress/esm2022/public_api.mjs +0 -3
  918. package/components/basic/progress/esm2022/utils.mjs +0 -25
  919. package/components/basic/progress/fesm2022/index.mjs +0 -344
  920. package/components/basic/progress/fesm2022/index.mjs.map +0 -1
  921. package/components/basic/progress/public_api.d.ts +0 -2
  922. package/components/input/default/bundles/index.umd.js +0 -3559
  923. package/components/input/default/esm2022/base-form-custom.component.mjs +0 -94
  924. package/components/input/default/esm2022/base-form.component.mjs +0 -110
  925. package/components/input/default/esm2022/button/button.component.mjs +0 -106
  926. package/components/input/default/esm2022/button/button.props.mjs +0 -26
  927. package/components/input/default/esm2022/button-group/button-group.directive.mjs +0 -51
  928. package/components/input/default/esm2022/button-group/button-group.props.mjs +0 -10
  929. package/components/input/default/esm2022/caption-position.directive.mjs +0 -172
  930. package/components/input/default/esm2022/checkbox/checkbox.component.mjs +0 -179
  931. package/components/input/default/esm2022/checkbox/checkbox.props.mjs +0 -27
  932. package/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +0 -268
  933. package/components/input/default/esm2022/checkboxset/checkboxset.props.mjs +0 -35
  934. package/components/input/default/esm2022/composite/composite.directive.mjs +0 -84
  935. package/components/input/default/esm2022/composite/composite.props.mjs +0 -10
  936. package/components/input/default/esm2022/dataset-aware-form.component.mjs +0 -307
  937. package/components/input/default/esm2022/number/number.component.mjs +0 -68
  938. package/components/input/default/esm2022/number/number.props.mjs +0 -35
  939. package/components/input/default/esm2022/public_api.mjs +0 -21
  940. package/components/input/default/esm2022/radioset/radioset.component.mjs +0 -251
  941. package/components/input/default/esm2022/radioset/radioset.props.mjs +0 -35
  942. package/components/input/default/esm2022/select/select.component.mjs +0 -230
  943. package/components/input/default/esm2022/select/select.props.mjs +0 -36
  944. package/components/input/default/esm2022/switch/switch.component.mjs +0 -227
  945. package/components/input/default/esm2022/switch/switch.props.mjs +0 -28
  946. package/components/input/default/esm2022/text/base/base-input.mjs +0 -93
  947. package/components/input/default/esm2022/text/calendar/input-calendar.component.mjs +0 -69
  948. package/components/input/default/esm2022/text/calendar/input-calendar.props.mjs +0 -30
  949. package/components/input/default/esm2022/text/color/input-color.component.mjs +0 -69
  950. package/components/input/default/esm2022/text/color/input-color.props.mjs +0 -27
  951. package/components/input/default/esm2022/text/email/input-email.component.mjs +0 -68
  952. package/components/input/default/esm2022/text/email/input-email.props.mjs +0 -29
  953. package/components/input/default/esm2022/text/locale/number-locale.mjs +0 -539
  954. package/components/input/default/esm2022/text/number/input-number.component.mjs +0 -79
  955. package/components/input/default/esm2022/text/number/input-number.props.mjs +0 -32
  956. package/components/input/default/esm2022/text/text/input-text.component.mjs +0 -145
  957. package/components/input/default/esm2022/text/text/input-text.props.mjs +0 -46
  958. package/components/input/default/esm2022/textarea/textarea.component.mjs +0 -85
  959. package/components/input/default/esm2022/textarea/textarea.props.mjs +0 -30
  960. package/components/input/default/fesm2022/index.mjs +0 -3529
  961. package/components/input/default/fesm2022/index.mjs.map +0 -1
  962. package/components/input/default/public_api.d.ts +0 -20
  963. package/components/input/epoch/bundles/index.umd.js +0 -3292
  964. package/components/input/epoch/esm2022/date/date.component.mjs +0 -376
  965. package/components/input/epoch/esm2022/date-time/date-time-picker.component.mjs +0 -473
  966. package/components/input/epoch/esm2022/date-time/date-time.component.mjs +0 -563
  967. package/components/input/epoch/esm2022/picker/picker.component.mjs +0 -184
  968. package/components/input/epoch/esm2022/public_api.mjs +0 -6
  969. package/components/input/epoch/esm2022/time/time.component.mjs +0 -432
  970. package/components/input/epoch/fesm2022/index.mjs +0 -3280
  971. package/components/input/epoch/fesm2022/index.mjs.map +0 -1
  972. package/components/input/epoch/public_api.d.ts +0 -5
  973. /package/build-task/basic/{default/anchor → anchor}/anchor.build.d.ts +0 -0
  974. /package/build-task/basic/{default/audio → audio}/audio.build.d.ts +0 -0
  975. /package/build-task/basic/{default/html → html}/html.build.d.ts +0 -0
  976. /package/build-task/basic/{default/icon → icon}/icon.build.d.ts +0 -0
  977. /package/build-task/basic/{default/iframe → iframe}/iframe.build.d.ts +0 -0
  978. /package/build-task/basic/{default/label → label}/label.build.d.ts +0 -0
  979. /package/build-task/basic/{default/picture → picture}/picture.build.d.ts +0 -0
  980. /package/build-task/basic/{default/spinner → spinner}/spinner.build.d.ts +0 -0
  981. /package/build-task/basic/{default/video → video}/video.build.d.ts +0 -0
  982. /package/components/basic/{default → anchor}/.npmignore +0 -0
  983. /package/components/basic/{default/anchor → anchor}/anchor.component.d.ts +0 -0
  984. /package/components/basic/{default/anchor → anchor}/anchor.props.d.ts +0 -0
  985. /package/components/basic/{progress → audio}/.npmignore +0 -0
  986. /package/components/basic/{default/audio → audio}/audio.component.d.ts +0 -0
  987. /package/components/basic/{default/audio → audio}/audio.props.d.ts +0 -0
  988. /package/components/{input/default → basic/html}/.npmignore +0 -0
  989. /package/components/basic/{default/html → html}/html.directive.d.ts +0 -0
  990. /package/components/basic/{default/html → html}/html.props.d.ts +0 -0
  991. /package/components/{input/epoch → basic/icon}/.npmignore +0 -0
  992. /package/components/basic/{default/icon → icon}/icon.component.d.ts +0 -0
  993. /package/components/basic/{default/icon → icon}/icon.props.d.ts +0 -0
  994. /package/components/basic/{default/iframe → iframe}/iframe.component.d.ts +0 -0
  995. /package/components/basic/{default/iframe → iframe}/iframe.props.d.ts +0 -0
  996. /package/components/basic/{default/label → label}/label.props.d.ts +0 -0
  997. /package/components/basic/{default/picture → picture}/picture.directive.d.ts +0 -0
  998. /package/components/basic/{default/picture → picture}/picture.props.d.ts +0 -0
  999. /package/components/basic/progress/{utils.d.ts → progress-utils/progress-utils.d.ts} +0 -0
  1000. /package/components/basic/{default/spinner → spinner}/spinner.component.d.ts +0 -0
  1001. /package/components/basic/{default/spinner → spinner}/spinner.props.d.ts +0 -0
  1002. /package/components/basic/{default/video → video}/video.component.d.ts +0 -0
  1003. /package/components/basic/{default/video → video}/video.props.d.ts +0 -0
  1004. /package/components/input/{default → base-form}/base-form.component.d.ts +0 -0
  1005. /package/components/input/{default/button → button}/button.component.d.ts +0 -0
  1006. /package/components/input/{default/button → button}/button.props.d.ts +0 -0
  1007. /package/components/input/{default/button-group → button-group}/button-group.directive.d.ts +0 -0
  1008. /package/components/input/{default/button-group → button-group}/button-group.props.d.ts +0 -0
  1009. /package/components/input/{default → caption-position}/caption-position.directive.d.ts +0 -0
  1010. /package/components/input/{default/checkbox → checkbox}/checkbox.props.d.ts +0 -0
  1011. /package/components/input/{default/checkboxset → checkboxset}/checkboxset.props.d.ts +0 -0
  1012. /package/components/input/{default/composite → composite}/composite.directive.d.ts +0 -0
  1013. /package/components/input/{default/composite → composite}/composite.props.d.ts +0 -0
  1014. /package/components/input/epoch/{date-time → date-time-picker}/date-time-picker.component.d.ts +0 -0
  1015. /package/components/input/{default/number → number}/number.props.d.ts +0 -0
  1016. /package/components/input/{default/radioset → radioset}/radioset.props.d.ts +0 -0
  1017. /package/components/input/{default/select → select}/select.props.d.ts +0 -0
  1018. /package/components/input/{default/switch → switch}/switch.props.d.ts +0 -0
  1019. /package/components/input/{default/text/calendar → text/input-calendar}/input-calendar.props.d.ts +0 -0
  1020. /package/components/input/{default/text/color → text/input-color}/input-color.props.d.ts +0 -0
  1021. /package/components/input/{default/text/email → text/input-email}/input-email.props.d.ts +0 -0
  1022. /package/components/input/{default/text/number → text/input-number}/input-number.props.d.ts +0 -0
  1023. /package/components/input/{default/text/text → text/input-text}/input-text.props.d.ts +0 -0
  1024. /package/components/input/{default/textarea → textarea}/textarea.props.d.ts +0 -0
@@ -1,3529 +0,0 @@
1
- import * as i1 from '@angular/common';
2
- import { CommonModule, getLocaleNumberSymbol, NumberSymbol } from '@angular/common';
3
- import * as i2 from '@wm/components/base';
4
- import { register, PROP_STRING, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, DISPLAY_TYPE, StylableComponent, styler, provideAsWidgetRef, WmComponentsModule, WidgetConfig, INPUTMODE, TrailingZeroDecimalPipe, extractDataAsArray, ToDatePipe, ALLFIELDS, getOrderedDataset, convertDataToObject, transformDataWithKeys, transformFormData, getUniqObjsByDataField, groupData, handleHeaderClick, toggleAllHeaders, APPLY_STYLES_TYPE, registerFormWidget, provideAs, WidgetRef } from '@wm/components/base';
5
- import * as i0 from '@angular/core';
6
- import { Component, Inject, Optional, HostBinding, Injectable, Injector, Attribute, Directive, HostListener, ElementRef, ViewChild, ContentChildren } from '@angular/core';
7
- import { __decorate, __param, __metadata } from 'tslib';
8
- import * as i1$1 from '@wm/core';
9
- import { DataSource, switchClass, $appDigest, addClass, isDefined, AbstractI18nService, AppDefaults, debounce as debounce$1, noop, isEqualWithFields, toBoolean, FormWidgetType, toggleClass, setListClass, addForIdAttributes, isIos, isSafari, setAttr, removeAttr, setCSS } from '@wm/core';
10
- import * as i2$1 from '@angular/forms';
11
- import { FormControlName, NgModel, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
12
- import { has, set, isString, get, includes, isUndefined, isNull, round, intersection, toArray, debounce, isArray, find, toString, isObject, isEqual, isEmpty, forEach, findIndex, trim } from 'lodash-es';
13
- import { Subject } from 'rxjs';
14
- import * as i3 from 'angular-imask';
15
- import { IMaskDirective, IMaskModule } from 'angular-imask';
16
-
17
- const registerProps$e = () => {
18
- register('wm-button', new Map([
19
- ['animation', PROP_STRING],
20
- ['badgevalue', PROP_STRING],
21
- ['caption', PROP_STRING],
22
- ['class', PROP_STRING],
23
- ['conditionalclass', PROP_ANY],
24
- ['conditionalstyle', PROP_ANY],
25
- ['disabled', PROP_BOOLEAN],
26
- ['hint', PROP_STRING],
27
- ['arialabel', PROP_STRING],
28
- ['iconclass', PROP_STRING],
29
- ['iconheight', PROP_STRING],
30
- ['iconmargin', PROP_STRING],
31
- ['iconposition', PROP_STRING],
32
- ['iconurl', PROP_STRING],
33
- ['iconwidth', PROP_STRING],
34
- ['name', PROP_STRING],
35
- ['shortcutkey', PROP_STRING],
36
- ['show', { value: true, ...PROP_BOOLEAN }],
37
- ['tabindex', { value: 0, ...PROP_NUMBER }],
38
- ['type', PROP_STRING]
39
- ]));
40
- };
41
-
42
- const _c0$c = ["wmButton", ""];
43
- const _c1$b = [[["", 8, "caret"]]];
44
- const _c2$8 = [".caret"];
45
- const _c3$4 = (a0, a1, a2) => ({ width: a0, height: a1, margin: a2 });
46
- const _c4$3 = (a0, a1, a2, a3) => ({ width: a0, height: a1, margin: a2, fontSize: a3 });
47
- function ButtonComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
48
- i0.ɵɵelement(0, "img", 0);
49
- i0.ɵɵpipe(1, "image");
50
- } if (rf & 2) {
51
- const ctx_r0 = i0.ɵɵnextContext();
52
- i0.ɵɵproperty("src", i0.ɵɵpipeBind1(1, 2, ctx_r0.iconurl), i0.ɵɵsanitizeUrl)("ngStyle", i0.ɵɵpureFunction3(4, _c3$4, ctx_r0.iconwidth, ctx_r0.iconheight, ctx_r0.iconmargin));
53
- } }
54
- function ButtonComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
55
- i0.ɵɵelement(0, "i", 5);
56
- } if (rf & 2) {
57
- const ctx_r0 = i0.ɵɵnextContext();
58
- i0.ɵɵclassMapInterpolate1("app-icon ", ctx_r0.iconclass, "");
59
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction4(4, _c4$3, ctx_r0.iconwidth, ctx_r0.iconheight, ctx_r0.iconmargin, ctx_r0.iconwidth));
60
- } }
61
- function ButtonComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
62
- i0.ɵɵelementStart(0, "span", 2);
63
- i0.ɵɵtext(1);
64
- i0.ɵɵelementEnd();
65
- } if (rf & 2) {
66
- const ctx_r0 = i0.ɵɵnextContext();
67
- i0.ɵɵadvance();
68
- i0.ɵɵtextInterpolate2("", ctx_r0.caption, " ", ctx_r0.appLocale.LABEL_ICON, "");
69
- } }
70
- function ButtonComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
71
- i0.ɵɵelement(0, "span", 4);
72
- } if (rf & 2) {
73
- const ctx_r0 = i0.ɵɵnextContext();
74
- i0.ɵɵproperty("textContent", ctx_r0.badgevalue);
75
- } }
76
- const DEFAULT_CLS$6 = 'btn app-button';
77
- const WIDGET_CONFIG$e = {
78
- widgetType: 'wm-button',
79
- hostClass: DEFAULT_CLS$6,
80
- displayType: DISPLAY_TYPE.INLINE_BLOCK
81
- };
82
- class ButtonComponent extends StylableComponent {
83
- static { this.initializeProps = registerProps$e(); }
84
- constructor(inj, explicitContext) {
85
- super(inj, WIDGET_CONFIG$e, explicitContext);
86
- styler(this.nativeElement, this);
87
- }
88
- static { this.ɵfac = function ButtonComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ButtonComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
89
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ButtonComponent, selectors: [["button", "wmButton", ""]], hostVars: 5, hostBindings: function ButtonComponent_HostBindings(rf, ctx) { if (rf & 2) {
90
- i0.ɵɵhostProperty("type", ctx.type)("tabIndex", ctx.tabindex)("disabled", ctx.disabled);
91
- i0.ɵɵattribute("accesskey", ctx.shortcutkey)("icon-position", ctx.iconposition);
92
- } }, exportAs: ["wmButton"], standalone: true, features: [i0.ɵɵProvidersFeature([
93
- provideAsWidgetRef(ButtonComponent)
94
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c0$c, ngContentSelectors: _c2$8, decls: 6, vars: 5, consts: [["data-identifier", "img", "alt", "button image", 1, "button-image-icon", 3, "src", "ngStyle"], ["aria-hidden", "true", 3, "class", "ngStyle"], [1, "sr-only"], [1, "btn-caption", 3, "innerHTML"], [1, "badge", "pull-right", 3, "textContent"], ["aria-hidden", "true", 3, "ngStyle"]], template: function ButtonComponent_Template(rf, ctx) { if (rf & 1) {
95
- i0.ɵɵprojectionDef(_c1$b);
96
- i0.ɵɵtemplate(0, ButtonComponent_Conditional_0_Template, 2, 8, "img", 0)(1, ButtonComponent_Conditional_1_Template, 1, 9, "i", 1)(2, ButtonComponent_Conditional_2_Template, 2, 2, "span", 2);
97
- i0.ɵɵelement(3, "span", 3);
98
- i0.ɵɵprojection(4);
99
- i0.ɵɵtemplate(5, ButtonComponent_Conditional_5_Template, 1, 1, "span", 4);
100
- } if (rf & 2) {
101
- i0.ɵɵconditional(ctx.iconurl ? 0 : -1);
102
- i0.ɵɵadvance();
103
- i0.ɵɵconditional(ctx.iconclass ? 1 : -1);
104
- i0.ɵɵadvance();
105
- i0.ɵɵconditional(ctx.iconclass ? 2 : -1);
106
- i0.ɵɵadvance();
107
- i0.ɵɵproperty("innerHTML", ctx.caption, i0.ɵɵsanitizeHtml);
108
- i0.ɵɵadvance(2);
109
- i0.ɵɵconditional(ctx.badgevalue ? 5 : -1);
110
- } }, dependencies: [CommonModule, i1.NgStyle, WmComponentsModule, i2.TextContentDirective, i2.ImagePipe], encapsulation: 2 }); }
111
- }
112
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ButtonComponent, [{
113
- type: Component,
114
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule], selector: 'button[wmButton]', providers: [
115
- provideAsWidgetRef(ButtonComponent)
116
- ], exportAs: 'wmButton', template: "@if (iconurl) {\n <img data-identifier=\"img\" alt=\"button image\" class=\"button-image-icon\" [src]=\"iconurl | image\" [ngStyle]=\"{width:iconwidth, height:iconheight, margin:iconmargin}\"/>\n}\n@if (iconclass) {\n <i class=\"app-icon {{iconclass}}\" aria-hidden=\"true\" [ngStyle]=\"{width:iconwidth, height:iconheight, margin:iconmargin, fontSize:iconwidth}\"></i>\n}\n@if (iconclass) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"btn-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n}\n" }]
117
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
118
- type: Inject,
119
- args: ['EXPLICIT_CONTEXT']
120
- }, {
121
- type: Optional
122
- }] }], { type: [{
123
- type: HostBinding,
124
- args: ['type']
125
- }], tabindex: [{
126
- type: HostBinding,
127
- args: ['tabIndex']
128
- }], disabled: [{
129
- type: HostBinding,
130
- args: ['disabled']
131
- }], shortcutkey: [{
132
- type: HostBinding,
133
- args: ['attr.accesskey']
134
- }], iconposition: [{
135
- type: HostBinding,
136
- args: ['attr.icon-position']
137
- }] }); })();
138
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ButtonComponent, { className: "ButtonComponent", filePath: "button/button.component.ts", lineNumber: 26 }); })();
139
-
140
- class BaseFormComponent extends StylableComponent {
141
- constructor(inj, config, explicitContext, initPromise) {
142
- super(inj, config, explicitContext, initPromise);
143
- this.inj = inj;
144
- this.binddatavalue = this.$element.attr('datavalue.bind');
145
- }
146
- set datavalue(datavalue) {
147
- this.dataval = datavalue;
148
- }
149
- get datavalue() {
150
- return this.dataval;
151
- }
152
- /**
153
- * Responsible for updating the variable bound to the widget's datavalue property.
154
- * @param value
155
- */
156
- updateBoundVariable(value) {
157
- let binddatavalue = this.binddatavalue;
158
- // return if the variable bound is not static.
159
- if (this.datavaluesource && this.datavaluesource.execute(DataSource.Operation.IS_API_AWARE)) {
160
- return;
161
- }
162
- else if (this.datavaluesource && !this.datavaluesource.twoWayBinding) {
163
- return;
164
- }
165
- // return if widget is bound.
166
- if (!binddatavalue || binddatavalue.startsWith('Widgets.') || binddatavalue.startsWith('itemRef.currentItemWidgets')) {
167
- return;
168
- }
169
- binddatavalue = binddatavalue.replace(/\[\$i\]/g, '[0]');
170
- binddatavalue = binddatavalue.replace(/\[(.*?)\]/g, (_match, key) => {
171
- try {
172
- const value = eval(`this.viewParent.${key}`);
173
- if (typeof value === 'string' || typeof value === 'number')
174
- return `[${value}]`;
175
- else
176
- return '[0]';
177
- }
178
- catch {
179
- return '[0]'; // fallback if evaluation fails
180
- }
181
- });
182
- // In case of list widget context will be the listItem.
183
- if (has(this.context, binddatavalue.split('.')[0]) && has(this.context, binddatavalue)) {
184
- set(this.context, binddatavalue, value);
185
- }
186
- // Parent widget must update on custom widget datavalue change for bindings to work
187
- else if (has(this.viewParent, binddatavalue) && this.viewParent.containerWidget?._isCustom) {
188
- set(this.viewParent, binddatavalue, value);
189
- }
190
- else if (has(this.viewParent, binddatavalue) && this.datavaluesource?.owner === "Page") {
191
- set(this.viewParent, binddatavalue, value);
192
- }
193
- else if (has(this.viewParent?.App, binddatavalue) && this.datavaluesource?.owner === "App") {
194
- set(this.viewParent.App, binddatavalue, value);
195
- }
196
- }
197
- invokeOnChange(value, $event) {
198
- // invoke the event callback
199
- if ($event) {
200
- if (this.datavalue !== this.prevDatavalue) {
201
- this.updateBoundVariable(value);
202
- this.invokeEventCallback('change', {
203
- $event,
204
- newVal: value,
205
- oldVal: this.prevDatavalue
206
- });
207
- }
208
- }
209
- // update the previous value
210
- this.prevDatavalue = value;
211
- }
212
- updatePrevDatavalue(val) {
213
- this.prevDatavalue = val;
214
- }
215
- getPrevDataValue() {
216
- return this.prevDatavalue;
217
- }
218
- ngAfterViewInit() {
219
- super.ngAfterViewInit();
220
- // [WMS-18892]- stopping event propagation [for ArrowLeft, ArrowUp, ArrowRight, ArrowDown actions] when form widgets or form is inside list widget
221
- let parentElemList = $(this.nativeElement).parents();
222
- if (parentElemList.closest('[wmList]').length) {
223
- this.$element.keydown(function ($event) {
224
- if ($event.keyCode === 37 || $event.keyCode === 38 || $event.keyCode === 39 || $event.keyCode === 40) {
225
- $event.stopPropagation();
226
- }
227
- });
228
- }
229
- }
230
- static { this.ɵfac = function BaseFormComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BaseFormComponent)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(WidgetConfig), i0.ɵɵinject('EXPLICIT_CONTEXT', 8), i0.ɵɵinject(Promise)); }; }
231
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: BaseFormComponent, factory: BaseFormComponent.ɵfac }); }
232
- }
233
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseFormComponent, [{
234
- type: Injectable
235
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
236
- type: Inject,
237
- args: [WidgetConfig]
238
- }] }, { type: undefined, decorators: [{
239
- type: Inject,
240
- args: ['EXPLICIT_CONTEXT']
241
- }, {
242
- type: Optional
243
- }] }, { type: Promise }], null); })();
244
-
245
- /*
246
- * WMS-18269
247
- * custom 'required' validator for components,
248
- * as the bound values are resolved at runtime
249
- * Called on 'required' property change
250
- *
251
- * Note: Component needs NG_VALIDATOR provider for this to work
252
- */
253
- function isValidValue(val) {
254
- switch (typeof val) {
255
- case 'object': return (!!val && (!!val.length || !!Object.keys(val).length));
256
- case 'number': return (!!val || val === 0);
257
- default: return !(val === undefined || val === null || val === '');
258
- }
259
- }
260
- function validateRequiredBind(required) {
261
- return (control) => required
262
- ? (isValidValue(control.value)
263
- ? null
264
- : { required: true })
265
- : null;
266
- }
267
- class BaseFormCustomComponent extends BaseFormComponent {
268
- constructor() {
269
- super(...arguments);
270
- this._onChange = () => { };
271
- this._onTouched = () => { };
272
- }
273
- ngOnInit() {
274
- super.ngOnInit();
275
- this._formControl = this.inj.get(FormControlName, null);
276
- }
277
- registerOnChange(fn) {
278
- this._onChange = fn;
279
- }
280
- registerOnTouched(fn) {
281
- this._onTouched = fn;
282
- }
283
- writeValue(value) {
284
- if (this.isDestroyed) {
285
- return;
286
- }
287
- if (this._formControl) {
288
- if (this._formControl.valueAccessor["widgetSubType"].startsWith('wm-custom-'))
289
- return;
290
- this.datavalue = value;
291
- this.onPropertyChange('datavalue', value);
292
- this.updatePrevDatavalue(value);
293
- }
294
- /*
295
- * WMS:18246
296
- * Call onChange on default value, so that the Component Model is updated
297
- * Do only When the Model Value is different from datavalue
298
- */
299
- (value !== this.datavalue) && this._onChange(this.datavalue);
300
- }
301
- get formControl() {
302
- return this._formControl;
303
- }
304
- invokeOnChange(value, $event, valid) {
305
- // let the angular know about the change
306
- this._onChange(value);
307
- if ($event) {
308
- super.invokeOnChange(value, $event);
309
- }
310
- else if (valid) {
311
- // Fix for [WMS-24869]: updating PrevDatavalue when there is a default value for the widget.
312
- this.updatePrevDatavalue(value);
313
- }
314
- }
315
- invokeOnTouched($event) {
316
- this._onTouched();
317
- if ($event) {
318
- this.invokeEventCallback('blur', { $event });
319
- }
320
- }
321
- invokeOnFocus($event) {
322
- this.invokeEventCallback('focus', { $event });
323
- }
324
- /* WMS-18269 */
325
- validate(control) {
326
- return this['show'] ? validateRequiredBind(this['required'])(control) : null;
327
- }
328
- static { this.ɵfac = /*@__PURE__*/ (() => { let ɵBaseFormCustomComponent_BaseFactory; return function BaseFormCustomComponent_Factory(__ngFactoryType__) { return (ɵBaseFormCustomComponent_BaseFactory || (ɵBaseFormCustomComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BaseFormCustomComponent)))(__ngFactoryType__ || BaseFormCustomComponent); }; })(); }
329
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: BaseFormCustomComponent, factory: BaseFormCustomComponent.ɵfac }); }
330
- }
331
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseFormCustomComponent, [{
332
- type: Injectable
333
- }], null, null); })();
334
-
335
- class BaseInput extends BaseFormCustomComponent {
336
- onPropertyChange(key, nv, ov) {
337
- // set the class on the input element
338
- if (key === 'tabindex') {
339
- return;
340
- }
341
- if (key === 'required') {
342
- /* WMS-18269 | Update Angular about the required attr value change */
343
- this._onChange(this.datavalue);
344
- }
345
- if (key === 'updateon') {
346
- this.ngModelOptions.updateOn = nv === 'default' ? 'change' : 'blur';
347
- }
348
- if (key === 'class') {
349
- if (this.inputEl.nativeElement) {
350
- switchClass(this.inputEl.nativeElement, nv, ov);
351
- }
352
- }
353
- else if (key === 'datavalue') {
354
- // update the oldDataValue when the datavalue is modified programmatically
355
- this.updatePrevDatavalue(nv);
356
- this._onChange(this.datavalue);
357
- }
358
- else {
359
- super.onPropertyChange(key, nv, ov);
360
- }
361
- }
362
- // invoke the change callback
363
- handleChange(newValue) {
364
- if (this.autotrim && this.datavalue && isString(this.datavalue)) {
365
- this.datavalue = this.datavalue.trim();
366
- }
367
- this.invokeOnChange(this.datavalue, { type: 'change' }, this.ngModel.valid);
368
- }
369
- // Change event is registered from the template, Prevent the framework from registering one more event
370
- handleEvent(node, eventName, eventCallback, locals) {
371
- if (eventName !== 'change' && eventName !== 'blur') {
372
- super.handleEvent(this.inputEl.nativeElement, eventName, eventCallback, locals);
373
- }
374
- }
375
- // invoke the blur callback
376
- handleBlur($event) {
377
- this.invokeOnTouched($event);
378
- }
379
- // Update the model on enter key press
380
- flushViewChanges(val) {
381
- // when val contains masked value, update the model with unmasked value
382
- const unMaskedVal = get(this.imask, 'maskRef.unmaskedValue');
383
- val = unMaskedVal ? unMaskedVal : val;
384
- this.ngModel.update.next(val);
385
- $appDigest();
386
- }
387
- ngAfterViewInit() {
388
- super.ngAfterViewInit();
389
- // add the class on the input element
390
- if (this.class) {
391
- addClass(this.inputEl.nativeElement, this.class);
392
- }
393
- styler(this.inputEl.nativeElement, this);
394
- }
395
- constructor(inj, config, explicitContext) {
396
- super(inj, config, explicitContext);
397
- // possible values for ngModelOptions are 'blur' and 'change'
398
- // default is 'blur'
399
- this.ngModelOptions = {
400
- updateOn: '',
401
- standalone: true
402
- };
403
- let updateOn = this.nativeElement.getAttribute('updateon') || 'blur';
404
- updateOn = updateOn === 'default' ? 'change' : updateOn;
405
- this.ngModelOptions.updateOn = updateOn;
406
- }
407
- static { this.ɵfac = function BaseInput_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BaseInput)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(WidgetConfig), i0.ɵɵinject('EXPLICIT_CONTEXT', 8)); }; }
408
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: BaseInput, factory: BaseInput.ɵfac }); }
409
- }
410
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseInput, [{
411
- type: Injectable
412
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
413
- type: Inject,
414
- args: [WidgetConfig]
415
- }] }, { type: undefined, decorators: [{
416
- type: Inject,
417
- args: ['EXPLICIT_CONTEXT']
418
- }, {
419
- type: Optional
420
- }] }], null); })();
421
-
422
- let NumberLocale = class NumberLocale extends BaseInput {
423
- constructor(inj, config, i18nService, trailingZeroDecimalPipe, explicitContext) {
424
- super(inj, config, explicitContext);
425
- this.i18nService = i18nService;
426
- this.trailingZeroDecimalPipe = trailingZeroDecimalPipe;
427
- this.isDefaultQuery = true;
428
- this.decimalValue = '';
429
- this.selectedLocale = i18nService.getSelectedLocale();
430
- this.DECIMAL = getLocaleNumberSymbol(this.localefilter || this.selectedLocale, NumberSymbol.Decimal);
431
- this.GROUP = getLocaleNumberSymbol(this.localefilter || this.selectedLocale, NumberSymbol.Group);
432
- this.numberfilter = '1.0-16';
433
- this.resetValidations();
434
- }
435
- // Setter for the datavalue.
436
- // @ts-ignore
437
- set datavalue(value) {
438
- this.lastValIsDecimal = false;
439
- // set text value to null if data value is empty.
440
- // @ts-ignore
441
- if (includes([null, undefined, ''], value)) {
442
- const input = this.inputEl.nativeElement;
443
- const prevDataValue = this.prevDatavalue;
444
- this.displayValue = input.value = this.proxyModel = null;
445
- this.resetValidations();
446
- // Fix for [WMS-27648]: When a decimal value is entered (e.g., "3."), datavalue and prevDatavalue become null as it is an invalid number.
447
- // handleChange() should be called when the invalid datavalue (e.g., "3.") is removed, and the value becomes an empty string ("").
448
- if ((prevDataValue || prevDataValue == 0 || prevDataValue == null) && !this.isDefaultQuery) {
449
- this.handleChange(value);
450
- this._onChange();
451
- }
452
- return;
453
- }
454
- // if the widget has default value and if we change the locale, the value should be in selected locale format.
455
- if (this.isDefaultQuery) {
456
- const isLocalizedNumber = isString(value) && includes(value, this.DECIMAL);
457
- const parts = isLocalizedNumber ? value.split(this.DECIMAL) : isString(value) && value.split('.');
458
- let decimalPlacesAttrVal = this.getAttr('decimalplaces');
459
- const decimalplaces = decimalPlacesAttrVal !== '' && decimalPlacesAttrVal !== undefined ? Number(decimalPlacesAttrVal) : NaN;
460
- if (this.inputmode === INPUTMODE.NATURAL && !isNaN(decimalplaces)) {
461
- if (decimalplaces === 0) {
462
- this.decimalValue = '';
463
- value = isLocalizedNumber ? parts[0] : this.transformNumber(parts[0]);
464
- }
465
- if (decimalplaces > 0) {
466
- this.decimalValue = parts[1] && parts[1].substring(0, decimalplaces) || '';
467
- if (isLocalizedNumber) {
468
- value = this.decimalValue.length ? `${parts[0]}${this.DECIMAL}${this.decimalValue}` : parts[0];
469
- }
470
- else {
471
- value = Number.parseFloat(String(value)).toFixed(decimalplaces);
472
- }
473
- }
474
- }
475
- else {
476
- this.decimalValue = parts[1] || '';
477
- value = isLocalizedNumber ? value : this.transformNumber(value);
478
- }
479
- }
480
- const numberReg = /\d/;
481
- const strVal = value.toString();
482
- let model;
483
- // When the input value only contains seperator, do not convert the sepertaor into 0
484
- if (numberReg.test(strVal)) {
485
- model = this.parseNumber(strVal);
486
- }
487
- else {
488
- model = NaN;
489
- }
490
- // On keypress, if the user types a decimal and is still active on the input do not throw error.
491
- if (isNaN(model) && strVal[strVal.length - 1] === this.DECIMAL && this.ngModelOptions.updateOn === 'change' && this.$element.find('input:focus').length) {
492
- this.lastValIsDecimal = true;
493
- }
494
- // get a valid number form the text.
495
- // if the number is valid or if number is not in range update the model value.
496
- if (!this.lastValIsDecimal && this.isValid(model)) {
497
- this.proxyModel = model;
498
- // update the display value in the text box.
499
- this.updateDisplayText();
500
- // Do not trigger onchange event for default value
501
- if (!this.isDefaultQuery) {
502
- this.handleChange(model);
503
- }
504
- }
505
- else {
506
- this.displayValue = value.toString();
507
- this.proxyModel = null;
508
- this.handleChange(null);
509
- }
510
- }
511
- // returns the actual model value of the widget.
512
- get datavalue() {
513
- return this.proxyModel;
514
- }
515
- // resets all the flags related to the widget's validation.
516
- resetValidations() {
517
- this.isInvalidNumber = false;
518
- this.numberNotInRange = false;
519
- }
520
- /**
521
- * Adds validations for the number before updating the widget model. like validating min and max value for the widget.
522
- * @param {number} val number to be validated
523
- * @returns {number}
524
- */
525
- isValid(val) {
526
- // id number is infinite then consider it as invalid value
527
- let invalidDecimalPlaces = false;
528
- if (this.inputmode === INPUTMODE.NATURAL && !isNaN(this.decimalplaces) && this.decimalplaces >= 0) {
529
- invalidDecimalPlaces = this.countDecimals(val) > this.decimalplaces;
530
- }
531
- else if (!Number.isInteger(this.step) && this.countDecimals(val) > this.countDecimals(this.step)) {
532
- invalidDecimalPlaces = true;
533
- }
534
- if (isNaN(val) || !isFinite(val) || invalidDecimalPlaces) {
535
- this.isInvalidNumber = true;
536
- return false;
537
- }
538
- if (val !== this.getValueInRange(val)) {
539
- this.numberNotInRange = true;
540
- return true;
541
- }
542
- this.resetValidations();
543
- return true;
544
- }
545
- /**
546
- * returns a valid number by validating the minimum and maximum values.
547
- * @param {number} value
548
- * @returns {number}
549
- */
550
- getValueInRange(value) {
551
- if (!isNaN(this.minvalue) && value < this.minvalue) {
552
- this.validateType = 'minvalue';
553
- return this.minvalue;
554
- }
555
- if (!isNaN(this.maxvalue) && value > this.maxvalue) {
556
- this.validateType = 'maxvalue';
557
- return this.maxvalue;
558
- }
559
- return value;
560
- }
561
- /**
562
- * convert number to localized number using angular decimal pipe. eg 10,00,000 or 1,000,000
563
- * @param number
564
- * @returns {string}
565
- */
566
- transformNumber(number, numberfilter) {
567
- const filterVal = numberfilter ? numberfilter : this.numberfilter;
568
- return this.trailingZeroDecimalPipe.transform(number, this.selectedLocale, filterVal, this.localefilter, this.trailingzero, this.decimalValue, !!numberfilter, this.i18nService?.getwidgetLocale());
569
- }
570
- /**
571
- * resets the cursor position in the text box.
572
- * @param {number} value cursor position index form left to right.
573
- */
574
- resetCursorPosition(value) {
575
- const input = this.inputEl.nativeElement;
576
- // position of the cursor should be given form right to left.
577
- let position = input.value.length - value;
578
- position = position < 0 ? 0 : position;
579
- // set the cursor position in the text box.
580
- input.setSelectionRange(position, position);
581
- }
582
- /**
583
- * Method parses the Localized number(string) to a valid number.
584
- * if the string dose not result to a valid number then returns NaN.
585
- * @param {string} val Localized number.
586
- * @returns {number}
587
- */
588
- parseNumber(val) {
589
- // WMS-22179: split number based on the decimal separator in the val
590
- // splits string into two parts. decimal and number.
591
- const parts = val.split(this.inputmode === INPUTMODE.FINANCIAL ? (val.indexOf(this.DECIMAL) > -1 ? this.DECIMAL : '.') : this.DECIMAL);
592
- if (!parts.length) {
593
- return null;
594
- }
595
- if (parts.length > 2) {
596
- return NaN;
597
- }
598
- // If number have decimal point and not have a decimal value then return.
599
- if (parts[1] === '') {
600
- return NaN;
601
- }
602
- // replaces all group separators form the number.
603
- const number = Number(parts[0].split(this.GROUP).join(''));
604
- const decimal = Number(`0.${parts[1] || 0}`);
605
- if (Number.isNaN(number) || Number.isNaN(decimal)) {
606
- return NaN;
607
- }
608
- const sum = parts.length > 1 ? parseFloat((number + decimal).toFixed(parts[1].length)) : number + decimal;
609
- // if the number is negative then calculate the number as number - decimal
610
- // Ex: number = -123 and decimal = 0.45 then number - decimal = -123-045 = -123.45
611
- // If entered number is -0.1 to -0.9 then the number is -0 and decimal is 0.1 to 0.9. Now calaculate the number as number-decimal
612
- // Ex: number = -0 and decimal = 0.1 then number-decimal = -0-0.1 = -0.1
613
- if (number === 0) {
614
- return Object.is(0, number) ? sum : number - decimal;
615
- }
616
- return number > 0 ? sum : number - decimal;
617
- }
618
- // updates the widgets text value.
619
- updateDisplayText() {
620
- const input = this.inputEl.nativeElement;
621
- const position = input.selectionStart;
622
- const preValue = input.value;
623
- if (!this.isDefaultQuery) {
624
- const parts = preValue.split(this.DECIMAL);
625
- this.decimalValue = parts[1] || '';
626
- }
627
- const stepVal = this.stepLength();
628
- if (this.inputmode === INPUTMODE.FINANCIAL && stepVal) {
629
- this.displayValue = input.value = this.transformNumber(this.proxyModel, `1.${stepVal}-${stepVal}`);
630
- this.decimalValue = this.decimalValue.replace(/\D/g, '');
631
- }
632
- else {
633
- this.displayValue = input.value = this.transformNumber(this.proxyModel);
634
- }
635
- // in safari browser, setSelectionRange will focus the input by default, which may invoke the focus event on widget.
636
- // Hence preventing the setSelectionRange when default value is set i.e. widget is not focused.
637
- if (this.updateon === 'default' && !this.isDefaultQuery) {
638
- this.resetCursorPosition(preValue.length - position);
639
- }
640
- }
641
- // This function returns the step length set in the studio
642
- stepLength() {
643
- if (this.inputmode === 'INPUTMODE.NATURAL' && !isNaN(this.decimalplaces) && this.decimalplaces >= 0) {
644
- return this.decimalplaces;
645
- }
646
- const stepLen = this.step.toString().split('.');
647
- if (stepLen.length === 1) {
648
- return;
649
- }
650
- else {
651
- return stepLen[1].length;
652
- }
653
- }
654
- // This function checks if the currency widget has input mode as natural and trailing zero is defined or not
655
- isNaturalCurrency() {
656
- return this.inputmode === INPUTMODE.NATURAL && this.widgetType === 'wm-currency' && !!this.trailingzero;
657
- }
658
- /**
659
- * @param value contains the value entered in the input box
660
- * This function modifies the user input value, into financial mode.
661
- * Number starts from highest precesion decimal, on typing number shifts to the left
662
- */
663
- onInputChange(value) {
664
- const stepVal = this.stepLength();
665
- const prevDataValue = this.getPrevDataValue();
666
- // WMS-22355, Trigger change cb if value exists or value is empty but datavalue exists (when value is selected and deleted).
667
- // Fix for [WMS-27041]: Ensure the change callback for the number widget triggers only on focus out (when updateon is set to blur),
668
- // not during initial input when the previous value is undefined and the current value is null.
669
- if (isDefined(value) && (value !== '' || this.datavalue || this.datavalue == 0)) {
670
- if (this.widgetType === "wm-number") {
671
- if (this.inputmode == INPUTMODE.FINANCIAL) {
672
- // Case 1: when there is no default value, prevDataValue is undefined && this.datavalue is null
673
- // Case 2: when there default value, prevDataValue is equal to this.datavalue
674
- if (!((prevDataValue == undefined && this.datavalue == null) || (prevDataValue == this.datavalue))) {
675
- this.handleChange(value);
676
- }
677
- }
678
- else {
679
- if (!(prevDataValue == undefined && this.datavalue == null)) {
680
- this.handleChange(value);
681
- }
682
- }
683
- }
684
- else { // currency widget
685
- this.handleChange(value);
686
- }
687
- }
688
- else {
689
- return;
690
- }
691
- if (!stepVal || this.inputmode !== INPUTMODE.FINANCIAL) {
692
- return;
693
- }
694
- let financialVal;
695
- /**
696
- * If the value is entered by the user, format the input
697
- * If the value is provided as default value, skip formatting
698
- */
699
- if (this.isDefaultQuery) {
700
- financialVal = parseFloat(value);
701
- }
702
- else {
703
- const valInWholeNum = parseInt(value.toString().replace(/\D/g, ''));
704
- financialVal = valInWholeNum * this.step;
705
- }
706
- if (!isNaN(financialVal)) {
707
- // When update on key is set keypress, update the datavalue else update only the display value
708
- if (this.ngModelOptions.updateOn === 'change') {
709
- this.datavalue = parseFloat(financialVal.toFixed(stepVal));
710
- this.handleChange(this.datavalue);
711
- }
712
- else {
713
- this.displayValue = financialVal.toFixed(stepVal);
714
- }
715
- }
716
- else if (this.ngModelOptions.updateOn !== 'blur') {
717
- this.datavalue = undefined;
718
- this.handleChange(null);
719
- }
720
- }
721
- // Input mode is financial and trailing zero is set to false, On focus set display val to fixed point notation and On blur strip trailing zeros
722
- // In currency, inputmode is natural and trailing zero and step are defined, on blur display val to fixed point notation and on focus strip the zeros
723
- checkForTrailingZeros($event) {
724
- const stepVal = this.stepLength();
725
- const financialMode = !this.trailingzero && this.inputmode === INPUTMODE.FINANCIAL;
726
- // If the user's last input is a decimal and not active on input field, throw error
727
- if (this.lastValIsDecimal) {
728
- this.onModelChange(this.displayValue);
729
- }
730
- if (!financialMode && !this.isNaturalCurrency()) {
731
- return;
732
- }
733
- if (stepVal && this.datavalue) {
734
- let numberfilter;
735
- if ((financialMode && $event.type === 'focus') || (this.isNaturalCurrency() && $event.type === 'blur')) {
736
- numberfilter = `1.${stepVal}-${stepVal}`;
737
- }
738
- this.displayValue = this.transformNumber(this.datavalue, numberfilter);
739
- }
740
- }
741
- /**
742
- * returns the number of decimal places a number have.
743
- * @param value: number
744
- * @returns {number}
745
- */
746
- countDecimals(value) {
747
- const num = Number(value);
748
- if (num === 0) {
749
- return 0;
750
- }
751
- // Convert to number and handle scientific notation
752
- if (Number.isNaN(num))
753
- return 0;
754
- // Get the exponential form to handle scientific notation properly
755
- const exponentialStr = num.toExponential();
756
- const match = exponentialStr.match(/^-?\d*\.?(\d+)?e([+-]\d+)$/);
757
- if (match) {
758
- const decimals = match[1] ? match[1].length : 0;
759
- const exponent = parseInt(match[2]);
760
- return Math.max(0, decimals - exponent);
761
- }
762
- // Fallback to regular decimal counting
763
- const decimalStr = num.toString();
764
- const isLocalizedNumber = includes(decimalStr, this.DECIMAL);
765
- const parts = isLocalizedNumber ? decimalStr.split(this.DECIMAL) : decimalStr.split('.');
766
- return parts[1] ? parts[1].length : 0;
767
- }
768
- /**
769
- * handles the arrow press event. Increases or decreases the number. triggered fom the template
770
- * @param $event keyboard event.
771
- * @param key identifier to increase or decrease the number.
772
- */
773
- onArrowPress($event, key) {
774
- $event.preventDefault();
775
- if (this.readonly || this.step === 0) {
776
- return;
777
- }
778
- const targetVal = $event.target.value.replace(/,/g, '');
779
- // proxyModel to be updated from $event.target.value if present to support arrow keys when input changes else pick up from this.proxymodel
780
- let proxyModel;
781
- if (targetVal && !isNaN(parseFloat(targetVal))) {
782
- proxyModel = parseFloat(targetVal);
783
- }
784
- else {
785
- proxyModel = this.proxyModel;
786
- }
787
- let value;
788
- // if the number is not in range and when arrow buttons are pressed need to get appropriate number value.
789
- if (this.numberNotInRange) {
790
- const inputValue = this.parseNumber(this.inputEl.nativeElement.value);
791
- // take the textbox value as current model if the value is valid.
792
- if (!isNaN(inputValue)) {
793
- value = this.getValueInRange(inputValue);
794
- proxyModel = inputValue;
795
- this.resetValidations();
796
- }
797
- }
798
- else {
799
- if (isUndefined(proxyModel) || isNull(proxyModel)) {
800
- proxyModel = value = this.getValueInRange((this.minvalue || 0));
801
- this.resetValidations();
802
- }
803
- else {
804
- value = this.getValueInRange(proxyModel + (key === 'UP' ? this.step : -this.step));
805
- }
806
- }
807
- if ((key === 'UP' && proxyModel <= value) || (key === 'DOWN' && proxyModel >= value)) {
808
- const decimalRoundValue = Math.max(this.countDecimals(proxyModel), this.countDecimals(this.step));
809
- // update the modelProxy.
810
- this.proxyModel = round(value, decimalRoundValue);
811
- this.updateDisplayText();
812
- this.handleChange(this.proxyModel);
813
- }
814
- }
815
- /**
816
- * method is called from the from widget. to check whether the value entered is valid or not.
817
- * @returns {object}
818
- */
819
- validate(c) {
820
- if (this.isInvalidNumber) {
821
- this.validateType = '';
822
- return {
823
- invalidNumber: {
824
- valid: false
825
- },
826
- };
827
- }
828
- if (this.numberNotInRange) {
829
- return {
830
- numberNotInRange: {
831
- valid: false
832
- },
833
- };
834
- }
835
- this.validateType = '';
836
- /* WMS-18269 | Extending the existing validation for 'required' */
837
- if (this['show'] && this['required']) {
838
- return (!!c.value || c.value === 0) ? null : { required: true };
839
- }
840
- return null;
841
- }
842
- validateInputEntry($event) {
843
- this.isDefaultQuery = false;
844
- // allow actions if control key is pressed or if backspace is pressed. (for Mozilla).
845
- if ($event.ctrlKey || includes(['Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Enter', 'Delete'], $event.key)) {
846
- return;
847
- }
848
- const validity = new RegExp(`^[\\d\\s-,.e+${this.GROUP}${this.DECIMAL}]$`, 'i');
849
- const inputValue = $event.target?.value || "";
850
- // when input mode is financial, do not restrict user on entering the value when step value limit is reached.
851
- const skipStepValidation = this.inputmode === INPUTMODE.FINANCIAL;
852
- // Validates if user eneters more than 16 digits
853
- if (inputValue) {
854
- const parsedVal = parseInt(inputValue.toString().replace(/\D/g, ''));
855
- if (parsedVal.toString().length > 15) {
856
- // WMS-22321: If the number is greater than MAX_SAFE_INTEGER (more than 15 numbers).
857
- // user selects a range of digits and presses a key.
858
- // Do not throw validation of exceeded number as selected range value will be deleted.
859
- const selectedVal = window.getSelection();
860
- if (selectedVal && selectedVal.toString() && selectedVal.focusNode === this.nativeElement) {
861
- return true;
862
- }
863
- return false;
864
- }
865
- }
866
- // validates entering of decimal values only when user provides decimal limit(i.e step contains decimal values).
867
- // Restrict user from entering only if the decimal limit is reached and the new digit is entered in decimal place
868
- // if (!skipStepValidation && inputValue && this.countDecimals(this.step) && (this.countDecimals(inputValue) >= this.countDecimals(this.step)) && $event.target.selectionStart >= inputValue.length - 1) {
869
- // return false;
870
- // }
871
- // validates if user entered an invalid character.
872
- if (!validity.test($event.key)) {
873
- return false;
874
- }
875
- if (this.inputmode === INPUTMODE.NATURAL && !isNaN(this.decimalplaces)) {
876
- if (this.decimalplaces === 0 && this.DECIMAL === $event.key) {
877
- return false;
878
- }
879
- const parts = includes(inputValue, this.DECIMAL) ? inputValue.split(this.DECIMAL) : inputValue.split('.');
880
- const isCursorPositionAtDecimalPlace = $event.target.selectionStart > parts[0].length;
881
- if (this.decimalplaces > 0 && this.countDecimals(inputValue) >= this.decimalplaces && isCursorPositionAtDecimalPlace) {
882
- return false;
883
- }
884
- }
885
- // comma cannot be entered consecutively
886
- if (includes(inputValue, ',') && inputValue[inputValue.length - 1] === ',' && $event.key === ',') {
887
- return false;
888
- }
889
- // a decimal value can be entered only once in the input.
890
- if (includes(inputValue, this.DECIMAL) && $event.key === this.DECIMAL) {
891
- return false;
892
- }
893
- // 'e' can be entered only once in the input.
894
- if (intersection(toArray(inputValue), ['e', 'E']).length && includes('eE', $event.key)) {
895
- return false;
896
- }
897
- if ((includes(inputValue, '+') || includes(inputValue, '-')) && ($event.key === '+' || $event.key === '-')) {
898
- return false;
899
- }
900
- // Do not allow user to enter only space without any input value
901
- if (!inputValue && $event.code === 'Space') {
902
- return false;
903
- }
904
- }
905
- onBackspace($event) {
906
- this.isDefaultQuery = false;
907
- }
908
- onDelete($event) {
909
- this.isDefaultQuery = false;
910
- }
911
- onEnter($event) {
912
- this.datavalue = $event.target.value;
913
- }
914
- onModelChange($event) {
915
- if (this.inputmode === INPUTMODE.NATURAL || (this.inputmode === INPUTMODE.FINANCIAL && this.ngModelOptions.updateOn === 'blur')) {
916
- this.datavalue = $event;
917
- }
918
- }
919
- onPropertyChange(key, nv, ov) {
920
- if (key === 'minvalue' || key === 'maxvalue') {
921
- this.isValid(nv);
922
- }
923
- else if (key === 'datavalue' && !ov) {
924
- if (this.isNaturalCurrency()) {
925
- this.checkForTrailingZeros({ type: 'blur' });
926
- }
927
- else {
928
- this.onInputChange(nv);
929
- }
930
- }
931
- else {
932
- super.onPropertyChange(key, nv, ov);
933
- }
934
- }
935
- onPaste($event) {
936
- const pastedData = $event.clipboardData.getData('text');
937
- for (const char of pastedData) {
938
- const mockEvent = new KeyboardEvent('keypress', { key: char });
939
- if (this.validateInputEntry(mockEvent) === false) {
940
- $event.preventDefault();
941
- return;
942
- }
943
- }
944
- }
945
- };
946
- NumberLocale = __decorate([
947
- __param(4, Inject('EXPLICIT_CONTEXT')),
948
- __param(4, Optional()),
949
- __metadata("design:paramtypes", [Injector, Object, AbstractI18nService,
950
- TrailingZeroDecimalPipe, Object])
951
- ], NumberLocale);
952
-
953
- class DatasetAwareFormComponent extends BaseFormCustomComponent {
954
- get modelByKey() {
955
- return this._modelByKey;
956
- }
957
- // triggers on ngModel change. This function extracts the datavalue value.
958
- set modelByKey(val) {
959
- this.selectByKey(val);
960
- // invoke on datavalue change.
961
- this.invokeOnChange(this._modelByValue);
962
- }
963
- // @ts-ignore
964
- get datavalue() {
965
- return this._modelByValue;
966
- }
967
- // triggers on setting the datavalue. This function extracts the model value.
968
- // @ts-ignore
969
- set datavalue(val) {
970
- if (this.multiple) {
971
- val = extractDataAsArray(val);
972
- }
973
- this._modelByValue = val;
974
- this.selectByValue(val);
975
- // changes on the datavalue can be subscribed using listenToDatavalue
976
- this.datavalue$.next(val);
977
- // invoke on datavalue change.
978
- this.invokeOnChange(val, undefined, true);
979
- }
980
- constructor(inj, config, explicitContext, groupby, initPromise) {
981
- super(inj, config, explicitContext, initPromise);
982
- this.groupby = groupby;
983
- this.datasetItems = [];
984
- this.acceptsArray = false; // set to true if proxyModel on widget accepts array type.
985
- this.dataset$ = new Subject();
986
- this.datavalue$ = new Subject();
987
- this.allowempty = true;
988
- this._debounceDatavalueUpdation = debounce((values) => {
989
- // if no item is found in datasetItems, wait untill the dataset updates by preserving the datavalue in toBeProcessedDatavalue.
990
- if (!isDefined(this._modelByKey) || (isArray(this._modelByKey) && !this._modelByKey.length)) {
991
- this.toBeProcessedDatavalue = values;
992
- this._modelByValue = '';
993
- }
994
- else if (isDefined(this.toBeProcessedDatavalue)) {
995
- // obtain the first array value when multiple is set to false.
996
- // set the modelByValue only when undefined.
997
- if (!isDefined(this._modelByValue)) {
998
- this._modelByValue = (!this.multiple && isArray(this.toBeProcessedDatavalue)) ? this.toBeProcessedDatavalue[0] : this.toBeProcessedDatavalue;
999
- }
1000
- this.toBeProcessedDatavalue = undefined;
1001
- }
1002
- this.initDisplayValues();
1003
- }, 150);
1004
- this.datePipe = this.inj.get(ToDatePipe);
1005
- this.appDefaults = this.inj.get(AppDefaults);
1006
- this.binddisplayexpression = this.nativeElement.getAttribute('displayexpression.bind');
1007
- this.binddisplayimagesrc = this.nativeElement.getAttribute('displayimagesrc.bind');
1008
- this.binddisplaylabel = this.nativeElement.getAttribute('displaylabel.bind');
1009
- this._debouncedInitDatasetItems = debounce$1(() => {
1010
- this.initDatasetItems();
1011
- $appDigest();
1012
- }, 150);
1013
- this.handleHeaderClick = noop;
1014
- this.cancelLocaleChangeSubscription = this.getAppInstance().subscribe("locale-changed", () => {
1015
- this._debouncedInitDatasetItems();
1016
- });
1017
- }
1018
- /**
1019
- * This function sets the _datavalue value from the model and sets the selected flag when item is found.
1020
- * Here model is the value obtained from ngModel.
1021
- * @param keys represent the model.
1022
- */
1023
- selectByKey(keys) {
1024
- this.resetDatasetItems();
1025
- if (!this.datasetItems.length) {
1026
- return;
1027
- }
1028
- if (this.multiple && !isArray(keys)) {
1029
- keys = [keys];
1030
- }
1031
- // Set the _modelByKey to the modified keys.
1032
- this._modelByKey = keys;
1033
- if (this.multiple) {
1034
- this._modelByValue = [];
1035
- keys.forEach(key => {
1036
- const itemByKey = find(this.datasetItems, item => {
1037
- // not triple equal, as the instance type can be different.
1038
- // only value comparison should be done.
1039
- return toString(item.key) === toString(key);
1040
- });
1041
- if (itemByKey) {
1042
- itemByKey.selected = true;
1043
- this._modelByValue = [...this._modelByValue, itemByKey.value];
1044
- }
1045
- });
1046
- }
1047
- else {
1048
- this._modelByValue = '';
1049
- const itemByKey = find(this.datasetItems, item => {
1050
- // not triple equal, as the instance type can be different.
1051
- // only value comparison should be done.
1052
- return toString(item.key) === toString(keys);
1053
- });
1054
- if (itemByKey) {
1055
- itemByKey.selected = true;
1056
- this._modelByValue = itemByKey.value;
1057
- }
1058
- }
1059
- this.initDisplayValues();
1060
- }
1061
- /**
1062
- * This function sets the _model value from the datavalue (selectedvalues) and sets the selected flag when item is found.
1063
- * datavalue is the default value or a value representing the displayField (for suppose: object in case of ALLFIELDS).
1064
- * If acceptsArray is true, the model always accepts an array.
1065
- * For example, select always accepts model as array whether multiple select is true or false.
1066
- * @param values represent the datavalue.
1067
- */
1068
- selectByValue(values) {
1069
- this.resetDatasetItems();
1070
- // if datavalue is not defined or empty then set the model as undefined.
1071
- if (!isDefined(values) || values === '' || isNull(values) || (values instanceof Array && !values.length)) {
1072
- this._modelByKey = undefined;
1073
- // do not return when allowempty is set to true.
1074
- if (!this.allowempty || !isDefined(values)) {
1075
- return;
1076
- }
1077
- }
1078
- if (this.acceptsArray && !isArray(values)) {
1079
- values = this.allowempty ? [values] : extractDataAsArray(values);
1080
- }
1081
- // preserve the datavalue if datasetItems are empty.
1082
- if (!this.datasetItems.length && isDefined(values)) {
1083
- this.toBeProcessedDatavalue = values;
1084
- return;
1085
- }
1086
- const filterField = this.datafield === ALLFIELDS ? 'dataObject' : 'key';
1087
- if (isArray(values)) {
1088
- this._modelByKey = [];
1089
- values.forEach(val => {
1090
- const itemByValue = find(this.datasetItems, item => {
1091
- if (filterField === 'dataObject') {
1092
- if (this.compareby && this.compareby.length) {
1093
- return isEqualWithFields(item[filterField], val, this.compareby);
1094
- }
1095
- }
1096
- return (isObject(item.value) ? isEqual(item.value, val) : (toString(item.value)).toLowerCase() === (toString(val)).toLowerCase());
1097
- });
1098
- if (itemByValue) {
1099
- itemByValue.selected = true;
1100
- this._modelByKey.push(itemByValue.key);
1101
- }
1102
- });
1103
- }
1104
- else {
1105
- this._modelByKey = undefined;
1106
- const itemByValue = find(this.datasetItems, item => {
1107
- if (filterField === 'dataObject') {
1108
- if (this.compareby && this.compareby.length) {
1109
- return isEqualWithFields(item[filterField], values, this.compareby);
1110
- }
1111
- }
1112
- return (isObject(item.value) ? isEqual(item.value, values) : (toString(item.value)).toLowerCase() === (toString(values)).toLowerCase());
1113
- });
1114
- if (itemByValue) {
1115
- itemByValue.selected = true;
1116
- this._modelByKey = itemByValue.key;
1117
- }
1118
- }
1119
- // delaying the datavalue update as the widgets in liveform are having datavalue as undefined and not the default provided value
1120
- // because datavalue is updated later when new dataset is available.
1121
- this._debounceDatavalueUpdation(values);
1122
- }
1123
- // Updates the displayValue property.
1124
- initDisplayValues() {
1125
- const displayValues = [];
1126
- this.datasetItems.forEach(item => {
1127
- if (item.selected) {
1128
- displayValues.push(item.label);
1129
- }
1130
- });
1131
- this.displayValue = this.multiple ? displayValues : displayValues[0] || '';
1132
- if (this.viewParent.containerWidget && this.viewParent.containerWidget._isCustom)
1133
- this.viewParent.containerWidget.displayValue = this.displayValue.length ? this.displayValue : '';
1134
- }
1135
- // This function parses the dataset and extracts the displayOptions from parsed dataset.
1136
- initDatasetItems() {
1137
- if (!this.dataset || isEmpty(this.dataset)) {
1138
- this.datasetItems = [];
1139
- // notify the dataset listeners
1140
- this.dataset$.next(this.datasetItems);
1141
- return;
1142
- }
1143
- // convert any dataset to the object format.
1144
- const orderedDataset = getOrderedDataset(convertDataToObject(this.dataset), this.orderby);
1145
- if (this.usekeys) {
1146
- this.datasetItems = transformDataWithKeys(orderedDataset);
1147
- }
1148
- else {
1149
- const displayOptions = transformFormData(this.viewParent, orderedDataset, this.datafield, {
1150
- displayField: this.displayfield || this.displaylabel,
1151
- displayExpr: this.displayexpression,
1152
- bindDisplayExpr: this.binddisplayexpression || this.binddisplaylabel,
1153
- bindDisplayImgSrc: this.binddisplayimagesrc,
1154
- displayImgSrc: this.displayimagesrc
1155
- });
1156
- // get the unique objects out of the extracted data. Notify change in datasetItems using [...datasetItems] notation
1157
- this.datasetItems = [...getUniqObjsByDataField(displayOptions, this.datafield, this.displayfield || this.displaylabel, toBoolean(this.allowempty))];
1158
- }
1159
- this.postDatasetItemsInit();
1160
- }
1161
- // Once the datasetItems are ready, set the proxyModel by using datavalue.
1162
- postDatasetItemsInit() {
1163
- if (this.datasetItems.length && !this._defaultQueryInvoked) {
1164
- // use the latest of toBeProcessedDatavalue, datavalue
1165
- const _datavalue = isEmpty(this.toBeProcessedDatavalue) ? this.datavalue : this.toBeProcessedDatavalue;
1166
- this.selectByValue(_datavalue);
1167
- }
1168
- // notify the dataset listeners
1169
- this.dataset$.next(this.datasetItems);
1170
- }
1171
- // Reset the selected flag on datasetItems to false.
1172
- resetDatasetItems() {
1173
- this.datasetItems.forEach(item => item.selected = false);
1174
- }
1175
- setTemplate(partialName) {
1176
- this.content = partialName;
1177
- if (this.viewParent && this.viewParent.prefabName) {
1178
- this['prefabName'] = this.viewParent.prefabName;
1179
- }
1180
- }
1181
- getGroupedData() {
1182
- return this.datasetItems.length ? groupData(this, convertDataToObject(this.datasetItems), this.groupby, this.match, this.orderby, this.dateformat, this.datePipe, 'dataObject', this.appDefaults) : [];
1183
- }
1184
- datasetSubscription() {
1185
- const datasetSubscription = this.dataset$.subscribe(() => {
1186
- this.groupedData = this.getGroupedData();
1187
- });
1188
- this.registerDestroyListener(() => datasetSubscription.unsubscribe());
1189
- }
1190
- setGroupData() {
1191
- this.datasetSubscription();
1192
- // If groupby is set, get the groupedData from the datasetItems.
1193
- this.groupedData = this.getGroupedData();
1194
- }
1195
- onPropertyChange(key, nv, ov) {
1196
- super.onPropertyChange(key, nv, ov);
1197
- switch (key) {
1198
- case 'dataset':
1199
- case 'datafield':
1200
- case 'displayfield':
1201
- case 'displaylabel':
1202
- case 'displayexpression':
1203
- case 'orderby':
1204
- case 'usekeys':
1205
- this._debouncedInitDatasetItems();
1206
- break;
1207
- case 'required':
1208
- case 'datavalue':
1209
- this._onChange(this.datavalue);
1210
- break;
1211
- case 'groupby':
1212
- case 'match':
1213
- if (this.widgetType !== 'wm-search' && this.widgetType !== 'wm-chips') {
1214
- this.setGroupData();
1215
- }
1216
- break;
1217
- }
1218
- }
1219
- ngOnInit() {
1220
- super.ngOnInit();
1221
- if (this.groupby && (this.widgetType !== 'wm-search' && this.widgetType !== 'wm-chips')) {
1222
- this.setGroupData();
1223
- }
1224
- // adding the handler for header click and toggle headers.
1225
- if (this.groupby && this.collapsible) {
1226
- this.handleHeaderClick = handleHeaderClick;
1227
- this.toggleAllHeaders = toggleAllHeaders.bind(undefined, this);
1228
- }
1229
- }
1230
- ngOnDestroy() {
1231
- if (this.cancelLocaleChangeSubscription) {
1232
- this.cancelLocaleChangeSubscription();
1233
- }
1234
- }
1235
- static { this.ɵfac = function DatasetAwareFormComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DatasetAwareFormComponent)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(WidgetConfig), i0.ɵɵinject('EXPLICIT_CONTEXT', 8), i0.ɵɵinjectAttribute('groupby'), i0.ɵɵinject(Promise)); }; }
1236
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DatasetAwareFormComponent, factory: DatasetAwareFormComponent.ɵfac }); }
1237
- }
1238
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatasetAwareFormComponent, [{
1239
- type: Injectable
1240
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
1241
- type: Inject,
1242
- args: [WidgetConfig]
1243
- }] }, { type: undefined, decorators: [{
1244
- type: Inject,
1245
- args: ['EXPLICIT_CONTEXT']
1246
- }, {
1247
- type: Optional
1248
- }] }, { type: undefined, decorators: [{
1249
- type: Attribute,
1250
- args: ['groupby']
1251
- }] }, { type: Promise }], null); })();
1252
-
1253
- const registerProps$d = () => {
1254
- register('wm-buttongroup', new Map([
1255
- ['class', PROP_STRING],
1256
- ['name', PROP_STRING],
1257
- ['show', { value: true, ...PROP_BOOLEAN }],
1258
- ['vertical', PROP_BOOLEAN]
1259
- ]));
1260
- };
1261
-
1262
- const DEFAULT_CLS$5 = 'btn-group app-button-group';
1263
- const WIDGET_CONFIG$d = {
1264
- widgetType: 'wm-buttongroup',
1265
- hostClass: DEFAULT_CLS$5
1266
- };
1267
- class ButtonGroupDirective extends StylableComponent {
1268
- static { this.initializeProps = registerProps$d(); }
1269
- handleClick(event) {
1270
- const $target = $(event.target).closest('.app-button');
1271
- this.$element.find('.app-button').removeClass('selected');
1272
- $target.addClass('selected');
1273
- }
1274
- constructor(inj, explicitContext) {
1275
- super(inj, WIDGET_CONFIG$d, explicitContext);
1276
- styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);
1277
- }
1278
- static { this.ɵfac = function ButtonGroupDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ButtonGroupDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
1279
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ButtonGroupDirective, selectors: [["", "wmButtonGroup", ""]], hostVars: 2, hostBindings: function ButtonGroupDirective_HostBindings(rf, ctx) { if (rf & 1) {
1280
- i0.ɵɵlistener("click", function ButtonGroupDirective_click_HostBindingHandler($event) { return ctx.handleClick($event); });
1281
- } if (rf & 2) {
1282
- i0.ɵɵclassProp("btn-group-vertical", ctx.vertical);
1283
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
1284
- provideAsWidgetRef(ButtonGroupDirective)
1285
- ]), i0.ɵɵInheritDefinitionFeature] }); }
1286
- }
1287
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ButtonGroupDirective, [{
1288
- type: Directive,
1289
- args: [{
1290
- standalone: true,
1291
- selector: '[wmButtonGroup]',
1292
- providers: [
1293
- provideAsWidgetRef(ButtonGroupDirective)
1294
- ]
1295
- }]
1296
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
1297
- type: Inject,
1298
- args: ['EXPLICIT_CONTEXT']
1299
- }, {
1300
- type: Optional
1301
- }] }], { vertical: [{
1302
- type: HostBinding,
1303
- args: ['class.btn-group-vertical']
1304
- }], handleClick: [{
1305
- type: HostListener,
1306
- args: ['click', ['$event']]
1307
- }] }); })();
1308
-
1309
- class CaptionPositionDirective {
1310
- constructor(inj, app) {
1311
- // skip floating caption for the below form fields
1312
- this.skipFloatPositionWidgets = ['radioset', 'checkboxset', 'richtext', 'switch', 'chips', 'checkbox', 'slider', 'rating', 'toggle', 'upload'];
1313
- this.elementRef = inj.get(ElementRef);
1314
- this.nativeEl = this.elementRef.nativeElement;
1315
- this.app = app;
1316
- }
1317
- onBlurCb() {
1318
- let mobileInputVal;
1319
- // In case of mobile date / time picker check for input element's value which has 'mobile-input' class
1320
- if (this.inputEl.length > 1 && this.inputEl.hasClass('mobile-input')) {
1321
- forEach(this.inputEl, (el) => {
1322
- if ($(el).hasClass('mobile-input') && el.value) {
1323
- mobileInputVal = el.value;
1324
- }
1325
- });
1326
- }
1327
- if (!this.inputEl.val() && !mobileInputVal) {
1328
- this.compositeEle.classList.remove('float-active');
1329
- this.inputEl.removeAttr('placeholder');
1330
- }
1331
- }
1332
- onFocusCb() {
1333
- this.compositeEle.classList.add('float-active');
1334
- this.inputEl.attr('placeholder', this.placeholder);
1335
- }
1336
- // For select widget, display placeholder only on focus else remove the text of the option selected.
1337
- checkForSelectPlaceholder() {
1338
- const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');
1339
- if (selectElPlaceholderOption && selectElPlaceholderOption.textContent && !$(this.nativeEl).find('select').is(':focus') &&
1340
- !$(this.inputEl.closest('[widget-id]')).attr('datavalue')) {
1341
- selectElPlaceholderOption.textContent = '';
1342
- }
1343
- }
1344
- setDefaultValueAnimation() {
1345
- // remove placeholder when the input el has placeholder and the placeholder is not bound to any variable
1346
- if (!this._isPlaceholderBound && this.inputEl.attr('placeholder')) {
1347
- this.placeholder = this.inputEl.attr('placeholder');
1348
- this.inputEl.removeAttr('placeholder');
1349
- }
1350
- // Do not show placeholder as selected by default
1351
- this.checkForSelectPlaceholder();
1352
- // check for datavalue attribute in composite element and defaultvalue attribute in form field element
1353
- // check for datavalue.bind attribute to see whether default value is binded via expression or a variable
1354
- // check for displayformat attribute, as in form fields user can set display format to the field
1355
- // check for formdata/bindformdata attribute to see if any default value is binded to the form
1356
- // check for select tag with multiple attribute enabled
1357
- if ((this.inputEl.val() && !this.inputEl.is('select')) || $(this.inputEl.closest('[widget-id]')).attr('datavalue') || $(this.inputEl.parent('[widget-id]')).attr('datavalue.bind') || this.nativeEl.getAttribute('defaultvalue')
1358
- || this.nativeEl.getAttribute('displayformat') || $(this.nativeEl).find('select option:selected').text() || $(this.nativeEl).find('select').attr('multiple')) {
1359
- this.compositeEle.classList.add('float-active');
1360
- }
1361
- }
1362
- /**
1363
- * Observing placeholder attribute change on DOM instead of having a propChangeHandler fn
1364
- * For composite widgets propertychangehandler function is invoked at independent widgets where as the directive is at composite level
1365
- */
1366
- observeForPlaceholderAttrChange() {
1367
- this._attrObserver = new MutationObserver(mutations => {
1368
- mutations.forEach((mutation) => {
1369
- if (mutation.attributeName === 'placeholder' && this.inputEl.attr('placeholder') && !this.compositeEle.classList.contains('float-active')) {
1370
- this.placeholder = this.inputEl.attr('placeholder');
1371
- this.inputEl.removeAttr('placeholder');
1372
- }
1373
- });
1374
- });
1375
- const config = { attributes: true, childList: false, characterData: false };
1376
- this._attrObserver.observe(this.inputEl[0], config);
1377
- }
1378
- // when a form is right aligned and have input-group-btn's like date picker, time picker etc. adjust the css to not overlap the label on the icon
1379
- checkForRightAlignedForm() {
1380
- const $compositeEle = $(this.compositeEle);
1381
- if ($compositeEle.closest('.align-right').length && $compositeEle.find('.input-group-btn').length) {
1382
- const $label = $compositeEle.find('label');
1383
- if ($compositeEle.find('[wmdatetime]').length) { // for datetime picker, as there will be 2 icons css is different
1384
- $label.addClass('input-grp-dt-icon');
1385
- }
1386
- else {
1387
- $label.addClass('input-grp-icon');
1388
- }
1389
- }
1390
- }
1391
- ngAfterViewInit() {
1392
- this.compositeEle = this.nativeEl;
1393
- const widget = this.nativeEl.widget;
1394
- let captionPosition = widget.$attrs.get('captionposition');
1395
- if (widget.form) {
1396
- captionPosition = widget.form.$attrs.get('captionposition');
1397
- this.compositeEle = this.nativeEl.querySelector('.app-composite-widget');
1398
- this._isPlaceholderBound = this.nativeEl.getAttribute('placeholder.bind');
1399
- }
1400
- if (captionPosition === 'floating') {
1401
- if (widget.form) { // for form-fields remove caption-floating and replace it with caption-float or caption-top
1402
- const widgetType = this.nativeEl.getAttribute('widgettype'); // fetches the form field type
1403
- if (this.skipFloatPositionWidgets.indexOf(widgetType) > -1) {
1404
- this.compositeEle.classList.remove('caption-floating');
1405
- this.compositeEle.classList.add('caption-top');
1406
- }
1407
- this.checkForRightAlignedForm();
1408
- }
1409
- this.inputEl = $(this.nativeEl).find('input, select, textarea');
1410
- if (!this._isPlaceholderBound) {
1411
- this._isPlaceholderBound = this.inputEl.closest('[widget-id]').attr('placeholder.bind');
1412
- }
1413
- // call the below function to apply float-active class when there are default values to the fields
1414
- setTimeout(this.setDefaultValueAnimation.bind(this), 0);
1415
- this.inputEl.focus(this.onFocusCb.bind(this));
1416
- this.inputEl.blur(this.onBlurCb.bind(this));
1417
- // observe for placeholder attribute change when placeholder is bound via db variable or an expression
1418
- if (this._isPlaceholderBound) {
1419
- this.observeForPlaceholderAttrChange();
1420
- }
1421
- }
1422
- }
1423
- // captionPositionAnimate is only notified for date-time, time and search widgets as input el is not updated with value on selection of dropdown/popups
1424
- ngOnInit() {
1425
- this.labelAnimationSubscription = this.app.subscribe('captionPositionAnimate', (data) => {
1426
- // displayVal is true when there is a value entered in the input field
1427
- // In case of form fields, when the field is in focus, isFocused will be set as true
1428
- // isSelectMultiple is set to true when for select widget, multiple option is enabled
1429
- // Checking inputEl focus - when form is represented as dialog and the first field is automatically in focus
1430
- const isInputElFocused = this.inputEl && this.inputEl.is(':focus');
1431
- if (data.displayVal || data.isFocused || data.isSelectMultiple || isInputElFocused) {
1432
- data.nativeEl.addClass('float-active');
1433
- if (!data.displayVal && isInputElFocused) {
1434
- this.inputEl.attr('placeholder', this.placeholder);
1435
- }
1436
- }
1437
- else {
1438
- data.nativeEl.removeClass('float-active');
1439
- // Remove placeholder on removing float-active, if not the label and placeholder are collided
1440
- // before placeholder is removed assign it to the placeholder variable
1441
- // check for placeholder in inputel and selectel
1442
- if (this.inputEl) {
1443
- const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');
1444
- if (this.inputEl.attr('placeholder') || selectElPlaceholderOption) {
1445
- if (selectElPlaceholderOption) {
1446
- selectElPlaceholderOption.textContent = '';
1447
- }
1448
- else {
1449
- this.placeholder = this.inputEl.attr('placeholder');
1450
- this.inputEl.removeAttr('placeholder');
1451
- }
1452
- }
1453
- }
1454
- }
1455
- });
1456
- }
1457
- ngOnDestroy() {
1458
- if (this.labelAnimationSubscription) {
1459
- this.labelAnimationSubscription();
1460
- }
1461
- if (this._attrObserver) {
1462
- this._attrObserver.disconnect();
1463
- }
1464
- }
1465
- static { this.ɵfac = function CaptionPositionDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaptionPositionDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1$1.App)); }; }
1466
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CaptionPositionDirective, selectors: [["", "wmCaptionPosition", ""]], standalone: true }); }
1467
- }
1468
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaptionPositionDirective, [{
1469
- type: Directive,
1470
- args: [{
1471
- standalone: true,
1472
- selector: '[wmCaptionPosition]'
1473
- }]
1474
- }], () => [{ type: i0.Injector }, { type: i1$1.App }], null); })();
1475
-
1476
- const checkboxProps = new Map([
1477
- ['caption', PROP_STRING],
1478
- ['class', PROP_STRING],
1479
- ['conditionalclass', PROP_ANY],
1480
- ['conditionalstyle', PROP_ANY],
1481
- ['checkedvalue', { value: true, ...PROP_STRING }],
1482
- ['datavaluesource', PROP_ANY],
1483
- ['datavalue', PROP_STRING],
1484
- ['disabled', PROP_BOOLEAN],
1485
- ['hint', PROP_STRING],
1486
- ['arialabel', PROP_STRING],
1487
- ['name', PROP_STRING],
1488
- ['readonly', PROP_BOOLEAN],
1489
- ['required', PROP_BOOLEAN],
1490
- ['shortcutkey', PROP_STRING],
1491
- ['show', { value: true, ...PROP_BOOLEAN }],
1492
- ['tabindex', { value: 0, ...PROP_NUMBER }],
1493
- ['uncheckedvalue', { value: false, ...PROP_STRING }]
1494
- ]);
1495
- const registerProps$c = () => {
1496
- register('wm-checkbox', checkboxProps);
1497
- registerFormWidget(FormWidgetType.CHECKBOX, checkboxProps);
1498
- registerFormWidget(FormWidgetType.TOGGLE, checkboxProps);
1499
- };
1500
-
1501
- const _c0$b = ["checkbox"];
1502
- const _c1$a = ["wmCheckbox", ""];
1503
- const _c2$7 = (a0, a1, a2) => ({ "unchecked": a0, "disabled": a1, "required": a2 });
1504
- const _c3$3 = () => ({ standalone: true });
1505
- const DEFAULT_CLS$4 = 'app-checkbox checkbox';
1506
- const WIDGET_CONFIG$c = {
1507
- widgetType: 'wm-checkbox',
1508
- hostClass: DEFAULT_CLS$4
1509
- };
1510
- /*
1511
- * try to convert the chekedvalue and unchecked values to boolean/number
1512
- */
1513
- const unStringify = (val, defaultVal) => {
1514
- if (val === null) {
1515
- return defaultVal;
1516
- }
1517
- if (val === true || val === 'true') {
1518
- return true;
1519
- }
1520
- if (val === false || val === 'false') {
1521
- return false;
1522
- }
1523
- const number = parseInt(val, 10);
1524
- if (!isNaN(number)) {
1525
- return number;
1526
- }
1527
- return val;
1528
- };
1529
- class CheckboxComponent extends BaseFormCustomComponent {
1530
- static { this.initializeProps = registerProps$c(); }
1531
- // if the checkbox is checked, return checkedvalue else return uncheckedvalue
1532
- // @ts-ignore
1533
- get datavalue() {
1534
- return isDefined(this.proxyModel) ? (this.proxyModel ? this._checkedvalue : this._uncheckedvalue) : undefined;
1535
- }
1536
- // when the datavalue is set, update the checked state
1537
- // @ts-ignore
1538
- set datavalue(v) {
1539
- this.proxyModel = (isDefined(v) && v !== '') ? v === this._checkedvalue : undefined;
1540
- this.updatePrevDatavalue(this.datavalue);
1541
- }
1542
- constructor(inj, checkedVal, uncheckedVal, type, explicitContext) {
1543
- super(inj, WIDGET_CONFIG$c, explicitContext);
1544
- this.type = type;
1545
- this._caption = '&nbsp';
1546
- this._checkedvalue = unStringify(checkedVal, true);
1547
- this._uncheckedvalue = unStringify(uncheckedVal, false);
1548
- // if the type of the checkbox is toggle update the related classes on the host node
1549
- toggleClass(this.nativeElement, 'app-toggle', type === 'toggle');
1550
- }
1551
- onPropertyChange(key, nv, ov) {
1552
- if (key === 'tabindex') {
1553
- return;
1554
- }
1555
- if (key === 'required') {
1556
- this._onChange(this.datavalue);
1557
- return;
1558
- }
1559
- if (key === 'caption') {
1560
- if (!isDefined(nv) || nv === '') {
1561
- this._caption = '&nbsp;';
1562
- }
1563
- else {
1564
- this._caption = nv;
1565
- }
1566
- }
1567
- else if (key === 'checkedvalue') {
1568
- this._checkedvalue = unStringify(nv, true);
1569
- }
1570
- else if (key === 'uncheckedvalue') {
1571
- this._uncheckedvalue = unStringify(nv, false);
1572
- }
1573
- else if (key === 'datavalue') {
1574
- this.datavalue = unStringify(nv);
1575
- this._onChange(this.datavalue);
1576
- }
1577
- else {
1578
- super.onPropertyChange(key, nv, ov);
1579
- }
1580
- }
1581
- // change and blur events are handled from template
1582
- handleEvent(node, eventName, callback, locals) {
1583
- if (eventName !== 'change' && eventName !== 'blur') {
1584
- // applying tap (Hammer event) on the label as the event handler is not getting triggered on the input.
1585
- const $el = eventName === 'tap' ? this.nativeElement.querySelector('label') : this.checkboxEl.nativeElement;
1586
- super.handleEvent($el, eventName, callback, locals);
1587
- }
1588
- }
1589
- handleChange(newVal) {
1590
- this.invokeOnChange(this.datavalue, { type: 'change' }, this.ngModel.valid);
1591
- }
1592
- onKeyDown($event) {
1593
- $event.preventDefault();
1594
- this.checkboxEl.nativeElement.click();
1595
- }
1596
- ngAfterViewInit() {
1597
- super.ngAfterViewInit();
1598
- styler(this.nativeElement.querySelector('label'), this);
1599
- }
1600
- static { this.ɵfac = function CheckboxComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CheckboxComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵinjectAttribute('checkedvalue'), i0.ɵɵinjectAttribute('uncheckedvalue'), i0.ɵɵinjectAttribute('type'), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
1601
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CheckboxComponent, selectors: [["", "wmCheckbox", ""]], viewQuery: function CheckboxComponent_Query(rf, ctx) { if (rf & 1) {
1602
- i0.ɵɵviewQuery(NgModel, 5);
1603
- i0.ɵɵviewQuery(_c0$b, 7, ElementRef);
1604
- } if (rf & 2) {
1605
- let _t;
1606
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ngModel = _t.first);
1607
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.checkboxEl = _t.first);
1608
- } }, hostBindings: function CheckboxComponent_HostBindings(rf, ctx) { if (rf & 1) {
1609
- i0.ɵɵlistener("keydown.enter", function CheckboxComponent_keydown_enter_HostBindingHandler($event) { return ctx.onKeyDown($event, "ENTER"); });
1610
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
1611
- provideAs(CheckboxComponent, NG_VALUE_ACCESSOR, true),
1612
- provideAs(CheckboxComponent, NG_VALIDATORS, true),
1613
- provideAsWidgetRef(CheckboxComponent)
1614
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c1$a, decls: 6, vars: 18, consts: [["checkbox", ""], [3, "ngClass"], ["type", "checkbox", "focus-target", "", 3, "ngModelChange", "blur", "ngModel", "ngModelOptions", "readonly", "required", "disabled", "tabindex"], [1, "caption", 3, "innerHtml"], ["alt", "Checkbox Image", "aria-hidden", "true", "src", "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", 1, "switch"], ["type", "hidden", "aria-hidden", "true", "tabindex", "-1", 1, "ng-hide", "model-holder", 3, "disabled", "value"]], template: function CheckboxComponent_Template(rf, ctx) { if (rf & 1) {
1615
- const _r1 = i0.ɵɵgetCurrentView();
1616
- i0.ɵɵelementStart(0, "label", 1)(1, "input", 2, 0);
1617
- i0.ɵɵtwoWayListener("ngModelChange", function CheckboxComponent_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.proxyModel, $event) || (ctx.proxyModel = $event); return i0.ɵɵresetView($event); });
1618
- i0.ɵɵlistener("blur", function CheckboxComponent_Template_input_blur_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.invokeOnTouched($event)); })("ngModelChange", function CheckboxComponent_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleChange($event)); });
1619
- i0.ɵɵelementEnd();
1620
- i0.ɵɵelement(3, "span", 3)(4, "img", 4);
1621
- i0.ɵɵelementEnd();
1622
- i0.ɵɵelement(5, "input", 5);
1623
- } if (rf & 2) {
1624
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(13, _c2$7, !ctx.proxyModel, ctx.disabled || ctx.readonly, ctx.required && ctx._caption));
1625
- i0.ɵɵadvance();
1626
- i0.ɵɵtwoWayProperty("ngModel", ctx.proxyModel);
1627
- i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(17, _c3$3))("readonly", ctx.readonly)("required", ctx.required)("disabled", ctx.disabled || ctx.readonly)("tabindex", ctx.tabindex);
1628
- i0.ɵɵattribute("name", ctx.name)("aria-label", ctx.arialabel)("accesskey", ctx.shortcutkey);
1629
- i0.ɵɵadvance(2);
1630
- i0.ɵɵproperty("innerHtml", ctx._caption, i0.ɵɵsanitizeHtml);
1631
- i0.ɵɵadvance(2);
1632
- i0.ɵɵproperty("disabled", ctx.disabled)("value", ctx.proxyModel);
1633
- } }, dependencies: [CommonModule, i1.NgClass, WmComponentsModule, FormsModule, i2$1.CheckboxControlValueAccessor, i2$1.NgControlStatus, i2$1.CheckboxRequiredValidator, i2$1.NgModel], encapsulation: 2 }); }
1634
- }
1635
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckboxComponent, [{
1636
- type: Component,
1637
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule, FormsModule], selector: '[wmCheckbox]', providers: [
1638
- provideAs(CheckboxComponent, NG_VALUE_ACCESSOR, true),
1639
- provideAs(CheckboxComponent, NG_VALIDATORS, true),
1640
- provideAsWidgetRef(CheckboxComponent)
1641
- ], template: "<label [ngClass]=\"{'unchecked': !proxyModel, 'disabled': (disabled || readonly), 'required': (required && _caption)}\">\n <input type=\"checkbox\"\n #checkbox\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel\"\n focus-target\n [(ngModel)]=\"proxyModel\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled || readonly\"\n [attr.accesskey]=\"shortcutkey\"\n [tabindex]=\"tabindex\"\n (blur)=\"invokeOnTouched($event)\"\n (ngModelChange)=\"handleChange($event)\">\n <span class=\"caption\" [innerHtml]=\"_caption\"></span>\n <img alt=\"Checkbox Image\" aria-hidden=\"true\" src=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" class=\"switch\"/>\n</label>\n<input type=\"hidden\" class=\"ng-hide model-holder\" aria-hidden=\"true\" tabindex=\"-1\" [disabled]=\"disabled\" [value]=\"proxyModel\">\n" }]
1642
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
1643
- type: Attribute,
1644
- args: ['checkedvalue']
1645
- }] }, { type: undefined, decorators: [{
1646
- type: Attribute,
1647
- args: ['uncheckedvalue']
1648
- }] }, { type: undefined, decorators: [{
1649
- type: Attribute,
1650
- args: ['type']
1651
- }] }, { type: undefined, decorators: [{
1652
- type: Inject,
1653
- args: ['EXPLICIT_CONTEXT']
1654
- }, {
1655
- type: Optional
1656
- }] }], { ngModel: [{
1657
- type: ViewChild,
1658
- args: [NgModel]
1659
- }], checkboxEl: [{
1660
- type: ViewChild,
1661
- args: ['checkbox', { static: true, read: ElementRef }]
1662
- }], onKeyDown: [{
1663
- type: HostListener,
1664
- args: ['keydown.enter', ['$event', '"ENTER"']]
1665
- }] }); })();
1666
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CheckboxComponent, { className: "CheckboxComponent", filePath: "checkbox/checkbox.component.ts", lineNumber: 64 }); })();
1667
-
1668
- const checkboxsetProps = new Map([
1669
- ['class', PROP_STRING],
1670
- ['collapsible', PROP_BOOLEAN],
1671
- ['compareby', PROP_STRING],
1672
- ['datafield', PROP_STRING],
1673
- ['dataset', { value: 'Option 1, Option 2, Option 3', ...PROP_ANY }],
1674
- ['datavaluesource', PROP_ANY],
1675
- ['datavalue', PROP_STRING],
1676
- ['dateformat', PROP_STRING],
1677
- ['disabled', PROP_BOOLEAN],
1678
- ['displayexpression', PROP_STRING],
1679
- ['displayfield', PROP_STRING],
1680
- ['displayValue', PROP_STRING],
1681
- ['groupby', PROP_STRING],
1682
- ['itemclass', { value: '', ...PROP_STRING }],
1683
- ['itemsperrow', { value: 'xs-1 sm-1 md-1 lg-1', ...PROP_STRING }],
1684
- ['listclass', { value: '', ...PROP_STRING }],
1685
- ['match', PROP_STRING],
1686
- ['name', PROP_STRING],
1687
- ['orderby', PROP_STRING],
1688
- ['readonly', PROP_BOOLEAN],
1689
- ['required', PROP_BOOLEAN],
1690
- ['show', { value: true, ...PROP_BOOLEAN }],
1691
- ['showcount', PROP_BOOLEAN],
1692
- ['showindevice', { displayType: 'inline-block', value: 'all', ...PROP_STRING }],
1693
- ['tabindex', { value: 0, ...PROP_NUMBER }],
1694
- ['usekeys', PROP_BOOLEAN]
1695
- ]);
1696
- const registerProps$b = () => {
1697
- register('wm-checkboxset', checkboxsetProps);
1698
- registerFormWidget(FormWidgetType.CHECKBOXSET, new Map(checkboxsetProps));
1699
- };
1700
-
1701
- const _c0$a = ["wmCheckboxset", ""];
1702
- const _c1$9 = (a0, a1) => ["checkbox", "app-checkbox", a0, a1];
1703
- const _c2$6 = a0 => ({ "disabled": a0 });
1704
- const _c3$2 = a0 => ({ "collapsible-content": a0 });
1705
- const _c4$2 = (a0, a1) => ["checkbox", "app-checkbox", "group-list-item", a0, a1];
1706
- function CheckboxsetComponent_Conditional_0_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
1707
- i0.ɵɵelementStart(0, "label", 4);
1708
- i0.ɵɵelement(1, "input", 6)(2, "span", 7);
1709
- i0.ɵɵelementEnd();
1710
- } if (rf & 2) {
1711
- const ctx_r3 = i0.ɵɵnextContext();
1712
- const item_r2 = ctx_r3.$implicit;
1713
- const ɵ$index_2_r5 = ctx_r3.$index;
1714
- const ctx_r2 = i0.ɵɵnextContext(2);
1715
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c2$6, ctx_r2.disabled || ctx_r2.readonly))("title", item_r2.label);
1716
- i0.ɵɵadvance();
1717
- i0.ɵɵproperty("name", "checkboxset_" + ctx_r2.widgetId)("tabindex", ctx_r2.tabindex)("disabled", ctx_r2.disabled || ctx_r2.readonly)("value", item_r2.key)("tabindex", ctx_r2.tabindex)("checked", item_r2.selected);
1718
- i0.ɵɵattribute("data-attr-index", ɵ$index_2_r5);
1719
- i0.ɵɵadvance();
1720
- i0.ɵɵproperty("textContent", item_r2.label);
1721
- } }
1722
- function CheckboxsetComponent_Conditional_0_For_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
1723
- i0.ɵɵelementStart(0, "label", 5);
1724
- i0.ɵɵelement(1, "input", 6)(2, "span", 8);
1725
- i0.ɵɵelementEnd();
1726
- } if (rf & 2) {
1727
- const ctx_r3 = i0.ɵɵnextContext();
1728
- const item_r2 = ctx_r3.$implicit;
1729
- const ɵ$index_2_r5 = ctx_r3.$index;
1730
- const ctx_r2 = i0.ɵɵnextContext(2);
1731
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$6, ctx_r2.disabled || ctx_r2.readonly));
1732
- i0.ɵɵadvance();
1733
- i0.ɵɵproperty("name", "checkboxset_" + ctx_r2.widgetId)("tabindex", ctx_r2.tabindex)("disabled", ctx_r2.disabled || ctx_r2.readonly)("value", item_r2.key)("tabindex", ctx_r2.tabindex)("checked", item_r2.selected);
1734
- i0.ɵɵattribute("data-attr-index", ɵ$index_2_r5);
1735
- } }
1736
- function CheckboxsetComponent_Conditional_0_For_1_Template(rf, ctx) { if (rf & 1) {
1737
- const _r1 = i0.ɵɵgetCurrentView();
1738
- i0.ɵɵelementStart(0, "li", 3);
1739
- i0.ɵɵlistener("click", function CheckboxsetComponent_Conditional_0_For_1_Template_li_click_0_listener($event) { const item_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCheckboxLabelClick($event, item_r2.key)); });
1740
- i0.ɵɵtemplate(1, CheckboxsetComponent_Conditional_0_For_1_Conditional_1_Template, 3, 12, "label", 4)(2, CheckboxsetComponent_Conditional_0_For_1_Conditional_2_Template, 3, 10, "label", 5);
1741
- i0.ɵɵelementEnd();
1742
- } if (rf & 2) {
1743
- const item_r2 = ctx.$implicit;
1744
- const ctx_r2 = i0.ɵɵnextContext(2);
1745
- i0.ɵɵclassProp("active", item_r2.selected);
1746
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(7, _c1$9, ctx_r2.itemclass, ctx_r2.itemsPerRowClass))("wmItemTemplate", ctx_r2.content)("userComponentParams", item_r2);
1747
- i0.ɵɵadvance();
1748
- i0.ɵɵconditional(!ctx_r2.content ? 1 : -1);
1749
- i0.ɵɵadvance();
1750
- i0.ɵɵconditional(ctx_r2.content ? 2 : -1);
1751
- } }
1752
- function CheckboxsetComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
1753
- i0.ɵɵrepeaterCreate(0, CheckboxsetComponent_Conditional_0_For_1_Template, 3, 10, "li", 2, i0.ɵɵrepeaterTrackByIdentity);
1754
- } if (rf & 2) {
1755
- const ctx_r2 = i0.ɵɵnextContext();
1756
- i0.ɵɵrepeater(ctx_r2.datasetItems);
1757
- } }
1758
- function CheckboxsetComponent_Conditional_1_For_1_Conditional_6_Template(rf, ctx) { if (rf & 1) {
1759
- i0.ɵɵelement(0, "i", 14);
1760
- } if (rf & 2) {
1761
- const ctx_r2 = i0.ɵɵnextContext(3);
1762
- i0.ɵɵpropertyInterpolate2("title", "", ctx_r2.appLocale.LABEL_COLLAPSE, "/", ctx_r2.appLocale.LABEL_EXPAND, "");
1763
- } }
1764
- function CheckboxsetComponent_Conditional_1_For_1_Conditional_7_Template(rf, ctx) { if (rf & 1) {
1765
- i0.ɵɵelement(0, "span", 15);
1766
- } if (rf & 2) {
1767
- const groupObj_r7 = i0.ɵɵnextContext().$implicit;
1768
- i0.ɵɵproperty("textContent", groupObj_r7.data.length);
1769
- } }
1770
- function CheckboxsetComponent_Conditional_1_For_1_For_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
1771
- i0.ɵɵelementStart(0, "label", 4);
1772
- i0.ɵɵelement(1, "input", 6)(2, "span", 7);
1773
- i0.ɵɵelementEnd();
1774
- } if (rf & 2) {
1775
- const ctx_r9 = i0.ɵɵnextContext();
1776
- const item_r9 = ctx_r9.$implicit;
1777
- const ɵ$index_38_r11 = ctx_r9.$index;
1778
- const ctx_r2 = i0.ɵɵnextContext(3);
1779
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c2$6, ctx_r2.disabled || ctx_r2.readonly))("title", item_r9.label);
1780
- i0.ɵɵadvance();
1781
- i0.ɵɵproperty("name", "checkboxset_" + ctx_r2.widgetId)("tabindex", ctx_r2.tabindex)("disabled", ctx_r2.disabled || ctx_r2.readonly)("value", item_r9.key)("tabindex", ctx_r2.tabindex)("checked", item_r9.selected);
1782
- i0.ɵɵattribute("data-attr-index", ɵ$index_38_r11);
1783
- i0.ɵɵadvance();
1784
- i0.ɵɵproperty("textContent", item_r9.label);
1785
- } }
1786
- function CheckboxsetComponent_Conditional_1_For_1_For_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
1787
- i0.ɵɵelementStart(0, "label", 5);
1788
- i0.ɵɵelement(1, "input", 6)(2, "span", 18);
1789
- i0.ɵɵelementEnd();
1790
- } if (rf & 2) {
1791
- const ctx_r9 = i0.ɵɵnextContext();
1792
- const item_r9 = ctx_r9.$implicit;
1793
- const ɵ$index_38_r11 = ctx_r9.$index;
1794
- const ctx_r2 = i0.ɵɵnextContext(3);
1795
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$6, ctx_r2.disabled || ctx_r2.readonly));
1796
- i0.ɵɵadvance();
1797
- i0.ɵɵproperty("name", "checkboxset_" + ctx_r2.widgetId)("tabindex", ctx_r2.tabindex)("disabled", ctx_r2.disabled || ctx_r2.readonly)("value", item_r9.key)("tabindex", ctx_r2.tabindex)("checked", item_r9.selected);
1798
- i0.ɵɵattribute("data-attr-index", ɵ$index_38_r11);
1799
- } }
1800
- function CheckboxsetComponent_Conditional_1_For_1_For_9_Template(rf, ctx) { if (rf & 1) {
1801
- const _r8 = i0.ɵɵgetCurrentView();
1802
- i0.ɵɵelementStart(0, "li", 17);
1803
- i0.ɵɵlistener("click", function CheckboxsetComponent_Conditional_1_For_1_For_9_Template_li_click_0_listener($event) { const item_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onCheckboxLabelClick($event, item_r9)); });
1804
- i0.ɵɵtemplate(1, CheckboxsetComponent_Conditional_1_For_1_For_9_Conditional_1_Template, 3, 12, "label", 4)(2, CheckboxsetComponent_Conditional_1_For_1_For_9_Conditional_2_Template, 3, 10, "label", 5);
1805
- i0.ɵɵelementEnd();
1806
- } if (rf & 2) {
1807
- const item_r9 = ctx.$implicit;
1808
- const ctx_r2 = i0.ɵɵnextContext(3);
1809
- i0.ɵɵclassProp("active", item_r9.selected);
1810
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(7, _c4$2, ctx_r2.itemclass, ctx_r2.itemsPerRowClass))("wmItemTemplate", ctx_r2.content)("userComponentParams", item_r9);
1811
- i0.ɵɵadvance();
1812
- i0.ɵɵconditional(!ctx_r2.content ? 1 : -1);
1813
- i0.ɵɵadvance();
1814
- i0.ɵɵconditional(ctx_r2.content ? 2 : -1);
1815
- } }
1816
- function CheckboxsetComponent_Conditional_1_For_1_Template(rf, ctx) { if (rf & 1) {
1817
- const _r6 = i0.ɵɵgetCurrentView();
1818
- i0.ɵɵelementStart(0, "li", 9)(1, "ul", 10)(2, "li", 11);
1819
- i0.ɵɵlistener("click", function CheckboxsetComponent_Conditional_1_For_1_Template_li_click_2_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.handleHeaderClick($event)); });
1820
- i0.ɵɵelementStart(3, "h4", 12);
1821
- i0.ɵɵtext(4);
1822
- i0.ɵɵelementStart(5, "div", 13);
1823
- i0.ɵɵtemplate(6, CheckboxsetComponent_Conditional_1_For_1_Conditional_6_Template, 1, 3, "i", 14)(7, CheckboxsetComponent_Conditional_1_For_1_Conditional_7_Template, 1, 1, "span", 15);
1824
- i0.ɵɵelementEnd()()();
1825
- i0.ɵɵrepeaterCreate(8, CheckboxsetComponent_Conditional_1_For_1_For_9_Template, 3, 10, "li", 16, i0.ɵɵrepeaterTrackByIdentity);
1826
- i0.ɵɵelementEnd()();
1827
- } if (rf & 2) {
1828
- const groupObj_r7 = ctx.$implicit;
1829
- const ɵ$index_20_r12 = ctx.$index;
1830
- const ctx_r2 = i0.ɵɵnextContext(2);
1831
- i0.ɵɵadvance();
1832
- i0.ɵɵattribute("aria-labelledby", "group_" + ctx_r2.widgetId + "_" + ɵ$index_20_r12);
1833
- i0.ɵɵadvance();
1834
- i0.ɵɵproperty("id", "group_" + ctx_r2.widgetId + "_" + ɵ$index_20_r12)("title", groupObj_r7.key)("ngClass", i0.ɵɵpureFunction1(8, _c3$2, ctx_r2.collapsible));
1835
- i0.ɵɵadvance();
1836
- i0.ɵɵattribute("aria-label", "Group " + groupObj_r7.key);
1837
- i0.ɵɵadvance();
1838
- i0.ɵɵtextInterpolate1("", groupObj_r7.key, " ");
1839
- i0.ɵɵadvance(2);
1840
- i0.ɵɵconditional(ctx_r2.collapsible ? 6 : -1);
1841
- i0.ɵɵadvance();
1842
- i0.ɵɵconditional(ctx_r2.showcount ? 7 : -1);
1843
- i0.ɵɵadvance();
1844
- i0.ɵɵrepeater(groupObj_r7.data);
1845
- } }
1846
- function CheckboxsetComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
1847
- i0.ɵɵrepeaterCreate(0, CheckboxsetComponent_Conditional_1_For_1_Template, 10, 10, "li", 9, i0.ɵɵrepeaterTrackByIdentity);
1848
- } if (rf & 2) {
1849
- const ctx_r2 = i0.ɵɵnextContext();
1850
- i0.ɵɵrepeater(ctx_r2.groupedData);
1851
- } }
1852
- function CheckboxsetComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
1853
- i0.ɵɵelement(0, "div", 1);
1854
- } }
1855
- const DEFAULT_CLS$3 = 'app-checkboxset list-group inline';
1856
- const WIDGET_CONFIG$b = { widgetType: 'wm-checkboxset', hostClass: DEFAULT_CLS$3 };
1857
- class CheckboxsetComponent extends DatasetAwareFormComponent {
1858
- static { this.initializeProps = registerProps$b(); }
1859
- constructor(inj, explicitContext) {
1860
- super(inj, WIDGET_CONFIG$b, explicitContext);
1861
- this.layout = '';
1862
- styler(this.nativeElement, this);
1863
- this.multiple = true;
1864
- }
1865
- triggerInvokeOnChange(keys, $event) {
1866
- this.modelByKey = keys;
1867
- if (this.viewParent.containerWidget && this.viewParent.containerWidget.updateDataValue)
1868
- this.viewParent.containerWidget.updateDataValue(this.datavalue);
1869
- this.invokeOnTouched();
1870
- // invoke on datavalue change.
1871
- this.invokeOnChange(this.datavalue, $event || {}, true);
1872
- }
1873
- onCheckboxLabelClick($event, key) {
1874
- if (!$($event.target).is('input')) {
1875
- return;
1876
- }
1877
- // construct the _model from the checked elements.
1878
- const inputElements = this.nativeElement.querySelectorAll('input:checked');
1879
- const keys = [];
1880
- forEach(inputElements, ($el) => {
1881
- // @ts-ignore
1882
- keys.push($el.value);
1883
- });
1884
- this.triggerInvokeOnChange(keys, $event);
1885
- }
1886
- // change and blur events are added from the template
1887
- handleEvent(node, eventName, callback, locals) {
1888
- if (eventName === 'click') {
1889
- this.eventManager.addEventListener(node, eventName, e => {
1890
- if (!$(e.target).is('input')) {
1891
- return;
1892
- }
1893
- locals.$event = e;
1894
- return callback();
1895
- });
1896
- }
1897
- else if (!includes(['change'], eventName)) {
1898
- super.handleEvent(node, eventName, callback, locals);
1899
- }
1900
- }
1901
- onKeyDown($event) {
1902
- $event.preventDefault();
1903
- $event.target.click();
1904
- }
1905
- onPropertyChange(key, nv, ov) {
1906
- if (key === 'tabindex') {
1907
- return;
1908
- }
1909
- if (key === 'required') {
1910
- this._onChange(this.datavalue);
1911
- return;
1912
- }
1913
- if (key === 'itemsperrow') {
1914
- setListClass(this);
1915
- }
1916
- else {
1917
- super.onPropertyChange(key, nv, ov);
1918
- }
1919
- }
1920
- static { this.ɵfac = function CheckboxsetComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CheckboxsetComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
1921
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CheckboxsetComponent, selectors: [["", "wmCheckboxset", ""]], hostBindings: function CheckboxsetComponent_HostBindings(rf, ctx) { if (rf & 1) {
1922
- i0.ɵɵlistener("keydown.enter", function CheckboxsetComponent_keydown_enter_HostBindingHandler($event) { return ctx.onKeyDown($event, "ENTER"); });
1923
- } }, exportAs: ["wmCheckboxset"], standalone: true, features: [i0.ɵɵProvidersFeature([
1924
- provideAs(CheckboxsetComponent, NG_VALUE_ACCESSOR, true),
1925
- provideAs(CheckboxsetComponent, NG_VALIDATORS, true),
1926
- provideAsWidgetRef(CheckboxsetComponent)
1927
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c0$a, decls: 4, vars: 3, consts: [["hidden", "", 1, "model-holder", 3, "disabled"], [1, "readonly-wrapper"], ["partialContainer", "", "role", "presentation", 3, "ngClass", "active", "wmItemTemplate", "userComponentParams"], ["partialContainer", "", "role", "presentation", 3, "click", "ngClass", "wmItemTemplate", "userComponentParams"], [1, "app-checkboxset-label", 3, "ngClass", "title"], [1, "app-checkboxset-label", 3, "ngClass"], ["type", "checkbox", 3, "name", "tabindex", "disabled", "value", "checked"], [1, "caption", 3, "textContent"], ["partial-container-target", "", 1, "caption", "customTemplate"], ["role", "presentation", 1, "app-list-item-group"], [1, "item-group"], ["aria-hidden", "true", 1, "list-group-header", 3, "click", "id", "title", "ngClass"], [1, "group-title"], [1, "header-action"], [1, "app-icon", "wi", "action", "wi-chevron-up", 3, "title"], [1, "label", "label-default", 3, "textContent"], ["partialContainer", "", 3, "ngClass", "active", "wmItemTemplate", "userComponentParams"], ["partialContainer", "", 3, "click", "ngClass", "wmItemTemplate", "userComponentParams"], ["partial-container-target", "", 1, "caption"]], template: function CheckboxsetComponent_Template(rf, ctx) { if (rf & 1) {
1928
- i0.ɵɵtemplate(0, CheckboxsetComponent_Conditional_0_Template, 2, 0)(1, CheckboxsetComponent_Conditional_1_Template, 2, 0);
1929
- i0.ɵɵelement(2, "input", 0);
1930
- i0.ɵɵtemplate(3, CheckboxsetComponent_Conditional_3_Template, 1, 0, "div", 1);
1931
- } if (rf & 2) {
1932
- i0.ɵɵconditional(!ctx.groupby ? 0 : 1);
1933
- i0.ɵɵadvance(2);
1934
- i0.ɵɵproperty("disabled", ctx.disabled || ctx.readonly);
1935
- i0.ɵɵadvance();
1936
- i0.ɵɵconditional(ctx.readonly || ctx.disabled ? 3 : -1);
1937
- } }, dependencies: [CommonModule, i1.NgClass, WmComponentsModule, i2.ItemTemplateDirective, i2.PartialParamHandlerDirective, i2.PartialContainerDirective, i2.TextContentDirective], encapsulation: 2 }); }
1938
- }
1939
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckboxsetComponent, [{
1940
- type: Component,
1941
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule], selector: '[wmCheckboxset]', exportAs: 'wmCheckboxset', providers: [
1942
- provideAs(CheckboxsetComponent, NG_VALUE_ACCESSOR, true),
1943
- provideAs(CheckboxsetComponent, NG_VALIDATORS, true),
1944
- provideAsWidgetRef(CheckboxsetComponent)
1945
- ], template: "@if (!groupby) {\n @for (item of datasetItems; track item; let i = $index) {\n <li [ngClass]=\"['checkbox', 'app-checkbox', itemclass, itemsPerRowClass]\"\n [class.active]=\"item.selected\"\n [wmItemTemplate]=\"content\" [userComponentParams]=\"item\" partialContainer\n (click)=\"onCheckboxLabelClick($event, item.key)\" role=\"presentation\">\n <!-- Default item template -->\n @if (!content) {\n <label class=\"app-checkboxset-label\" [ngClass]=\"{'disabled':disabled || readonly}\" [title]=\"item.label\">\n <input [name]=\"'checkboxset_' + widgetId\" [tabindex]=\"tabindex\"\n type=\"checkbox\"\n [disabled]=\"disabled || readonly\" [attr.data-attr-index]=\"i\"\n [value]=\"item.key\" [tabindex]=\"tabindex\" [checked]=\"item.selected\"/>\n <span class=\"caption\" [textContent]=\"item.label\"></span>\n </label>\n }\n <!-- Custom partial template -->\n @if (content) {\n <label class=\"app-checkboxset-label\" [ngClass]=\"{'disabled':disabled || readonly}\" >\n <input [name]=\"'checkboxset_' + widgetId\" [tabindex]=\"tabindex\"\n type=\"checkbox\"\n [disabled]=\"disabled || readonly\" [attr.data-attr-index]=\"i\"\n [value]=\"item.key\" [tabindex]=\"tabindex\" [checked]=\"item.selected\"/>\n <span class=\"caption customTemplate\" partial-container-target></span>\n </label>\n }\n </li>\n }\n} @else {\n @for (groupObj of groupedData; track groupObj; let groupindex = $index) {\n <li class=\"app-list-item-group\" role=\"presentation\">\n <ul class=\"item-group\" [attr.aria-labelledby]=\"'group_' + widgetId + '_' + groupindex\">\n <li [id]=\"'group_' + widgetId + '_' + groupindex\" aria-hidden=\"true\" class=\"list-group-header\" (click)=\"handleHeaderClick($event)\" [title]=\"groupObj.key\" [ngClass]=\"{'collapsible-content': collapsible}\">\n <h4 class=\"group-title\" [attr.aria-label]=\"'Group '+groupObj.key\">{{groupObj.key}}\n <div class=\"header-action\">\n @if (collapsible) {\n <i class=\"app-icon wi action wi-chevron-up\" title=\"{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}\"></i>\n }\n @if (showcount) {\n <span class=\"label label-default\" [textContent]=\"groupObj.data.length\"></span>\n }\n </div>\n </h4>\n </li>\n @for (item of groupObj.data; track item; let i = $index) {\n <li\n [ngClass]=\"['checkbox', 'app-checkbox', 'group-list-item', itemclass, itemsPerRowClass]\"\n [class.active]=\"item.selected\"\n [wmItemTemplate]=\"content\" [userComponentParams]=\"item\" partialContainer\n (click)=\"onCheckboxLabelClick($event, item)\">\n <!-- Default item template -->\n @if (!content) {\n <label class=\"app-checkboxset-label\" [ngClass]=\"{'disabled':disabled || readonly}\" [title]=\"item.label\">\n <input [name]=\"'checkboxset_' + widgetId\" type=\"checkbox\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled || readonly\" [attr.data-attr-index]=\"i\"\n [value]=\"item.key\" [tabindex]=\"tabindex\" [checked]=\"item.selected\"/>\n <span class=\"caption\" [textContent]=\"item.label\"></span>\n </label>\n }\n <!-- Custom partial template -->\n @if (content) {\n <label class=\"app-checkboxset-label\" [ngClass]=\"{'disabled':disabled || readonly}\" >\n <input [name]=\"'checkboxset_' + widgetId\" type=\"checkbox\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled || readonly\" [attr.data-attr-index]=\"i\"\n [value]=\"item.key\" [tabindex]=\"tabindex\" [checked]=\"item.selected\"/>\n <span class=\"caption\" partial-container-target></span>\n </label>\n }\n </li>\n }\n </ul>\n </li>\n }\n}\n<input [disabled]=\"disabled || readonly\" hidden class=\"model-holder\">\n@if (readonly || disabled) {\n <div class=\"readonly-wrapper\"></div>\n}\n\n<!-- This template will be displayed when groupby is specified. -->\n" }]
1946
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
1947
- type: Inject,
1948
- args: ['EXPLICIT_CONTEXT']
1949
- }, {
1950
- type: Optional
1951
- }] }], { onKeyDown: [{
1952
- type: HostListener,
1953
- args: ['keydown.enter', ['$event', '"ENTER"']]
1954
- }] }); })();
1955
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CheckboxsetComponent, { className: "CheckboxsetComponent", filePath: "checkboxset/checkboxset.component.ts", lineNumber: 31 }); })();
1956
-
1957
- const registerProps$a = () => {
1958
- register('wm-form-group', new Map([
1959
- ['captionposition', PROP_STRING],
1960
- ['name', PROP_STRING],
1961
- ['required', PROP_BOOLEAN],
1962
- ['show', { value: true, ...PROP_BOOLEAN }]
1963
- ]));
1964
- };
1965
-
1966
- const DEFAULT_CLS$2 = 'form-group app-composite-widget clearfix';
1967
- const WIDGET_CONFIG$a = {
1968
- widgetType: 'wm-form-group',
1969
- hostClass: DEFAULT_CLS$2
1970
- };
1971
- const CAPTION_POSITION = {
1972
- left: 'caption-left',
1973
- right: 'caption-right',
1974
- top: 'caption-top',
1975
- floating: 'caption-floating'
1976
- };
1977
- class CompositeDirective extends StylableComponent {
1978
- static { this.initializeProps = registerProps$a(); }
1979
- constructor(inj, explicitContext) {
1980
- super(inj, WIDGET_CONFIG$a, explicitContext);
1981
- styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);
1982
- }
1983
- /**
1984
- * this is onPropertyChange handler for the form-group component
1985
- * @param key
1986
- * @param nv
1987
- * @param ov
1988
- */
1989
- onPropertyChange(key, nv, ov) {
1990
- if (key === 'captionposition') {
1991
- switchClass(this.nativeElement, CAPTION_POSITION[nv], CAPTION_POSITION[ov]);
1992
- }
1993
- else if (key === 'required') {
1994
- this.required = nv;
1995
- this.assignRequiredToSubComponents();
1996
- }
1997
- else {
1998
- super.onPropertyChange(key, nv, ov);
1999
- }
2000
- }
2001
- /**
2002
- * this method assigns the required on the component/directive based on the required attribute of the form-group
2003
- */
2004
- assignRequiredToSubComponents() {
2005
- if (this.required && this.componentRefs) {
2006
- setTimeout(() => {
2007
- this.componentRefs.forEach(componentRef => componentRef.widget.required = true);
2008
- }, 50);
2009
- }
2010
- }
2011
- ngAfterViewInit() {
2012
- super.ngAfterViewInit();
2013
- addForIdAttributes(this.nativeElement);
2014
- this.assignRequiredToSubComponents();
2015
- }
2016
- static { this.ɵfac = function CompositeDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CompositeDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
2017
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CompositeDirective, selectors: [["div", "wmComposite", ""]], contentQueries: function CompositeDirective_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
2018
- i0.ɵɵcontentQuery(dirIndex, WidgetRef, 5);
2019
- } if (rf & 2) {
2020
- let _t;
2021
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.componentRefs = _t);
2022
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
2023
- provideAsWidgetRef(CompositeDirective)
2024
- ]), i0.ɵɵInheritDefinitionFeature] }); }
2025
- }
2026
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CompositeDirective, [{
2027
- type: Directive,
2028
- args: [{
2029
- standalone: true,
2030
- selector: 'div[wmComposite]',
2031
- providers: [
2032
- provideAsWidgetRef(CompositeDirective)
2033
- ]
2034
- }]
2035
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
2036
- type: Inject,
2037
- args: ['EXPLICIT_CONTEXT']
2038
- }, {
2039
- type: Optional
2040
- }] }], { componentRefs: [{
2041
- type: ContentChildren,
2042
- args: [WidgetRef, { descendants: true }]
2043
- }] }); })();
2044
-
2045
- const numberProps = new Map([
2046
- ['autofocus', PROP_BOOLEAN],
2047
- ['class', PROP_STRING],
2048
- ['datavaluesource', PROP_ANY],
2049
- ['datavalue', PROP_STRING],
2050
- ['disabled', PROP_BOOLEAN],
2051
- ['hint', PROP_STRING],
2052
- ['arialabel', PROP_STRING],
2053
- ['localefilter', PROP_STRING],
2054
- ['minvalue', PROP_NUMBER],
2055
- ['maxvalue', PROP_NUMBER],
2056
- ['name', PROP_STRING],
2057
- ['numberfilter', PROP_STRING],
2058
- ['placeholder', { value: 'Enter number', ...PROP_STRING }],
2059
- ['readonly', PROP_BOOLEAN],
2060
- ['regexp', PROP_STRING],
2061
- ['required', PROP_BOOLEAN],
2062
- ['shortcutkey', PROP_STRING],
2063
- ['show', { value: true, ...PROP_BOOLEAN }],
2064
- ['step', { value: 1, ...PROP_NUMBER }],
2065
- ['tabindex', { value: 0, ...PROP_NUMBER }],
2066
- ['trailingzero', { value: false, ...PROP_BOOLEAN }],
2067
- ['updateon', PROP_STRING],
2068
- ['inputmode', { value: 'natural', ...PROP_STRING }],
2069
- ['decimalplaces', PROP_NUMBER],
2070
- ['conditionalclass', PROP_ANY],
2071
- ['conditionalstyle', PROP_ANY]
2072
- ]);
2073
- const registerProps$9 = () => {
2074
- register('wm-number', numberProps);
2075
- registerFormWidget(FormWidgetType.NUMBER, new Map(numberProps));
2076
- };
2077
-
2078
- const _c0$9 = ["input"];
2079
- const _c1$8 = ["wmNumber", ""];
2080
- const WIDGET_CONFIG$9 = {
2081
- widgetType: 'wm-number',
2082
- hostClass: 'app-input-wrapper'
2083
- };
2084
- class NumberComponent extends NumberLocale {
2085
- static { this.initializeProps = registerProps$9(); }
2086
- constructor(inj, i18nService, trailingZeroDecimalPipe, explicitContext) {
2087
- super(inj, WIDGET_CONFIG$9, i18nService, trailingZeroDecimalPipe, explicitContext);
2088
- }
2089
- static { this.ɵfac = function NumberComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NumberComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1$1.AbstractI18nService), i0.ɵɵdirectiveInject(i2.TrailingZeroDecimalPipe), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
2090
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NumberComponent, selectors: [["", "wmNumber", ""]], viewQuery: function NumberComponent_Query(rf, ctx) { if (rf & 1) {
2091
- i0.ɵɵviewQuery(_c0$9, 7);
2092
- i0.ɵɵviewQuery(NgModel, 7);
2093
- } if (rf & 2) {
2094
- let _t;
2095
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputEl = _t.first);
2096
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ngModel = _t.first);
2097
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
2098
- provideAs(NumberComponent, NG_VALUE_ACCESSOR, true),
2099
- provideAs(NumberComponent, NG_VALIDATORS, true),
2100
- provideAsWidgetRef(NumberComponent)
2101
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c1$8, decls: 2, vars: 14, consts: [["input", ""], ["inputmode", "decimal", "focus-target", "", "type", "text", 1, "form-control", "app-textbox", "app-number-input", 3, "ngModelChange", "blur", "focus", "input", "keypress", "paste", "keydown.backspace", "keydown.delete", "keydown.enter", "keydown.ArrowUp", "keydown.ArrowDown", "ngModel", "readonly", "disabled", "pattern", "autofocus", "ngClass", "ngStyle", "ngModelOptions", "required"]], template: function NumberComponent_Template(rf, ctx) { if (rf & 1) {
2102
- const _r1 = i0.ɵɵgetCurrentView();
2103
- i0.ɵɵelementStart(0, "input", 1, 0);
2104
- i0.ɵɵlistener("ngModelChange", function NumberComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onModelChange($event)); })("blur", function NumberComponent_Template_input_blur_0_listener($event) { i0.ɵɵrestoreView(_r1); ctx.handleBlur($event); return i0.ɵɵresetView(ctx.checkForTrailingZeros($event)); })("focus", function NumberComponent_Template_input_focus_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.checkForTrailingZeros($event)); })("input", function NumberComponent_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onInputChange($event.target.value)); })("keypress", function NumberComponent_Template_input_keypress_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.validateInputEntry($event)); })("paste", function NumberComponent_Template_input_paste_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onPaste($event)); })("keydown.backspace", function NumberComponent_Template_input_keydown_backspace_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onBackspace($event)); })("keydown.delete", function NumberComponent_Template_input_keydown_delete_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDelete($event)); })("keydown.enter", function NumberComponent_Template_input_keydown_enter_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onEnter($event)); })("keydown.ArrowUp", function NumberComponent_Template_input_keydown_ArrowUp_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onArrowPress($event, "UP")); })("keydown.ArrowDown", function NumberComponent_Template_input_keydown_ArrowDown_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onArrowPress($event, "DOWN")); });
2105
- i0.ɵɵelementEnd();
2106
- } if (rf & 2) {
2107
- i0.ɵɵproperty("ngModel", ctx.displayValue)("readonly", ctx.readonly)("disabled", ctx.disabled)("pattern", ctx.regexp)("autofocus", ctx.autofocus)("ngClass", ctx.conditionalclass)("ngStyle", ctx.conditionalstyle)("ngModelOptions", ctx.ngModelOptions)("required", ctx.required);
2108
- i0.ɵɵattribute("name", ctx.name)("tabindex", ctx.tabindex)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.arialabel);
2109
- } }, dependencies: [CommonModule, i1.NgClass, i1.NgStyle, WmComponentsModule, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.RequiredValidator, i2$1.PatternValidator, i2$1.NgModel], encapsulation: 2 }); }
2110
- }
2111
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NumberComponent, [{
2112
- type: Component,
2113
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule, FormsModule], selector: '[wmNumber]', providers: [
2114
- provideAs(NumberComponent, NG_VALUE_ACCESSOR, true),
2115
- provideAs(NumberComponent, NG_VALIDATORS, true),
2116
- provideAsWidgetRef(NumberComponent)
2117
- ], template: "<input class=\"form-control app-textbox app-number-input\"\n inputmode=\"decimal\"\n focus-target\n [attr.name]=\"name\"\n type=\"text\"\n [ngModel]=\"displayValue\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"handleBlur($event); checkForTrailingZeros($event);\"\n (focus)=\"checkForTrailingZeros($event)\"\n (input)=\"onInputChange($event.target.value)\"\n [ngModelOptions]=\"ngModelOptions\"\n [required]=\"required\"\n (keypress)=\"validateInputEntry($event)\"\n (paste)=\"onPaste($event)\"\n (keydown.backspace)=\"onBackspace($event)\"\n (keydown.delete)=\"onDelete($event)\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.ArrowUp)=\"onArrowPress($event, 'UP')\"\n (keydown.ArrowDown)=\"onArrowPress($event, 'DOWN')\"\n #input>\n" }]
2118
- }], () => [{ type: i0.Injector }, { type: i1$1.AbstractI18nService }, { type: i2.TrailingZeroDecimalPipe }, { type: undefined, decorators: [{
2119
- type: Inject,
2120
- args: ['EXPLICIT_CONTEXT']
2121
- }, {
2122
- type: Optional
2123
- }] }], { inputEl: [{
2124
- type: ViewChild,
2125
- args: ['input', { static: true }]
2126
- }], ngModel: [{
2127
- type: ViewChild,
2128
- args: [NgModel, { static: true }]
2129
- }] }); })();
2130
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NumberComponent, { className: "NumberComponent", filePath: "number/number.component.ts", lineNumber: 29 }); })();
2131
-
2132
- const radiosetProps = new Map([
2133
- ['class', PROP_STRING],
2134
- ['collapsible', PROP_BOOLEAN],
2135
- ['compareby', PROP_STRING],
2136
- ['datafield', PROP_STRING],
2137
- ['dataset', { value: 'Option 1, Option 2, Option 3', ...PROP_ANY }],
2138
- ['datavaluesource', PROP_ANY],
2139
- ['datavalue', PROP_ANY],
2140
- ['dateformat', PROP_STRING],
2141
- ['disabled', PROP_BOOLEAN],
2142
- ['displayexpression', PROP_STRING],
2143
- ['displayfield', PROP_STRING],
2144
- ['displayValue', PROP_STRING],
2145
- ['groupby', PROP_STRING],
2146
- ['itemclass', { value: '', ...PROP_STRING }],
2147
- ['itemsperrow', { value: 'xs-1 sm-1 md-1 lg-1', ...PROP_STRING }],
2148
- ['listclass', { value: '', ...PROP_STRING }],
2149
- ['match', PROP_STRING],
2150
- ['name', PROP_STRING],
2151
- ['orderby', PROP_STRING],
2152
- ['readonly', PROP_BOOLEAN],
2153
- ['required', PROP_BOOLEAN],
2154
- ['show', { value: true, ...PROP_BOOLEAN }],
2155
- ['showcount', PROP_BOOLEAN],
2156
- ['showindevice', { displayType: 'inline-block', value: 'all', ...PROP_STRING }],
2157
- ['tabindex', { value: 0, ...PROP_NUMBER }],
2158
- ['usekeys', PROP_BOOLEAN]
2159
- ]);
2160
- const registerProps$8 = () => {
2161
- register('wm-radioset', radiosetProps);
2162
- registerFormWidget(FormWidgetType.RADIOSET, new Map(radiosetProps));
2163
- };
2164
-
2165
- const _c0$8 = ["wmRadioset", ""];
2166
- const _c1$7 = (a0, a1) => ["radio", "app-radio", a0, a1];
2167
- const _c2$5 = a0 => ({ "disabled": a0 });
2168
- const _c3$1 = a0 => ({ "collapsible-content": a0 });
2169
- const _c4$1 = (a0, a1) => ["radio", "app-radio", "group-list-item", a0, a1];
2170
- function RadiosetComponent_Conditional_0_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
2171
- i0.ɵɵelementStart(0, "label", 4);
2172
- i0.ɵɵelement(1, "input", 5)(2, "span", 6);
2173
- i0.ɵɵelementEnd();
2174
- } if (rf & 2) {
2175
- const ctx_r3 = i0.ɵɵnextContext();
2176
- const item_r2 = ctx_r3.$implicit;
2177
- const ɵ$index_2_r5 = ctx_r3.$index;
2178
- const ctx_r2 = i0.ɵɵnextContext(2);
2179
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$5, ctx_r2.disabled || ctx_r2.readonly));
2180
- i0.ɵɵadvance();
2181
- i0.ɵɵproperty("checked", item_r2.selected)("disabled", ctx_r2.disabled || ctx_r2.readonly)("name", "radioset_" + ctx_r2.widgetId)("tabindex", ctx_r2.tabindex)("value", item_r2.key);
2182
- i0.ɵɵattribute("data-attr-index", ɵ$index_2_r5);
2183
- i0.ɵɵadvance();
2184
- i0.ɵɵproperty("textContent", item_r2.label);
2185
- } }
2186
- function RadiosetComponent_Conditional_0_For_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
2187
- i0.ɵɵelementStart(0, "label", 4);
2188
- i0.ɵɵelement(1, "input", 5)(2, "span", 7);
2189
- i0.ɵɵelementEnd();
2190
- } if (rf & 2) {
2191
- const ctx_r3 = i0.ɵɵnextContext();
2192
- const item_r2 = ctx_r3.$implicit;
2193
- const ɵ$index_2_r5 = ctx_r3.$index;
2194
- const ctx_r2 = i0.ɵɵnextContext(2);
2195
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c2$5, ctx_r2.disabled || ctx_r2.readonly));
2196
- i0.ɵɵadvance();
2197
- i0.ɵɵproperty("checked", item_r2.selected)("disabled", ctx_r2.disabled || ctx_r2.readonly)("name", "radioset_" + ctx_r2.widgetId)("tabindex", ctx_r2.tabindex)("value", item_r2.key);
2198
- i0.ɵɵattribute("data-attr-index", ɵ$index_2_r5);
2199
- } }
2200
- function RadiosetComponent_Conditional_0_For_1_Template(rf, ctx) { if (rf & 1) {
2201
- const _r1 = i0.ɵɵgetCurrentView();
2202
- i0.ɵɵelementStart(0, "li", 3);
2203
- i0.ɵɵlistener("click", function RadiosetComponent_Conditional_0_For_1_Template_li_click_0_listener($event) { const item_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onRadioLabelClick($event, item_r2.key)); });
2204
- i0.ɵɵtemplate(1, RadiosetComponent_Conditional_0_For_1_Conditional_1_Template, 3, 10, "label", 4)(2, RadiosetComponent_Conditional_0_For_1_Conditional_2_Template, 3, 9, "label", 4);
2205
- i0.ɵɵelementEnd();
2206
- } if (rf & 2) {
2207
- const item_r2 = ctx.$implicit;
2208
- const ctx_r2 = i0.ɵɵnextContext(2);
2209
- i0.ɵɵclassProp("active", item_r2.selected);
2210
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(7, _c1$7, ctx_r2.itemclass, ctx_r2.itemsPerRowClass))("wmItemTemplate", ctx_r2.content)("userComponentParams", item_r2);
2211
- i0.ɵɵadvance();
2212
- i0.ɵɵconditional(!ctx_r2.content ? 1 : -1);
2213
- i0.ɵɵadvance();
2214
- i0.ɵɵconditional(ctx_r2.content ? 2 : -1);
2215
- } }
2216
- function RadiosetComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
2217
- i0.ɵɵrepeaterCreate(0, RadiosetComponent_Conditional_0_For_1_Template, 3, 10, "li", 2, i0.ɵɵrepeaterTrackByIdentity);
2218
- } if (rf & 2) {
2219
- const ctx_r2 = i0.ɵɵnextContext();
2220
- i0.ɵɵrepeater(ctx_r2.datasetItems);
2221
- } }
2222
- function RadiosetComponent_Conditional_1_For_1_Conditional_6_Template(rf, ctx) { if (rf & 1) {
2223
- i0.ɵɵelement(0, "i", 13);
2224
- } if (rf & 2) {
2225
- const ctx_r2 = i0.ɵɵnextContext(3);
2226
- i0.ɵɵpropertyInterpolate2("title", "", ctx_r2.appLocale.LABEL_COLLAPSE, "/", ctx_r2.appLocale.LABEL_EXPAND, "");
2227
- } }
2228
- function RadiosetComponent_Conditional_1_For_1_Conditional_7_Template(rf, ctx) { if (rf & 1) {
2229
- i0.ɵɵelement(0, "span", 14);
2230
- } if (rf & 2) {
2231
- const groupObj_r7 = i0.ɵɵnextContext().$implicit;
2232
- i0.ɵɵproperty("textContent", groupObj_r7.data.length);
2233
- } }
2234
- function RadiosetComponent_Conditional_1_For_1_For_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
2235
- i0.ɵɵelementStart(0, "label", 4);
2236
- i0.ɵɵelement(1, "input", 17)(2, "span", 6);
2237
- i0.ɵɵelementEnd();
2238
- } if (rf & 2) {
2239
- const ctx_r9 = i0.ɵɵnextContext();
2240
- const item_r9 = ctx_r9.$implicit;
2241
- const ɵ$index_38_r11 = ctx_r9.$index;
2242
- const ctx_r2 = i0.ɵɵnextContext(3);
2243
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$5, ctx_r2.disabled || ctx_r2.readonly));
2244
- i0.ɵɵadvance();
2245
- i0.ɵɵproperty("name", "radioset_" + ctx_r2.widgetId)("value", item_r9.key)("disabled", ctx_r2.disabled || ctx_r2.readonly)("tabindex", ctx_r2.tabindex)("checked", item_r9.selected);
2246
- i0.ɵɵattribute("data-attr-index", ɵ$index_38_r11);
2247
- i0.ɵɵadvance();
2248
- i0.ɵɵproperty("textContent", item_r9.label);
2249
- } }
2250
- function RadiosetComponent_Conditional_1_For_1_For_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
2251
- i0.ɵɵelementStart(0, "label", 4);
2252
- i0.ɵɵelement(1, "input", 17)(2, "span", 7);
2253
- i0.ɵɵelementEnd();
2254
- } if (rf & 2) {
2255
- const ctx_r9 = i0.ɵɵnextContext();
2256
- const item_r9 = ctx_r9.$implicit;
2257
- const ɵ$index_38_r11 = ctx_r9.$index;
2258
- const ctx_r2 = i0.ɵɵnextContext(3);
2259
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c2$5, ctx_r2.disabled || ctx_r2.readonly));
2260
- i0.ɵɵadvance();
2261
- i0.ɵɵproperty("name", "radioset_" + ctx_r2.widgetId)("value", item_r9.key)("disabled", ctx_r2.disabled || ctx_r2.readonly)("tabindex", ctx_r2.tabindex)("checked", item_r9.selected);
2262
- i0.ɵɵattribute("data-attr-index", ɵ$index_38_r11);
2263
- } }
2264
- function RadiosetComponent_Conditional_1_For_1_For_9_Template(rf, ctx) { if (rf & 1) {
2265
- const _r8 = i0.ɵɵgetCurrentView();
2266
- i0.ɵɵelementStart(0, "li", 16);
2267
- i0.ɵɵlistener("click", function RadiosetComponent_Conditional_1_For_1_For_9_Template_li_click_0_listener($event) { const item_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onRadioLabelClick($event, item_r9)); });
2268
- i0.ɵɵtemplate(1, RadiosetComponent_Conditional_1_For_1_For_9_Conditional_1_Template, 3, 10, "label", 4)(2, RadiosetComponent_Conditional_1_For_1_For_9_Conditional_2_Template, 3, 9, "label", 4);
2269
- i0.ɵɵelementEnd();
2270
- } if (rf & 2) {
2271
- const item_r9 = ctx.$implicit;
2272
- const ctx_r2 = i0.ɵɵnextContext(3);
2273
- i0.ɵɵclassProp("active", item_r9.selected);
2274
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(7, _c4$1, ctx_r2.itemclass, ctx_r2.itemsPerRowClass))("wmItemTemplate", ctx_r2.content)("userComponentParams", item_r9);
2275
- i0.ɵɵadvance();
2276
- i0.ɵɵconditional(!ctx_r2.content ? 1 : -1);
2277
- i0.ɵɵadvance();
2278
- i0.ɵɵconditional(ctx_r2.content ? 2 : -1);
2279
- } }
2280
- function RadiosetComponent_Conditional_1_For_1_Template(rf, ctx) { if (rf & 1) {
2281
- const _r6 = i0.ɵɵgetCurrentView();
2282
- i0.ɵɵelementStart(0, "li", 8)(1, "ul", 9)(2, "li", 10);
2283
- i0.ɵɵlistener("click", function RadiosetComponent_Conditional_1_For_1_Template_li_click_2_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.handleHeaderClick($event)); });
2284
- i0.ɵɵelementStart(3, "h4", 11);
2285
- i0.ɵɵtext(4);
2286
- i0.ɵɵelementStart(5, "div", 12);
2287
- i0.ɵɵtemplate(6, RadiosetComponent_Conditional_1_For_1_Conditional_6_Template, 1, 3, "i", 13)(7, RadiosetComponent_Conditional_1_For_1_Conditional_7_Template, 1, 1, "span", 14);
2288
- i0.ɵɵelementEnd()()();
2289
- i0.ɵɵrepeaterCreate(8, RadiosetComponent_Conditional_1_For_1_For_9_Template, 3, 10, "li", 15, i0.ɵɵrepeaterTrackByIdentity);
2290
- i0.ɵɵelementEnd()();
2291
- } if (rf & 2) {
2292
- const groupObj_r7 = ctx.$implicit;
2293
- const ɵ$index_20_r12 = ctx.$index;
2294
- const ctx_r2 = i0.ɵɵnextContext(2);
2295
- i0.ɵɵadvance();
2296
- i0.ɵɵattribute("aria-labelledby", "group_" + ctx_r2.widgetId + "_" + ɵ$index_20_r12);
2297
- i0.ɵɵadvance();
2298
- i0.ɵɵproperty("id", "group_" + ctx_r2.widgetId + "_" + ɵ$index_20_r12)("title", groupObj_r7.key)("ngClass", i0.ɵɵpureFunction1(8, _c3$1, ctx_r2.collapsible));
2299
- i0.ɵɵadvance();
2300
- i0.ɵɵattribute("aria-label", "Group " + groupObj_r7.key);
2301
- i0.ɵɵadvance();
2302
- i0.ɵɵtextInterpolate1("", groupObj_r7.key, " ");
2303
- i0.ɵɵadvance(2);
2304
- i0.ɵɵconditional(ctx_r2.collapsible ? 6 : -1);
2305
- i0.ɵɵadvance();
2306
- i0.ɵɵconditional(ctx_r2.showcount ? 7 : -1);
2307
- i0.ɵɵadvance();
2308
- i0.ɵɵrepeater(groupObj_r7.data);
2309
- } }
2310
- function RadiosetComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
2311
- i0.ɵɵrepeaterCreate(0, RadiosetComponent_Conditional_1_For_1_Template, 10, 10, "li", 8, i0.ɵɵrepeaterTrackByIdentity);
2312
- } if (rf & 2) {
2313
- const ctx_r2 = i0.ɵɵnextContext();
2314
- i0.ɵɵrepeater(ctx_r2.groupedData);
2315
- } }
2316
- function RadiosetComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
2317
- i0.ɵɵelement(0, "div", 1);
2318
- } }
2319
- const DEFAULT_CLS$1 = 'app-radioset list-group inline';
2320
- const WIDGET_CONFIG$8 = { widgetType: 'wm-radioset', hostClass: DEFAULT_CLS$1 };
2321
- class RadiosetComponent extends DatasetAwareFormComponent {
2322
- static { this.initializeProps = registerProps$8(); }
2323
- constructor(inj, explicitContext) {
2324
- super(inj, WIDGET_CONFIG$8, explicitContext);
2325
- this.layout = '';
2326
- styler(this.nativeElement, this);
2327
- this.multiple = false;
2328
- }
2329
- triggerInvokeOnChange(key, $event) {
2330
- this.modelByKey = key;
2331
- if (this.viewParent.containerWidget && this.viewParent.containerWidget.updateDataValue)
2332
- this.viewParent.containerWidget.updateDataValue(this.datavalue);
2333
- this.invokeOnTouched();
2334
- // invoke on datavalue change.
2335
- this.invokeOnChange(this.datavalue, $event || {}, true);
2336
- }
2337
- /**
2338
- * On click of the option, update the datavalue
2339
- */
2340
- onRadioLabelClick($event, key) {
2341
- if (!$($event.target).is('input')) {
2342
- return;
2343
- }
2344
- this.triggerInvokeOnChange(key, $event);
2345
- }
2346
- // change and blur events are added from the template
2347
- handleEvent(node, eventName, callback, locals) {
2348
- if (eventName === 'click') {
2349
- this.eventManager.addEventListener(node, eventName, e => {
2350
- if (!$(e.target).is('input')) {
2351
- return;
2352
- }
2353
- locals.$event = e;
2354
- return callback();
2355
- });
2356
- }
2357
- else if (!includes(['change'], eventName)) {
2358
- super.handleEvent(node, eventName, callback, locals);
2359
- }
2360
- }
2361
- onPropertyChange(key, nv, ov) {
2362
- if (key === 'tabindex') {
2363
- return;
2364
- }
2365
- if (key === 'itemsperrow') {
2366
- setListClass(this);
2367
- }
2368
- else {
2369
- super.onPropertyChange(key, nv, ov);
2370
- }
2371
- }
2372
- static { this.ɵfac = function RadiosetComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RadiosetComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
2373
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RadiosetComponent, selectors: [["", "wmRadioset", ""]], exportAs: ["wmRadioset"], standalone: true, features: [i0.ɵɵProvidersFeature([
2374
- provideAs(RadiosetComponent, NG_VALUE_ACCESSOR, true),
2375
- provideAs(RadiosetComponent, NG_VALIDATORS, true),
2376
- provideAsWidgetRef(RadiosetComponent)
2377
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c0$8, decls: 4, vars: 3, consts: [["hidden", "", 1, "model-holder", 3, "disabled"], ["aria-readonly", "true", 1, "readonly-wrapper"], ["partialContainer", "", "role", "presentation", 3, "ngClass", "active", "wmItemTemplate", "userComponentParams"], ["partialContainer", "", "role", "presentation", 3, "click", "ngClass", "wmItemTemplate", "userComponentParams"], [1, "app-radioset-label", 3, "ngClass"], ["type", "radio", 3, "checked", "disabled", "name", "tabindex", "value"], [1, "caption", 3, "textContent"], ["partial-container-target", "", 1, "caption", "customTemplate"], ["role", "presentation", 1, "app-list-item-group"], [1, "item-group"], ["aria-hidden", "true", 1, "list-group-header", 3, "click", "id", "title", "ngClass"], [1, "group-title"], [1, "header-action"], [1, "app-icon", "wi", "action", "wi-chevron-up", 3, "title"], [1, "label", "label-default", 3, "textContent"], ["partialContainer", "", 3, "ngClass", "active", "wmItemTemplate", "userComponentParams"], ["partialContainer", "", 3, "click", "ngClass", "wmItemTemplate", "userComponentParams"], ["type", "radio", 3, "name", "value", "disabled", "tabindex", "checked"]], template: function RadiosetComponent_Template(rf, ctx) { if (rf & 1) {
2378
- i0.ɵɵtemplate(0, RadiosetComponent_Conditional_0_Template, 2, 0)(1, RadiosetComponent_Conditional_1_Template, 2, 0);
2379
- i0.ɵɵelement(2, "input", 0);
2380
- i0.ɵɵtemplate(3, RadiosetComponent_Conditional_3_Template, 1, 0, "div", 1);
2381
- } if (rf & 2) {
2382
- i0.ɵɵconditional(!ctx.groupby ? 0 : 1);
2383
- i0.ɵɵadvance(2);
2384
- i0.ɵɵproperty("disabled", ctx.disabled || ctx.readonly);
2385
- i0.ɵɵadvance();
2386
- i0.ɵɵconditional(ctx.readonly || ctx.disabled ? 3 : -1);
2387
- } }, dependencies: [CommonModule, i1.NgClass, WmComponentsModule, i2.ItemTemplateDirective, i2.PartialParamHandlerDirective, i2.PartialContainerDirective, i2.TextContentDirective], encapsulation: 2 }); }
2388
- }
2389
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RadiosetComponent, [{
2390
- type: Component,
2391
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule], selector: '[wmRadioset]', exportAs: 'wmRadioset', providers: [
2392
- provideAs(RadiosetComponent, NG_VALUE_ACCESSOR, true),
2393
- provideAs(RadiosetComponent, NG_VALIDATORS, true),
2394
- provideAsWidgetRef(RadiosetComponent)
2395
- ], template: "@if (!groupby) {\n @for (item of datasetItems; track item; let i = $index) {\n <li [ngClass]=\"['radio', 'app-radio', itemclass, itemsPerRowClass]\"\n [class.active]=\"item.selected\"\n [wmItemTemplate]=\"content\" [userComponentParams]=\"item\" partialContainer\n (click)=\"onRadioLabelClick($event, item.key)\" role=\"presentation\">\n <!-- Default item template -->\n @if (!content) {\n <label class=\"app-radioset-label\"\n [ngClass]=\"{'disabled':disabled || readonly}\">\n <input [attr.data-attr-index]=\"i\" [checked]=\"item.selected\" [disabled]=\"disabled || readonly\"\n [name]=\"'radioset_' + widgetId\" [tabindex]=\"tabindex\" [value]=\"item.key\"\n type=\"radio\"/>\n <span class=\"caption\" [textContent]=\"item.label\"></span>\n </label>\n }\n <!-- Custom partial template -->\n @if (content) {\n <label class=\"app-radioset-label\"\n [ngClass]=\"{'disabled':disabled || readonly}\">\n <input [attr.data-attr-index]=\"i\" [checked]=\"item.selected\" [disabled]=\"disabled || readonly\"\n [name]=\"'radioset_' + widgetId\" [tabindex]=\"tabindex\" [value]=\"item.key\"\n type=\"radio\"/>\n <span class=\"caption customTemplate\" partial-container-target></span>\n </label>\n }\n </li>\n }\n} @else {\n @for (groupObj of groupedData; track groupObj; let groupindex = $index) {\n <li class=\"app-list-item-group\" role=\"presentation\" >\n <ul class=\"item-group\" [attr.aria-labelledby]=\"'group_' + widgetId + '_' + groupindex\">\n <li [id]=\"'group_' + widgetId + '_' + groupindex\" aria-hidden=\"true\" class=\"list-group-header\" (click)=\"handleHeaderClick($event)\" [title]=\"groupObj.key\" [ngClass]=\"{'collapsible-content': collapsible}\">\n <h4 class=\"group-title\" [attr.aria-label]=\"'Group '+groupObj.key\">{{groupObj.key}}\n <div class=\"header-action\">\n @if (collapsible) {\n <i class=\"app-icon wi action wi-chevron-up\" title=\"{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}\"></i>\n }\n @if (showcount) {\n <span class=\"label label-default\" [textContent]=\"groupObj.data.length\"></span>\n }\n </div>\n </h4>\n </li>\n @for (item of groupObj.data; track item; let i = $index) {\n <li\n [ngClass]=\"['radio', 'app-radio', 'group-list-item', itemclass, itemsPerRowClass]\"\n [class.active]=\"item.selected\"\n [wmItemTemplate]=\"content\" [userComponentParams]=\"item\" partialContainer\n (click)=\"onRadioLabelClick($event, item)\">\n <!-- Default item template -->\n @if (!content) {\n <label class=\"app-radioset-label\"\n [ngClass]=\"{'disabled':disabled || readonly}\">\n <input [attr.data-attr-index]=\"i\" [name]=\"'radioset_' + widgetId\" type=\"radio\"\n [value]=\"item.key\" [disabled]=\"disabled || readonly\" [tabindex]=\"tabindex\" [checked]=\"item.selected\"/>\n <span class=\"caption\" [textContent]=\"item.label\"></span>\n </label>\n }\n <!-- Custom partial template -->\n @if (content) {\n <label class=\"app-radioset-label\"\n [ngClass]=\"{'disabled':disabled || readonly}\">\n <input [attr.data-attr-index]=\"i\" [name]=\"'radioset_' + widgetId\" type=\"radio\"\n [value]=\"item.key\" [disabled]=\"disabled || readonly\" [tabindex]=\"tabindex\" [checked]=\"item.selected\"/>\n <span class=\"caption customTemplate\" partial-container-target></span>\n </label>\n }\n </li>\n }\n </ul>\n </li>\n }\n}\n\n<input [disabled]=\"disabled || readonly\" hidden class=\"model-holder\">\n@if (readonly || disabled) {\n <div aria-readonly=\"true\" class=\"readonly-wrapper\"></div>\n}\n\n<!-- This template will be displayed when groupby is specified. -->\n" }]
2396
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
2397
- type: Inject,
2398
- args: ['EXPLICIT_CONTEXT']
2399
- }, {
2400
- type: Optional
2401
- }] }], null); })();
2402
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RadiosetComponent, { className: "RadiosetComponent", filePath: "radioset/radioset.component.ts", lineNumber: 30 }); })();
2403
-
2404
- const selectProps = new Map([
2405
- ['autofocus', PROP_BOOLEAN],
2406
- ['class', { value: '', ...PROP_STRING }],
2407
- ['compareby', PROP_STRING],
2408
- ['datafield', PROP_STRING],
2409
- ['dataset', PROP_ANY],
2410
- ['datavaluesource', PROP_ANY],
2411
- ['datavalue', PROP_STRING],
2412
- ['dateformat', PROP_STRING],
2413
- ['disabled', PROP_BOOLEAN],
2414
- ['displayexpression', PROP_STRING],
2415
- ['displayfield', PROP_STRING],
2416
- ['displayValue', PROP_STRING],
2417
- ['groupby', PROP_STRING],
2418
- ['hint', PROP_STRING],
2419
- ['arialabel', PROP_STRING],
2420
- ['match', PROP_STRING],
2421
- ['multiple', { value: false, ...PROP_BOOLEAN }],
2422
- ['name', PROP_STRING],
2423
- ['orderby', PROP_STRING],
2424
- ['placeholder', PROP_STRING],
2425
- ['readonly', PROP_BOOLEAN],
2426
- ['required', PROP_BOOLEAN],
2427
- ['shortcutkey', PROP_STRING],
2428
- ['show', { value: true, ...PROP_BOOLEAN }],
2429
- ['tabindex', { value: 0, ...PROP_NUMBER }],
2430
- ['usekeys', PROP_BOOLEAN]
2431
- ]);
2432
- const registerProps$7 = () => {
2433
- register('wm-select', selectProps);
2434
- registerFormWidget(FormWidgetType.SELECT, new Map(selectProps));
2435
- registerFormWidget(FormWidgetType.TYPEAHEAD, new Map(selectProps));
2436
- };
2437
-
2438
- const _c0$7 = ["select"];
2439
- const _c1$6 = a0 => ["app-select form-control", a0];
2440
- const _c2$4 = () => ({ standalone: true });
2441
- function SelectComponent_Conditional_3_For_1_For_2_Template(rf, ctx) { if (rf & 1) {
2442
- i0.ɵɵelement(0, "option", 4);
2443
- } if (rf & 2) {
2444
- const item_r2 = ctx.$implicit;
2445
- i0.ɵɵproperty("value", item_r2.key)("selected", item_r2.selected)("textContent", item_r2.label);
2446
- } }
2447
- function SelectComponent_Conditional_3_For_1_Template(rf, ctx) { if (rf & 1) {
2448
- i0.ɵɵelementStart(0, "optgroup", 3);
2449
- i0.ɵɵrepeaterCreate(1, SelectComponent_Conditional_3_For_1_For_2_Template, 1, 3, "option", 4, i0.ɵɵrepeaterTrackByIdentity);
2450
- i0.ɵɵelementEnd();
2451
- } if (rf & 2) {
2452
- const groupObj_r3 = ctx.$implicit;
2453
- i0.ɵɵproperty("label", groupObj_r3.key);
2454
- i0.ɵɵadvance();
2455
- i0.ɵɵrepeater(groupObj_r3.data);
2456
- } }
2457
- function SelectComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
2458
- i0.ɵɵrepeaterCreate(0, SelectComponent_Conditional_3_For_1_Template, 3, 1, "optgroup", 3, i0.ɵɵrepeaterTrackByIdentity);
2459
- } if (rf & 2) {
2460
- const ctx_r3 = i0.ɵɵnextContext();
2461
- i0.ɵɵrepeater(ctx_r3.groupedData);
2462
- } }
2463
- function SelectComponent_Conditional_4_For_1_Template(rf, ctx) { if (rf & 1) {
2464
- i0.ɵɵelement(0, "option", 4);
2465
- } if (rf & 2) {
2466
- const item_r5 = ctx.$implicit;
2467
- i0.ɵɵproperty("value", item_r5.key)("selected", item_r5.selected)("textContent", item_r5.label);
2468
- } }
2469
- function SelectComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
2470
- i0.ɵɵrepeaterCreate(0, SelectComponent_Conditional_4_For_1_Template, 1, 3, "option", 4, i0.ɵɵrepeaterTrackByIdentity);
2471
- } if (rf & 2) {
2472
- const ctx_r3 = i0.ɵɵnextContext();
2473
- i0.ɵɵrepeater(ctx_r3.datasetItems);
2474
- } }
2475
- const WIDGET_CONFIG$7 = { widgetType: 'wm-select', hostClass: 'app-select-wrapper' };
2476
- class SelectComponent extends DatasetAwareFormComponent {
2477
- static { this.initializeProps = registerProps$7(); }
2478
- set datasource(ds) {
2479
- if (ds && ds.execute && ds.execute(DataSource.Operation.IS_BOUND_TO_LOCALE)) {
2480
- this.datavalue = ds.execute(DataSource.Operation.GET_DEFAULT_LOCALE);
2481
- }
2482
- }
2483
- constructor(inj, explicitContext) {
2484
- super(inj, WIDGET_CONFIG$7, explicitContext);
2485
- this.acceptsArray = true;
2486
- /*
2487
- * When the dataset for a select element is updated and no longer includes the previously selected value:
2488
- * The select element becomes empty, and the ngModel value is updated to reflect this change.
2489
- * However, the change event is not triggered, preventing the form control from recognizing the update and applying necessary validations.
2490
- * As this widget implements ControlValueAccessor, manually updating the ngModel (or modelByKey) is necessary to ensure correct form behavior.
2491
- * */
2492
- const datasetSubscription = this.dataset$.subscribe(() => {
2493
- if (isIos() || isSafari()) {
2494
- if (this.datavalue) {
2495
- const selectedItem = this.datasetItems.find(item => item.selected);
2496
- if (!selectedItem) {
2497
- setTimeout(() => {
2498
- if (!this.placeholder) {
2499
- this.selectEl.nativeElement.value = '';
2500
- }
2501
- this.modelByKey = undefined;
2502
- }, 100);
2503
- }
2504
- }
2505
- else {
2506
- setTimeout(() => {
2507
- if (!this.placeholder) {
2508
- this.selectEl.nativeElement.value = '';
2509
- }
2510
- }, 100);
2511
- }
2512
- }
2513
- });
2514
- this.registerDestroyListener(() => datasetSubscription.unsubscribe());
2515
- }
2516
- ngAfterViewInit() {
2517
- super.ngAfterViewInit();
2518
- styler(this.selectEl.nativeElement, this);
2519
- }
2520
- // Change event is registered from the template, Prevent the framework from registering one more event
2521
- handleEvent(node, eventName, eventCallback, locals) {
2522
- if (!['blur', 'change'].includes(eventName)) {
2523
- super.handleEvent(this.selectEl.nativeElement, eventName, eventCallback, locals);
2524
- }
2525
- }
2526
- onSelectValueChange($event) {
2527
- if (this.readonly) {
2528
- if (this.placeholder) {
2529
- this.selectEl.nativeElement.value = this.placeholder;
2530
- }
2531
- else {
2532
- this.selectEl.nativeElement.value = '';
2533
- }
2534
- this.datavalue = this.prevDatavalue;
2535
- return;
2536
- }
2537
- this.invokeOnTouched();
2538
- // invoke on datavalue change.
2539
- this.invokeOnChange(this.datavalue, $event || {}, true);
2540
- }
2541
- onPropertyChange(key, nv, ov) {
2542
- if (key === 'required') {
2543
- this._onChange(this.datavalue);
2544
- return;
2545
- }
2546
- if (key === 'class' || key === 'tabindex') {
2547
- if (key === 'class') {
2548
- // After NG15 upgrade ng-invalid class is added even the field is valid, so we are removing the ng-invalid manually
2549
- const isNgUntouchedValid = this.selectEl.nativeElement.classList.contains('ng-untouched') && this.selectEl.nativeElement.classList.contains('ng-valid');
2550
- if (isNgUntouchedValid && nv.includes('ng-untouched') && nv.includes('ng-invalid')) {
2551
- setTimeout(() => {
2552
- if (this.selectEl.nativeElement.classList.contains('ng-untouched') && this.selectEl.nativeElement.classList.contains('ng-valid') && this.selectEl.nativeElement.classList.contains('ng-invalid')) {
2553
- this.selectEl.nativeElement.classList.remove('ng-invalid');
2554
- }
2555
- });
2556
- }
2557
- }
2558
- return;
2559
- }
2560
- else if (key === 'readonly') {
2561
- (nv === true) ? setAttr(this.selectEl.nativeElement, 'readonly', 'readonly') : removeAttr(this.selectEl.nativeElement, 'readonly');
2562
- }
2563
- super.onPropertyChange(key, nv, ov);
2564
- }
2565
- /**
2566
- * When caption floating is enabled and placeholder is given, do not show placeholder until user focuses on the field
2567
- * When focused add the placeholder to the option which is selected
2568
- * On blur, remove the placeholder and do not animate the label
2569
- * @param $event event received will be either a blur or focus event
2570
- */
2571
- checkForFloatingLabel($event) {
2572
- const captionEl = $(this.selectEl.nativeElement).closest('.app-composite-widget.caption-floating');
2573
- if (!this.placeholder && (isIos() || isSafari())) {
2574
- this.removePlaceholderOption();
2575
- }
2576
- if (captionEl.length > 0) {
2577
- const placeholderOption = this.selectEl.nativeElement.querySelector('#placeholderOption');
2578
- if ($event.type === 'mousedown' && (!this.datavalue || (this.datavalue && $(this.selectEl).find('select option:selected').text() === '' && this.placeholder))) {
2579
- if (this.placeholder) {
2580
- placeholderOption.textContent = this.placeholder;
2581
- }
2582
- }
2583
- else if (!this.datavalue) {
2584
- if (this.placeholder) {
2585
- placeholderOption.textContent = '';
2586
- }
2587
- captionEl.removeClass('float-active');
2588
- }
2589
- }
2590
- }
2591
- /*
2592
- * Removing the placeholder option if no placeholder is provided.
2593
- * In html we are hiding the placeholder option using css but in Apple devices and safari option is showing.
2594
- * Styles are not allowed on option tag in ios safari
2595
- * After removing the option, if no datavalue is present and native select element sets value to the first option by default, so we are setting it to empty
2596
- * */
2597
- removePlaceholderOption() {
2598
- const hiddenEle = $(this.selectEl.nativeElement).find('#placeholderOption');
2599
- if (hiddenEle.length) {
2600
- hiddenEle.remove();
2601
- if (!this.datavalue) {
2602
- this.selectEl.nativeElement.value = '';
2603
- }
2604
- }
2605
- }
2606
- static { this.ɵfac = function SelectComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SelectComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
2607
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectComponent, selectors: [["wm-select"]], viewQuery: function SelectComponent_Query(rf, ctx) { if (rf & 1) {
2608
- i0.ɵɵviewQuery(_c0$7, 7, ElementRef);
2609
- } if (rf & 2) {
2610
- let _t;
2611
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.selectEl = _t.first);
2612
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
2613
- provideAs(SelectComponent, NG_VALUE_ACCESSOR, true),
2614
- provideAs(SelectComponent, NG_VALIDATORS, true),
2615
- provideAsWidgetRef(SelectComponent)
2616
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], decls: 5, vars: 18, consts: [["select", ""], ["focus-target", "", 3, "ngModelChange", "change", "mousedown", "blur", "ngClass", "disabled", "required", "tabindex", "ngModel", "ngModelOptions", "multiple", "autofocus"], ["selected", "", "value", "undefined", "id", "placeholderOption", 3, "textContent", "hidden"], [3, "label"], [3, "value", "selected", "textContent"]], template: function SelectComponent_Template(rf, ctx) { if (rf & 1) {
2617
- const _r1 = i0.ɵɵgetCurrentView();
2618
- i0.ɵɵelementStart(0, "select", 1, 0);
2619
- i0.ɵɵtwoWayListener("ngModelChange", function SelectComponent_Template_select_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.modelByKey, $event) || (ctx.modelByKey = $event); return i0.ɵɵresetView($event); });
2620
- i0.ɵɵlistener("change", function SelectComponent_Template_select_change_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSelectValueChange($event)); })("mousedown", function SelectComponent_Template_select_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.checkForFloatingLabel($event)); })("blur", function SelectComponent_Template_select_blur_0_listener($event) { i0.ɵɵrestoreView(_r1); ctx.invokeOnTouched($event); return i0.ɵɵresetView(ctx.checkForFloatingLabel($event)); });
2621
- i0.ɵɵelement(2, "option", 2);
2622
- i0.ɵɵtemplate(3, SelectComponent_Conditional_3_Template, 2, 0)(4, SelectComponent_Conditional_4_Template, 2, 0);
2623
- i0.ɵɵelementEnd();
2624
- } if (rf & 2) {
2625
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c1$6, ctx.class))("disabled", ctx.disabled)("required", ctx.required)("tabindex", ctx.tabindex);
2626
- i0.ɵɵtwoWayProperty("ngModel", ctx.modelByKey);
2627
- i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(17, _c2$4))("multiple", ctx.multiple)("autofocus", ctx.autofocus);
2628
- i0.ɵɵattribute("accesskey", ctx.shortcutkey)("name", ctx.name)("aria-label", ctx.arialabel);
2629
- i0.ɵɵadvance(2);
2630
- i0.ɵɵproperty("textContent", ctx.placeholder)("hidden", !ctx.placeholder);
2631
- i0.ɵɵadvance();
2632
- i0.ɵɵconditional(ctx.groupby ? 3 : -1);
2633
- i0.ɵɵadvance();
2634
- i0.ɵɵconditional(!ctx.groupby ? 4 : -1);
2635
- } }, dependencies: [CommonModule, i1.NgClass, WmComponentsModule, i2.TextContentDirective, FormsModule, i2$1.NgSelectOption, i2$1.ɵNgSelectMultipleOption, i2$1.SelectMultipleControlValueAccessor, i2$1.NgControlStatus, i2$1.RequiredValidator, i2$1.NgModel], encapsulation: 2 }); }
2636
- }
2637
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectComponent, [{
2638
- type: Component,
2639
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule, FormsModule], selector: 'wm-select', providers: [
2640
- provideAs(SelectComponent, NG_VALUE_ACCESSOR, true),
2641
- provideAs(SelectComponent, NG_VALIDATORS, true),
2642
- provideAsWidgetRef(SelectComponent)
2643
- ], template: "<!--Updated focus with mousedown event. IOS devices not allow update of option value after opening dropdown-->\n<select #select\n focus-target\n [ngClass]=\"['app-select form-control', class]\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [attr.accesskey]=\"shortcutkey\"\n [(ngModel)]=\"modelByKey\"\n [ngModelOptions]=\"{standalone: true}\"\n [multiple]=\"multiple\"\n (change)=\"onSelectValueChange($event)\"\n (mousedown)=\"checkForFloatingLabel($event)\"\n (blur)=\"invokeOnTouched($event); checkForFloatingLabel($event)\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\">\n\n <option selected\n value=\"undefined\"\n [textContent]=\"placeholder\"\n id=\"placeholderOption\"\n [hidden]=\"!placeholder\"></option>\n\n @if (groupby) {\n @for (groupObj of groupedData; track groupObj) {\n <optgroup\n [label]=\"groupObj.key\">\n @for (item of groupObj.data; track item) {\n <option\n [value]=\"item.key\"\n [selected]=\"item.selected\"\n [textContent]=\"item.label\"\n ></option>\n }\n </optgroup>\n }\n }\n\n @if (!groupby) {\n @for (item of datasetItems; track item) {\n <option\n [value]=\"item.key\"\n [selected]=\"item.selected\"\n [textContent]=\"item.label\"\n ></option>\n }\n }\n</select>\n" }]
2644
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
2645
- type: Inject,
2646
- args: ['EXPLICIT_CONTEXT']
2647
- }, {
2648
- type: Optional
2649
- }] }], { selectEl: [{
2650
- type: ViewChild,
2651
- args: ['select', { static: true, read: ElementRef }]
2652
- }] }); })();
2653
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SelectComponent, { className: "SelectComponent", filePath: "select/select.component.ts", lineNumber: 25 }); })();
2654
-
2655
- const inputCalendarTypeProps = new Map([
2656
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
2657
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
2658
- ['autofocus', PROP_BOOLEAN],
2659
- ['class', PROP_STRING],
2660
- ['datasource', PROP_ANY],
2661
- ['datavalue', PROP_STRING],
2662
- ['disabled', PROP_BOOLEAN],
2663
- ['hint', PROP_STRING],
2664
- ['arialabel', PROP_STRING],
2665
- ['maxvalue', PROP_NUMBER],
2666
- ['minvalue', PROP_NUMBER],
2667
- ['name', PROP_STRING],
2668
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
2669
- ['readonly', PROP_BOOLEAN],
2670
- ['required', PROP_BOOLEAN],
2671
- ['shortcutkey', PROP_STRING],
2672
- ['show', { value: true, ...PROP_BOOLEAN }],
2673
- ['step', PROP_NUMBER],
2674
- ['tabindex', { value: 0, ...PROP_NUMBER }],
2675
- ['type', PROP_STRING],
2676
- ['updateon', PROP_STRING],
2677
- ['conditionalclass', PROP_ANY],
2678
- ['conditionalstyle', PROP_ANY]
2679
- ]);
2680
- const registerProps$6 = () => {
2681
- register('wm-input-calendar', inputCalendarTypeProps);
2682
- };
2683
-
2684
- const _c0$6 = ["input"];
2685
- const _c1$5 = ["type", "date"];
2686
- const _c2$3 = () => ({ standalone: true });
2687
- const WIDGET_CONFIG$6 = {
2688
- widgetType: 'wm-input-calendar',
2689
- hostClass: 'app-input-wrapper'
2690
- };
2691
- class InputCalendarComponent extends BaseInput {
2692
- static { this.initializeProps = registerProps$6(); }
2693
- constructor(inj, explicitContext) {
2694
- super(inj, WIDGET_CONFIG$6, explicitContext);
2695
- }
2696
- static { this.ɵfac = function InputCalendarComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InputCalendarComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
2697
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: InputCalendarComponent, selectors: [["wm-input", "type", "date"], ["wm-input", "type", "datetime-local"], ["wm-input", "type", "month"], ["wm-input", "type", "time"], ["wm-input", "type", "week"]], viewQuery: function InputCalendarComponent_Query(rf, ctx) { if (rf & 1) {
2698
- i0.ɵɵviewQuery(_c0$6, 7);
2699
- i0.ɵɵviewQuery(NgModel, 5);
2700
- } if (rf & 2) {
2701
- let _t;
2702
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputEl = _t.first);
2703
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ngModel = _t.first);
2704
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
2705
- provideAs(InputCalendarComponent, NG_VALUE_ACCESSOR, true),
2706
- provideAs(InputCalendarComponent, NG_VALIDATORS, true),
2707
- provideAsWidgetRef(InputCalendarComponent)
2708
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c1$5, decls: 2, vars: 19, consts: [["input", ""], ["focus-target", "", 1, "form-control", "app-textbox", 3, "ngModelChange", "blur", "type", "ngModel", "ngModelOptions", "readonly", "required", "disabled", "min", "max", "step", "autofocus", "autocomplete", "ngClass", "ngStyle"]], template: function InputCalendarComponent_Template(rf, ctx) { if (rf & 1) {
2709
- const _r1 = i0.ɵɵgetCurrentView();
2710
- i0.ɵɵelementStart(0, "input", 1, 0);
2711
- i0.ɵɵtwoWayListener("ngModelChange", function InputCalendarComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.datavalue, $event) || (ctx.datavalue = $event); return i0.ɵɵresetView($event); });
2712
- i0.ɵɵlistener("blur", function InputCalendarComponent_Template_input_blur_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleBlur($event)); })("ngModelChange", function InputCalendarComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleChange($event)); });
2713
- i0.ɵɵelementEnd();
2714
- } if (rf & 2) {
2715
- i0.ɵɵproperty("type", ctx.type);
2716
- i0.ɵɵtwoWayProperty("ngModel", ctx.datavalue);
2717
- i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(18, _c2$3))("readonly", ctx.readonly)("required", ctx.required)("disabled", ctx.disabled)("min", ctx.minvalue)("max", ctx.maxvalue)("step", ctx.step)("autofocus", ctx.autofocus)("autocomplete", ctx.autocomplete ? "on" : "off")("ngClass", ctx.conditionalclass)("ngStyle", ctx.conditionalstyle);
2718
- i0.ɵɵattribute("name", ctx.name)("tabindex", ctx.tabindex)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.arialabel || ctx.type + " field");
2719
- } }, dependencies: [CommonModule, i1.NgClass, i1.NgStyle, WmComponentsModule, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.RequiredValidator, i2$1.NgModel], encapsulation: 2 }); }
2720
- }
2721
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InputCalendarComponent, [{
2722
- type: Component,
2723
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule, FormsModule], selector: 'wm-input[type="date"], wm-input[type="datetime-local"], wm-input[type="month"], wm-input[type="time"], wm-input[type="week"]', providers: [
2724
- provideAs(InputCalendarComponent, NG_VALUE_ACCESSOR, true),
2725
- provideAs(InputCalendarComponent, NG_VALIDATORS, true),
2726
- provideAsWidgetRef(InputCalendarComponent)
2727
- ], template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel || type + ' field'\"\n [autofocus]=\"autofocus\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n #input>\n" }]
2728
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
2729
- type: Inject,
2730
- args: ['EXPLICIT_CONTEXT']
2731
- }, {
2732
- type: Optional
2733
- }] }], { inputEl: [{
2734
- type: ViewChild,
2735
- args: ['input', { static: true }]
2736
- }], ngModel: [{
2737
- type: ViewChild,
2738
- args: [NgModel]
2739
- }] }); })();
2740
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InputCalendarComponent, { className: "InputCalendarComponent", filePath: "text/calendar/input-calendar.component.ts", lineNumber: 27 }); })();
2741
-
2742
- const inputColorTypeProps = new Map([
2743
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
2744
- ['autofocus', PROP_BOOLEAN],
2745
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
2746
- ['class', PROP_STRING],
2747
- ['datavaluesource', PROP_ANY],
2748
- ['datavalue', PROP_STRING],
2749
- ['disabled', PROP_BOOLEAN],
2750
- ['hint', PROP_STRING],
2751
- ['arialabel', PROP_STRING],
2752
- ['name', PROP_STRING],
2753
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
2754
- ['readonly', PROP_BOOLEAN],
2755
- ['required', PROP_BOOLEAN],
2756
- ['shortcutkey', PROP_STRING],
2757
- ['show', { value: true, ...PROP_BOOLEAN }],
2758
- ['tabindex', { value: 0, ...PROP_NUMBER }],
2759
- ['type', { value: 'color', ...PROP_STRING }],
2760
- ['updateon', PROP_STRING],
2761
- ['conditionalclass', PROP_ANY],
2762
- ['conditionalstyle', PROP_ANY]
2763
- ]);
2764
- const registerProps$5 = () => {
2765
- register('wm-input-color', inputColorTypeProps);
2766
- };
2767
-
2768
- const _c0$5 = ["input"];
2769
- const _c1$4 = ["type", "color"];
2770
- const _c2$2 = () => ({ standalone: true });
2771
- const WIDGET_CONFIG$5 = {
2772
- widgetType: 'wm-input-color',
2773
- hostClass: 'app-input-wrapper'
2774
- };
2775
- class InputColorComponent extends BaseInput {
2776
- static { this.initializeProps = registerProps$5(); }
2777
- constructor(inj, explicitContext) {
2778
- super(inj, WIDGET_CONFIG$5, explicitContext);
2779
- }
2780
- static { this.ɵfac = function InputColorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InputColorComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
2781
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: InputColorComponent, selectors: [["wm-input", "type", "color"]], viewQuery: function InputColorComponent_Query(rf, ctx) { if (rf & 1) {
2782
- i0.ɵɵviewQuery(_c0$5, 7);
2783
- i0.ɵɵviewQuery(NgModel, 5);
2784
- } if (rf & 2) {
2785
- let _t;
2786
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputEl = _t.first);
2787
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ngModel = _t.first);
2788
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
2789
- provideAs(InputColorComponent, NG_VALUE_ACCESSOR, true),
2790
- provideAs(InputColorComponent, NG_VALIDATORS, true),
2791
- provideAsWidgetRef(InputColorComponent)
2792
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c1$4, decls: 2, vars: 16, consts: [["input", ""], ["focus-target", "", 1, "form-control", "app-textbox", 3, "ngModelChange", "blur", "type", "ngModel", "ngModelOptions", "readonly", "required", "disabled", "maxlength", "autofocus", "ngClass", "ngStyle"]], template: function InputColorComponent_Template(rf, ctx) { if (rf & 1) {
2793
- const _r1 = i0.ɵɵgetCurrentView();
2794
- i0.ɵɵelementStart(0, "input", 1, 0);
2795
- i0.ɵɵtwoWayListener("ngModelChange", function InputColorComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.datavalue, $event) || (ctx.datavalue = $event); return i0.ɵɵresetView($event); });
2796
- i0.ɵɵlistener("blur", function InputColorComponent_Template_input_blur_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleBlur($event)); })("ngModelChange", function InputColorComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleChange($event)); });
2797
- i0.ɵɵelementEnd();
2798
- } if (rf & 2) {
2799
- i0.ɵɵproperty("type", ctx.type);
2800
- i0.ɵɵtwoWayProperty("ngModel", ctx.datavalue);
2801
- i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(15, _c2$2))("readonly", ctx.readonly)("required", ctx.required)("disabled", ctx.disabled)("maxlength", ctx.maxchars)("autofocus", ctx.autofocus)("ngClass", ctx.conditionalclass)("ngStyle", ctx.conditionalstyle);
2802
- i0.ɵɵattribute("name", ctx.name)("tabindex", ctx.tabindex)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.arialabel);
2803
- } }, dependencies: [CommonModule, i1.NgClass, i1.NgStyle, WmComponentsModule, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.RequiredValidator, i2$1.MaxLengthValidator, i2$1.NgModel], encapsulation: 2 }); }
2804
- }
2805
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InputColorComponent, [{
2806
- type: Component,
2807
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule, FormsModule], selector: 'wm-input[type="color"]', providers: [
2808
- provideAs(InputColorComponent, NG_VALUE_ACCESSOR, true),
2809
- provideAs(InputColorComponent, NG_VALIDATORS, true),
2810
- provideAsWidgetRef(InputColorComponent)
2811
- ], template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n #input>\n" }]
2812
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
2813
- type: Inject,
2814
- args: ['EXPLICIT_CONTEXT']
2815
- }, {
2816
- type: Optional
2817
- }] }], { inputEl: [{
2818
- type: ViewChild,
2819
- args: ['input', { static: true }]
2820
- }], ngModel: [{
2821
- type: ViewChild,
2822
- args: [NgModel]
2823
- }] }); })();
2824
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InputColorComponent, { className: "InputColorComponent", filePath: "text/color/input-color.component.ts", lineNumber: 28 }); })();
2825
-
2826
- const inputEmailTypeProps = new Map([
2827
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
2828
- ['autofocus', PROP_BOOLEAN],
2829
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
2830
- ['class', PROP_STRING],
2831
- ['datavaluesource', PROP_ANY],
2832
- ['datavalue', PROP_STRING],
2833
- ['disabled', PROP_BOOLEAN],
2834
- ['hint', PROP_STRING],
2835
- ['arialabel', PROP_STRING],
2836
- ['maxchars', PROP_NUMBER],
2837
- ['name', PROP_STRING],
2838
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
2839
- ['readonly', PROP_BOOLEAN],
2840
- ['regexp', PROP_STRING],
2841
- ['required', PROP_BOOLEAN],
2842
- ['shortcutkey', PROP_STRING],
2843
- ['show', { value: true, ...PROP_BOOLEAN }],
2844
- ['tabindex', { value: 0, ...PROP_NUMBER }],
2845
- ['type', { value: 'email', ...PROP_STRING }],
2846
- ['updateon', PROP_STRING],
2847
- ['conditionalclass', PROP_ANY],
2848
- ['conditionalstyle', PROP_ANY]
2849
- ]);
2850
- const registerProps$4 = () => {
2851
- register('wm-input-email', inputEmailTypeProps);
2852
- };
2853
-
2854
- const _c0$4 = ["input"];
2855
- const _c1$3 = ["type", "email"];
2856
- const WIDGET_CONFIG$4 = {
2857
- widgetType: 'wm-input-email',
2858
- hostClass: 'app-input-wrapper'
2859
- };
2860
- class InputEmailComponent extends BaseInput {
2861
- static { this.initializeProps = registerProps$4(); }
2862
- constructor(inj, explicitContext) {
2863
- super(inj, WIDGET_CONFIG$4, explicitContext);
2864
- }
2865
- static { this.ɵfac = function InputEmailComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InputEmailComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
2866
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: InputEmailComponent, selectors: [["wm-input", "type", "email"]], viewQuery: function InputEmailComponent_Query(rf, ctx) { if (rf & 1) {
2867
- i0.ɵɵviewQuery(_c0$4, 7);
2868
- i0.ɵɵviewQuery(NgModel, 5);
2869
- } if (rf & 2) {
2870
- let _t;
2871
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputEl = _t.first);
2872
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ngModel = _t.first);
2873
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
2874
- provideAs(InputEmailComponent, NG_VALUE_ACCESSOR, true),
2875
- provideAs(InputEmailComponent, NG_VALIDATORS, true),
2876
- provideAsWidgetRef(InputEmailComponent)
2877
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c1$3, decls: 2, vars: 17, consts: [["input", ""], ["focus-target", "", "email", "", 1, "form-control", "app-textbox", 3, "ngModelChange", "blur", "keyup.enter", "type", "ngModel", "ngModelOptions", "readonly", "required", "disabled", "maxlength", "pattern", "autofocus", "ngClass", "ngStyle", "autocomplete"]], template: function InputEmailComponent_Template(rf, ctx) { if (rf & 1) {
2878
- const _r1 = i0.ɵɵgetCurrentView();
2879
- i0.ɵɵelementStart(0, "input", 1, 0);
2880
- i0.ɵɵtwoWayListener("ngModelChange", function InputEmailComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.datavalue, $event) || (ctx.datavalue = $event); return i0.ɵɵresetView($event); });
2881
- i0.ɵɵlistener("blur", function InputEmailComponent_Template_input_blur_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleBlur($event)); })("ngModelChange", function InputEmailComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleChange($event)); })("keyup.enter", function InputEmailComponent_Template_input_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r1); const input_r2 = i0.ɵɵreference(1); return i0.ɵɵresetView(ctx.flushViewChanges(input_r2.value)); });
2882
- i0.ɵɵelementEnd();
2883
- } if (rf & 2) {
2884
- i0.ɵɵproperty("type", ctx.type);
2885
- i0.ɵɵtwoWayProperty("ngModel", ctx.datavalue);
2886
- i0.ɵɵproperty("ngModelOptions", ctx.ngModelOptions)("readonly", ctx.readonly)("required", ctx.required)("disabled", ctx.disabled)("maxlength", ctx.maxchars)("pattern", ctx.regexp)("autofocus", ctx.autofocus)("ngClass", ctx.conditionalclass)("ngStyle", ctx.conditionalstyle)("autocomplete", ctx.autocomplete ? "on" : "off");
2887
- i0.ɵɵattribute("name", ctx.name)("tabindex", ctx.tabindex)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.arialabel);
2888
- } }, dependencies: [CommonModule, i1.NgClass, i1.NgStyle, WmComponentsModule, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.RequiredValidator, i2$1.MaxLengthValidator, i2$1.PatternValidator, i2$1.EmailValidator, i2$1.NgModel], encapsulation: 2 }); }
2889
- }
2890
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InputEmailComponent, [{
2891
- type: Component,
2892
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule, FormsModule], selector: 'wm-input[type="email"]', providers: [
2893
- provideAs(InputEmailComponent, NG_VALUE_ACCESSOR, true),
2894
- provideAs(InputEmailComponent, NG_VALIDATORS, true),
2895
- provideAsWidgetRef(InputEmailComponent)
2896
- ], template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n email\n #input>\n" }]
2897
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
2898
- type: Inject,
2899
- args: ['EXPLICIT_CONTEXT']
2900
- }, {
2901
- type: Optional
2902
- }] }], { inputEl: [{
2903
- type: ViewChild,
2904
- args: ['input', { static: true }]
2905
- }], ngModel: [{
2906
- type: ViewChild,
2907
- args: [NgModel]
2908
- }] }); })();
2909
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InputEmailComponent, { className: "InputEmailComponent", filePath: "text/email/input-email.component.ts", lineNumber: 28 }); })();
2910
-
2911
- const textareaProps = new Map([
2912
- ['autofocus', PROP_BOOLEAN],
2913
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
2914
- ['class', PROP_STRING],
2915
- ['datavaluesource', PROP_ANY],
2916
- ['datavalue', PROP_STRING],
2917
- ['disabled', PROP_BOOLEAN],
2918
- ['hint', PROP_STRING],
2919
- ['arialabel', PROP_STRING],
2920
- ['maxchars', PROP_NUMBER],
2921
- ['name', PROP_STRING],
2922
- ['placeholder', { value: 'Place your text', ...PROP_STRING }],
2923
- ['readonly', PROP_BOOLEAN],
2924
- ['required', PROP_BOOLEAN],
2925
- ['shortcutkey', PROP_STRING],
2926
- ['show', { value: true, ...PROP_BOOLEAN }],
2927
- ['tabindex', { value: 0, ...PROP_NUMBER }],
2928
- ['updateon', PROP_STRING],
2929
- ['limitdisplaytext', PROP_STRING],
2930
- ['charlength', PROP_NUMBER],
2931
- ['conditionalclass', PROP_ANY],
2932
- ['conditionalstyle', PROP_ANY]
2933
- ]);
2934
- const registerProps$3 = () => {
2935
- register('wm-textarea', textareaProps);
2936
- registerFormWidget(FormWidgetType.TEXTAREA, new Map(textareaProps));
2937
- };
2938
-
2939
- const _c0$3 = ["textarea"];
2940
- function TextareaComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
2941
- i0.ɵɵelementStart(0, "div", 2);
2942
- i0.ɵɵtext(1);
2943
- i0.ɵɵelementEnd();
2944
- } if (rf & 2) {
2945
- const ctx_r1 = i0.ɵɵnextContext();
2946
- i0.ɵɵadvance();
2947
- i0.ɵɵtextInterpolate(ctx_r1.limitdisplaytext);
2948
- } }
2949
- const WIDGET_CONFIG$3 = {
2950
- widgetType: 'wm-textarea',
2951
- hostClass: 'app-input-wrapper'
2952
- };
2953
- class TextareaComponent extends BaseInput {
2954
- static { this.initializeProps = registerProps$3(); }
2955
- constructor(inj, explicitContext) {
2956
- super(inj, WIDGET_CONFIG$3, explicitContext);
2957
- this.charlength = 0;
2958
- }
2959
- onInputChange() {
2960
- this.charlength = this.inputEl.nativeElement.value.length;
2961
- }
2962
- ngAfterViewChecked() {
2963
- this.charlength = this.inputEl.nativeElement.value.length;
2964
- }
2965
- static { this.ɵfac = function TextareaComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TextareaComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
2966
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TextareaComponent, selectors: [["wm-textarea"]], viewQuery: function TextareaComponent_Query(rf, ctx) { if (rf & 1) {
2967
- i0.ɵɵviewQuery(_c0$3, 7);
2968
- i0.ɵɵviewQuery(NgModel, 5);
2969
- } if (rf & 2) {
2970
- let _t;
2971
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputEl = _t.first);
2972
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ngModel = _t.first);
2973
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
2974
- provideAs(TextareaComponent, NG_VALUE_ACCESSOR, true),
2975
- provideAs(TextareaComponent, NG_VALIDATORS, true),
2976
- provideAsWidgetRef(TextareaComponent)
2977
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], decls: 3, vars: 15, consts: [["textarea", ""], ["focus-target", "", "aria-multiline", "true", 1, "form-control", "app-textarea", 3, "ngModelChange", "blur", "input", "ngModel", "ngModelOptions", "readonly", "required", "disabled", "maxlength", "autofocus", "ngClass", "ngStyle"], [1, "textarea-count"]], template: function TextareaComponent_Template(rf, ctx) { if (rf & 1) {
2978
- const _r1 = i0.ɵɵgetCurrentView();
2979
- i0.ɵɵelementStart(0, "textarea", 1, 0);
2980
- i0.ɵɵtwoWayListener("ngModelChange", function TextareaComponent_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.datavalue, $event) || (ctx.datavalue = $event); return i0.ɵɵresetView($event); });
2981
- i0.ɵɵlistener("blur", function TextareaComponent_Template_textarea_blur_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleBlur($event)); })("input", function TextareaComponent_Template_textarea_input_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onInputChange()); })("ngModelChange", function TextareaComponent_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); ctx.handleChange($event); return i0.ɵɵresetView(ctx.onInputChange()); });
2982
- i0.ɵɵelementEnd();
2983
- i0.ɵɵtemplate(2, TextareaComponent_Conditional_2_Template, 2, 1, "div", 2);
2984
- } if (rf & 2) {
2985
- i0.ɵɵtwoWayProperty("ngModel", ctx.datavalue);
2986
- i0.ɵɵproperty("ngModelOptions", ctx.ngModelOptions)("readonly", ctx.readonly)("required", ctx.required)("disabled", ctx.disabled)("maxlength", ctx.maxchars)("autofocus", ctx.autofocus)("ngClass", ctx.conditionalclass)("ngStyle", ctx.conditionalstyle);
2987
- i0.ɵɵattribute("name", ctx.name)("tabindex", ctx.tabindex)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.arialabel);
2988
- i0.ɵɵadvance(2);
2989
- i0.ɵɵconditional(ctx.maxchars ? 2 : -1);
2990
- } }, dependencies: [CommonModule, i1.NgClass, i1.NgStyle, WmComponentsModule, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.RequiredValidator, i2$1.MaxLengthValidator, i2$1.NgModel], encapsulation: 2 }); }
2991
- }
2992
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TextareaComponent, [{
2993
- type: Component,
2994
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule, FormsModule], selector: 'wm-textarea', providers: [
2995
- provideAs(TextareaComponent, NG_VALUE_ACCESSOR, true),
2996
- provideAs(TextareaComponent, NG_VALIDATORS, true),
2997
- provideAsWidgetRef(TextareaComponent)
2998
- ], template: "<textarea class=\"form-control app-textarea\"\n focus-target\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n aria-multiline=\"true\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (input)=\"onInputChange()\"\n (ngModelChange)=\"handleChange($event); onInputChange();\"\n #textarea\n></textarea>\n\n@if (maxchars) {\n <div class=\"textarea-count\" >{{limitdisplaytext}}</div>\n}\n" }]
2999
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
3000
- type: Inject,
3001
- args: ['EXPLICIT_CONTEXT']
3002
- }, {
3003
- type: Optional
3004
- }] }], { inputEl: [{
3005
- type: ViewChild,
3006
- args: ['textarea', { static: true }]
3007
- }], ngModel: [{
3008
- type: ViewChild,
3009
- args: [NgModel]
3010
- }] }); })();
3011
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TextareaComponent, { className: "TextareaComponent", filePath: "textarea/textarea.component.ts", lineNumber: 28 }); })();
3012
-
3013
- const inputNumberTypeProps = new Map([
3014
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
3015
- ['autofocus', PROP_BOOLEAN],
3016
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
3017
- ['class', PROP_STRING],
3018
- ['datavaluesource', PROP_ANY],
3019
- ['datavalue', PROP_STRING],
3020
- ['disabled', PROP_BOOLEAN],
3021
- ['hint', PROP_STRING],
3022
- ['arialabel', PROP_STRING],
3023
- ['maxchars', PROP_NUMBER],
3024
- ['maxvalue', PROP_NUMBER],
3025
- ['minvalue', PROP_NUMBER],
3026
- ['name', PROP_STRING],
3027
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
3028
- ['readonly', PROP_BOOLEAN],
3029
- ['regexp', PROP_STRING],
3030
- ['required', PROP_BOOLEAN],
3031
- ['shortcutkey', PROP_STRING],
3032
- ['show', { value: true, ...PROP_BOOLEAN }],
3033
- ['step', PROP_NUMBER],
3034
- ['tabindex', { value: 0, ...PROP_NUMBER }],
3035
- ['type', { value: 'number', ...PROP_STRING }],
3036
- ['updateon', PROP_STRING],
3037
- ['conditionalclass', PROP_ANY],
3038
- ['conditionalstyle', PROP_ANY]
3039
- ]);
3040
- const registerProps$2 = () => {
3041
- register('wm-input-number', inputNumberTypeProps);
3042
- };
3043
-
3044
- const inputTextTypeProps = new Map([
3045
- ['autocomplete', { value: true, ...PROP_BOOLEAN }],
3046
- ['autofocus', PROP_BOOLEAN],
3047
- ['autotrim', { value: true, ...PROP_BOOLEAN }],
3048
- ['class', PROP_STRING],
3049
- ['datavaluesource', PROP_ANY],
3050
- ['datavalue', PROP_STRING],
3051
- ['disabled', PROP_BOOLEAN],
3052
- ['displayformat', PROP_STRING],
3053
- ['hint', PROP_STRING],
3054
- ['arialabel', PROP_STRING],
3055
- ['maxchars', PROP_NUMBER],
3056
- ['name', PROP_STRING],
3057
- ['placeholder', { value: 'Enter text', ...PROP_STRING }],
3058
- ['readonly', PROP_BOOLEAN],
3059
- ['regexp', PROP_STRING],
3060
- ['required', PROP_BOOLEAN],
3061
- ['shortcutkey', PROP_STRING],
3062
- ['show', { value: true, ...PROP_BOOLEAN }],
3063
- ['showdisplayformaton', { value: 'always', ...PROP_ANY }],
3064
- ['tabindex', { value: 0, ...PROP_NUMBER }],
3065
- ['type', { value: 'text', ...PROP_STRING }],
3066
- ['updateon', PROP_STRING],
3067
- ['conditionalclass', PROP_ANY],
3068
- ['conditionalstyle', PROP_ANY]
3069
- ]);
3070
- const registerProps$1 = () => {
3071
- register('wm-input-text', inputTextTypeProps);
3072
- registerFormWidget(FormWidgetType.PASSWORD, new Map(inputTextTypeProps));
3073
- const formTextProps = new Map(inputTextTypeProps);
3074
- const mergeTextProps = (typeProps) => {
3075
- typeProps.forEach((v, k) => formTextProps.set(k, v));
3076
- };
3077
- mergeTextProps(inputCalendarTypeProps);
3078
- mergeTextProps(inputColorTypeProps);
3079
- mergeTextProps(inputEmailTypeProps);
3080
- mergeTextProps(inputNumberTypeProps);
3081
- registerFormWidget(FormWidgetType.TEXT, new Map(formTextProps));
3082
- };
3083
-
3084
- const _c0$2 = ["input"];
3085
- const _c1$2 = ["type", "text"];
3086
- const WIDGET_CONFIG$2 = {
3087
- widgetType: 'wm-input-text',
3088
- hostClass: 'app-input-wrapper'
3089
- };
3090
- class InputTextComponent extends BaseInput {
3091
- static { this.initializeProps = registerProps$1(); }
3092
- constructor(inj, explicitContext) {
3093
- super(inj, WIDGET_CONFIG$2, explicitContext);
3094
- this.lazy = false;
3095
- }
3096
- /* Define the property change handler. This function will be triggered when there is a change in the widget property */
3097
- onPropertyChange(key, nv, ov) {
3098
- /*Monitoring changes for styles or properties and accordingly handling respective changes.*/
3099
- switch (key) {
3100
- case 'displayformat':
3101
- this.maskVal = this.displayformat;
3102
- this.checkForDisplayFormat();
3103
- break;
3104
- case 'showdisplayformaton':
3105
- this.lazy = nv === 'keypress' ? true : false;
3106
- break;
3107
- default:
3108
- super.onPropertyChange(key, nv, ov);
3109
- }
3110
- }
3111
- get mask() {
3112
- if (this.displayformat && (!this.placeholder || (this.placeholder && this.isFocused))) {
3113
- return {
3114
- mask: this.maskVal,
3115
- lazy: this.lazy,
3116
- definitions: {
3117
- '9': /\d/,
3118
- 'A': /[a-zA-Z]/,
3119
- 'a': /[a-z]/,
3120
- '*': /\w/
3121
- }
3122
- };
3123
- }
3124
- else {
3125
- return false;
3126
- }
3127
- }
3128
- // show display format on focus or when it has a data value present. Else show the placeholder
3129
- checkForDisplayFormat($event) {
3130
- if (this.displayformat) {
3131
- this.isFocused = (($event && $event.type === 'focus') || this.datavalue) ? true : false;
3132
- // Do not show format placeholder when no value is present on blur
3133
- if (!this.isFocused && this.imask && this.imask.maskRef) {
3134
- this.imask.maskRef.updateOptions({ lazy: true });
3135
- // on blur, when no value is present assign maskref to null, as in some cases (where format palceholder starts with pranthesis) the format placeholder is still shown. WMS-20124
3136
- if (!this.datavalue && this.imask.maskRef.value) {
3137
- this.imask.maskRef.value = this.datavalue;
3138
- }
3139
- }
3140
- else {
3141
- // when display format is dynamically populated, cursor position is at the end of the format, readjusting the cursor position based on masked input value
3142
- // Adding timeout, as the below code should be on hold until imask model is generated
3143
- setTimeout(() => {
3144
- if (this.imask && this.imask.maskRef && this.imask.maskRef.value) {
3145
- const maskValIndex = this.imask.maskRef.value.indexOf('_');
3146
- const enteredMaskVal = maskValIndex >= 0 ? this.imask.maskRef.value.slice(0, maskValIndex).length : this.imask.maskRef.value.length;
3147
- if (enteredMaskVal !== this.imask.maskRef.cursorPos) {
3148
- this.imask.maskRef.updateCursor(enteredMaskVal);
3149
- }
3150
- }
3151
- }, 50);
3152
- }
3153
- }
3154
- else if (this.imask && this.imask.maskRef) { // When display format is bound via condition, remove the placeholder when the format is not applicable
3155
- this.imask.maskRef.updateOptions({ lazy: true });
3156
- // when display format is removed assign input value to the datavalue attr. WMS-20124
3157
- this.inputEl.nativeElement.value = this.datavalue;
3158
- }
3159
- }
3160
- ngOnInit() {
3161
- super.ngOnInit();
3162
- this.isFocused = !!this.datavalue;
3163
- }
3164
- static { this.ɵfac = function InputTextComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InputTextComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
3165
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: InputTextComponent, selectors: [["wm-input", "type", "text"], ["wm-input", 3, "type", ""], ["wm-input", "type", "password"], ["wm-input", "type", "search"], ["wm-input", "type", "tel"], ["wm-input", "type", "url"]], viewQuery: function InputTextComponent_Query(rf, ctx) { if (rf & 1) {
3166
- i0.ɵɵviewQuery(_c0$2, 7);
3167
- i0.ɵɵviewQuery(NgModel, 5);
3168
- i0.ɵɵviewQuery(_c0$2, 5, IMaskDirective);
3169
- } if (rf & 2) {
3170
- let _t;
3171
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputEl = _t.first);
3172
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ngModel = _t.first);
3173
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.imask = _t.first);
3174
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
3175
- provideAs(InputTextComponent, NG_VALUE_ACCESSOR, true),
3176
- provideAs(InputTextComponent, NG_VALIDATORS, true),
3177
- provideAsWidgetRef(InputTextComponent)
3178
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c1$2, decls: 2, vars: 19, consts: [["input", ""], ["focus-target", "", 1, "form-control", "app-textbox", 3, "ngModelChange", "blur", "focus", "keyup.enter", "type", "ngModel", "imask", "unmask", "ngModelOptions", "readonly", "required", "disabled", "maxlength", "pattern", "autofocus", "ngClass", "ngStyle", "autocomplete"]], template: function InputTextComponent_Template(rf, ctx) { if (rf & 1) {
3179
- const _r1 = i0.ɵɵgetCurrentView();
3180
- i0.ɵɵelementStart(0, "input", 1, 0);
3181
- i0.ɵɵtwoWayListener("ngModelChange", function InputTextComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.datavalue, $event) || (ctx.datavalue = $event); return i0.ɵɵresetView($event); });
3182
- i0.ɵɵlistener("ngModelChange", function InputTextComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleChange($event)); })("blur", function InputTextComponent_Template_input_blur_0_listener($event) { i0.ɵɵrestoreView(_r1); ctx.handleBlur($event); return i0.ɵɵresetView(ctx.checkForDisplayFormat($event)); })("focus", function InputTextComponent_Template_input_focus_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.checkForDisplayFormat($event)); })("keyup.enter", function InputTextComponent_Template_input_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r1); const input_r2 = i0.ɵɵreference(1); return i0.ɵɵresetView(ctx.flushViewChanges(input_r2.value)); });
3183
- i0.ɵɵelementEnd();
3184
- } if (rf & 2) {
3185
- i0.ɵɵproperty("type", ctx.type);
3186
- i0.ɵɵtwoWayProperty("ngModel", ctx.datavalue);
3187
- i0.ɵɵproperty("imask", ctx.mask)("unmask", true)("ngModelOptions", ctx.ngModelOptions)("readonly", ctx.readonly)("required", ctx.required)("disabled", ctx.disabled)("maxlength", ctx.maxchars)("pattern", ctx.regexp)("autofocus", ctx.autofocus)("ngClass", ctx.conditionalclass)("ngStyle", ctx.conditionalstyle)("autocomplete", ctx.autocomplete ? "on" : "off");
3188
- i0.ɵɵattribute("name", ctx.name)("aria-label", ctx.arialabel)("tabindex", ctx.tabindex)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey);
3189
- } }, dependencies: [CommonModule, i1.NgClass, i1.NgStyle, WmComponentsModule, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.RequiredValidator, i2$1.MaxLengthValidator, i2$1.PatternValidator, i2$1.NgModel, IMaskModule, i3.IMaskDirective], encapsulation: 2 }); }
3190
- }
3191
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InputTextComponent, [{
3192
- type: Component,
3193
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule, FormsModule, IMaskModule], selector: 'wm-input[type="text"], wm-input:not([type]), wm-input[type="password"], wm-input[type="search"], wm-input[type="tel"], wm-input[type="url"]', providers: [
3194
- provideAs(InputTextComponent, NG_VALUE_ACCESSOR, true),
3195
- provideAs(InputTextComponent, NG_VALIDATORS, true),
3196
- provideAsWidgetRef(InputTextComponent)
3197
- ], template: "<input class=\"form-control app-textbox\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel\"\n [(ngModel)]=\"datavalue\"\n [imask]=\"mask\"\n [unmask]=\"true\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [pattern]=\"regexp\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (ngModelChange)=\"handleChange($event)\"\n (blur)=\"handleBlur($event); checkForDisplayFormat($event)\"\n (focus)=\"checkForDisplayFormat($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n #input>\n" }]
3198
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
3199
- type: Inject,
3200
- args: ['EXPLICIT_CONTEXT']
3201
- }, {
3202
- type: Optional
3203
- }] }], { inputEl: [{
3204
- type: ViewChild,
3205
- args: ['input', { static: true }]
3206
- }], ngModel: [{
3207
- type: ViewChild,
3208
- args: [NgModel]
3209
- }], imask: [{
3210
- type: ViewChild,
3211
- args: ['input', { read: IMaskDirective }]
3212
- }] }); })();
3213
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InputTextComponent, { className: "InputTextComponent", filePath: "text/text/input-text.component.ts", lineNumber: 29 }); })();
3214
-
3215
- const _c0$1 = ["input"];
3216
- const _c1$1 = ["type", "number"];
3217
- const _c2$1 = a0 => ({ "step-hidden": a0 });
3218
- const WIDGET_CONFIG$1 = {
3219
- widgetType: 'wm-input-number',
3220
- hostClass: 'app-input-wrapper'
3221
- };
3222
- class InputNumberComponent extends BaseInput {
3223
- static { this.initializeProps = registerProps$2(); }
3224
- constructor(inj, explicitContext) {
3225
- super(inj, WIDGET_CONFIG$1, explicitContext);
3226
- }
3227
- onArrowPress($event) {
3228
- if (this.step === 0) {
3229
- $event.preventDefault();
3230
- }
3231
- }
3232
- validateInputEntry($event) {
3233
- if ($event.key === 'e' && $event.target.value.indexOf($event.key) !== -1) {
3234
- return false;
3235
- }
3236
- }
3237
- static { this.ɵfac = function InputNumberComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InputNumberComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
3238
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: InputNumberComponent, selectors: [["wm-input", "type", "number"]], viewQuery: function InputNumberComponent_Query(rf, ctx) { if (rf & 1) {
3239
- i0.ɵɵviewQuery(_c0$1, 7);
3240
- i0.ɵɵviewQuery(NgModel, 5);
3241
- } if (rf & 2) {
3242
- let _t;
3243
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputEl = _t.first);
3244
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ngModel = _t.first);
3245
- } }, standalone: true, features: [i0.ɵɵProvidersFeature([
3246
- provideAs(InputNumberComponent, NG_VALUE_ACCESSOR, true),
3247
- provideAs(InputNumberComponent, NG_VALIDATORS, true),
3248
- provideAsWidgetRef(InputNumberComponent)
3249
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c1$1, decls: 2, vars: 22, consts: [["input", ""], ["focus-target", "", 1, "form-control", "app-textbox", 3, "ngModelChange", "blur", "keyup.enter", "keydown.ArrowUp", "keydown.ArrowDown", "keypress", "ngClass", "type", "ngModel", "ngModelOptions", "readonly", "required", "disabled", "maxlength", "min", "max", "step", "autofocus", "ngStyle", "autocomplete"]], template: function InputNumberComponent_Template(rf, ctx) { if (rf & 1) {
3250
- const _r1 = i0.ɵɵgetCurrentView();
3251
- i0.ɵɵelementStart(0, "input", 1, 0);
3252
- i0.ɵɵtwoWayListener("ngModelChange", function InputNumberComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.datavalue, $event) || (ctx.datavalue = $event); return i0.ɵɵresetView($event); });
3253
- i0.ɵɵlistener("blur", function InputNumberComponent_Template_input_blur_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleBlur($event)); })("ngModelChange", function InputNumberComponent_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleChange($event)); })("keyup.enter", function InputNumberComponent_Template_input_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r1); const input_r2 = i0.ɵɵreference(1); return i0.ɵɵresetView(ctx.flushViewChanges(input_r2.value)); })("keydown.ArrowUp", function InputNumberComponent_Template_input_keydown_ArrowUp_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onArrowPress($event)); })("keydown.ArrowDown", function InputNumberComponent_Template_input_keydown_ArrowDown_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onArrowPress($event)); })("keypress", function InputNumberComponent_Template_input_keypress_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.validateInputEntry($event)); });
3254
- i0.ɵɵelementEnd();
3255
- } if (rf & 2) {
3256
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c2$1, ctx.step === 0))("type", ctx.type);
3257
- i0.ɵɵtwoWayProperty("ngModel", ctx.datavalue);
3258
- i0.ɵɵproperty("ngModelOptions", ctx.ngModelOptions)("readonly", ctx.readonly)("required", ctx.required)("disabled", ctx.disabled)("maxlength", ctx.maxchars)("min", ctx.minvalue)("max", ctx.maxvalue)("step", ctx.step)("autofocus", ctx.autofocus)("ngClass", ctx.conditionalclass)("ngStyle", ctx.conditionalstyle)("autocomplete", ctx.autocomplete ? "on" : "off");
3259
- i0.ɵɵattribute("name", ctx.name)("tabindex", ctx.tabindex)("placeholder", ctx.placeholder)("accesskey", ctx.shortcutkey)("aria-label", ctx.arialabel);
3260
- } }, dependencies: [CommonModule, i1.NgClass, i1.NgStyle, WmComponentsModule, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.RequiredValidator, i2$1.MaxLengthValidator, i2$1.NgModel], encapsulation: 2 }); }
3261
- }
3262
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InputNumberComponent, [{
3263
- type: Component,
3264
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule, FormsModule], selector: 'wm-input[type="number"]', providers: [
3265
- provideAs(InputNumberComponent, NG_VALUE_ACCESSOR, true),
3266
- provideAs(InputNumberComponent, NG_VALIDATORS, true),
3267
- provideAsWidgetRef(InputNumberComponent)
3268
- ], template: "<input class=\"form-control app-textbox\"\n [ngClass]=\"{'step-hidden': step === 0}\"\n focus-target\n [type]=\"type\"\n [attr.name]=\"name\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"ngModelOptions\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [maxlength]=\"maxchars\"\n [min]=\"minvalue\"\n [max]=\"maxvalue\"\n [step]=\"step\"\n [attr.tabindex]=\"tabindex\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\"\n [ngClass]=\"conditionalclass\"\n [ngStyle]=\"conditionalstyle\"\n (blur)=\"handleBlur($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [autocomplete]=\"autocomplete ? 'on' : 'off'\"\n (keyup.enter)=\"flushViewChanges(input.value)\"\n (keydown.ArrowUp)=\"onArrowPress($event)\"\n (keydown.ArrowDown)=\"onArrowPress($event)\"\n (keypress)=\"validateInputEntry($event)\"\n #input>\n" }]
3269
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
3270
- type: Inject,
3271
- args: ['EXPLICIT_CONTEXT']
3272
- }, {
3273
- type: Optional
3274
- }] }], { inputEl: [{
3275
- type: ViewChild,
3276
- args: ['input', { static: true }]
3277
- }], ngModel: [{
3278
- type: ViewChild,
3279
- args: [NgModel]
3280
- }] }); })();
3281
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InputNumberComponent, { className: "InputNumberComponent", filePath: "text/number/input-number.component.ts", lineNumber: 27 }); })();
3282
-
3283
- const switchProps = new Map([
3284
- ['class', PROP_STRING],
3285
- ['compareby', PROP_STRING],
3286
- ['datafield', PROP_STRING],
3287
- ['dataset', { value: 'yes, no, maybe', ...PROP_ANY }],
3288
- ['datavaluesource', PROP_ANY],
3289
- ['datavalue', PROP_STRING],
3290
- ['disabled', PROP_BOOLEAN],
3291
- ['displayexpression', PROP_STRING],
3292
- ['displayfield', PROP_STRING],
3293
- ['hint', PROP_ANY],
3294
- ['arialabel', PROP_STRING],
3295
- ['iconclass', PROP_STRING],
3296
- ['checkediconclass', { value: '', ...PROP_STRING }],
3297
- ['name', PROP_STRING],
3298
- ['orderby', PROP_STRING],
3299
- ['required', PROP_BOOLEAN],
3300
- ['show', { value: true, ...PROP_BOOLEAN }],
3301
- ['tabindex', { value: 0, ...PROP_NUMBER }]
3302
- ]);
3303
- const registerProps = () => {
3304
- register('wm-switch', switchProps);
3305
- registerFormWidget(FormWidgetType.SWITCH, new Map(switchProps));
3306
- registerFormWidget(FormWidgetType.TOGGLE, new Map(switchProps));
3307
- };
3308
-
3309
- const _c0 = ["wmSwitch", ""];
3310
- const _c1 = a0 => ({ "multi-select": a0 });
3311
- const _c2 = (a0, a1) => ({ "selected": a0, "disabled": a1 });
3312
- const _c3 = a0 => ["app-icon", a0];
3313
- const _c4 = a0 => [a0];
3314
- function SwitchComponent_For_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
3315
- i0.ɵɵelement(0, "i", 5);
3316
- } if (rf & 2) {
3317
- const opt_r3 = i0.ɵɵnextContext().$implicit;
3318
- const ctx_r4 = i0.ɵɵnextContext();
3319
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(1, _c3, opt_r3.dataObject[ctx_r4.iconclass] || opt_r3["icon"]));
3320
- } }
3321
- function SwitchComponent_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
3322
- i0.ɵɵelement(0, "i", 5);
3323
- } if (rf & 2) {
3324
- const ctx_r4 = i0.ɵɵnextContext(2);
3325
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(1, _c4, ctx_r4.checkediconclass));
3326
- } }
3327
- function SwitchComponent_For_2_Template(rf, ctx) { if (rf & 1) {
3328
- const _r1 = i0.ɵɵgetCurrentView();
3329
- i0.ɵɵelementStart(0, "a", 4);
3330
- i0.ɵɵlistener("click", function SwitchComponent_For_2_Template_a_click_0_listener($event) { const ctx_r1 = i0.ɵɵrestoreView(_r1); const opt_r3 = ctx_r1.$implicit; const $index_r4 = ctx_r1.$index; const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.selectOpt($event, $index_r4, opt_r3)); });
3331
- i0.ɵɵtemplate(1, SwitchComponent_For_2_Conditional_1_Template, 1, 3, "i", 5)(2, SwitchComponent_For_2_Conditional_2_Template, 1, 3, "i", 5);
3332
- i0.ɵɵelement(3, "span", 6);
3333
- i0.ɵɵelementEnd();
3334
- } if (rf & 2) {
3335
- const opt_r3 = ctx.$implicit;
3336
- const ctx_r4 = i0.ɵɵnextContext();
3337
- i0.ɵɵproperty("title", ctx_r4.hint ? ctx_r4.hint : opt_r3.key)("name", "wm-switch-" + opt_r3.key)("title", (ctx_r4.hint == null ? null : ctx_r4.hint[opt_r3.index - 1]) ? ctx_r4.hint[opt_r3.index - 1] : (ctx_r4.hint == null ? null : ctx_r4.hint[0]) ? ctx_r4.hint[0] : opt_r3[ctx_r4.displayfield] || opt_r3.label)("ngClass", i0.ɵɵpureFunction2(8, _c2, opt_r3.selected, ctx_r4.disabled));
3338
- i0.ɵɵattribute("aria-pressed", opt_r3.selected ? true : false);
3339
- i0.ɵɵadvance();
3340
- i0.ɵɵconditional(opt_r3.dataObject && opt_r3.dataObject[ctx_r4.iconclass] && (!opt_r3.selected || !ctx_r4.checkediconclass) ? 1 : -1);
3341
- i0.ɵɵadvance();
3342
- i0.ɵɵconditional(opt_r3.selected && ctx_r4.checkediconclass ? 2 : -1);
3343
- i0.ɵɵadvance();
3344
- i0.ɵɵproperty("textContent", opt_r3[ctx_r4.displayfield] || opt_r3.label);
3345
- } }
3346
- function SwitchComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
3347
- i0.ɵɵelementStart(0, "span", 2);
3348
- i0.ɵɵelement(1, "i", 7);
3349
- i0.ɵɵelementStart(2, "span", 8);
3350
- i0.ɵɵtext(3);
3351
- i0.ɵɵelementEnd()();
3352
- } if (rf & 2) {
3353
- const ctx_r4 = i0.ɵɵnextContext();
3354
- i0.ɵɵproperty("title", ctx_r4.selectedItem ? ctx_r4.selectedItem.label : ctx_r4.modelByKey);
3355
- i0.ɵɵadvance();
3356
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c4, ctx_r4.checkediconclass));
3357
- i0.ɵɵadvance(2);
3358
- i0.ɵɵtextInterpolate(ctx_r4.selectedItem ? ctx_r4.selectedItem.label : ctx_r4.modelByKey);
3359
- } }
3360
- const DEFAULT_CLS = 'app-switch';
3361
- const WIDGET_CONFIG = { widgetType: 'wm-switch', hostClass: DEFAULT_CLS };
3362
- class SwitchComponent extends DatasetAwareFormComponent {
3363
- static { this.initializeProps = registerProps(); }
3364
- constructor(inj, explicitContext) {
3365
- super(inj, WIDGET_CONFIG, explicitContext);
3366
- this.options = [];
3367
- this.multiple = this.getAttr("multiple") === "true";
3368
- this.checkediconclass = this.getAttr("checkediconclass");
3369
- this._debounceSetSelectedValue = debounce$1((val) => {
3370
- this.setSelectedValue();
3371
- this.updateHighlighter(val);
3372
- // only for default value trigger app digest to apply the selectedItem
3373
- if (val) {
3374
- $appDigest();
3375
- }
3376
- }, 200);
3377
- const datasetSubscription = this.dataset$.subscribe(() => this.updateSwitchOptions());
3378
- this.registerDestroyListener(() => datasetSubscription.unsubscribe());
3379
- const datavalueSubscription = this.datavalue$.subscribe(() => {
3380
- this._debounceSetSelectedValue(true);
3381
- });
3382
- this.registerDestroyListener(() => datavalueSubscription.unsubscribe());
3383
- }
3384
- ngAfterViewInit() {
3385
- super.ngAfterViewInit();
3386
- styler(this.nativeElement, this);
3387
- }
3388
- onStyleChange(key, nv, ov) {
3389
- if (key === 'height') {
3390
- setCSS(this.nativeElement, 'overflow', nv ? 'auto' : '');
3391
- }
3392
- else {
3393
- super.onStyleChange(key, nv, ov);
3394
- }
3395
- }
3396
- // This function sets the selectedItem by either using compareby fields or selected flag on datasetItems.
3397
- setSelectedValue() {
3398
- if (isDefined(this.datavalue) || isDefined(this.toBeProcessedDatavalue)) {
3399
- this.selectedItem = find(this.datasetItems, { selected: true });
3400
- return;
3401
- }
3402
- // If no value is provided, set first value as default if options are available else set -1 ie no selection
3403
- this.selectOptAtIndex(0);
3404
- }
3405
- // set the css for switch overlay element.
3406
- // set the selected index from the datasetItems and highlight the datavalue on switch.
3407
- updateSwitchOptions() {
3408
- if (this.datasetItems.length && !this.multiple) {
3409
- this.btnwidth = (100 / this.datasetItems.length);
3410
- setCSS(this.nativeElement.querySelector('.app-switch-overlay'), 'width', this.btnwidth + '%');
3411
- }
3412
- this._debounceSetSelectedValue(true);
3413
- }
3414
- // This function animates the highlighted span on to the selected value.
3415
- updateHighlighter(skipAnimation) {
3416
- const handler = $(this.nativeElement).find('span.app-switch-overlay');
3417
- this.setSelectedValue();
3418
- let left, index = this.selectedItem ? findIndex(this.datasetItems, { key: this.selectedItem.key }) : -1;
3419
- if (index === undefined || index === null) {
3420
- index = -1;
3421
- }
3422
- left = index * this.btnwidth;
3423
- if (skipAnimation) {
3424
- handler.css('left', left + '%');
3425
- }
3426
- else {
3427
- handler.animate({
3428
- left: left + '%'
3429
- }, 300);
3430
- }
3431
- }
3432
- selectOptAtIndex($index) {
3433
- if (!this.datasetItems.length) {
3434
- return;
3435
- }
3436
- const opt = this.datasetItems[$index];
3437
- this._modelByValue = opt.value;
3438
- }
3439
- // Triggered on selected the option from the switch.
3440
- // set the index and highlight the default value. Invoke onchange event handler.
3441
- selectOpt($event, $index, option) {
3442
- $event.preventDefault();
3443
- if (this.disabled) {
3444
- return;
3445
- }
3446
- if (this.multiple) {
3447
- const keys = [];
3448
- this.datasetItems[$index].selected = !this.datasetItems[$index].selected;
3449
- forEach(this.datasetItems, (item) => {
3450
- if (item.selected)
3451
- keys.push(item.key);
3452
- });
3453
- this.modelByKey = keys;
3454
- this.selectedItem = find(this.datasetItems, { selected: true });
3455
- }
3456
- else {
3457
- this.modelByKey = option.key;
3458
- if (!this.multiple && this.selectedItem && $index === findIndex(this.datasetItems, { key: this.selectedItem.key })) {
3459
- if (this.datasetItems.length === 2) {
3460
- $index = $index === 1 ? 0 : 1;
3461
- }
3462
- else {
3463
- return;
3464
- }
3465
- }
3466
- this.selectedItem = this.datasetItems[$index];
3467
- this.updateHighlighter();
3468
- }
3469
- this.invokeOnTouched();
3470
- // invoke on datavalue change.
3471
- this.invokeOnChange(this.datavalue, $event || {}, true);
3472
- $appDigest();
3473
- }
3474
- onPropertyChange(key, nv, ov) {
3475
- if (key === 'disabled' && !toBoolean(nv)) {
3476
- this.nativeElement.removeAttribute(key);
3477
- }
3478
- else {
3479
- if (key === 'hint') {
3480
- if (isUndefined(nv) || isNull(nv) || trim(nv) === '') {
3481
- this.hint = [];
3482
- }
3483
- else if (!isArray(nv)) {
3484
- this.hint = [nv];
3485
- }
3486
- }
3487
- super.onPropertyChange(key, nv, ov);
3488
- }
3489
- }
3490
- static { this.ɵfac = function SwitchComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SwitchComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
3491
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SwitchComponent, selectors: [["", "wmSwitch", ""]], exportAs: ["wmSwitch"], standalone: true, features: [i0.ɵɵProvidersFeature([
3492
- provideAs(SwitchComponent, NG_VALUE_ACCESSOR, true),
3493
- provideAsWidgetRef(SwitchComponent)
3494
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c0, decls: 5, vars: 8, consts: [["role", "group", 1, "btn-group", "btn-group-justified", 3, "ngClass"], ["focus-target", "", "href", "javascript:void(0);", "role", "button", 1, "btn", "btn-default", 3, "title", "name", "ngClass"], ["aria-hidden", "true", 1, "btn", "btn-primary", "app-switch-overlay", "switch-handle", 3, "title"], ["aria-hidden", "true", 1, "model-holder", "ng-hide", 3, "name", "disabled", "value", "required"], ["focus-target", "", "href", "javascript:void(0);", "role", "button", 1, "btn", "btn-default", 3, "click", "title", "name", "ngClass"], ["aria-hidden", "true", 3, "ngClass"], [1, "caption", 3, "textContent"], [3, "ngClass"], [1, "caption"]], template: function SwitchComponent_Template(rf, ctx) { if (rf & 1) {
3495
- i0.ɵɵelementStart(0, "div", 0);
3496
- i0.ɵɵrepeaterCreate(1, SwitchComponent_For_2_Template, 4, 11, "a", 1, i0.ɵɵrepeaterTrackByIdentity);
3497
- i0.ɵɵelementEnd();
3498
- i0.ɵɵtemplate(3, SwitchComponent_Conditional_3_Template, 4, 5, "span", 2);
3499
- i0.ɵɵelement(4, "input", 3);
3500
- } if (rf & 2) {
3501
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1, ctx.multiple));
3502
- i0.ɵɵadvance();
3503
- i0.ɵɵrepeater(ctx.datasetItems);
3504
- i0.ɵɵadvance(2);
3505
- i0.ɵɵconditional(!ctx.multiple ? 3 : -1);
3506
- i0.ɵɵadvance();
3507
- i0.ɵɵproperty("name", ctx.name)("disabled", ctx.disabled)("value", ctx.modelByKey)("required", ctx.required);
3508
- } }, dependencies: [CommonModule, i1.NgClass, WmComponentsModule, i2.TextContentDirective], encapsulation: 2 }); }
3509
- }
3510
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SwitchComponent, [{
3511
- type: Component,
3512
- args: [{ standalone: true, imports: [CommonModule, WmComponentsModule], selector: '[wmSwitch]', providers: [
3513
- provideAs(SwitchComponent, NG_VALUE_ACCESSOR, true),
3514
- provideAsWidgetRef(SwitchComponent)
3515
- ], exportAs: 'wmSwitch', template: "<div role=\"group\" class=\"btn-group btn-group-justified\" [ngClass]=\"{'multi-select': multiple}\">\n @for (opt of datasetItems; track opt) {\n <a\n focus-target\n href=\"javascript:void(0);\"\n class=\"btn btn-default\"\n [title]=\"hint?hint:opt.key\"\n [name]=\"'wm-switch-' + opt.key\"\n role=\"button\"\n [title]=\"hint?.[opt.index-1]?hint[opt.index-1]:(hint?.[0]?hint[0]:(opt[displayfield]||opt.label))\"\n [ngClass]=\"{'selected': opt.selected, 'disabled': disabled}\"\n [attr.aria-pressed]=\"opt.selected ? true : false\"\n (click)=\"selectOpt($event, $index, opt)\"\n >\n @if (opt.dataObject && opt.dataObject[iconclass] && (!opt.selected ||!checkediconclass)) {\n <i aria-hidden=\"true\" [ngClass]=\"['app-icon', opt.dataObject[iconclass] || opt['icon']]\"></i>\n }\n @if (opt.selected && checkediconclass) {\n <i aria-hidden=\"true\" [ngClass]=\"[checkediconclass]\"></i>\n }\n <span class=\"caption\" [textContent]=\"opt[displayfield] || opt.label\"></span>\n </a>\n }\n</div>\n@if (!multiple) {\n <span [title]=\"selectedItem ? selectedItem.label : modelByKey\" aria-hidden=\"true\"\n class=\"btn btn-primary app-switch-overlay switch-handle\">\n <i [ngClass]=\"[checkediconclass]\"></i>\n <span class=\"caption\">{{selectedItem ? selectedItem.label : modelByKey}}</span>\n </span>\n}\n<input [name]=\"name\" class=\"model-holder ng-hide\" [disabled]=\"disabled\" [value]=\"modelByKey\" [required]=\"required\" aria-hidden=\"true\">\n" }]
3516
- }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
3517
- type: Inject,
3518
- args: ['EXPLICIT_CONTEXT']
3519
- }, {
3520
- type: Optional
3521
- }] }], null); })();
3522
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SwitchComponent, { className: "SwitchComponent", filePath: "switch/switch.component.ts", lineNumber: 29 }); })();
3523
-
3524
- /**
3525
- * Generated bundle index. Do not edit.
3526
- */
3527
-
3528
- export { BaseFormComponent, BaseFormCustomComponent, ButtonComponent, ButtonGroupDirective, CaptionPositionDirective, CheckboxComponent, CheckboxsetComponent, CompositeDirective, DatasetAwareFormComponent, InputCalendarComponent, InputColorComponent, InputEmailComponent, InputNumberComponent, InputTextComponent, NumberComponent, NumberLocale, RadiosetComponent, SelectComponent, SwitchComponent, TextareaComponent, unStringify };
3529
- //# sourceMappingURL=index.mjs.map