@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,243 +1,287 @@
1
- import * as i0 from '@angular/core';
2
- import { Attribute, Inject, Optional, Directive } from '@angular/core';
3
- import * as i1 from '@wm/core';
4
- import { noop, addClass } from '@wm/core';
5
- import { PROP_STRING, PROP_BOOLEAN, register, styler, PROP_TYPE, provideAs, provideAsWidgetRef, StylableComponent, getWidgetPropsByType } from '@wm/components/base';
6
- import { capitalize, cloneDeep } from 'lodash-es';
7
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
8
- import { DatasetAwareFormComponent } from '@wm/components/input/dataset-aware-form';
9
- import { Subject } from 'rxjs';
10
-
11
- const customWidgetProps = new Map([
12
- ['class', PROP_STRING],
13
- ['hint', PROP_STRING],
14
- ['name', PROP_STRING],
15
- ['widgetname', PROP_STRING],
16
- ['show', { value: true, ...PROP_BOOLEAN }]
1
+ import * as i0 from "@angular/core";
2
+ import { Attribute, Directive, Inject, Optional } from "@angular/core";
3
+ import * as i1 from "@wm/core";
4
+ import { addClass, noop } from "@wm/core";
5
+ import { PROP_BOOLEAN, PROP_STRING, PROP_TYPE, StylableComponent, getWidgetPropsByType, provideAs, provideAsWidgetRef, register, styler } from "@wm/components/base";
6
+ import { capitalize, cloneDeep } from "lodash-es";
7
+ import { NG_VALIDATORS, NG_VALUE_ACCESSOR } from "@angular/forms";
8
+ import { DatasetAwareFormComponent } from "@wm/components/input/dataset-aware-form";
9
+ import { Subject } from "rxjs";
10
+ const customWidgetProps = /* @__PURE__ */ new Map([
11
+ ["class", PROP_STRING],
12
+ ["hint", PROP_STRING],
13
+ ["name", PROP_STRING],
14
+ ["widgetname", PROP_STRING],
15
+ ["show", {
16
+ value: true,
17
+ ...PROP_BOOLEAN
18
+ }]
17
19
  ]);
18
20
  const registerProps$1 = () => {
19
- register('wm-custom-widget', customWidgetProps);
21
+ register("wm-custom-widget", customWidgetProps);
20
22
  };
21
-
22
- const registeredPropsSet = new Set();
23
+ const registeredPropsSet = /* @__PURE__ */ new Set();
23
24
  let customWidgetPropsMap = {};
24
- const DEFAULT_CLS$1 = 'app-html-container';
25
- class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
26
- static { this.initializeProps = registerProps$1(); }
27
- constructor(inj, elRef, widgetname, explicitContext) {
28
- const widgetType = `wm-custom-${widgetname}`;
29
- const WIDGET_CONFIG = { widgetType, hostClass: DEFAULT_CLS$1 };
30
- let resolveFn = noop;
31
- super(inj, WIDGET_CONFIG, explicitContext, undefined, new Promise(res => resolveFn = res));
32
- this.props = {};
33
- this.baseWidget = {};
34
- this._isCustom = true;
35
- this.propsReady = resolveFn;
36
- this.configSubject = new Subject();
37
- this.onErroSubject = new Subject();
38
- this.widgetType = widgetType;
39
- this.name = elRef.nativeElement.getAttribute('name');
40
- styler(this.nativeElement, this);
41
- // Call on property change on name to set name attribute on element.
42
- this.registerReadyStateListener(() => {
43
- super.onPropertyChange('name', this.name);
44
- });
45
- this.registerPropertyChangeListener(((key, nv, ov) => {
46
- if (!key.startsWith('prop-'))
47
- return;
48
- const propName = key.slice(5);
49
- if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) {
50
- this.props[propName] = nv;
51
- }
52
- }));
53
- }
54
- get datavalue() {
55
- if (this.nativeElement.children.length) {
56
- let value = this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue;
57
- this.updateDataValue(value);
58
- return value;
59
- }
60
- return undefined;
61
- }
62
- set datavalue(value) {
63
- if (this.nativeElement.children.length)
64
- this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue = value;
65
- }
66
- setBaseWidgetName(baseWidgetType) {
67
- let splitArr = baseWidgetType.split('-'), modifiedArr = [];
68
- modifiedArr = splitArr.map((item) => {
69
- item = item !== 'wm' ? capitalize(item) : item;
70
- return item;
71
- });
72
- this.baseWidgetName = modifiedArr.join('');
73
- }
74
- setProps(config, resolveFn) {
75
- this.config = config;
76
- this.baseWidgetName = this.config.projectPropsOn || this.config.widgetType.split('wm-')[1];
77
- this.configSubject.next(null);
78
- if (config.customClasses) {
79
- addClass(this.nativeElement, config.customClasses);
80
- }
81
- this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');
82
- this.baseWidget = this.nativeElement.children[0].children[0].querySelector(`[name=${this.baseWidgetName}]`)?.widget;
83
- if (!config?.properties) {
84
- return;
85
- }
86
- if (!registeredPropsSet.has(this.widgetType)) {
87
- register(this.widgetType, this.prepareProps(config.properties));
88
- }
89
- else {
90
- this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]));
91
- }
92
- this.propsReady(resolveFn);
93
- }
94
- prepareProps(props = {}) {
95
- const propsMap = new Map(customWidgetProps);
96
- Object.entries(props).forEach(([k, v]) => {
97
- let type = PROP_TYPE.STRING;
98
- if (v.type === 'boolean') {
99
- type = PROP_TYPE.BOOLEAN;
100
- }
101
- else if (v.type === 'number') {
102
- type = PROP_TYPE.NUMBER;
103
- }
104
- else if (v.type !== 'string') {
105
- type = v.type;
106
- }
107
- // Do not set the 'bind:*' values
108
- propsMap.set(`prop-${k}`, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });
109
- this.props[k] = v.value;
110
- });
111
- registeredPropsSet.add(this.widgetType);
112
- customWidgetPropsMap[this.widgetType] = this.props;
113
- return propsMap;
114
- }
115
- updateDataValue(value) {
116
- if (this.formControl?.control && value !== this.formControl.control.value) {
117
- this.formControl.control.setValue(value);
118
- if (this.formControl.control.invalid) {
119
- this.onErroSubject.next(null);
120
- }
121
- }
122
- }
123
- updateData(key, value) {
124
- let modifiedKey = key.replace('base-', '');
125
- if (this.asAttr) {
126
- this[this.baseWidgetName][modifiedKey] = value;
127
- this.nativeElement.children[0].children[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;
128
- this[this.baseWidgetName].initDatasetItems();
129
- }
130
- else {
131
- this[modifiedKey] = value;
132
- this.nativeElement.children[0].children[0]['widget'].viewParent[modifiedKey] = value;
133
- }
134
- if (this.formControl && modifiedKey === 'datavalue') {
135
- this.updateDataValue(value);
136
- }
137
- }
138
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: CustomWidgetContainerDirective, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: 'widgetname', attribute: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
139
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.21", type: CustomWidgetContainerDirective, isStandalone: true, selector: "[wmWidgetContainer]", providers: [
140
- provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),
141
- provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),
142
- provideAsWidgetRef(CustomWidgetContainerDirective)
143
- ], exportAs: ["wmWidgetContainer"], usesInheritance: true, ngImport: i0 }); }
144
- }
145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: CustomWidgetContainerDirective, decorators: [{
146
- type: Directive,
147
- args: [{
148
- standalone: true,
149
- selector: '[wmWidgetContainer]',
150
- providers: [
151
- provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),
152
- provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),
153
- provideAsWidgetRef(CustomWidgetContainerDirective)
154
- ],
155
- exportAs: 'wmWidgetContainer'
156
- }]
157
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ElementRef }, { type: undefined, decorators: [{
158
- type: Attribute,
159
- args: ['widgetname']
160
- }] }, { type: undefined, decorators: [{
161
- type: Inject,
162
- args: ['EXPLICIT_CONTEXT']
163
- }, {
164
- type: Optional
165
- }] }] });
166
-
25
+ const DEFAULT_CLS$1 = "app-html-container";
26
+ var CustomWidgetContainerDirective = class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
27
+ static {
28
+ this.initializeProps = registerProps$1();
29
+ }
30
+ constructor(inj, elRef, widgetname, explicitContext) {
31
+ const widgetType = `wm-custom-${widgetname}`;
32
+ const WIDGET_CONFIG = {
33
+ widgetType,
34
+ hostClass: DEFAULT_CLS$1
35
+ };
36
+ let resolveFn = noop;
37
+ super(inj, WIDGET_CONFIG, explicitContext, void 0, new Promise((res) => resolveFn = res));
38
+ this.props = {};
39
+ this.baseWidget = {};
40
+ this._isCustom = true;
41
+ this.propsReady = resolveFn;
42
+ this.configSubject = new Subject();
43
+ this.onErroSubject = new Subject();
44
+ this.widgetType = widgetType;
45
+ this.name = elRef.nativeElement.getAttribute("name");
46
+ styler(this.nativeElement, this);
47
+ this.registerReadyStateListener(() => {
48
+ super.onPropertyChange("name", this.name);
49
+ });
50
+ this.registerPropertyChangeListener(((key, nv, ov) => {
51
+ if (!key.startsWith("prop-")) return;
52
+ const propName = key.slice(5);
53
+ if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) this.props[propName] = nv;
54
+ }));
55
+ }
56
+ get datavalue() {
57
+ if (this.nativeElement.children.length) {
58
+ let value = this.nativeElement.children[0].children[0]["widget"].viewParent.datavalue;
59
+ this.updateDataValue(value);
60
+ return value;
61
+ }
62
+ }
63
+ set datavalue(value) {
64
+ if (this.nativeElement.children.length) this.nativeElement.children[0].children[0]["widget"].viewParent.datavalue = value;
65
+ }
66
+ setBaseWidgetName(baseWidgetType) {
67
+ let splitArr = baseWidgetType.split("-"), modifiedArr = [];
68
+ modifiedArr = splitArr.map((item) => {
69
+ item = item !== "wm" ? capitalize(item) : item;
70
+ return item;
71
+ });
72
+ this.baseWidgetName = modifiedArr.join("");
73
+ }
74
+ setProps(config, resolveFn) {
75
+ this.config = config;
76
+ this.baseWidgetName = this.config.projectPropsOn || this.config.widgetType.split("wm-")[1];
77
+ this.configSubject.next(null);
78
+ if (config.customClasses) addClass(this.nativeElement, config.customClasses);
79
+ this.asAttr = this.nativeElement.children[0].children[0].hasAttribute("as");
80
+ this.baseWidget = this.nativeElement.children[0].children[0].querySelector(`[name=${this.baseWidgetName}]`)?.widget;
81
+ if (!config?.properties) return;
82
+ if (!registeredPropsSet.has(this.widgetType)) register(this.widgetType, this.prepareProps(config.properties));
83
+ else this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]));
84
+ this.propsReady(resolveFn);
85
+ }
86
+ prepareProps(props) {
87
+ const propsMap = new Map(customWidgetProps);
88
+ Object.entries(props).forEach(([k, v]) => {
89
+ let type = PROP_TYPE.STRING;
90
+ if (v.type === "boolean") type = PROP_TYPE.BOOLEAN;
91
+ else if (v.type === "number") type = PROP_TYPE.NUMBER;
92
+ else if (v.type !== "string") type = v.type;
93
+ propsMap.set(`prop-${k}`, {
94
+ type,
95
+ value: _.startsWith(v.value, "bind:") ? void 0 : v.value
96
+ });
97
+ this.props[k] = v.value;
98
+ });
99
+ registeredPropsSet.add(this.widgetType);
100
+ customWidgetPropsMap[this.widgetType] = this.props;
101
+ return propsMap;
102
+ }
103
+ updateDataValue(value) {
104
+ if (this.formControl?.control && value !== this.formControl.control.value) {
105
+ this.formControl.control.setValue(value);
106
+ if (this.formControl.control.invalid) this.onErroSubject.next(null);
107
+ }
108
+ }
109
+ updateData(key, value) {
110
+ let modifiedKey = key.replace("base-", "");
111
+ if (this.asAttr) {
112
+ this[this.baseWidgetName][modifiedKey] = value;
113
+ this.nativeElement.children[0].children[0]["widget"].viewParent[this.baseWidgetName][modifiedKey] = value;
114
+ this[this.baseWidgetName].initDatasetItems();
115
+ } else {
116
+ this[modifiedKey] = value;
117
+ this.nativeElement.children[0].children[0]["widget"].viewParent[modifiedKey] = value;
118
+ }
119
+ if (this.formControl && modifiedKey === "datavalue") this.updateDataValue(value);
120
+ }
121
+ static {
122
+ this.ɵfac = i0.ɵɵngDeclareFactory({
123
+ minVersion: "12.0.0",
124
+ version: "22.2.1",
125
+ ngImport: i0,
126
+ type: CustomWidgetContainerDirective,
127
+ deps: [
128
+ { token: i0.Injector },
129
+ { token: i0.ElementRef },
130
+ {
131
+ token: "widgetname",
132
+ attribute: true
133
+ },
134
+ {
135
+ token: "EXPLICIT_CONTEXT",
136
+ optional: true
137
+ }
138
+ ],
139
+ target: i0.ɵɵFactoryTarget.Directive
140
+ });
141
+ }
142
+ static {
143
+ this.ɵdir = i0.ɵɵngDeclareDirective({
144
+ minVersion: "14.0.0",
145
+ version: "22.2.1",
146
+ type: CustomWidgetContainerDirective,
147
+ isStandalone: true,
148
+ selector: "[wmWidgetContainer]",
149
+ providers: [
150
+ provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),
151
+ provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),
152
+ provideAsWidgetRef(CustomWidgetContainerDirective)
153
+ ],
154
+ exportAs: ["wmWidgetContainer"],
155
+ usesInheritance: true,
156
+ ngImport: i0
157
+ });
158
+ }
159
+ };
160
+ i0.ɵɵngDeclareClassMetadata({
161
+ minVersion: "12.0.0",
162
+ version: "22.2.1",
163
+ ngImport: i0,
164
+ type: CustomWidgetContainerDirective,
165
+ decorators: [{
166
+ type: Directive,
167
+ args: [{
168
+ standalone: true,
169
+ selector: "[wmWidgetContainer]",
170
+ providers: [
171
+ provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),
172
+ provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),
173
+ provideAsWidgetRef(CustomWidgetContainerDirective)
174
+ ],
175
+ exportAs: "wmWidgetContainer"
176
+ }]
177
+ }],
178
+ ctorParameters: () => [
179
+ { type: i0.Injector },
180
+ { type: i0.ElementRef },
181
+ {
182
+ type: void 0,
183
+ decorators: [{
184
+ type: Attribute,
185
+ args: ["widgetname"]
186
+ }]
187
+ },
188
+ {
189
+ type: void 0,
190
+ decorators: [{
191
+ type: Inject,
192
+ args: ["EXPLICIT_CONTEXT"]
193
+ }, { type: Optional }]
194
+ }
195
+ ]
196
+ });
167
197
  const registerProps = () => {
168
- register('wm-custom-widget-container', new Map([
169
- ['name', PROP_STRING],
170
- ['class', PROP_STRING]
171
- ]));
198
+ register("wm-custom-widget-container", /* @__PURE__ */ new Map([["name", PROP_STRING], ["class", PROP_STRING]]));
172
199
  };
