@wavemaker-ai/app-ng-runtime 12.0.2-rc.647771 → 12.1.0-rc.647821

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (473) hide show
  1. package/build-task/bundles/index.umd.js +2489 -2963
  2. package/build-task/fesm2022/index.mjs +2307 -2786
  3. package/build-task/fesm2022/index.mjs.map +1 -1
  4. package/build-task/types/index.d.ts +401 -844
  5. package/components/advanced/carousel/bundles/index.umd.js +387 -344
  6. package/components/advanced/carousel/fesm2022/index.mjs +363 -325
  7. package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
  8. package/components/advanced/carousel/types/index.d.ts +85 -86
  9. package/components/advanced/custom/bundles/index.umd.js +298 -249
  10. package/components/advanced/custom/fesm2022/index.mjs +280 -236
  11. package/components/advanced/custom/fesm2022/index.mjs.map +1 -1
  12. package/components/advanced/custom/types/index.d.ts +49 -49
  13. package/components/advanced/login/bundles/index.umd.js +177 -127
  14. package/components/advanced/login/fesm2022/index.mjs +162 -117
  15. package/components/advanced/login/fesm2022/index.mjs.map +1 -1
  16. package/components/advanced/login/types/index.d.ts +33 -34
  17. package/components/advanced/marquee/bundles/index.umd.js +93 -63
  18. package/components/advanced/marquee/fesm2022/index.mjs +73 -48
  19. package/components/advanced/marquee/fesm2022/index.mjs.map +1 -1
  20. package/components/advanced/marquee/types/index.d.ts +11 -12
  21. package/components/base/bundles/index.umd.js +5515 -6359
  22. package/components/base/fesm2022/index.mjs +5169 -6027
  23. package/components/base/fesm2022/index.mjs.map +1 -1
  24. package/components/base/types/index.d.ts +1198 -1154
  25. package/components/basic/anchor/bundles/index.umd.js +273 -195
  26. package/components/basic/anchor/fesm2022/index.mjs +251 -178
  27. package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
  28. package/components/basic/anchor/types/index.d.ts +40 -41
  29. package/components/basic/audio/bundles/index.umd.js +124 -75
  30. package/components/basic/audio/fesm2022/index.mjs +104 -60
  31. package/components/basic/audio/fesm2022/index.mjs.map +1 -1
  32. package/components/basic/audio/types/index.d.ts +22 -23
  33. package/components/basic/html/bundles/index.umd.js +144 -113
  34. package/components/basic/html/fesm2022/index.mjs +125 -99
  35. package/components/basic/html/fesm2022/index.mjs.map +1 -1
  36. package/components/basic/html/types/index.d.ts +20 -17
  37. package/components/basic/icon/bundles/index.umd.js +144 -72
  38. package/components/basic/icon/fesm2022/index.mjs +124 -57
  39. package/components/basic/icon/fesm2022/index.mjs.map +1 -1
  40. package/components/basic/icon/types/index.d.ts +18 -19
  41. package/components/basic/iframe/bundles/index.umd.js +143 -93
  42. package/components/basic/iframe/fesm2022/index.mjs +124 -79
  43. package/components/basic/iframe/fesm2022/index.mjs.map +1 -1
  44. package/components/basic/iframe/types/index.d.ts +28 -29
  45. package/components/basic/label/bundles/index.umd.js +136 -120
  46. package/components/basic/label/fesm2022/index.mjs +118 -107
  47. package/components/basic/label/fesm2022/index.mjs.map +1 -1
  48. package/components/basic/label/types/index.d.ts +14 -15
  49. package/components/basic/picture/bundles/index.umd.js +171 -130
  50. package/components/basic/picture/fesm2022/index.mjs +152 -116
  51. package/components/basic/picture/fesm2022/index.mjs.map +1 -1
  52. package/components/basic/picture/types/index.d.ts +21 -22
  53. package/components/basic/progress/progress-bar/bundles/index.umd.js +211 -160
  54. package/components/basic/progress/progress-bar/fesm2022/index.mjs +193 -147
  55. package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -1
  56. package/components/basic/progress/progress-bar/types/index.d.ts +45 -41
  57. package/components/basic/progress/progress-circle/bundles/index.umd.js +294 -165
  58. package/components/basic/progress/progress-circle/fesm2022/index.mjs +274 -150
  59. package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -1
  60. package/components/basic/progress/progress-circle/types/index.d.ts +41 -42
  61. package/components/basic/progress/progress-utils/bundles/index.umd.js +27 -29
  62. package/components/basic/progress/progress-utils/fesm2022/index.mjs +18 -25
  63. package/components/basic/progress/progress-utils/fesm2022/index.mjs.map +1 -1
  64. package/components/basic/progress/progress-utils/types/index.d.ts +3 -5
  65. package/components/basic/rich-text-editor/bundles/index.umd.js +294 -228
  66. package/components/basic/rich-text-editor/fesm2022/index.mjs +275 -214
  67. package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
  68. package/components/basic/rich-text-editor/types/index.d.ts +55 -56
  69. package/components/basic/search/bundles/index.umd.js +1129 -1090
  70. package/components/basic/search/fesm2022/index.mjs +1117 -1083
  71. package/components/basic/search/fesm2022/index.mjs.map +1 -1
  72. package/components/basic/search/types/index.d.ts +132 -130
  73. package/components/basic/spinner/bundles/index.umd.js +216 -120
  74. package/components/basic/spinner/fesm2022/index.mjs +201 -110
  75. package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
  76. package/components/basic/spinner/types/index.d.ts +30 -31
  77. package/components/basic/tree/bundles/index.umd.js +756 -756
  78. package/components/basic/tree/fesm2022/index.mjs +740 -745
  79. package/components/basic/tree/fesm2022/index.mjs.map +1 -1
  80. package/components/basic/tree/types/index.d.ts +106 -97
  81. package/components/basic/video/bundles/index.umd.js +164 -108
  82. package/components/basic/video/fesm2022/index.mjs +145 -94
  83. package/components/basic/video/fesm2022/index.mjs.map +1 -1
  84. package/components/basic/video/types/index.d.ts +29 -30
  85. package/components/chart/bundles/index.umd.js +1768 -1737
  86. package/components/chart/fesm2022/index.mjs +1713 -1728
  87. package/components/chart/fesm2022/index.mjs.map +1 -1
  88. package/components/chart/types/index.d.ts +102 -104
  89. package/components/containers/accordion/bundles/index.umd.js +522 -494
  90. package/components/containers/accordion/fesm2022/index.mjs +502 -479
  91. package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
  92. package/components/containers/accordion/types/index.d.ts +116 -116
  93. package/components/containers/layout-grid/bundles/index.umd.js +260 -164
  94. package/components/containers/layout-grid/fesm2022/index.mjs +231 -140
  95. package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
  96. package/components/containers/layout-grid/types/index.d.ts +30 -27
  97. package/components/containers/linear-layout/bundles/index.umd.js +220 -178
  98. package/components/containers/linear-layout/fesm2022/index.mjs +193 -156
  99. package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
  100. package/components/containers/linear-layout/types/index.d.ts +26 -26
  101. package/components/containers/panel/bundles/index.umd.js +343 -215
  102. package/components/containers/panel/fesm2022/index.mjs +330 -207
  103. package/components/containers/panel/fesm2022/index.mjs.map +1 -1
  104. package/components/containers/panel/types/index.d.ts +48 -49
  105. package/components/containers/tabs/bundles/index.umd.js +832 -779
  106. package/components/containers/tabs/fesm2022/index.mjs +811 -763
  107. package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
  108. package/components/containers/tabs/types/index.d.ts +134 -126
  109. package/components/containers/tile/bundles/index.umd.js +93 -60
  110. package/components/containers/tile/fesm2022/index.mjs +75 -47
  111. package/components/containers/tile/fesm2022/index.mjs.map +1 -1
  112. package/components/containers/tile/types/index.d.ts +11 -12
  113. package/components/containers/wizard/bundles/index.umd.js +1096 -1078
  114. package/components/containers/wizard/fesm2022/index.mjs +1069 -1056
  115. package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
  116. package/components/containers/wizard/types/index.d.ts +258 -252
  117. package/components/data/card/bundles/index.umd.js +439 -229
  118. package/components/data/card/fesm2022/index.mjs +408 -203
  119. package/components/data/card/fesm2022/index.mjs.map +1 -1
  120. package/components/data/card/types/index.d.ts +50 -48
  121. package/components/data/form/bundles/index.umd.js +3392 -3339
  122. package/components/data/form/fesm2022/index.mjs +3350 -3304
  123. package/components/data/form/fesm2022/index.mjs.map +1 -1
  124. package/components/data/form/types/index.d.ts +561 -482
  125. package/components/data/list/bundles/index.umd.js +1523 -1601
  126. package/components/data/list/fesm2022/index.mjs +1507 -1590
  127. package/components/data/list/fesm2022/index.mjs.map +1 -1
  128. package/components/data/list/types/index.d.ts +300 -283
  129. package/components/data/live-table/bundles/index.umd.js +299 -280
  130. package/components/data/live-table/fesm2022/index.mjs +284 -270
  131. package/components/data/live-table/fesm2022/index.mjs.map +1 -1
  132. package/components/data/live-table/types/index.d.ts +42 -39
  133. package/components/data/pagination/bundles/index.umd.js +848 -881
  134. package/components/data/pagination/fesm2022/index.mjs +835 -879
  135. package/components/data/pagination/fesm2022/index.mjs.map +1 -1
  136. package/components/data/pagination/types/index.d.ts +110 -106
  137. package/components/data/table/bundles/index.umd.js +4977 -5042
  138. package/components/data/table/fesm2022/index.mjs +4937 -5007
  139. package/components/data/table/fesm2022/index.mjs.map +1 -1
  140. package/components/data/table/types/index.d.ts +770 -736
  141. package/components/dialogs/alert-dialog/bundles/index.umd.js +259 -118
  142. package/components/dialogs/alert-dialog/fesm2022/index.mjs +243 -109
  143. package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
  144. package/components/dialogs/alert-dialog/types/index.d.ts +31 -26
  145. package/components/dialogs/confirm-dialog/bundles/index.umd.js +250 -121
  146. package/components/dialogs/confirm-dialog/fesm2022/index.mjs +236 -114
  147. package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
  148. package/components/dialogs/confirm-dialog/types/index.d.ts +34 -29
  149. package/components/dialogs/default/bundles/index.umd.js +509 -373
  150. package/components/dialogs/default/fesm2022/index.mjs +485 -354
  151. package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  152. package/components/dialogs/default/types/index.d.ts +129 -86
  153. package/components/dialogs/design-dialog/bundles/index.umd.js +320 -142
  154. package/components/dialogs/design-dialog/fesm2022/index.mjs +305 -132
  155. package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
  156. package/components/dialogs/design-dialog/types/index.d.ts +31 -20
  157. package/components/dialogs/iframe-dialog/bundles/index.umd.js +258 -111
  158. package/components/dialogs/iframe-dialog/fesm2022/index.mjs +245 -105
  159. package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
  160. package/components/dialogs/iframe-dialog/types/index.d.ts +27 -22
  161. package/components/dialogs/login-dialog/bundles/index.umd.js +139 -106
  162. package/components/dialogs/login-dialog/fesm2022/index.mjs +125 -97
  163. package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
  164. package/components/dialogs/login-dialog/types/index.d.ts +27 -26
  165. package/components/dialogs/partial-dialog/bundles/index.umd.js +302 -149
  166. package/components/dialogs/partial-dialog/fesm2022/index.mjs +289 -143
  167. package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
  168. package/components/dialogs/partial-dialog/types/index.d.ts +37 -32
  169. package/components/input/base-form/bundles/index.umd.js +143 -139
  170. package/components/input/base-form/fesm2022/index.mjs +129 -130
  171. package/components/input/base-form/fesm2022/index.mjs.map +1 -1
  172. package/components/input/base-form/types/index.d.ts +28 -29
  173. package/components/input/base-form-custom/bundles/index.umd.js +107 -121
  174. package/components/input/base-form-custom/fesm2022/index.mjs +88 -107
  175. package/components/input/base-form-custom/fesm2022/index.mjs.map +1 -1
  176. package/components/input/base-form-custom/types/index.d.ts +23 -26
  177. package/components/input/button/bundles/index.umd.js +177 -89
  178. package/components/input/button/fesm2022/index.mjs +158 -75
  179. package/components/input/button/fesm2022/index.mjs.map +1 -1
  180. package/components/input/button/types/index.d.ts +24 -25
  181. package/components/input/button-group/bundles/index.umd.js +110 -72
  182. package/components/input/button-group/fesm2022/index.mjs +90 -57
  183. package/components/input/button-group/fesm2022/index.mjs.map +1 -1
  184. package/components/input/button-group/types/index.d.ts +13 -14
  185. package/components/input/calendar/bundles/index.umd.js +615 -647
  186. package/components/input/calendar/fesm2022/index.mjs +596 -649
  187. package/components/input/calendar/fesm2022/index.mjs.map +1 -1
  188. package/components/input/calendar/types/index.d.ts +130 -131
  189. package/components/input/caption-position/bundles/index.umd.js +175 -188
  190. package/components/input/caption-position/fesm2022/index.mjs +159 -177
  191. package/components/input/caption-position/fesm2022/index.mjs.map +1 -1
  192. package/components/input/caption-position/types/index.d.ts +31 -34
  193. package/components/input/checkbox/bundles/index.umd.js +339 -200
  194. package/components/input/checkbox/fesm2022/index.mjs +319 -185
  195. package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
  196. package/components/input/checkbox/types/index.d.ts +46 -41
  197. package/components/input/checkboxset/bundles/index.umd.js +256 -170
  198. package/components/input/checkboxset/fesm2022/index.mjs +242 -161
  199. package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
  200. package/components/input/checkboxset/types/index.d.ts +26 -27
  201. package/components/input/chips/bundles/index.umd.js +721 -733
  202. package/components/input/chips/fesm2022/index.mjs +706 -723
  203. package/components/input/chips/fesm2022/index.mjs.map +1 -1
  204. package/components/input/chips/types/index.d.ts +101 -90
  205. package/components/input/color-picker/bundles/index.umd.js +312 -137
  206. package/components/input/color-picker/fesm2022/index.mjs +296 -126
  207. package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
  208. package/components/input/color-picker/types/index.d.ts +35 -36
  209. package/components/input/composite/bundles/index.umd.js +127 -112
  210. package/components/input/composite/fesm2022/index.mjs +106 -96
  211. package/components/input/composite/fesm2022/index.mjs.map +1 -1
  212. package/components/input/composite/types/index.d.ts +26 -27
  213. package/components/input/currency/bundles/index.umd.js +237 -104
  214. package/components/input/currency/fesm2022/index.mjs +219 -91
  215. package/components/input/currency/fesm2022/index.mjs.map +1 -1
  216. package/components/input/currency/types/index.d.ts +30 -31
  217. package/components/input/dataset-aware-form/bundles/index.umd.js +298 -346
  218. package/components/input/dataset-aware-form/fesm2022/index.mjs +286 -339
  219. package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -1
  220. package/components/input/dataset-aware-form/types/index.d.ts +80 -80
  221. package/components/input/epoch/base-date-time/bundles/index.umd.js +809 -1081
  222. package/components/input/epoch/base-date-time/fesm2022/index.mjs +796 -1073
  223. package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
  224. package/components/input/epoch/base-date-time/types/index.d.ts +244 -247
  225. package/components/input/epoch/date/bundles/index.umd.js +619 -513
  226. package/components/input/epoch/date/fesm2022/index.mjs +604 -503
  227. package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
  228. package/components/input/epoch/date/types/index.d.ts +63 -64
  229. package/components/input/epoch/date-time/bundles/index.umd.js +682 -511
  230. package/components/input/epoch/date-time/fesm2022/index.mjs +672 -506
  231. package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -1
  232. package/components/input/epoch/date-time/types/index.d.ts +111 -112
  233. package/components/input/epoch/date-time-picker/bundles/index.umd.js +417 -321
  234. package/components/input/epoch/date-time-picker/fesm2022/index.mjs +405 -314
  235. package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -1
  236. package/components/input/epoch/date-time-picker/types/index.d.ts +135 -80
  237. package/components/input/epoch/picker/bundles/index.umd.js +201 -148
  238. package/components/input/epoch/picker/fesm2022/index.mjs +183 -135
  239. package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -1
  240. package/components/input/epoch/picker/types/index.d.ts +46 -38
  241. package/components/input/epoch/time/bundles/index.umd.js +534 -392
  242. package/components/input/epoch/time/fesm2022/index.mjs +523 -386
  243. package/components/input/epoch/time/fesm2022/index.mjs.map +1 -1
  244. package/components/input/epoch/time/types/index.d.ts +107 -108
  245. package/components/input/file-upload/bundles/index.umd.js +500 -477
  246. package/components/input/file-upload/fesm2022/index.mjs +484 -466
  247. package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  248. package/components/input/file-upload/types/index.d.ts +110 -109
  249. package/components/input/number/bundles/index.umd.js +241 -101
  250. package/components/input/number/fesm2022/index.mjs +224 -89
  251. package/components/input/number/fesm2022/index.mjs.map +1 -1
  252. package/components/input/number/types/index.d.ts +28 -29
  253. package/components/input/radioset/bundles/index.umd.js +240 -156
  254. package/components/input/radioset/fesm2022/index.mjs +226 -147
  255. package/components/input/radioset/fesm2022/index.mjs.map +1 -1
  256. package/components/input/radioset/types/index.d.ts +25 -26
  257. package/components/input/rating/bundles/index.umd.js +353 -266
  258. package/components/input/rating/fesm2022/index.mjs +337 -255
  259. package/components/input/rating/fesm2022/index.mjs.map +1 -1
  260. package/components/input/rating/types/index.d.ts +52 -53
  261. package/components/input/select/bundles/index.umd.js +295 -217
  262. package/components/input/select/fesm2022/index.mjs +280 -207
  263. package/components/input/select/fesm2022/index.mjs.map +1 -1
  264. package/components/input/select/types/index.d.ts +38 -39
  265. package/components/input/slider/bundles/index.umd.js +316 -197
  266. package/components/input/slider/fesm2022/index.mjs +297 -183
  267. package/components/input/slider/fesm2022/index.mjs.map +1 -1
  268. package/components/input/slider/types/index.d.ts +43 -44
  269. package/components/input/switch/bundles/index.umd.js +257 -219
  270. package/components/input/switch/fesm2022/index.mjs +243 -210
  271. package/components/input/switch/fesm2022/index.mjs.map +1 -1
  272. package/components/input/switch/types/index.d.ts +34 -35
  273. package/components/input/text/bundles/index.umd.js +1585 -1120
  274. package/components/input/text/fesm2022/index.mjs +1542 -1082
  275. package/components/input/text/fesm2022/index.mjs.map +1 -1
  276. package/components/input/text/types/index.d.ts +313 -310
  277. package/components/input/textarea/bundles/index.umd.js +224 -100
  278. package/components/input/textarea/fesm2022/index.mjs +207 -88
  279. package/components/input/textarea/fesm2022/index.mjs.map +1 -1
  280. package/components/input/textarea/types/index.d.ts +32 -33
  281. package/components/navigation/breadcrumb/bundles/index.umd.js +205 -131
  282. package/components/navigation/breadcrumb/fesm2022/index.mjs +188 -118
  283. package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
  284. package/components/navigation/breadcrumb/types/index.d.ts +29 -28
  285. package/components/navigation/menu/bundles/index.umd.js +1461 -950
  286. package/components/navigation/menu/fesm2022/index.mjs +1416 -910
  287. package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  288. package/components/navigation/menu/types/index.d.ts +220 -193
  289. package/components/navigation/navbar/bundles/index.umd.js +172 -79
  290. package/components/navigation/navbar/fesm2022/index.mjs +155 -67
  291. package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
  292. package/components/navigation/navbar/types/index.d.ts +19 -20
  293. package/components/navigation/popover/bundles/index.umd.js +543 -519
  294. package/components/navigation/popover/fesm2022/index.mjs +524 -505
  295. package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
  296. package/components/navigation/popover/types/index.d.ts +86 -86
  297. package/components/page/default/bundles/index.umd.js +634 -451
  298. package/components/page/default/fesm2022/index.mjs +600 -422
  299. package/components/page/default/fesm2022/index.mjs.map +1 -1
  300. package/components/page/default/types/index.d.ts +123 -119
  301. package/components/page/footer/bundles/index.umd.js +91 -63
  302. package/components/page/footer/fesm2022/index.mjs +71 -48
  303. package/components/page/footer/fesm2022/index.mjs.map +1 -1
  304. package/components/page/footer/types/index.d.ts +11 -12
  305. package/components/page/header/bundles/index.umd.js +96 -59
  306. package/components/page/header/fesm2022/index.mjs +76 -44
  307. package/components/page/header/fesm2022/index.mjs.map +1 -1
  308. package/components/page/header/types/index.d.ts +12 -13
  309. package/components/page/left-panel/bundles/index.umd.js +405 -407
  310. package/components/page/left-panel/fesm2022/index.mjs +386 -393
  311. package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
  312. package/components/page/left-panel/types/index.d.ts +47 -40
  313. package/components/page/right-panel/bundles/index.umd.js +115 -78
  314. package/components/page/right-panel/fesm2022/index.mjs +96 -64
  315. package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
  316. package/components/page/right-panel/types/index.d.ts +14 -13
  317. package/components/page/top-nav/bundles/index.umd.js +91 -60
  318. package/components/page/top-nav/fesm2022/index.mjs +73 -47
  319. package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
  320. package/components/page/top-nav/types/index.d.ts +11 -12
  321. package/components/prefab/bundles/index.umd.js +253 -173
  322. package/components/prefab/fesm2022/index.mjs +233 -158
  323. package/components/prefab/fesm2022/index.mjs.map +1 -1
  324. package/components/prefab/types/index.d.ts +35 -33
  325. package/core/bundles/index.umd.js +4466 -5642
  326. package/core/fesm2022/index.mjs +3997 -5202
  327. package/core/fesm2022/index.mjs.map +1 -1
  328. package/core/types/index.d.ts +1785 -1808
  329. package/http/bundles/index.umd.js +339 -413
  330. package/http/fesm2022/index.mjs +323 -402
  331. package/http/fesm2022/index.mjs.map +1 -1
  332. package/http/types/index.d.ts +107 -112
  333. package/locales/moment/am-et.js +73 -0
  334. package/locales/moment/bm.js +2 -0
  335. package/locales/moment/ca.js +1 -1
  336. package/locales/moment/de-at.js +29 -1
  337. package/locales/moment/de-ch.js +29 -1
  338. package/locales/moment/de.js +29 -1
  339. package/locales/moment/hu.js +3 -3
  340. package/locales/moment/id.js +12 -1
  341. package/locales/moment/ka.js +1 -1
  342. package/locales/moment/mk.js +0 -1
  343. package/locales/moment/nl-be.js +1 -1
  344. package/locales/moment/pl.js +1 -1
  345. package/locales/moment/ps.js +188 -0
  346. package/locales/moment/pt-br.js +14 -6
  347. package/locales/moment/sv.js +1 -1
  348. package/locales/moment/sw.js +56 -14
  349. package/locales/moment/uk.js +5 -4
  350. package/locales/moment/uz-latn.js +1 -1
  351. package/locales/moment/uz.js +1 -1
  352. package/npm-shrinkwrap.json +2 -2
  353. package/oAuth/bundles/index.umd.js +326 -483
  354. package/oAuth/fesm2022/index.mjs +267 -429
  355. package/oAuth/fesm2022/index.mjs.map +1 -1
  356. package/oAuth/types/index.d.ts +22 -26
  357. package/package-lock.json +2 -2
  358. package/package.json +1 -1
  359. package/runtime/base/bundles/index.umd.js +6380 -6093
  360. package/runtime/base/fesm2022/index.mjs +6368 -6107
  361. package/runtime/base/fesm2022/index.mjs.map +1 -1
  362. package/runtime/base/types/index.d.ts +1336 -1359
  363. package/runtime/dynamic/bundles/index.umd.js +1215 -851
  364. package/runtime/dynamic/fesm2022/index.mjs +1253 -898
  365. package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
  366. package/runtime/dynamic/types/index.d.ts +140 -128
  367. package/scripts/datatable/datatable.js +20 -30
  368. package/security/bundles/index.umd.js +297 -438
  369. package/security/fesm2022/index.mjs +282 -443
  370. package/security/fesm2022/index.mjs.map +1 -1
  371. package/security/types/index.d.ts +127 -130
  372. package/swipey/bundles/index.umd.js +57 -48
  373. package/swipey/fesm2022/index.mjs +55 -50
  374. package/swipey/fesm2022/index.mjs.map +1 -1
  375. package/swipey/types/index.d.ts +19 -21
  376. package/transpiler/bundles/index.umd.js +1174 -811
  377. package/transpiler/fesm2022/index.mjs +1109 -757
  378. package/transpiler/fesm2022/index.mjs.map +1 -1
  379. package/transpiler/types/index.d.ts +32 -36
  380. package/variables/bundles/index.umd.js +2226 -3245
  381. package/variables/fesm2022/index.mjs +2117 -3237
  382. package/variables/fesm2022/index.mjs.map +1 -1
  383. package/variables/types/index.d.ts +410 -393
  384. package/build-task/.npmignore +0 -2
  385. package/components/advanced/carousel/.npmignore +0 -2
  386. package/components/advanced/custom/.npmignore +0 -2
  387. package/components/advanced/login/.npmignore +0 -2
  388. package/components/advanced/marquee/.npmignore +0 -2
  389. package/components/base/.npmignore +0 -2
  390. package/components/basic/anchor/.npmignore +0 -2
  391. package/components/basic/audio/.npmignore +0 -2
  392. package/components/basic/html/.npmignore +0 -2
  393. package/components/basic/icon/.npmignore +0 -2
  394. package/components/basic/iframe/.npmignore +0 -2
  395. package/components/basic/label/.npmignore +0 -2
  396. package/components/basic/picture/.npmignore +0 -2
  397. package/components/basic/progress/progress-bar/.npmignore +0 -2
  398. package/components/basic/progress/progress-circle/.npmignore +0 -2
  399. package/components/basic/progress/progress-utils/.npmignore +0 -2
  400. package/components/basic/rich-text-editor/.npmignore +0 -2
  401. package/components/basic/search/.npmignore +0 -2
  402. package/components/basic/spinner/.npmignore +0 -2
  403. package/components/basic/tree/.npmignore +0 -2
  404. package/components/basic/video/.npmignore +0 -2
  405. package/components/chart/.npmignore +0 -2
  406. package/components/containers/accordion/.npmignore +0 -2
  407. package/components/containers/layout-grid/.npmignore +0 -2
  408. package/components/containers/linear-layout/.npmignore +0 -2
  409. package/components/containers/panel/.npmignore +0 -2
  410. package/components/containers/tabs/.npmignore +0 -2
  411. package/components/containers/tile/.npmignore +0 -2
  412. package/components/containers/wizard/.npmignore +0 -2
  413. package/components/data/card/.npmignore +0 -2
  414. package/components/data/form/.npmignore +0 -2
  415. package/components/data/list/.npmignore +0 -2
  416. package/components/data/live-table/.npmignore +0 -2
  417. package/components/data/pagination/.npmignore +0 -2
  418. package/components/data/table/.npmignore +0 -2
  419. package/components/dialogs/alert-dialog/.npmignore +0 -2
  420. package/components/dialogs/confirm-dialog/.npmignore +0 -2
  421. package/components/dialogs/default/.npmignore +0 -2
  422. package/components/dialogs/design-dialog/.npmignore +0 -2
  423. package/components/dialogs/iframe-dialog/.npmignore +0 -2
  424. package/components/dialogs/login-dialog/.npmignore +0 -2
  425. package/components/dialogs/partial-dialog/.npmignore +0 -2
  426. package/components/input/base-form/.npmignore +0 -2
  427. package/components/input/base-form-custom/.npmignore +0 -2
  428. package/components/input/button/.npmignore +0 -2
  429. package/components/input/button-group/.npmignore +0 -2
  430. package/components/input/calendar/.npmignore +0 -2
  431. package/components/input/caption-position/.npmignore +0 -2
  432. package/components/input/checkbox/.npmignore +0 -2
  433. package/components/input/checkboxset/.npmignore +0 -2
  434. package/components/input/chips/.npmignore +0 -2
  435. package/components/input/color-picker/.npmignore +0 -2
  436. package/components/input/composite/.npmignore +0 -2
  437. package/components/input/currency/.npmignore +0 -2
  438. package/components/input/dataset-aware-form/.npmignore +0 -2
  439. package/components/input/epoch/base-date-time/.npmignore +0 -2
  440. package/components/input/epoch/date/.npmignore +0 -2
  441. package/components/input/epoch/date-time/.npmignore +0 -2
  442. package/components/input/epoch/date-time-picker/.npmignore +0 -2
  443. package/components/input/epoch/picker/.npmignore +0 -2
  444. package/components/input/epoch/time/.npmignore +0 -2
  445. package/components/input/file-upload/.npmignore +0 -2
  446. package/components/input/number/.npmignore +0 -2
  447. package/components/input/radioset/.npmignore +0 -2
  448. package/components/input/rating/.npmignore +0 -2
  449. package/components/input/select/.npmignore +0 -2
  450. package/components/input/slider/.npmignore +0 -2
  451. package/components/input/switch/.npmignore +0 -2
  452. package/components/input/text/.npmignore +0 -2
  453. package/components/input/textarea/.npmignore +0 -2
  454. package/components/navigation/breadcrumb/.npmignore +0 -2
  455. package/components/navigation/menu/.npmignore +0 -2
  456. package/components/navigation/navbar/.npmignore +0 -2
  457. package/components/navigation/popover/.npmignore +0 -2
  458. package/components/page/default/.npmignore +0 -2
  459. package/components/page/footer/.npmignore +0 -2
  460. package/components/page/header/.npmignore +0 -2
  461. package/components/page/left-panel/.npmignore +0 -2
  462. package/components/page/right-panel/.npmignore +0 -2
  463. package/components/page/top-nav/.npmignore +0 -2
  464. package/components/prefab/.npmignore +0 -2
  465. package/core/.npmignore +0 -2
  466. package/http/.npmignore +0 -2
  467. package/oAuth/.npmignore +0 -2
  468. package/runtime/base/.npmignore +0 -2
  469. package/runtime/dynamic/.npmignore +0 -2
  470. package/security/.npmignore +0 -2
  471. package/swipey/.npmignore +0 -2
  472. package/transpiler/.npmignore +0 -2
  473. package/variables/.npmignore +0 -2