173
-
174
- const DEFAULT_CLS = 'app-custom-widget-container clearfix';
175
- const WIDGET_CONFIG = { widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS };
176
- class CustomWidgetDirective extends StylableComponent {
177
- static { this.initializeProps = registerProps(); }
178
- constructor(inj, viewport) {
179
- super(inj, WIDGET_CONFIG);
180
- this.viewport = viewport;
181
- this.registerDestroyListener(this.viewport.subscribe("resize" /* ViewportEvent.RESIZE */, data => this.callback('resize', data)));
182
- this.registerDestroyListener(this.viewport.subscribe("orientationchange" /* ViewportEvent.ORIENTATION_CHANGE */, data => this.callback('orientationchange', data)));
183
- }
184
- ngAfterContentInit() {
185
- let customWidget = this.nativeElement.closest('[customwidgetcontainer]') || this.nativeElement.closest('[wmwidgetcontainer]'), inheritedProps = {}, customWidgetProps = Array.from(getWidgetPropsByType("wm-custom-widget-container").keys());
186
- for (let i = 0; i < customWidget.attributes.length; i++) {
187
- let attr = customWidget.attributes.item(i);
188
- if (attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))
189
- inheritedProps[attr.name] = attr.value;
190
- }
191
- this.processChildren(this.nativeElement.children, inheritedProps);
192
- }
193
- processChildren(children, inheritedProps) {
194
- let baseWidgetName = this.$element.attr('base');
195
- Array.from(children).forEach((child) => {
196
- if (child.getAttribute('name') !== baseWidgetName)
197
- this.processChildren(child.children, inheritedProps);
198
- else {
199
- for (const [key, value] of Object.entries(inheritedProps)) {
200
- if (key.includes(".event") || key.includes('.bind'))
201
- this.processAttr(key, value, { widget: child.widget, nativeElement: child });
202
- else
203
- child.widget[key] = value;
204
- }
205
- }
206
- });
207
- }
208
- callback(eventName, locals) {
209
- locals = _.assign({ widget: this }, locals);
210
- this.invokeEventCallback(eventName, locals);
211
- }
212
- ngOnAttach() {
213
- this.callback('attach');
214
- }
215
- ngOnDetach() {
216
- this.callback('detach');
217
- }
218
- ngOnDestroy() {
219
- this.callback('destroy');
220
- super.ngOnDestroy();
221
- }
222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: CustomWidgetDirective, deps: [{ token: i0.Injector }, { token: i1.Viewport }], target: i0.ɵɵFactoryTarget.Directive }); }
223
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.21", type: CustomWidgetDirective, isStandalone: true, selector: "[wmCustomWidget]", providers: [
224
- provideAsWidgetRef(CustomWidgetDirective)
225
- ], usesInheritance: true, ngImport: i0 }); }
226
- }
227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: CustomWidgetDirective, decorators: [{
228
- type: Directive,
229
- args: [{
230
- standalone: true,
231
- selector: '[wmCustomWidget]',
232
- providers: [
233
- provideAsWidgetRef(CustomWidgetDirective)
234
- ]
235
- }]
236
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i1.Viewport }] });
237
-
238
- /**
239
- * Generated bundle index. Do not edit.
240
- */
241
-
200
+ const WIDGET_CONFIG = {
201
+ widgetType: "wm-custom-widget-container",
202
+ hostClass: "app-custom-widget-container clearfix"
203
+ };
204
+ var CustomWidgetDirective = class CustomWidgetDirective extends StylableComponent {
205
+ static {
206
+ this.initializeProps = registerProps();
207
+ }
208
+ constructor(inj, viewport) {
209
+ super(inj, WIDGET_CONFIG);
210
+ this.viewport = viewport;
211
+ this.registerDestroyListener(this.viewport.subscribe("resize", (data) => this.callback("resize", data)));
212
+ this.registerDestroyListener(this.viewport.subscribe("orientationchange", (data) => this.callback("orientationchange", data)));
213
+ }
214
+ ngAfterContentInit() {
215
+ let customWidget = this.nativeElement.closest("[customwidgetcontainer]") || this.nativeElement.closest("[wmwidgetcontainer]"), inheritedProps = {}, customWidgetProps = Array.from(getWidgetPropsByType("wm-custom-widget-container").keys());
216
+ for (let i = 0; i < customWidget.attributes.length; i++) {
217
+ let attr = customWidget.attributes.item(i);
218
+ if (attr.value && attr.value !== "" && !customWidgetProps.includes(attr.name)) inheritedProps[attr.name] = attr.value;
219
+ }
220
+ this.processChildren(this.nativeElement.children, inheritedProps);
221
+ }
222
+ processChildren(children, inheritedProps) {
223
+ let baseWidgetName = this.$element.attr("base");
224
+ Array.from(children).forEach((child) => {
225
+ if (child.getAttribute("name") !== baseWidgetName) this.processChildren(child.children, inheritedProps);
226
+ else for (const [key, value] of Object.entries(inheritedProps)) if (key.includes(".event") || key.includes(".bind")) this.processAttr(key, value, {
227
+ widget: child.widget,
228
+ nativeElement: child
229
+ });
230
+ else child.widget[key] = value;
231
+ });
232
+ }
233
+ callback(eventName, locals) {
234
+ locals = _.assign({ widget: this }, locals);
235
+ this.invokeEventCallback(eventName, locals);
236
+ }
237
+ ngOnAttach() {
238
+ this.callback("attach");
239
+ }
240
+ ngOnDetach() {
241
+ this.callback("detach");
242
+ }
243
+ ngOnDestroy() {
244
+ this.callback("destroy");
245
+ super.ngOnDestroy();
246
+ }
247
+ static {
248
+ this.ɵfac = i0.ɵɵngDeclareFactory({
249
+ minVersion: "12.0.0",
250
+ version: "22.2.1",
251
+ ngImport: i0,
252
+ type: CustomWidgetDirective,
253
+ deps: [{ token: i0.Injector }, { token: i1.Viewport }],
254
+ target: i0.ɵɵFactoryTarget.Directive
255
+ });
256
+ }
257
+ static {
258
+ this.ɵdir = i0.ɵɵngDeclareDirective({
259
+ minVersion: "14.0.0",
260
+ version: "22.2.1",
261
+ type: CustomWidgetDirective,
262
+ isStandalone: true,
263
+ selector: "[wmCustomWidget]",
264
+ providers: [provideAsWidgetRef(CustomWidgetDirective)],
265
+ usesInheritance: true,
266
+ ngImport: i0
267
+ });
268
+ }
269
+ };
270
+ i0.ɵɵngDeclareClassMetadata({
271
+ minVersion: "12.0.0",
272
+ version: "22.2.1",
273
+ ngImport: i0,
274
+ type: CustomWidgetDirective,
275
+ decorators: [{
276
+ type: Directive,
277
+ args: [{
278
+ standalone: true,
279
+ selector: "[wmCustomWidget]",
280
+ providers: [provideAsWidgetRef(CustomWidgetDirective)]
281
+ }]
282
+ }],
283
+ ctorParameters: () => [{ type: i0.Injector }, { type: i1.Viewport }]
284
+ });
242
285
  export { CustomWidgetContainerDirective, CustomWidgetDirective };
243
- //# sourceMappingURL=index.mjs.map
286
+
287
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget.props.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget-container.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-prop.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/index.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const customWidgetProps =\n new Map(\n [\n ['class', PROP_STRING],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['widgetname', PROP_STRING],\n ['show', { value: true, ...PROP_BOOLEAN }]\n ]\n )\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget',\n customWidgetProps\n );\n};\n","import {Attribute, Directive, ElementRef, Inject, Injector, OnInit, Optional} from '@angular/core';\n\nimport { addClass, noop } from '@wm/core';\nimport {PROP_TYPE, provideAs, provideAsWidgetRef, register, styler} from '@wm/components/base';\n\nimport { customWidgetProps } from './custom-widget.props';\nimport { registerProps } from \"../custom-widget-container/custom-widget.props\";\nimport {capitalize, cloneDeep} from 'lodash-es';\nimport {NG_VALIDATORS, NG_VALUE_ACCESSOR} from \"@angular/forms\";\nimport {DatasetAwareFormComponent} from \"@wm/components/input/dataset-aware-form\";\nimport {Subject} from \"rxjs\";\n\nconst registeredPropsSet = new Set<string>();\n\nlet customWidgetPropsMap: { [key: string]: any } = {};\n\nconst DEFAULT_CLS = 'app-html-container';\n\ndeclare const _;\n\n@Directive({\n standalone: true,\n selector: '[wmWidgetContainer]',\n providers: [\n provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),\n provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),\n provideAsWidgetRef(CustomWidgetContainerDirective)\n ],\n exportAs: 'wmWidgetContainer'\n})\nexport class CustomWidgetContainerDirective extends DatasetAwareFormComponent implements OnInit {\n static readonly initializeProps = registerProps();\n\n widgetType: string;\n name: string;\n propsReady: Function;\n widgetName: string;\n config: any;\n private props: any = {};\n private baseWidgetName: string;\n baseWidget: any = {};\n asAttr: boolean;\n configSubject: Subject<any>;\n onErroSubject: Subject<any>;\n _isCustom: boolean = true;\n\n constructor(\n inj: Injector, elRef: ElementRef,\n @Attribute('widgetname') widgetname: string,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n const widgetType = `wm-custom-${widgetname}`;\n const WIDGET_CONFIG = { widgetType, hostClass: DEFAULT_CLS };\n let resolveFn: Function = noop;\n\n super(inj, WIDGET_CONFIG, explicitContext, undefined, new Promise(res => resolveFn = res));\n this.propsReady = resolveFn;\n this.configSubject = new Subject();\n this.onErroSubject = new Subject();\n this.widgetType = widgetType;\n this.name = elRef.nativeElement.getAttribute('name');\n\n styler(this.nativeElement, this);\n\n // Call on property change on name to set name attribute on element.\n this.registerReadyStateListener(() => {\n super.onPropertyChange('name', this.name);\n });\n\n this.registerPropertyChangeListener(((key: string, nv: any, ov?: any) => {\n if (!key.startsWith('prop-')) return;\n const propName = key.slice(5)\n if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) {\n this.props[propName] = nv;\n }\n }))\n }\n\n get datavalue() {\n if(this.nativeElement.children.length) {\n let value = this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue;\n this.updateDataValue(value);\n return value;\n }\n return undefined;\n }\n\n set datavalue(value) {\n if(this.nativeElement.children.length)\n this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue = value;\n }\n\n setBaseWidgetName(baseWidgetType: string) {\n let splitArr = baseWidgetType.split('-'), modifiedArr = [];\n modifiedArr = splitArr.map((item: any) => {\n item = item !== 'wm' ? capitalize(item) : item;\n return item;\n });\n this.baseWidgetName = modifiedArr.join('');\n }\n\n public setProps(config, resolveFn: Function) {\n this.config = config;\n this.baseWidgetName = this.config.projectPropsOn || this.config.widgetType.split('wm-')[1];\n this.configSubject.next(null);\n if(config.customClasses){\n addClass(this.nativeElement, config.customClasses);\n }\n this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');\n\n this.baseWidget = (this.nativeElement.children[0].children[0].querySelector(`[name=${this.baseWidgetName}]`) as any)?.widget;\n if (!config?.properties) {\n return;\n }\n if (!registeredPropsSet.has(this.widgetType)) {\n register(this.widgetType, this.prepareProps(config.properties));\n }else{\n this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]))\n }\n\n this.propsReady(resolveFn);\n }\n\n private prepareProps(props = {}) {\n const propsMap = new Map(customWidgetProps);\n Object.entries(props).forEach(([k, v]: [string, any]) => {\n let type = PROP_TYPE.STRING;\n\n if (v.type === 'boolean') {\n type = PROP_TYPE.BOOLEAN;\n } else if (v.type === 'number') {\n type = PROP_TYPE.NUMBER;\n } else if (v.type !== 'string') {\n type = v.type;\n }\n\n // Do not set the 'bind:*' values\n propsMap.set(`prop-${k}`, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });\n this.props[k] = v.value;\n });\n\n registeredPropsSet.add(this.widgetType);\n customWidgetPropsMap[this.widgetType] = this.props\n\n return propsMap;\n }\n\n updateDataValue(value) {\n if(this.formControl?.control && value !== this.formControl.control.value) {\n this.formControl.control.setValue(value);\n if (this.formControl.control.invalid) {\n this.onErroSubject.next(null);\n }\n }\n }\n\n updateData(key: string, value: any) {\n let modifiedKey = key.replace('base-', '');\n if(this.asAttr) {\n this[this.baseWidgetName][modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;\n this[this.baseWidgetName].initDatasetItems();\n } else {\n this[modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[modifiedKey] = value;\n }\n if(this.formControl && modifiedKey === 'datavalue'){\n this.updateDataValue(value);\n }\n }\n}\n","import {PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget-container',\n new Map(\n [\n ['name', PROP_STRING],\n ['class', PROP_STRING]\n ]\n )\n );\n};\n","import { AfterContentInit, Directive, Injector, OnDestroy } from '@angular/core';\n\nimport {Viewport, ViewportEvent} from '@wm/core';\nimport { registerProps } from './custom-widget-prop';\nimport { StylableComponent, provideAsWidgetRef, getWidgetPropsByType } from '@wm/components/base';\n\nconst DEFAULT_CLS = 'app-custom-widget-container clearfix';\nconst WIDGET_CONFIG = {widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS};\ndeclare const _;\n\n@Directive({\n standalone: true,\n selector: '[wmCustomWidget]',\n providers: [\n provideAsWidgetRef(CustomWidgetDirective)\n ]\n})\nexport class CustomWidgetDirective extends StylableComponent implements OnDestroy, AfterContentInit {\n static readonly initializeProps = registerProps();\n\n constructor(inj: Injector, private readonly viewport: Viewport) {\n super(inj, WIDGET_CONFIG);\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.RESIZE, data => this.callback('resize', data)));\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.ORIENTATION_CHANGE, data => this.callback('orientationchange', data)));\n }\n ngAfterContentInit() {\n let customWidget = this.nativeElement.closest('[customwidgetcontainer]') || this.nativeElement.closest('[wmwidgetcontainer]'),\n inheritedProps = {},\n customWidgetProps = Array.from(getWidgetPropsByType(\"wm-custom-widget-container\").keys());\n for(let i = 0; i < customWidget.attributes.length; i++) {\n let attr = customWidget.attributes.item(i);\n if(attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))\n inheritedProps[attr.name] = attr.value;\n }\n this.processChildren(this.nativeElement.children, inheritedProps);\n }\n\n processChildren(children: any, inheritedProps: { [key: string]: string }) {\n let baseWidgetName = this.$element.attr('base');\n Array.from(children).forEach((child: any) => {\n if(child.getAttribute('name') !== baseWidgetName)\n this.processChildren(child.children, inheritedProps);\n else {\n for (const [key, value] of Object.entries(inheritedProps)) {\n if(key.includes(\".event\") || key.includes('.bind'))\n this.processAttr(key, value, {widget: child.widget, nativeElement: child});\n else\n child.widget[key] = value;\n }\n }\n });\n }\n\n private callback(eventName, locals?: object) {\n locals = _.assign({ widget: this }, locals);\n this.invokeEventCallback(eventName, locals);\n }\n\n public ngOnAttach() {\n this.callback('attach');\n }\n\n public ngOnDetach() {\n this.callback('detach');\n }\n\n public ngOnDestroy() {\n this.callback('destroy');\n super.ngOnDestroy();\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["registerProps","DEFAULT_CLS"],"mappings":";;;;;;;;;;AAEO,MAAM,iBAAiB,GAC1B,IAAI,GAAG,CACH;IACI,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,YAAY,EAAE,WAAW,CAAC;IAC3B,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAE;AAC5C,CAAA,CACJ;AAEE,MAAMA,eAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,kBAAkB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IAAI,EAAE,EAAE,MAAM,CAAC;AAC3C,QAAA,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,CAAC;IAC/C;IAEO,UAAU,GAAA;AACb,QAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC3B;IAEO,UAAU,GAAA;AACb,QAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC3B;IAEO,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QACxB,KAAK,CAAC,WAAW,EAAE;IACvB;+GApDS,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,SAAA,EAJnB;YACP,kBAAkB,CAAC,qBAAqB;AAC3C,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAEQ,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AACd,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,SAAS,EAAE;AACP,wBAAA,kBAAkB,CAAA,qBAAA;AACrB;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget.props.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget-container.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-prop.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.directive.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const customWidgetProps =\n new Map(\n [\n ['class', PROP_STRING],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['widgetname', PROP_STRING],\n ['show', { value: true, ...PROP_BOOLEAN }]\n ]\n )\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget',\n customWidgetProps\n );\n};\n","import {Attribute, Directive, ElementRef, Inject, Injector, OnInit, Optional} from '@angular/core';\n\nimport { addClass, noop } from '@wm/core';\nimport {PROP_TYPE, provideAs, provideAsWidgetRef, register, styler} from '@wm/components/base';\n\nimport { customWidgetProps } from './custom-widget.props';\nimport { registerProps } from \"../custom-widget-container/custom-widget.props\";\nimport {capitalize, cloneDeep} from 'lodash-es';\nimport {NG_VALIDATORS, NG_VALUE_ACCESSOR} from \"@angular/forms\";\nimport {DatasetAwareFormComponent} from \"@wm/components/input/dataset-aware-form\";\nimport {Subject} from \"rxjs\";\n\nconst registeredPropsSet = new Set<string>();\n\nlet customWidgetPropsMap: { [key: string]: any } = {};\n\nconst DEFAULT_CLS = 'app-html-container';\n\ndeclare const _;\n\n@Directive({\n standalone: true,\n selector: '[wmWidgetContainer]',\n providers: [\n provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),\n provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),\n provideAsWidgetRef(CustomWidgetContainerDirective)\n ],\n exportAs: 'wmWidgetContainer'\n})\nexport class CustomWidgetContainerDirective extends DatasetAwareFormComponent implements OnInit {\n static readonly initializeProps = registerProps();\n\n widgetType: string;\n name: string;\n propsReady: Function;\n widgetName: string;\n config: any;\n private props: any = {};\n private baseWidgetName: string;\n baseWidget: any = {};\n asAttr: boolean;\n configSubject: Subject<any>;\n onErroSubject: Subject<any>;\n _isCustom: boolean = true;\n\n constructor(\n inj: Injector, elRef: ElementRef,\n @Attribute('widgetname') widgetname: string,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n const widgetType = `wm-custom-${widgetname}`;\n const WIDGET_CONFIG = { widgetType, hostClass: DEFAULT_CLS };\n let resolveFn: Function = noop;\n\n super(inj, WIDGET_CONFIG, explicitContext, undefined, new Promise(res => resolveFn = res));\n this.propsReady = resolveFn;\n this.configSubject = new Subject();\n this.onErroSubject = new Subject();\n this.widgetType = widgetType;\n this.name = elRef.nativeElement.getAttribute('name');\n\n styler(this.nativeElement, this);\n\n // Call on property change on name to set name attribute on element.\n this.registerReadyStateListener(() => {\n super.onPropertyChange('name', this.name);\n });\n\n this.registerPropertyChangeListener(((key: string, nv: any, ov?: any) => {\n if (!key.startsWith('prop-')) return;\n const propName = key.slice(5)\n if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) {\n this.props[propName] = nv;\n }\n }))\n }\n\n get datavalue() {\n if(this.nativeElement.children.length) {\n let value = this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue;\n this.updateDataValue(value);\n return value;\n }\n return undefined;\n }\n\n set datavalue(value) {\n if(this.nativeElement.children.length)\n this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue = value;\n }\n\n setBaseWidgetName(baseWidgetType: string) {\n let splitArr = baseWidgetType.split('-'), modifiedArr = [];\n modifiedArr = splitArr.map((item: any) => {\n item = item !== 'wm' ? capitalize(item) : item;\n return item;\n });\n this.baseWidgetName = modifiedArr.join('');\n }\n\n public setProps(config, resolveFn: Function) {\n this.config = config;\n this.baseWidgetName = this.config.projectPropsOn || this.config.widgetType.split('wm-')[1];\n this.configSubject.next(null);\n if(config.customClasses){\n addClass(this.nativeElement, config.customClasses);\n }\n this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');\n\n this.baseWidget = (this.nativeElement.children[0].children[0].querySelector(`[name=${this.baseWidgetName}]`) as any)?.widget;\n if (!config?.properties) {\n return;\n }\n if (!registeredPropsSet.has(this.widgetType)) {\n register(this.widgetType, this.prepareProps(config.properties));\n }else{\n this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]))\n }\n\n this.propsReady(resolveFn);\n }\n\n private prepareProps(props) {\n const propsMap = new Map(customWidgetProps);\n Object.entries(props).forEach(([k, v]: [string, any]) => {\n let type = PROP_TYPE.STRING;\n\n if (v.type === 'boolean') {\n type = PROP_TYPE.BOOLEAN;\n } else if (v.type === 'number') {\n type = PROP_TYPE.NUMBER;\n } else if (v.type !== 'string') {\n type = v.type;\n }\n\n // Do not set the 'bind:*' values\n propsMap.set(`prop-${k}`, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });\n this.props[k] = v.value;\n });\n\n registeredPropsSet.add(this.widgetType);\n customWidgetPropsMap[this.widgetType] = this.props\n\n return propsMap;\n }\n\n updateDataValue(value) {\n if(this.formControl?.control && value !== this.formControl.control.value) {\n this.formControl.control.setValue(value);\n if (this.formControl.control.invalid) {\n this.onErroSubject.next(null);\n }\n }\n }\n\n updateData(key: string, value: any) {\n let modifiedKey = key.replace('base-', '');\n if(this.asAttr) {\n this[this.baseWidgetName][modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;\n this[this.baseWidgetName].initDatasetItems();\n } else {\n this[modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[modifiedKey] = value;\n }\n if(this.formControl && modifiedKey === 'datavalue'){\n this.updateDataValue(value);\n }\n }\n}\n","import {PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget-container',\n new Map(\n [\n ['name', PROP_STRING],\n ['class', PROP_STRING]\n ]\n )\n );\n};\n","import { AfterContentInit, Directive, Injector, OnDestroy } from '@angular/core';\n\nimport {Viewport, ViewportEvent} from '@wm/core';\nimport { registerProps } from './custom-widget-prop';\nimport { StylableComponent, provideAsWidgetRef, getWidgetPropsByType } from '@wm/components/base';\n\nconst DEFAULT_CLS = 'app-custom-widget-container clearfix';\nconst WIDGET_CONFIG = {widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS};\ndeclare const _;\n\n@Directive({\n standalone: true,\n selector: '[wmCustomWidget]',\n providers: [\n provideAsWidgetRef(CustomWidgetDirective)\n ]\n})\nexport class CustomWidgetDirective extends StylableComponent implements OnDestroy, AfterContentInit {\n static readonly initializeProps = registerProps();\n\n constructor(inj: Injector, private readonly viewport: Viewport) {\n super(inj, WIDGET_CONFIG);\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.RESIZE, data => this.callback('resize', data)));\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.ORIENTATION_CHANGE, data => this.callback('orientationchange', data)));\n }\n ngAfterContentInit() {\n let customWidget = this.nativeElement.closest('[customwidgetcontainer]') || this.nativeElement.closest('[wmwidgetcontainer]'),\n inheritedProps = {},\n customWidgetProps = Array.from(getWidgetPropsByType(\"wm-custom-widget-container\").keys());\n for(let i = 0; i < customWidget.attributes.length; i++) {\n let attr = customWidget.attributes.item(i);\n if(attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))\n inheritedProps[attr.name] = attr.value;\n }\n this.processChildren(this.nativeElement.children, inheritedProps);\n }\n\n processChildren(children: any, inheritedProps: { [key: string]: string }) {\n let baseWidgetName = this.$element.attr('base');\n Array.from(children).forEach((child: any) => {\n if(child.getAttribute('name') !== baseWidgetName)\n this.processChildren(child.children, inheritedProps);\n else {\n for (const [key, value] of Object.entries(inheritedProps)) {\n if(key.includes(\".event\") || key.includes('.bind'))\n this.processAttr(key, value, {widget: child.widget, nativeElement: child});\n else\n child.widget[key] = value;\n }\n }\n });\n }\n\n private callback(eventName, locals?: object) {\n locals = _.assign({ widget: this }, locals);\n this.invokeEventCallback(eventName, locals);\n }\n\n public ngOnAttach() {\n this.callback('attach');\n }\n\n public ngOnDetach() {\n this.callback('detach');\n }\n\n public ngOnDestroy() {\n this.callback('destroy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