@@ -1,178 +1,160 @@
1
- import * as i0 from '@angular/core';
2
- import { ElementRef, Directive } from '@angular/core';
3
- import * as i1 from '@wm/core';
4
- import { forEach } from 'lodash-es';
5
-
6
- class CaptionPositionDirective {
7
- constructor(inj, app) {
8
- // skip floating caption for the below form fields
9
- this.skipFloatPositionWidgets = ['radioset', 'checkboxset', 'richtext', 'switch', 'chips', 'checkbox', 'slider', 'rating', 'toggle', 'upload'];
10
- this.elementRef = inj.get(ElementRef);
11
- this.nativeEl = this.elementRef.nativeElement;
12
- this.app = app;
13
- }
14
- onBlurCb() {
15
- let mobileInputVal;
16
- // In case of mobile date / time picker check for input element's value which has 'mobile-input' class
17
- if (this.inputEl.length > 1 && this.inputEl.hasClass('mobile-input')) {
18
- forEach(this.inputEl, (el) => {
19
- if ($(el).hasClass('mobile-input') && el.value) {
20
- mobileInputVal = el.value;
21
- }
22
- });
23
- }
24
- if (!this.inputEl.val() && !mobileInputVal) {
25
- this.compositeEle.classList.remove('float-active');
26
- this.inputEl.removeAttr('placeholder');
27
- }
28
- }
29
- onFocusCb() {
30
- this.compositeEle.classList.add('float-active');
31
- this.inputEl.attr('placeholder', this.placeholder);
32
- }
33
- // For select widget, display placeholder only on focus else remove the text of the option selected.
34
- checkForSelectPlaceholder() {
35
- const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');
36
- if (selectElPlaceholderOption?.textContent && !$(this.nativeEl).find('select').is(':focus') &&
37
- !$(this.inputEl.closest('[widget-id]')).attr('datavalue')) {
38
- selectElPlaceholderOption.textContent = '';
39
- }
40
- }
41
- setDefaultValueAnimation() {
42
- // remove placeholder when the input el has placeholder and the placeholder is not bound to any variable
43
- if (!this._isPlaceholderBound && this.inputEl.attr('placeholder')) {
44
- this.placeholder = this.inputEl.attr('placeholder');
45
- this.inputEl.removeAttr('placeholder');
46
- }
47
- // Do not show placeholder as selected by default
48
- this.checkForSelectPlaceholder();
49
- // check for datavalue attribute in composite element and defaultvalue attribute in form field element
50
- // check for datavalue.bind attribute to see whether default value is binded via expression or a variable
51
- // check for displayformat attribute, as in form fields user can set display format to the field
52
- // check for formdata/bindformdata attribute to see if any default value is binded to the form
53
- // check for select tag with multiple attribute enabled
54
- 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')
55
- || this.nativeEl.getAttribute('displayformat') || $(this.nativeEl).find('select option:selected').text() || $(this.nativeEl).find('select').attr('multiple')) {
56
- this.compositeEle.classList.add('float-active');
57
- }
58
- }
59
- /**
60
- * Observing placeholder attribute change on DOM instead of having a propChangeHandler fn
61
- * For composite widgets propertychangehandler function is invoked at independent widgets where as the directive is at composite level
62
- */
63
- observeForPlaceholderAttrChange() {
64
- this._attrObserver = new MutationObserver(mutations => {
65
- mutations.forEach((mutation) => {
66
- if (mutation.attributeName === 'placeholder' && this.inputEl.attr('placeholder') && !this.compositeEle.classList.contains('float-active')) {
67
- this.placeholder = this.inputEl.attr('placeholder');
68
- this.inputEl.removeAttr('placeholder');
69
- }
70
- });
71
- });
72
- const config = { attributes: true, childList: false, characterData: false };
73
- this._attrObserver.observe(this.inputEl[0], config);
74
- }
75
- // 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
76
- checkForRightAlignedForm() {
77
- const $compositeEle = $(this.compositeEle);
78
- if ($compositeEle.closest('.align-right').length && $compositeEle.find('.input-group-btn').length) {
79
- const $label = $compositeEle.find('label');
80
- if ($compositeEle.find('[wmdatetime]').length) { // for datetime picker, as there will be 2 icons css is different
81
- $label.addClass('input-grp-dt-icon');
82
- }
83
- else {
84
- $label.addClass('input-grp-icon');
85
- }
86
- }
87
- }
88
- ngAfterViewInit() {
89
- this.compositeEle = this.nativeEl;
90
- const widget = this.nativeEl.widget;
91
- let captionPosition = widget.$attrs.get('captionposition');
92
- if (widget.form) {
93
- captionPosition = widget.form.$attrs.get('captionposition');
94
- this.compositeEle = this.nativeEl.querySelector('.app-composite-widget');
95
- this._isPlaceholderBound = this.nativeEl.getAttribute('placeholder.bind');
96
- }
97
- if (captionPosition === 'floating') {
98
- if (widget.form) { // for form-fields remove caption-floating and replace it with caption-float or caption-top
99
- const widgetType = this.nativeEl.getAttribute('widgettype'); // fetches the form field type
100
- if (this.skipFloatPositionWidgets.indexOf(widgetType) > -1) {
101
- this.compositeEle.classList.remove('caption-floating');
102
- this.compositeEle.classList.add('caption-top');
103
- }
104
- this.checkForRightAlignedForm();
105
- }
106
- this.inputEl = $(this.nativeEl).find('input, select, textarea');
107
- if (!this._isPlaceholderBound) {
108
- this._isPlaceholderBound = this.inputEl.closest('[widget-id]').attr('placeholder.bind');
109
- }
110
- // call the below function to apply float-active class when there are default values to the fields
111
- setTimeout(this.setDefaultValueAnimation.bind(this), 0);
112
- this.inputEl.focus(this.onFocusCb.bind(this));
113
- this.inputEl.blur(this.onBlurCb.bind(this));
114
- // observe for placeholder attribute change when placeholder is bound via db variable or an expression
115
- if (this._isPlaceholderBound) {
116
- this.observeForPlaceholderAttrChange();
117
- }
118
- }
119
- }
120
- // captionPositionAnimate is only notified for date-time, time and search widgets as input el is not updated with value on selection of dropdown/popups
121
- ngOnInit() {
122
- this.labelAnimationSubscription = this.app.subscribe('captionPositionAnimate', (data) => {
123
- // displayVal is true when there is a value entered in the input field
124
- // In case of form fields, when the field is in focus, isFocused will be set as true
125
- // isSelectMultiple is set to true when for select widget, multiple option is enabled
126
- // Checking inputEl focus - when form is represented as dialog and the first field is automatically in focus
127
- const isInputElFocused = this.inputEl?.is(':focus');
128
- if (data.displayVal || data.isFocused || data.isSelectMultiple || isInputElFocused) {
129
- data.nativeEl.addClass('float-active');
130
- if (!data.displayVal && isInputElFocused) {
131
- this.inputEl.attr('placeholder', this.placeholder);
132
- }
133
- }
134
- else {
135
- data.nativeEl.removeClass('float-active');
136
- // Remove placeholder on removing float-active, if not the label and placeholder are collided
137
- // before placeholder is removed assign it to the placeholder variable
138
- // check for placeholder in inputel and selectel
139
- if (this.inputEl) {
140
- const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');
141
- if (this.inputEl.attr('placeholder') || selectElPlaceholderOption) {
142
- if (selectElPlaceholderOption) {
143
- selectElPlaceholderOption.textContent = '';
144
- }
145
- else {
146
- this.placeholder = this.inputEl.attr('placeholder');
147
- this.inputEl.removeAttr('placeholder');
148
- }
149
- }
150
- }
151
- }
152
- });
153
- }
154
- ngOnDestroy() {
155
- if (this.labelAnimationSubscription) {
156
- this.labelAnimationSubscription();
157
- }
158
- if (this._attrObserver) {
159
- this._attrObserver.disconnect();
160
- }
161
- }
162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: CaptionPositionDirective, deps: [{ token: i0.Injector }, { token: i1.App }], target: i0.ɵɵFactoryTarget.Directive }); }
163
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.21", type: CaptionPositionDirective, isStandalone: true, selector: "[wmCaptionPosition]", ngImport: i0 }); }
164
- }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: CaptionPositionDirective, decorators: [{
166
- type: Directive,
167
- args: [{
168
- standalone: true,
169
- selector: '[wmCaptionPosition]'
170
- }]
171
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i1.App }] });
172
-
173
- /**
174
- * Generated bundle index. Do not edit.
175
- */
176
-
1
+ import * as i0 from "@angular/core";
2
+ import { Directive, ElementRef } from "@angular/core";
3
+ import * as i1 from "@wm/core";
4
+ import { forEach } from "lodash-es";
5
+ var CaptionPositionDirective = class CaptionPositionDirective {
6
+ constructor(inj, app) {
7
+ this.skipFloatPositionWidgets = [
8
+ "radioset",
9
+ "checkboxset",
10
+ "richtext",
11
+ "switch",
12
+ "chips",
13
+ "checkbox",
14
+ "slider",
15
+ "rating",
16
+ "toggle",
17
+ "upload"
18
+ ];
19
+ this.elementRef = inj.get(ElementRef);
20
+ this.nativeEl = this.elementRef.nativeElement;
21
+ this.app = app;
22
+ }
23
+ onBlurCb() {
24
+ let mobileInputVal;
25
+ if (this.inputEl.length > 1 && this.inputEl.hasClass("mobile-input")) forEach(this.inputEl, (el) => {
26
+ if ($(el).hasClass("mobile-input") && el.value) mobileInputVal = el.value;
27
+ });
28
+ if (!this.inputEl.val() && !mobileInputVal) {
29
+ this.compositeEle.classList.remove("float-active");
30
+ this.inputEl.removeAttr("placeholder");
31
+ }
32
+ }
33
+ onFocusCb() {
34
+ this.compositeEle.classList.add("float-active");
35
+ this.inputEl.attr("placeholder", this.placeholder);
36
+ }
37
+ checkForSelectPlaceholder() {
38
+ const selectElPlaceholderOption = this.nativeEl.querySelector("#placeholderOption");
39
+ if (selectElPlaceholderOption?.textContent && !$(this.nativeEl).find("select").is(":focus") && !$(this.inputEl.closest("[widget-id]")).attr("datavalue")) selectElPlaceholderOption.textContent = "";
40
+ }
41
+ setDefaultValueAnimation() {
42
+ if (!this._isPlaceholderBound && this.inputEl.attr("placeholder")) {
43
+ this.placeholder = this.inputEl.attr("placeholder");
44
+ this.inputEl.removeAttr("placeholder");
45
+ }
46
+ this.checkForSelectPlaceholder();
47
+ 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") || this.nativeEl.getAttribute("displayformat") || $(this.nativeEl).find("select option:selected").text() || $(this.nativeEl).find("select").attr("multiple")) this.compositeEle.classList.add("float-active");
48
+ }
49
+ observeForPlaceholderAttrChange() {
50
+ this._attrObserver = new MutationObserver((mutations) => {
51
+ mutations.forEach((mutation) => {
52
+ if (mutation.attributeName === "placeholder" && this.inputEl.attr("placeholder") && !this.compositeEle.classList.contains("float-active")) {
53
+ this.placeholder = this.inputEl.attr("placeholder");
54
+ this.inputEl.removeAttr("placeholder");
55
+ }
56
+ });
57
+ });
58
+ this._attrObserver.observe(this.inputEl[0], {
59
+ attributes: true,
60
+ childList: false,
61
+ characterData: false
62
+ });
63
+ }
64
+ checkForRightAlignedForm() {
65
+ const $compositeEle = $(this.compositeEle);
66
+ if ($compositeEle.closest(".align-right").length && $compositeEle.find(".input-group-btn").length) {
67
+ const $label = $compositeEle.find("label");
68
+ if ($compositeEle.find("[wmdatetime]").length) $label.addClass("input-grp-dt-icon");
69
+ else $label.addClass("input-grp-icon");
70
+ }
71
+ }
72
+ ngAfterViewInit() {
73
+ this.compositeEle = this.nativeEl;
74
+ const widget = this.nativeEl.widget;
75
+ let captionPosition = widget.$attrs.get("captionposition");
76
+ if (widget.form) {
77
+ captionPosition = widget.form.$attrs.get("captionposition");
78
+ this.compositeEle = this.nativeEl.querySelector(".app-composite-widget");
79
+ this._isPlaceholderBound = this.nativeEl.getAttribute("placeholder.bind");
80
+ }
81
+ if (captionPosition === "floating") {
82
+ if (widget.form) {
83
+ const widgetType = this.nativeEl.getAttribute("widgettype");
84
+ if (this.skipFloatPositionWidgets.indexOf(widgetType) > -1) {
85
+ this.compositeEle.classList.remove("caption-floating");
86
+ this.compositeEle.classList.add("caption-top");
87
+ }
88
+ this.checkForRightAlignedForm();
89
+ }
90
+ this.inputEl = $(this.nativeEl).find("input, select, textarea");
91
+ if (!this._isPlaceholderBound) this._isPlaceholderBound = this.inputEl.closest("[widget-id]").attr("placeholder.bind");
92
+ setTimeout(this.setDefaultValueAnimation.bind(this), 0);
93
+ this.inputEl.focus(this.onFocusCb.bind(this));
94
+ this.inputEl.blur(this.onBlurCb.bind(this));
95
+ if (this._isPlaceholderBound) this.observeForPlaceholderAttrChange();
96
+ }
97
+ }
98
+ ngOnInit() {
99
+ this.labelAnimationSubscription = this.app.subscribe("captionPositionAnimate", (data) => {
100
+ const isInputElFocused = this.inputEl?.is(":focus");
101
+ if (data.displayVal || data.isFocused || data.isSelectMultiple || isInputElFocused) {
102
+ data.nativeEl.addClass("float-active");
103
+ if (!data.displayVal && isInputElFocused) this.inputEl.attr("placeholder", this.placeholder);
104
+ } else {
105
+ data.nativeEl.removeClass("float-active");
106
+ if (this.inputEl) {
107
+ const selectElPlaceholderOption = this.nativeEl.querySelector("#placeholderOption");
108
+ if (this.inputEl.attr("placeholder") || selectElPlaceholderOption) {
109
+ if (selectElPlaceholderOption) selectElPlaceholderOption.textContent = "";
110
+ else {
111
+ this.placeholder = this.inputEl.attr("placeholder");
112
+ this.inputEl.removeAttr("placeholder");
113
+ }
114
+ }
115
+ }
116
+ }
117
+ });
118
+ }
119
+ ngOnDestroy() {
120
+ if (this.labelAnimationSubscription) this.labelAnimationSubscription();
121
+ if (this._attrObserver) this._attrObserver.disconnect();
122
+ }
123
+ static {
124
+ this.ɵfac = i0.ɵɵngDeclareFactory({
125
+ minVersion: "12.0.0",
126
+ version: "22.2.1",
127
+ ngImport: i0,
128
+ type: CaptionPositionDirective,
129
+ deps: [{ token: i0.Injector }, { token: i1.App }],
130
+ target: i0.ɵɵFactoryTarget.Directive
131
+ });
132
+ }
133
+ static {
134
+ this.ɵdir = i0.ɵɵngDeclareDirective({
135
+ minVersion: "14.0.0",
136
+ version: "22.2.1",
137
+ type: CaptionPositionDirective,
138
+ isStandalone: true,
139
+ selector: "[wmCaptionPosition]",
140
+ ngImport: i0
141
+ });
142
+ }
143
+ };
144
+ i0.ɵɵngDeclareClassMetadata({
145
+ minVersion: "12.0.0",
146
+ version: "22.2.1",
147
+ ngImport: i0,
148
+ type: CaptionPositionDirective,
149
+ decorators: [{
150
+ type: Directive,
151
+ args: [{
152
+ standalone: true,
153
+ selector: "[wmCaptionPosition]"
154
+ }]
155
+ }],
156
+ ctorParameters: () => [{ type: i0.Injector }, { type: i1.App }]
157
+ });
177
158
  export { CaptionPositionDirective };
178
- //# sourceMappingURL=index.mjs.map
159
+
160
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/caption-position/src/caption-position.directive.ts","../../../../../projects/components/widgets/input/caption-position/src/index.ts"],"sourcesContent":["import {AfterViewInit, Directive, ElementRef, Injector, OnDestroy, OnInit} from '@angular/core';\nimport {App} from '@wm/core';\nimport {forEach} from \"lodash-es\";\n\ndeclare const $;\n@Directive({\n standalone: true,\n selector: '[wmCaptionPosition]'\n})\nexport class CaptionPositionDirective implements AfterViewInit, OnInit, OnDestroy {\n private readonly elementRef: ElementRef;\n private inputEl;\n private readonly nativeEl;\n private compositeEle;\n private readonly app: App;\n private labelAnimationSubscription;\n private placeholder;\n private _attrObserver;\n private _isPlaceholderBound;\n\n // skip floating caption for the below form fields\n private readonly skipFloatPositionWidgets: string[] = ['radioset', 'checkboxset', 'richtext', 'switch', 'chips', 'checkbox', 'slider', 'rating', 'toggle', 'upload'];\n\n constructor(inj: Injector, app: App) {\n this.elementRef = inj.get(ElementRef);\n this.nativeEl = this.elementRef.nativeElement;\n this.app = app;\n }\n\n private onBlurCb() { // on blur, remove animation and placeholder if there is no value\n let mobileInputVal;\n // In case of mobile date / time picker check for input element's value which has 'mobile-input' class\n if (this.inputEl.length > 1 && this.inputEl.hasClass('mobile-input')) {\n forEach(this.inputEl, (el) => {\n if ($(el).hasClass('mobile-input') && el.value) {\n mobileInputVal = el.value;\n }\n });\n }\n if (!this.inputEl.val() && !mobileInputVal) {\n this.compositeEle.classList.remove('float-active');\n this.inputEl.removeAttr('placeholder');\n }\n }\n\n private onFocusCb() { // on focus, add animation class and the place holder\n this.compositeEle.classList.add('float-active');\n this.inputEl.attr('placeholder', this.placeholder);\n }\n\n // For select widget, display placeholder only on focus else remove the text of the option selected.\n private checkForSelectPlaceholder() {\n const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');\n if (selectElPlaceholderOption?.textContent && !$(this.nativeEl).find('select').is(':focus') &&\n !$(this.inputEl.closest('[widget-id]')).attr('datavalue')) {\n selectElPlaceholderOption.textContent = '';\n }\n }\n\n private setDefaultValueAnimation() { // set animation when default values are present\n // remove placeholder when the input el has placeholder and the placeholder is not bound to any variable\n if (!this._isPlaceholderBound && this.inputEl.attr('placeholder')) {\n this.placeholder = this.inputEl.attr('placeholder');\n this.inputEl.removeAttr('placeholder');\n }\n\n // Do not show placeholder as selected by default\n this.checkForSelectPlaceholder();\n\n // check for datavalue attribute in composite element and defaultvalue attribute in form field element\n // check for datavalue.bind attribute to see whether default value is binded via expression or a variable\n // check for displayformat attribute, as in form fields user can set display format to the field\n // check for formdata/bindformdata attribute to see if any default value is binded to the form\n // check for select tag with multiple attribute enabled\n\n 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')\n || this.nativeEl.getAttribute('displayformat') || $(this.nativeEl).find('select option:selected').text() || $(this.nativeEl).find('select').attr('multiple')) {\n this.compositeEle.classList.add('float-active');\n }\n }\n\n /**\n * Observing placeholder attribute change on DOM instead of having a propChangeHandler fn\n * For composite widgets propertychangehandler function is invoked at independent widgets where as the directive is at composite level\n */\n private observeForPlaceholderAttrChange() {\n this._attrObserver = new MutationObserver(mutations => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === 'placeholder' && this.inputEl.attr('placeholder') && !this.compositeEle.classList.contains('float-active')) {\n this.placeholder = this.inputEl.attr('placeholder');\n this.inputEl.removeAttr('placeholder');\n }\n });\n });\n const config = { attributes: true, childList: false, characterData: false };\n this._attrObserver.observe(this.inputEl[0], config);\n }\n\n // 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\n private checkForRightAlignedForm() {\n const $compositeEle = $(this.compositeEle);\n if ($compositeEle.closest('.align-right').length && $compositeEle.find('.input-group-btn').length) {\n const $label = $compositeEle.find('label');\n if ($compositeEle.find('[wmdatetime]').length) { // for datetime picker, as there will be 2 icons css is different\n $label.addClass('input-grp-dt-icon');\n } else {\n $label.addClass('input-grp-icon');\n }\n }\n }\n\n ngAfterViewInit() {\n this.compositeEle = this.nativeEl;\n const widget = this.nativeEl.widget;\n let captionPosition: string = widget.$attrs.get('captionposition');\n if (widget.form) {\n captionPosition = widget.form.$attrs.get('captionposition');\n this.compositeEle = this.nativeEl.querySelector('.app-composite-widget');\n this._isPlaceholderBound = this.nativeEl.getAttribute('placeholder.bind');\n }\n if (captionPosition === 'floating') {\n if (widget.form) { // for form-fields remove caption-floating and replace it with caption-float or caption-top\n const widgetType: string = this.nativeEl.getAttribute('widgettype'); // fetches the form field type\n if (this.skipFloatPositionWidgets.indexOf(widgetType) > -1) {\n this.compositeEle.classList.remove('caption-floating');\n this.compositeEle.classList.add('caption-top');\n }\n this.checkForRightAlignedForm();\n }\n this.inputEl = $(this.nativeEl).find('input, select, textarea');\n if (!this._isPlaceholderBound) {\n this._isPlaceholderBound = this.inputEl.closest('[widget-id]').attr('placeholder.bind');\n }\n // call the below function to apply float-active class when there are default values to the fields\n setTimeout(this.setDefaultValueAnimation.bind(this), 0);\n\n this.inputEl.focus(this.onFocusCb.bind(this));\n this.inputEl.blur(this.onBlurCb.bind(this));\n\n // observe for placeholder attribute change when placeholder is bound via db variable or an expression\n if (this._isPlaceholderBound) {\n this.observeForPlaceholderAttrChange();\n }\n }\n }\n\n // captionPositionAnimate is only notified for date-time, time and search widgets as input el is not updated with value on selection of dropdown/popups\n ngOnInit() {\n this.labelAnimationSubscription = this.app.subscribe('captionPositionAnimate', (data) => {\n // displayVal is true when there is a value entered in the input field\n // In case of form fields, when the field is in focus, isFocused will be set as true\n // isSelectMultiple is set to true when for select widget, multiple option is enabled\n // Checking inputEl focus - when form is represented as dialog and the first field is automatically in focus\n const isInputElFocused = this.inputEl?.is(':focus');\n if (data.displayVal || data.isFocused || data.isSelectMultiple || isInputElFocused) {\n data.nativeEl.addClass('float-active');\n if (!data.displayVal && isInputElFocused) {\n this.inputEl.attr('placeholder', this.placeholder);\n }\n } else {\n data.nativeEl.removeClass('float-active');\n // Remove placeholder on removing float-active, if not the label and placeholder are collided\n // before placeholder is removed assign it to the placeholder variable\n // check for placeholder in inputel and selectel\n if (this.inputEl) {\n const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');\n if (this.inputEl.attr('placeholder') || selectElPlaceholderOption) {\n if (selectElPlaceholderOption) {\n selectElPlaceholderOption.textContent = '';\n } else {\n this.placeholder = this.inputEl.attr('placeholder');\n this.inputEl.removeAttr('placeholder');\n }\n }\n }\n }\n });\n }\n\n ngOnDestroy() {\n if (this.labelAnimationSubscription) {\n this.labelAnimationSubscription();\n }\n if (this._attrObserver) {\n this._attrObserver.disconnect();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MASa,wBAAwB,CAAA;IAcjC,WAAA,CAAY,GAAa,EAAE,GAAQ,EAAA;;QAFlB,IAAA,CAAA,wBAAwB,GAAa,CAAC,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;QAGhK,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,QAAQ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OAAO,CAAC,IAAI,CAAC,aAAa,CAAC;AACnD,4BAAA,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;wBAC1C;oBACJ;gBACJ;YACJ;AACJ,QAAA,CAAC,CAAC;IACN;IAEA,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,0BAA0B,EAAE;YACjC,IAAI,CAAC,0BAA0B,EAAE;QACrC;AACA,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;AACpB,YAAA,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE;QACnC;IACJ;+GAjLS,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,GAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AACd,oBAAA,QAAQ,EAAE;AACb,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../projects/components/widgets/input/caption-position/src/caption-position.directive.ts"],"sourcesContent":["import {AfterViewInit, Directive, ElementRef, Injector, OnDestroy, OnInit} from '@angular/core';\nimport {App} from '@wm/core';\nimport {forEach} from \"lodash-es\";\n\ndeclare const $;\n@Directive({\n standalone: true,\n selector: '[wmCaptionPosition]'\n})\nexport class CaptionPositionDirective implements AfterViewInit, OnInit, OnDestroy {\n private readonly elementRef: ElementRef;\n private inputEl;\n private readonly nativeEl;\n private compositeEle;\n private readonly app: App;\n private labelAnimationSubscription;\n private placeholder;\n private _attrObserver;\n private _isPlaceholderBound;\n\n // skip floating caption for the below form fields\n private readonly skipFloatPositionWidgets: string[] = ['radioset', 'checkboxset', 'richtext', 'switch', 'chips', 'checkbox', 'slider', 'rating', 'toggle', 'upload'];\n\n constructor(inj: Injector, app: App) {\n this.elementRef = inj.get(ElementRef);\n this.nativeEl = this.elementRef.nativeElement;\n this.app = app;\n }\n\n private onBlurCb() { // on blur, remove animation and placeholder if there is no value\n let mobileInputVal;\n // In case of mobile date / time picker check for input element's value which has 'mobile-input' class\n if (this.inputEl.length > 1 && this.inputEl.hasClass('mobile-input')) {\n forEach(this.inputEl, (el) => {\n if ($(el).hasClass('mobile-input') && el.value) {\n mobileInputVal = el.value;\n }\n });\n }\n if (!this.inputEl.val() && !mobileInputVal) {\n this.compositeEle.classList.remove('float-active');\n this.inputEl.removeAttr('placeholder');\n }\n }\n\n private onFocusCb() { // on focus, add animation class and the place holder\n this.compositeEle.classList.add('float-active');\n this.inputEl.attr('placeholder', this.placeholder);\n }\n\n // For select widget, display placeholder only on focus else remove the text of the option selected.\n private checkForSelectPlaceholder() {\n const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');\n if (selectElPlaceholderOption?.textContent && !$(this.nativeEl).find('select').is(':focus') &&\n !$(this.inputEl.closest('[widget-id]')).attr('datavalue')) {\n selectElPlaceholderOption.textContent = '';\n }\n }\n\n private setDefaultValueAnimation() { // set animation when default values are present\n // remove placeholder when the input el has placeholder and the placeholder is not bound to any variable\n if (!this._isPlaceholderBound && this.inputEl.attr('placeholder')) {\n this.placeholder = this.inputEl.attr('placeholder');\n this.inputEl.removeAttr('placeholder');\n }\n\n // Do not show placeholder as selected by default\n this.checkForSelectPlaceholder();\n\n // check for datavalue attribute in composite element and defaultvalue attribute in form field element\n // check for datavalue.bind attribute to see whether default value is binded via expression or a variable\n // check for displayformat attribute, as in form fields user can set display format to the field\n // check for formdata/bindformdata attribute to see if any default value is binded to the form\n // check for select tag with multiple attribute enabled\n\n 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')\n || this.nativeEl.getAttribute('displayformat') || $(this.nativeEl).find('select option:selected').text() || $(this.nativeEl).find('select').attr('multiple')) {\n this.compositeEle.classList.add('float-active');\n }\n }\n\n /**\n * Observing placeholder attribute change on DOM instead of having a propChangeHandler fn\n * For composite widgets propertychangehandler function is invoked at independent widgets where as the directive is at composite level\n */\n private observeForPlaceholderAttrChange() {\n this._attrObserver = new MutationObserver(mutations => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === 'placeholder' && this.inputEl.attr('placeholder') && !this.compositeEle.classList.contains('float-active')) {\n this.placeholder = this.inputEl.attr('placeholder');\n this.inputEl.removeAttr('placeholder');\n }\n });\n });\n const config = { attributes: true, childList: false, characterData: false };\n this._attrObserver.observe(this.inputEl[0], config);\n }\n\n // 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\n private checkForRightAlignedForm() {\n const $compositeEle = $(this.compositeEle);\n if ($compositeEle.closest('.align-right').length && $compositeEle.find('.input-group-btn').length) {\n const $label = $compositeEle.find('label');\n if ($compositeEle.find('[wmdatetime]').length) { // for datetime picker, as there will be 2 icons css is different\n $label.addClass('input-grp-dt-icon');\n } else {\n $label.addClass('input-grp-icon');\n }\n }\n }\n\n ngAfterViewInit() {\n this.compositeEle = this.nativeEl;\n const widget = this.nativeEl.widget;\n let captionPosition: string = widget.$attrs.get('captionposition');\n if (widget.form) {\n captionPosition = widget.form.$attrs.get('captionposition');\n this.compositeEle = this.nativeEl.querySelector('.app-composite-widget');\n this._isPlaceholderBound = this.nativeEl.getAttribute('placeholder.bind');\n }\n if (captionPosition === 'floating') {\n if (widget.form) { // for form-fields remove caption-floating and replace it with caption-float or caption-top\n const widgetType: string = this.nativeEl.getAttribute('widgettype'); // fetches the form field type\n if (this.skipFloatPositionWidgets.indexOf(widgetType) > -1) {\n this.compositeEle.classList.remove('caption-floating');\n this.compositeEle.classList.add('caption-top');\n }\n this.checkForRightAlignedForm();\n }\n this.inputEl = $(this.nativeEl).find('input, select, textarea');\n if (!this._isPlaceholderBound) {\n this._isPlaceholderBound = this.inputEl.closest('[widget-id]').attr('placeholder.bind');\n }\n // call the below function to apply float-active class when there are default values to the fields\n setTimeout(this.setDefaultValueAnimation.bind(this), 0);\n\n this.inputEl.focus(this.onFocusCb.bind(this));\n this.inputEl.blur(this.onBlurCb.bind(this));\n\n // observe for placeholder attribute change when placeholder is bound via db variable or an expression\n if (this._isPlaceholderBound) {\n this.observeForPlaceholderAttrChange();\n }\n }\n }\n\n // captionPositionAnimate is only notified for date-time, time and search widgets as input el is not updated with value on selection of dropdown/popups\n ngOnInit() {\n this.labelAnimationSubscription = this.app.subscribe('captionPositionAnimate', (data) => {\n // displayVal is true when there is a value entered in the input field\n // In case of form fields, when the field is in focus, isFocused will be set as true\n // isSelectMultiple is set to true when for select widget, multiple option is enabled\n // Checking inputEl focus - when form is represented as dialog and the first field is automatically in focus\n const isInputElFocused = this.inputEl?.is(':focus');\n if (data.displayVal || data.isFocused || data.isSelectMultiple || isInputElFocused) {\n data.nativeEl.addClass('float-active');\n if (!data.displayVal && isInputElFocused) {\n this.inputEl.attr('placeholder', this.placeholder);\n }\n } else {\n data.nativeEl.removeClass('float-active');\n // Remove placeholder on removing float-active, if not the label and placeholder are collided\n // before placeholder is removed assign it to the placeholder variable\n // check for placeholder in inputel and selectel\n if (this.inputEl) {\n const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');\n if (this.inputEl.attr('placeholder') || selectElPlaceholderOption) {\n if (selectElPlaceholderOption) {\n selectElPlaceholderOption.textContent = '';\n } else {\n this.placeholder = this.inputEl.attr('placeholder');\n this.inputEl.removeAttr('placeholder');\n }\n }\n }\n }\n });\n }\n\n ngOnDestroy() {\n if (this.labelAnimationSubscription) {\n this.labelAnimationSubscription();\n }\n if (this._attrObserver) {\n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ACA,0BAA0B,cAAc;WACrC;OACH,KAAK,cAAc,KAAK,QAAQ,KAAK,aAAa;OAClD,KAAK,QAAQ,WAAW,aAAa;MACzC;KACJ;IACJ;GACJ;EACJ,CAAC;CACL;CAEA,cAAW;EACP,IAAI,KAAK,4BACL,KAAK,2BAA0B;EAEnC,IAAI,KAAK,eACL,KAAK,cAAc,WAAU;CAErC;CAjLS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAwB,MAAA,CAAA,EAAA,OAAA,GAAA,SAAA,GAAA,EAAA,OAAA,GAAA,IAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAxB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAwB,cAAA;GAAA,UAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAxB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EAJpC,MAAA;EAAU,MAAA,CAAA;GACT,YAAY;GACV,UAAU;EACb,CAAA"}
@@ -1,34 +1,31 @@
1
- import * as i0 from '@angular/core';
2
- import { AfterViewInit, OnInit, OnDestroy, Injector } from '@angular/core';
3
- import { App } from '@wm/core';
4
-
5
- declare class CaptionPositionDirective implements AfterViewInit, OnInit, OnDestroy {
6
- private readonly elementRef;
7
- private inputEl;
8
- private readonly nativeEl;
9
- private compositeEle;
10
- private readonly app;
11
- private labelAnimationSubscription;
12
- private placeholder;
13
- private _attrObserver;
14
- private _isPlaceholderBound;
15
- private readonly skipFloatPositionWidgets;
16
- constructor(inj: Injector, app: App);
17
- private onBlurCb;
18
- private onFocusCb;
19
- private checkForSelectPlaceholder;
20
- private setDefaultValueAnimation;
21
- /**
22
- * Observing placeholder attribute change on DOM instead of having a propChangeHandler fn
23
- * For composite widgets propertychangehandler function is invoked at independent widgets where as the directive is at composite level
24
- */
25
- private observeForPlaceholderAttrChange;
26
- private checkForRightAlignedForm;
27
- ngAfterViewInit(): void;
28
- ngOnInit(): void;
29
- ngOnDestroy(): void;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<CaptionPositionDirective, never>;
31
- static ɵdir: i0.ɵɵDirectiveDeclaration<CaptionPositionDirective, "[wmCaptionPosition]", never, {}, {}, never, never, true, never>;
32
- }
33
-
34
- export { CaptionPositionDirective };
1
+ import * as i0 from "@angular/core";
2
+ import { AfterViewInit, Injector, OnDestroy, OnInit } from "@angular/core";
3
+ import { App } from "@wm/core";
4
+ export declare class CaptionPositionDirective implements AfterViewInit, OnInit, OnDestroy {
5
+ private readonly elementRef;
6
+ private inputEl;
7
+ private readonly nativeEl;
8
+ private compositeEle;
9
+ private readonly app;
10
+ private labelAnimationSubscription;
11
+ private placeholder;
12
+ private _attrObserver;
13
+ private _isPlaceholderBound;
14
+ private readonly skipFloatPositionWidgets;
15
+ constructor(inj: Injector, app: App);
16
+ private onBlurCb;
17
+ private onFocusCb;
18
+ private checkForSelectPlaceholder;
19
+ private setDefaultValueAnimation;
20
+ /**
21
+ * Observing placeholder attribute change on DOM instead of having a propChangeHandler fn
22
+ * For composite widgets propertychangehandler function is invoked at independent widgets where as the directive is at composite level
23
+ */
24
+ private observeForPlaceholderAttrChange;
25
+ private checkForRightAlignedForm;
26
+ ngAfterViewInit(): void;
27
+ ngOnInit(): void;
28
+ ngOnDestroy(): void;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<CaptionPositionDirective, never>;
30
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CaptionPositionDirective, "[wmCaptionPosition]", never, {}, {}, never, never, true, never>;
31
+ }