@watermarkinsights/ripple 4.2.0-1 → 4.2.0

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 (367) hide show
  1. package/dist/cjs/chartFunctions-2c3e010e.js +600 -0
  2. package/dist/cjs/{functions-4208c444.js → functions-91da05e9.js} +362 -362
  3. package/dist/cjs/{global-2806c327.js → global-b85941b0.js} +24 -24
  4. package/dist/cjs/{index-f8ef86de.js → index-fae02cd7.js} +150 -436
  5. package/dist/cjs/interfaces-245d7bff.js +38 -0
  6. package/dist/cjs/intl-fa3bb4ae.js +179 -0
  7. package/dist/cjs/loader.cjs.js +13 -4
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +85 -85
  9. package/dist/cjs/priv-datepicker.cjs.entry.js +637 -637
  10. package/dist/cjs/priv-navigator-button.cjs.entry.js +18 -18
  11. package/dist/cjs/priv-navigator-item.cjs.entry.js +21 -21
  12. package/dist/cjs/ripple.cjs.js +7 -4
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +314 -314
  14. package/dist/cjs/wm-button.cjs.entry.js +174 -174
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +17 -17
  16. package/dist/cjs/wm-chart.cjs.entry.js +164 -164
  17. package/dist/cjs/wm-datepicker.cjs.entry.js +160 -160
  18. package/dist/cjs/wm-file-list.cjs.entry.js +10 -10
  19. package/dist/cjs/wm-file.cjs.entry.js +178 -178
  20. package/dist/cjs/wm-input.cjs.entry.js +102 -102
  21. package/dist/cjs/wm-line-chart.cjs.entry.js +448 -448
  22. package/dist/cjs/wm-modal-footer.cjs.entry.js +27 -27
  23. package/dist/cjs/wm-modal-header.cjs.entry.js +21 -21
  24. package/dist/cjs/wm-modal.cjs.entry.js +92 -92
  25. package/dist/cjs/wm-navigation_3.cjs.entry.js +179 -179
  26. package/dist/cjs/wm-navigator.cjs.entry.js +251 -251
  27. package/dist/cjs/wm-option_2.cjs.entry.js +710 -710
  28. package/dist/cjs/wm-pagination.cjs.entry.js +169 -169
  29. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +151 -151
  30. package/dist/cjs/wm-search.cjs.entry.js +192 -192
  31. package/dist/cjs/wm-snackbar.cjs.entry.js +114 -114
  32. package/dist/cjs/wm-tab-item_3.cjs.entry.js +247 -247
  33. package/dist/cjs/wm-tag-input.cjs.entry.js +849 -849
  34. package/dist/cjs/wm-tag-option.cjs.entry.js +33 -33
  35. package/dist/cjs/wm-timepicker.cjs.entry.js +270 -270
  36. package/dist/cjs/wm-toggletip.cjs.entry.js +99 -99
  37. package/dist/cjs/wm-uploader.cjs.entry.js +198 -198
  38. package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
  39. package/dist/collection/collection-manifest.json +41 -41
  40. package/dist/collection/components/charts/chartFunctions.js +456 -456
  41. package/dist/collection/components/charts/chartFunctions.spec.js +13 -13
  42. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +73 -73
  43. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +254 -257
  44. package/dist/collection/components/charts/screenshots.e2e.js +30 -30
  45. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +121 -121
  46. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +160 -160
  47. package/dist/collection/components/charts/wm-chart/wm-chart.js +381 -382
  48. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +26 -26
  49. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +2 -1
  50. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +138 -138
  51. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +717 -717
  52. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +106 -106
  53. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +202 -202
  54. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +54 -54
  55. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +136 -136
  56. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +31 -31
  57. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +119 -119
  58. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +187 -187
  59. package/dist/collection/components/wm-action-menu/wm-action-menu.js +435 -435
  60. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +35 -35
  61. package/dist/collection/components/wm-button/wm-button.e2e.js +58 -58
  62. package/dist/collection/components/wm-button/wm-button.js +452 -454
  63. package/dist/collection/components/wm-button/wm-button.spec.js +63 -63
  64. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +939 -943
  65. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.spec.js +71 -71
  66. package/dist/collection/components/wm-datepicker/wm-datepicker.css +2 -1
  67. package/dist/collection/components/wm-datepicker/wm-datepicker.e2e.js +359 -359
  68. package/dist/collection/components/wm-datepicker/wm-datepicker.js +413 -415
  69. package/dist/collection/components/wm-datepicker/wm-datepicker.spec.js +13 -13
  70. package/dist/collection/components/wm-file/wm-file.js +380 -380
  71. package/dist/collection/components/wm-file/wm-file.spec.js +107 -107
  72. package/dist/collection/components/wm-file-list/wm-file-list.js +42 -42
  73. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +47 -47
  74. package/dist/collection/components/wm-input/wm-input.e2e.js +26 -26
  75. package/dist/collection/components/wm-input/wm-input.js +453 -453
  76. package/dist/collection/components/wm-input/wm-input.spec.js +168 -168
  77. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +18 -18
  78. package/dist/collection/components/wm-menuitem/wm-menuitem.js +436 -446
  79. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +46 -46
  80. package/dist/collection/components/wm-modal/wm-modal-footer.js +130 -130
  81. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +8 -8
  82. package/dist/collection/components/wm-modal/wm-modal-header.js +68 -68
  83. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +5 -5
  84. package/dist/collection/components/wm-modal/wm-modal.e2e.js +65 -65
  85. package/dist/collection/components/wm-modal/wm-modal.js +296 -299
  86. package/dist/collection/components/wm-modal/wm-modal.spec.js +22 -22
  87. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +1 -0
  88. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +112 -112
  89. package/dist/collection/components/wm-navigation/wm-navigation-item.js +125 -125
  90. package/dist/collection/components/wm-navigation/wm-navigation.css +2 -0
  91. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +86 -86
  92. package/dist/collection/components/wm-navigation/wm-navigation.js +209 -209
  93. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +79 -79
  94. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +30 -30
  95. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +103 -103
  96. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +118 -119
  97. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +180 -180
  98. package/dist/collection/components/wm-navigator/wm-navigator.js +454 -454
  99. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +153 -153
  100. package/dist/collection/components/wm-option/wm-option.e2e.js +19 -19
  101. package/dist/collection/components/wm-option/wm-option.js +463 -474
  102. package/dist/collection/components/wm-option/wm-option.spec.js +39 -39
  103. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +301 -301
  104. package/dist/collection/components/wm-pagination/wm-pagination.js +327 -327
  105. package/dist/collection/components/wm-search/wm-search.e2e.js +69 -69
  106. package/dist/collection/components/wm-search/wm-search.js +414 -415
  107. package/dist/collection/components/wm-search/wm-search.spec.js +64 -64
  108. package/dist/collection/components/wm-select/wm-select.e2e.js +443 -443
  109. package/dist/collection/components/wm-select/wm-select.js +966 -967
  110. package/dist/collection/components/wm-select/wm-select.spec.js +250 -250
  111. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +114 -114
  112. package/dist/collection/components/wm-snackbar/wm-snackbar.js +207 -209
  113. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +4 -4
  114. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +188 -190
  115. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +261 -261
  116. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  117. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +79 -79
  118. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +6 -6
  119. package/dist/collection/components/wm-tag-input/wm-tag-input.css +4 -2
  120. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +168 -168
  121. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1159 -1159
  122. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +147 -147
  123. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +234 -236
  124. package/dist/collection/components/wm-timepicker/wm-timepicker.css +2 -1
  125. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +147 -147
  126. package/dist/collection/components/wm-timepicker/wm-timepicker.js +527 -531
  127. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +151 -151
  128. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +61 -61
  129. package/dist/collection/components/wm-toggletip/wm-toggletip.js +208 -209
  130. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +16 -16
  131. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +56 -56
  132. package/dist/collection/components/wm-uploader/wm-uploader.js +422 -423
  133. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +149 -149
  134. package/dist/collection/components/wm-wrapper/wm-wrapper.js +26 -26
  135. package/dist/collection/global/__mocks__/functions.js +1 -1
  136. package/dist/collection/global/functions.js +510 -510
  137. package/dist/collection/global/functions.spec.js +123 -123
  138. package/dist/collection/global/global.js +16 -16
  139. package/dist/collection/global/interfaces.js +39 -39
  140. package/dist/collection/global/intl.js +162 -162
  141. package/dist/collection/global/services/__mocks__/http-service.js +112 -112
  142. package/dist/collection/global/services/http-service.js +41 -41
  143. package/dist/collection/global/themes/default.js +4 -4
  144. package/dist/collection/global/themes/neutral.js +4 -4
  145. package/dist/collection/lang/lang.spec.js +13 -13
  146. package/dist/esm/chartFunctions-36634c04.js +584 -0
  147. package/dist/esm/{functions-d0e70094.js → functions-5afd09f4.js} +362 -362
  148. package/dist/esm/{global-08dce155.js → global-91088105.js} +24 -24
  149. package/dist/esm/{index-f164fbca.js → index-7e11ea42.js} +150 -436
  150. package/dist/esm/interfaces-89cad2fc.js +35 -0
  151. package/dist/esm/intl-e2da750a.js +174 -0
  152. package/dist/esm/loader.js +14 -5
  153. package/dist/esm/polyfills/css-shim.js +1 -0
  154. package/dist/esm/priv-chart-popover.entry.js +85 -85
  155. package/dist/esm/priv-datepicker.entry.js +637 -637
  156. package/dist/esm/priv-navigator-button.entry.js +18 -18
  157. package/dist/esm/priv-navigator-item.entry.js +21 -21
  158. package/dist/esm/ripple.js +8 -5
  159. package/dist/esm/wm-action-menu_2.entry.js +314 -314
  160. package/dist/esm/wm-button.entry.js +174 -174
  161. package/dist/esm/wm-chart-slice.entry.js +17 -17
  162. package/dist/esm/wm-chart.entry.js +164 -164
  163. package/dist/esm/wm-datepicker.entry.js +160 -160
  164. package/dist/esm/wm-file-list.entry.js +10 -10
  165. package/dist/esm/wm-file.entry.js +178 -178
  166. package/dist/esm/wm-input.entry.js +102 -102
  167. package/dist/esm/wm-line-chart.entry.js +448 -448
  168. package/dist/esm/wm-modal-footer.entry.js +27 -27
  169. package/dist/esm/wm-modal-header.entry.js +21 -21
  170. package/dist/esm/wm-modal.entry.js +92 -92
  171. package/dist/esm/wm-navigation_3.entry.js +179 -179
  172. package/dist/esm/wm-navigator.entry.js +251 -251
  173. package/dist/esm/wm-option_2.entry.js +710 -710
  174. package/dist/esm/wm-pagination.entry.js +169 -169
  175. package/dist/esm/wm-progress-indicator_3.entry.js +151 -151
  176. package/dist/esm/wm-search.entry.js +192 -192
  177. package/dist/esm/wm-snackbar.entry.js +114 -114
  178. package/dist/esm/wm-tab-item_3.entry.js +247 -247
  179. package/dist/esm/wm-tag-input.entry.js +849 -849
  180. package/dist/esm/wm-tag-option.entry.js +33 -33
  181. package/dist/esm/wm-timepicker.entry.js +270 -270
  182. package/dist/esm/wm-toggletip.entry.js +99 -99
  183. package/dist/esm/wm-uploader.entry.js +198 -198
  184. package/dist/esm/wm-wrapper.entry.js +12 -12
  185. package/dist/esm-es5/chartFunctions-36634c04.js +1 -0
  186. package/dist/esm-es5/functions-5afd09f4.js +1 -0
  187. package/dist/esm-es5/global-91088105.js +1 -0
  188. package/dist/esm-es5/index-7e11ea42.js +2 -0
  189. package/dist/esm-es5/{intl-05c9e0c9.js → intl-e2da750a.js} +1 -1
  190. package/dist/esm-es5/loader.js +1 -1
  191. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  192. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  193. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  194. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  195. package/dist/esm-es5/ripple.js +1 -1
  196. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  197. package/dist/esm-es5/wm-button.entry.js +1 -1
  198. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  199. package/dist/esm-es5/wm-chart.entry.js +1 -1
  200. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  201. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  202. package/dist/esm-es5/wm-file.entry.js +1 -1
  203. package/dist/esm-es5/wm-input.entry.js +1 -1
  204. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  205. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  206. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  207. package/dist/esm-es5/wm-modal.entry.js +1 -1
  208. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  209. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  210. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  211. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  212. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  213. package/dist/esm-es5/wm-search.entry.js +1 -1
  214. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  215. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  216. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  217. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  218. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  219. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  220. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  221. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  222. package/dist/loader/index.d.ts +1 -1
  223. package/dist/ripple/p-00acacbe.system.entry.js +1 -0
  224. package/dist/ripple/{p-3446852f.system.entry.js → p-0631be01.system.entry.js} +1 -1
  225. package/dist/ripple/{p-ad6dc751.entry.js → p-0aecac86.entry.js} +1 -1
  226. package/dist/ripple/{p-c717d895.entry.js → p-0d9f70ab.entry.js} +1 -1
  227. package/dist/ripple/{p-b253d2fc.entry.js → p-0f1ff645.entry.js} +1 -1
  228. package/dist/ripple/{p-63f75d43.entry.js → p-1205fdc1.entry.js} +1 -1
  229. package/dist/ripple/{p-27f47edc.entry.js → p-1283e85d.entry.js} +1 -1
  230. package/dist/ripple/{p-43e2a49a.entry.js → p-13594c2e.entry.js} +1 -1
  231. package/dist/ripple/{p-5a921e55.entry.js → p-13af8346.entry.js} +1 -1
  232. package/dist/ripple/{p-ceced3d9.system.entry.js → p-15497721.system.entry.js} +1 -1
  233. package/dist/ripple/p-16363e1c.system.entry.js +1 -0
  234. package/dist/ripple/{p-3a070f35.entry.js → p-19773c40.entry.js} +1 -1
  235. package/dist/ripple/{p-b4d862e1.system.entry.js → p-1cde16a7.system.entry.js} +1 -1
  236. package/dist/ripple/{p-f711c914.entry.js → p-20f5c695.entry.js} +1 -1
  237. package/dist/ripple/{p-13ca30d8.js → p-24b08e1f.js} +1 -1
  238. package/dist/ripple/{p-2c834d27.system.entry.js → p-2a95b63f.system.entry.js} +1 -1
  239. package/dist/ripple/{p-c96a5c94.system.entry.js → p-2e773564.system.entry.js} +1 -1
  240. package/dist/ripple/p-30bf24f8.system.js +2 -0
  241. package/dist/ripple/p-3248c0fa.system.entry.js +1 -0
  242. package/dist/ripple/{p-28e4583c.system.entry.js → p-32b1126c.system.entry.js} +1 -1
  243. package/dist/ripple/{p-aadf8c59.entry.js → p-36049d2f.entry.js} +1 -1
  244. package/dist/ripple/p-3aca2871.js +1 -0
  245. package/dist/ripple/{p-633cd89a.system.entry.js → p-3becce62.system.entry.js} +1 -1
  246. package/dist/ripple/{p-58174f4e.entry.js → p-3c80bf67.entry.js} +1 -1
  247. package/dist/ripple/p-40fcae38.system.js +1 -0
  248. package/dist/ripple/p-47c20b05.entry.js +1 -0
  249. package/dist/ripple/p-4825101c.system.js +1 -0
  250. package/dist/ripple/p-56d64283.system.entry.js +1 -0
  251. package/dist/ripple/p-5e85967a.system.js +1 -0
  252. package/dist/ripple/{p-067d7922.system.entry.js → p-622a7791.system.entry.js} +1 -1
  253. package/dist/ripple/{p-aba5a00e.system.entry.js → p-676c1089.system.entry.js} +1 -1
  254. package/dist/ripple/{p-153701f9.entry.js → p-6abb903c.entry.js} +1 -1
  255. package/dist/ripple/{p-372faf33.entry.js → p-7529706d.entry.js} +1 -1
  256. package/dist/ripple/{p-de349bee.entry.js → p-7962f562.entry.js} +1 -1
  257. package/dist/ripple/{p-8d4734ad.entry.js → p-80aef387.entry.js} +1 -1
  258. package/dist/ripple/{p-8cace32f.entry.js → p-84a7e757.entry.js} +1 -1
  259. package/dist/ripple/{p-9fecbc8a.system.js → p-85f744ed.system.js} +1 -1
  260. package/dist/ripple/{p-05d4e49b.js → p-863e737a.js} +1 -1
  261. package/dist/ripple/{p-7e56da2e.system.entry.js → p-8ea68cb3.system.entry.js} +1 -1
  262. package/dist/ripple/{p-1402cfa2.system.js → p-8f3f903f.system.js} +1 -1
  263. package/dist/ripple/{p-c249063c.entry.js → p-8f8c3705.entry.js} +1 -1
  264. package/dist/ripple/{p-67d48c33.system.entry.js → p-90ea7e3a.system.entry.js} +1 -1
  265. package/dist/ripple/{p-a82a8931.entry.js → p-9288659b.entry.js} +1 -1
  266. package/dist/ripple/{p-6cf7a34a.entry.js → p-935513f8.entry.js} +1 -1
  267. package/dist/ripple/{p-b452d1d7.entry.js → p-a0bf5eef.entry.js} +1 -1
  268. package/dist/ripple/{p-06776596.system.entry.js → p-a1e95b05.system.entry.js} +1 -1
  269. package/dist/ripple/{p-25446670.entry.js → p-a52c5a1c.entry.js} +1 -1
  270. package/dist/ripple/{p-2c4f312d.system.entry.js → p-a5b23781.system.entry.js} +1 -1
  271. package/dist/ripple/p-a6be3cca.system.entry.js +1 -0
  272. package/dist/ripple/{p-fa87bce3.entry.js → p-a9c096b5.entry.js} +1 -1
  273. package/dist/ripple/p-aafa111a.system.js +1 -0
  274. package/dist/ripple/{p-1d8b0039.entry.js → p-ad37cdfd.entry.js} +1 -1
  275. package/dist/ripple/{p-350fe5da.entry.js → p-ae674a54.entry.js} +1 -1
  276. package/dist/ripple/{p-e24ddae1.entry.js → p-b3c73bc9.entry.js} +1 -1
  277. package/dist/ripple/{p-e8b58666.system.entry.js → p-b3e08b14.system.entry.js} +1 -1
  278. package/dist/ripple/p-b5bedd63.js +2 -0
  279. package/dist/ripple/{p-a69c37e0.entry.js → p-b71a83e3.entry.js} +1 -1
  280. package/dist/ripple/p-bd537299.system.entry.js +1 -0
  281. package/dist/ripple/{p-42ebfcfa.entry.js → p-c41603e6.entry.js} +1 -1
  282. package/dist/ripple/{p-5a4d9897.system.entry.js → p-c5e8f8a5.system.entry.js} +1 -1
  283. package/dist/ripple/{p-7a8816d9.system.entry.js → p-c76bbedf.system.entry.js} +1 -1
  284. package/dist/ripple/{p-3af72848.js → p-c7b5ac39.js} +1 -1
  285. package/dist/ripple/{p-361cc8fc.system.entry.js → p-cbd8a60b.system.entry.js} +1 -1
  286. package/dist/ripple/{p-3583d113.system.entry.js → p-d04ba5f8.system.entry.js} +1 -1
  287. package/dist/ripple/{p-1fa2a756.system.entry.js → p-d0f1b8c4.system.entry.js} +1 -1
  288. package/dist/ripple/{p-bdd4f919.system.entry.js → p-d496bc44.system.entry.js} +1 -1
  289. package/dist/ripple/{p-7e8daaac.entry.js → p-deb4f5a2.entry.js} +1 -1
  290. package/dist/ripple/{p-5ac980e2.system.entry.js → p-e3f0b57f.system.entry.js} +1 -1
  291. package/dist/ripple/{p-f1a92576.system.entry.js → p-e4919f95.system.entry.js} +1 -1
  292. package/dist/ripple/{p-49118468.entry.js → p-ed942b42.entry.js} +1 -1
  293. package/dist/ripple/{p-0ecbf569.system.entry.js → p-f30839a1.system.entry.js} +1 -1
  294. package/dist/ripple/{p-d3f9d028.system.entry.js → p-ff14e4ec.system.entry.js} +1 -1
  295. package/dist/ripple/ripple.esm.js +1 -1
  296. package/dist/ripple/ripple.js +20 -16
  297. package/dist/types/components/charts/chartFunctions.d.ts +13 -13
  298. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +24 -24
  299. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +8 -8
  300. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +39 -39
  301. package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +73 -73
  302. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +26 -26
  303. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -17
  304. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +7 -7
  305. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +43 -43
  306. package/dist/types/components/wm-button/wm-button.d.ts +40 -40
  307. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +76 -76
  308. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +31 -31
  309. package/dist/types/components/wm-file/wm-file.d.ts +40 -40
  310. package/dist/types/components/wm-file-list/wm-file-list.d.ts +3 -3
  311. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  312. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +31 -31
  313. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +11 -11
  314. package/dist/types/components/wm-modal/wm-modal-header.d.ts +7 -7
  315. package/dist/types/components/wm-modal/wm-modal.d.ts +24 -24
  316. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +13 -13
  317. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +10 -10
  318. package/dist/types/components/wm-navigation/wm-navigation.d.ts +23 -23
  319. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +7 -7
  320. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +10 -10
  321. package/dist/types/components/wm-navigator/wm-navigator.d.ts +57 -57
  322. package/dist/types/components/wm-option/wm-option.d.ts +36 -36
  323. package/dist/types/components/wm-pagination/wm-pagination.d.ts +27 -27
  324. package/dist/types/components/wm-search/wm-search.d.ts +73 -73
  325. package/dist/types/components/wm-select/wm-select.d.ts +99 -99
  326. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +24 -24
  327. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +30 -30
  328. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +41 -41
  329. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +16 -16
  330. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +48 -48
  331. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +20 -20
  332. package/dist/types/components/wm-uploader/wm-uploader.d.ts +47 -47
  333. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +4 -4
  334. package/dist/types/components.d.ts +0 -382
  335. package/dist/types/global/__mocks__/functions.d.ts +1 -1
  336. package/dist/types/global/functions.d.ts +4 -4
  337. package/dist/types/global/interfaces.d.ts +49 -49
  338. package/dist/types/global/intl.d.ts +31 -31
  339. package/dist/types/global/services/__mocks__/http-service.d.ts +1 -1
  340. package/dist/types/stencil-public-runtime.d.ts +5 -46
  341. package/package.json +1 -1
  342. package/dist/cjs/chartFunctions-cecf8134.js +0 -600
  343. package/dist/cjs/interfaces-ad9e80a6.js +0 -38
  344. package/dist/cjs/intl-3fafc6d1.js +0 -179
  345. package/dist/esm/chartFunctions-23173fce.js +0 -584
  346. package/dist/esm/interfaces-9b75fb61.js +0 -35
  347. package/dist/esm/intl-05c9e0c9.js +0 -174
  348. package/dist/esm-es5/chartFunctions-23173fce.js +0 -1
  349. package/dist/esm-es5/functions-d0e70094.js +0 -1
  350. package/dist/esm-es5/global-08dce155.js +0 -1
  351. package/dist/esm-es5/index-f164fbca.js +0 -2
  352. package/dist/ripple/p-028ef6db.system.entry.js +0 -1
  353. package/dist/ripple/p-09d62ddd.entry.js +0 -1
  354. package/dist/ripple/p-0fe97e85.system.js +0 -2
  355. package/dist/ripple/p-1453ea51.system.entry.js +0 -1
  356. package/dist/ripple/p-17d3440b.system.js +0 -1
  357. package/dist/ripple/p-1cc91907.system.js +0 -1
  358. package/dist/ripple/p-30b17818.system.entry.js +0 -1
  359. package/dist/ripple/p-4de51706.js +0 -2
  360. package/dist/ripple/p-88406560.system.entry.js +0 -1
  361. package/dist/ripple/p-8f76a838.system.entry.js +0 -1
  362. package/dist/ripple/p-a99b05de.system.entry.js +0 -1
  363. package/dist/ripple/p-c18b398c.system.js +0 -1
  364. package/dist/ripple/p-c235754b.js +0 -1
  365. package/dist/ripple/p-d03095e7.system.js +0 -1
  366. /package/dist/esm-es5/{interfaces-9b75fb61.js → interfaces-89cad2fc.js} +0 -0
  367. /package/dist/ripple/{p-196eb2f3.js → p-c0c111fd.js} +0 -0
@@ -1,5 +1,4 @@
1
1
  const NAMESPACE = 'ripple';
2
- const BUILD = /* ripple */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: true, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
3
2
 
4
3
  /**
5
4
  * Virtual DOM patching algorithm based on Snabbdom by
@@ -32,13 +31,6 @@ const uniqueTime = (key, measureText) => {
32
31
  }
33
32
  };
34
33
  const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
35
- /**
36
- * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
37
- *
38
- * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
39
- * support as of Stencil v4.
40
- */
41
- const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
42
34
  const XLINK_NS = 'http://www.w3.org/1999/xlink';
43
35
  /**
44
36
  * Default style mode id
@@ -119,13 +111,13 @@ const h = (nodeName, vnodeData, ...children) => {
119
111
  };
120
112
  walk(children);
121
113
  if (vnodeData) {
114
+ // normalize class / classname attributes
122
115
  if (vnodeData.key) {
123
116
  key = vnodeData.key;
124
117
  }
125
118
  if (vnodeData.name) {
126
119
  slotName = vnodeData.name;
127
120
  }
128
- // normalize class / className attributes
129
121
  {
130
122
  const classData = vnodeData.className || vnodeData.class;
131
123
  if (classData) {
@@ -276,9 +268,9 @@ const registerStyle = (scopeId, cssText, allowCS) => {
276
268
  }
277
269
  styles.set(scopeId, style);
278
270
  };
279
- const addStyle = (styleContainerNode, cmpMeta, mode) => {
271
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
280
272
  var _a;
281
- const scopeId = getScopeId(cmpMeta);
273
+ let scopeId = getScopeId(cmpMeta);
282
274
  const style = styles.get(scopeId);
283
275
  // if an element is NOT connected then getRootNode() will return the wrong root node
284
276
  // so the fallback is to always use the document for the root node in those cases
@@ -293,8 +285,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
293
285
  }
294
286
  if (!appliedStyles.has(scopeId)) {
295
287
  {
296
- styleElm = doc.createElement('style');
297
- styleElm.innerHTML = style;
288
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
289
+ {
290
+ styleElm = doc.createElement('style');
291
+ styleElm.innerHTML = style;
292
+ }
298
293
  // Apply CSP nonce to the style tag if it exists
299
294
  const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
300
295
  if (nonce != null) {
@@ -302,10 +297,6 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
302
297
  }
303
298
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
304
299
  }
305
- // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
306
- if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
307
- styleElm.innerHTML += SLOT_FB_CSS;
308
- }
309
300
  if (appliedStyles) {
310
301
  appliedStyles.add(scopeId);
311
302
  }
@@ -323,6 +314,7 @@ const attachStyles = (hostRef) => {
323
314
  const flags = cmpMeta.$flags$;
324
315
  const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
325
316
  const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
317
+ // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
326
318
  if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
327
319
  // only required when we're NOT using native shadow dom (slot)
328
320
  // or this browser doesn't support native shadow dom
@@ -345,21 +337,6 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
345
337
  *
346
338
  * Modified for Stencil's compiler and vdom
347
339
  */
348
- /**
349
- * When running a VDom render set properties present on a VDom node onto the
350
- * corresponding HTML element.
351
- *
352
- * Note that this function has special functionality for the `class`,
353
- * `style`, `key`, and `ref` attributes, as well as event handlers (like
354
- * `onClick`, etc). All others are just passed through as-is.
355
- *
356
- * @param elm the HTMLElement onto which attributes should be set
357
- * @param memberName the name of the attribute to set
358
- * @param oldValue the old value for the attribute
359
- * @param newValue the new value for the attribute
360
- * @param isSvg whether we're in an svg context or not
361
- * @param flags bitflags for Vdom variables
362
- */
363
340
  const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
364
341
  if (oldValue !== newValue) {
365
342
  let isProp = isMemberInElement(elm, memberName);
@@ -436,19 +413,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
436
413
  // except for the first character, we keep the event name case
437
414
  memberName = ln[2] + memberName.slice(3);
438
415
  }
439
- if (oldValue || newValue) {
440
- // Need to account for "capture" events.
441
- // If the event name ends with "Capture", we'll update the name to remove
442
- // the "Capture" suffix and make sure the event listener is setup to handle the capture event.
443
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
444
- // Make sure we only replace the last instance of "Capture"
445
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
446
- if (oldValue) {
447
- plt.rel(elm, memberName, oldValue, capture);
448
- }
449
- if (newValue) {
450
- plt.ael(elm, memberName, newValue, capture);
451
- }
416
+ if (oldValue) {
417
+ plt.rel(elm, memberName, oldValue, false);
418
+ }
419
+ if (newValue) {
420
+ plt.ael(elm, memberName, newValue, false);
452
421
  }
453
422
  }
454
423
  else {
@@ -470,11 +439,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
470
439
  elm[memberName] = newValue;
471
440
  }
472
441
  }
473
- catch (e) {
474
- /**
475
- * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
476
- */
477
- }
442
+ catch (e) { }
478
443
  }
479
444
  /**
480
445
  * Need to manually update attribute if:
@@ -513,14 +478,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
513
478
  }
514
479
  };
515
480
  const parseClassListRegex = /\s/;
516
- /**
517
- * Parsed a string of classnames into an array
518
- * @param value className string, e.g. "foo bar baz"
519
- * @returns list of classes, e.g. ["foo", "bar", "baz"]
520
- */
521
481
  const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
522
- const CAPTURE_EVENT_SUFFIX = 'Capture';
523
- const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
524
482
  const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
525
483
  // if the element passed in is a shadow root, which is a document fragment
526
484
  // then we want to be adding attrs/props to the shadow root's "host" element
@@ -554,7 +512,6 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
554
512
  * @returns the newly created node
555
513
  */
556
514
  const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
557
- var _a;
558
515
  // tslint:disable-next-line: prefer-const
559
516
  const newVNode = newParentVNode.$children$[childIndex];
560
517
  let i = 0;
@@ -628,15 +585,11 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
628
585
  }
629
586
  }
630
587
  }
631
- // This needs to always happen so we can hide nodes that are projected
632
- // to another component but don't end up in a slot
633
- elm['s-hn'] = hostTagName;
634
588
  {
589
+ elm['s-hn'] = hostTagName;
635
590
  if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
636
591
  // remember the content reference comment
637
592
  elm['s-sr'] = true;
638
- // Persist the name of the slot that this slot was going to be projected into.
639
- elm['s-fs'] = (_a = newVNode.$attrs$) === null || _a === void 0 ? void 0 : _a.slot;
640
593
  // remember the content reference comment
641
594
  elm['s-cr'] = contentRef;
642
595
  // remember the slot name, or empty string for default slot
@@ -644,38 +597,30 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
644
597
  // check if we've got an old vnode for this slot
645
598
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
646
599
  if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
647
- {
648
- // we've got an old slot vnode and the wrapper is being replaced
649
- // so let's move the old slot content back to its original location
650
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
651
- }
600
+ // we've got an old slot vnode and the wrapper is being replaced
601
+ // so let's move the old slot content back to it's original location
602
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
652
603
  }
653
604
  }
654
605
  }
655
606
  return elm;
656
607
  };
657
608
  const putBackInOriginalLocation = (parentElm, recursive) => {
658
- var _a;
659
609
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
660
610
  const oldSlotChildNodes = parentElm.childNodes;
661
611
  for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
662
612
  const childNode = oldSlotChildNodes[i];
663
613
  if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
614
+ // // this child node in the old element is from another component
615
+ // // remove this node from the old slot's parent
616
+ // childNode.remove();
664
617
  // and relocate it back to it's original location
665
618
  parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
666
619
  // remove the old original location comment entirely
667
620
  // later on the patch function will know what to do
668
- // and move this to the correct spot if need be
621
+ // and move this to the correct spot in need be
669
622
  childNode['s-ol'].remove();
670
623
  childNode['s-ol'] = undefined;
671
- // Reset so we can correctly move the node around again.
672
- childNode['s-sh'] = undefined;
673
- // When putting an element node back in its original location,
674
- // we need to reset the `slot` attribute back to the value it originally had
675
- // so we can correctly relocate it again in the future
676
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
677
- childNode.setAttribute('slot', (_a = childNode['s-sn']) !== null && _a !== void 0 ? _a : '');
678
- }
679
624
  checkSlotRelocate = true;
680
625
  }
681
626
  if (recursive) {
@@ -1099,53 +1044,42 @@ const patch = (oldVNode, newVNode) => {
1099
1044
  elm.data = text;
1100
1045
  }
1101
1046
  };
1102
- /**
1103
- * Adjust the `.hidden` property as-needed on any nodes in a DOM subtree which
1104
- * are slot fallbacks nodes.
1105
- *
1106
- * A slot fallback node should be visible by default. Then, it should be
1107
- * conditionally hidden if:
1108
- *
1109
- * - it has a sibling with a `slot` property set to its slot name or if
1110
- * - it is a default fallback slot node, in which case we hide if it has any
1111
- * content
1112
- *
1113
- * @param elm the element of interest
1114
- */
1115
1047
  const updateFallbackSlotVisibility = (elm) => {
1048
+ // tslint:disable-next-line: prefer-const
1116
1049
  const childNodes = elm.childNodes;
1117
- for (const childNode of childNodes) {
1050
+ let childNode;
1051
+ let i;
1052
+ let ilen;
1053
+ let j;
1054
+ let slotNameAttr;
1055
+ let nodeType;
1056
+ for (i = 0, ilen = childNodes.length; i < ilen; i++) {
1057
+ childNode = childNodes[i];
1118
1058
  if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1119
1059
  if (childNode['s-sr']) {
1120
1060
  // this is a slot fallback node
1121
1061
  // get the slot name for this slot reference node
1122
- const slotName = childNode['s-sn'];
1062
+ slotNameAttr = childNode['s-sn'];
1123
1063
  // by default always show a fallback slot node
1124
1064
  // then hide it if there are other slots in the light dom
1125
1065
  childNode.hidden = false;
1126
- // we need to check all of its sibling nodes in order to see if
1127
- // `childNode` should be hidden
1128
- for (const siblingNode of childNodes) {
1129
- // Don't check the node against itself
1130
- if (siblingNode !== childNode) {
1131
- if (siblingNode['s-hn'] !== childNode['s-hn'] || slotName !== '') {
1132
- // this sibling node is from a different component OR is a named
1133
- // fallback slot node
1134
- if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
1135
- (slotName === siblingNode.getAttribute('slot') || slotName === siblingNode['s-sn'])) {
1136
- childNode.hidden = true;
1137
- break;
1138
- }
1066
+ for (j = 0; j < ilen; j++) {
1067
+ nodeType = childNodes[j].nodeType;
1068
+ if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
1069
+ // this sibling node is from a different component OR is a named fallback slot node
1070
+ if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
1071
+ childNode.hidden = true;
1072
+ break;
1139
1073
  }
1140
- else {
1141
- // this is a default fallback slot node
1142
- // any element or text node (with content)
1143
- // should hide the default fallback slot node
1144
- if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1145
- (siblingNode.nodeType === 3 /* NODE_TYPE.TextNode */ && siblingNode.textContent.trim() !== '')) {
1146
- childNode.hidden = true;
1147
- break;
1148
- }
1074
+ }
1075
+ else {
1076
+ // this is a default fallback slot node
1077
+ // any element or text node (with content)
1078
+ // should hide the default fallback slot node
1079
+ if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1080
+ (nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
1081
+ childNode.hidden = true;
1082
+ break;
1149
1083
  }
1150
1084
  }
1151
1085
  }
@@ -1155,67 +1089,45 @@ const updateFallbackSlotVisibility = (elm) => {
1155
1089
  }
1156
1090
  }
1157
1091
  };
1158
- /**
1159
- * Component-global information about nodes which are either currently being
1160
- * relocated or will be shortly.
1161
- */
1162
1092
  const relocateNodes = [];
1163
- /**
1164
- * Mark the contents of a slot for relocation via adding references to them to
1165
- * the {@link relocateNodes} data structure. The actual work of relocating them
1166
- * will then be handled in {@link renderVdom}.
1167
- *
1168
- * @param elm a render node whose child nodes need to be relocated
1169
- */
1170
- const markSlotContentForRelocation = (elm) => {
1093
+ const relocateSlotContent = (elm) => {
1171
1094
  // tslint:disable-next-line: prefer-const
1095
+ let childNode;
1172
1096
  let node;
1173
1097
  let hostContentNodes;
1098
+ let slotNameAttr;
1099
+ let relocateNodeData;
1174
1100
  let j;
1175
- for (const childNode of elm.childNodes) {
1176
- // we need to find child nodes which are slot references so we can then try
1177
- // to match them up with nodes that need to be relocated
1101
+ let i = 0;
1102
+ const childNodes = elm.childNodes;
1103
+ const ilen = childNodes.length;
1104
+ for (; i < ilen; i++) {
1105
+ childNode = childNodes[i];
1178
1106
  if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
1179
- // first get the content reference comment node ('s-cr'), then we get
1180
- // its parent, which is where all the host content is now
1107
+ // first got the content reference comment node
1108
+ // then we got it's parent, which is where all the host content is in now
1181
1109
  hostContentNodes = node.parentNode.childNodes;
1182
- const slotName = childNode['s-sn'];
1183
- // iterate through all the nodes under the location where the host was
1184
- // originally rendered
1110
+ slotNameAttr = childNode['s-sn'];
1185
1111
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1186
1112
  node = hostContentNodes[j];
1187
- // check that the node is not a content reference node or a node
1188
- // reference and then check that the host name does not match that of
1189
- // childNode.
1190
- // In addition, check that the slot either has not already been relocated, or
1191
- // that its current location's host is not childNode's host. This is essentially
1192
- // a check so that we don't try to relocate (and then hide) a node that is already
1193
- // where it should be.
1194
- if (!node['s-cn'] &&
1195
- !node['s-nr'] &&
1196
- node['s-hn'] !== childNode['s-hn'] &&
1197
- (!BUILD.experimentalSlotFixes )) {
1198
- // if `node` is located in the slot that `childNode` refers to (via the
1199
- // `'s-sn'` property) then we need to relocate it from it's current spot
1200
- // (under the host element parent) to the right slot location
1201
- if (isNodeLocatedInSlot(node, slotName)) {
1113
+ if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
1114
+ // let's do some relocating to its new home
1115
+ // but never relocate a content reference node
1116
+ // that is suppose to always represent the original content location
1117
+ if (isNodeLocatedInSlot(node, slotNameAttr)) {
1202
1118
  // it's possible we've already decided to relocate this node
1203
- let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1119
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1204
1120
  // made some changes to slots
1205
1121
  // let's make sure we also double check
1206
1122
  // fallbacks are correctly hidden or shown
1207
1123
  checkSlotFallbackVisibility = true;
1208
- // ensure that the slot-name attr is correct
1209
- node['s-sn'] = node['s-sn'] || slotName;
1124
+ node['s-sn'] = node['s-sn'] || slotNameAttr;
1210
1125
  if (relocateNodeData) {
1211
- relocateNodeData.$nodeToRelocate$['s-sh'] = childNode['s-hn'];
1212
- // we marked this node for relocation previously but didn't find
1213
- // out the slot reference node to which it needs to be relocated
1214
- // so write it down now!
1126
+ // previously we never found a slot home for this node
1127
+ // but turns out we did, so let's remember it now
1215
1128
  relocateNodeData.$slotRefNode$ = childNode;
1216
1129
  }
1217
1130
  else {
1218
- node['s-sh'] = childNode['s-hn'];
1219
1131
  // add to our list of nodes to relocate
1220
1132
  relocateNodes.push({
1221
1133
  $slotRefNode$: childNode,
@@ -1234,10 +1146,8 @@ const markSlotContentForRelocation = (elm) => {
1234
1146
  }
1235
1147
  }
1236
1148
  else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1237
- // the node is not found within the slot (`childNode`) that we're
1238
- // currently looking at, so we stick it into `relocateNodes` to
1239
- // handle later. If we never find a home for this element then
1240
- // we'll need to hide it
1149
+ // so far this element does not have a slot home, not setting slotRefNode on purpose
1150
+ // if we never find a home for this element then we'll need to hide it
1241
1151
  relocateNodes.push({
1242
1152
  $nodeToRelocate$: node,
1243
1153
  });
@@ -1245,41 +1155,30 @@ const markSlotContentForRelocation = (elm) => {
1245
1155
  }
1246
1156
  }
1247
1157
  }
1248
- // if we're dealing with any type of element (capable of itself being a
1249
- // slot reference or containing one) then we recur
1250
1158
  if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1251
- markSlotContentForRelocation(childNode);
1159
+ relocateSlotContent(childNode);
1252
1160
  }
1253
1161
  }
1254
1162
  };
1255
- /**
1256
- * Check whether a node is located in a given named slot.
1257
- *
1258
- * @param nodeToRelocate the node of interest
1259
- * @param slotName the slot name to check
1260
- * @returns whether the node is located in the slot or not
1261
- */
1262
- const isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1163
+ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1263
1164
  if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1264
- if (nodeToRelocate.getAttribute('slot') === null && slotName === '') {
1265
- // if the node doesn't have a slot attribute, and the slot we're checking
1266
- // is not a named slot, then we assume the node should be within the slot
1165
+ if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
1267
1166
  return true;
1268
1167
  }
1269
- if (nodeToRelocate.getAttribute('slot') === slotName) {
1168
+ if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
1270
1169
  return true;
1271
1170
  }
1272
1171
  return false;
1273
1172
  }
1274
- if (nodeToRelocate['s-sn'] === slotName) {
1173
+ if (nodeToRelocate['s-sn'] === slotNameAttr) {
1275
1174
  return true;
1276
1175
  }
1277
- return slotName === '';
1176
+ return slotNameAttr === '';
1278
1177
  };
1279
1178
  /**
1280
- * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
1281
- * them with `null`. This signals that the DOM element corresponding to the VDom
1282
- * node has been removed from the DOM.
1179
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
1180
+ * calling them with `null`. This signals that the DOM element corresponding to
1181
+ * the VDom node has been removed from the DOM.
1283
1182
  *
1284
1183
  * @param vNode a virtual DOM node
1285
1184
  */
@@ -1300,45 +1199,17 @@ const nullifyVNodeRefs = (vNode) => {
1300
1199
  * @param hostRef data needed to root and render the virtual DOM tree, such as
1301
1200
  * the DOM node into which it should be rendered.
1302
1201
  * @param renderFnResults the virtual DOM nodes to be rendered
1303
- * @param isInitialLoad whether or not this is the first call after page load
1304
1202
  */
1305
- const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1306
- var _a, _b, _c, _d;
1203
+ const renderVdom = (hostRef, renderFnResults) => {
1307
1204
  const hostElm = hostRef.$hostElement$;
1308
1205
  const cmpMeta = hostRef.$cmpMeta$;
1309
1206
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1310
- // if `renderFnResults` is a Host node then we can use it directly. If not,
1311
- // we need to call `h` again to wrap the children of our component in a
1312
- // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
1313
- // implicitly that the top-level vdom node is 1) an only child and 2)
1314
- // contains attrs that need to be set on the host element.
1315
1207
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1316
1208
  hostTagName = hostElm.tagName;
1317
1209
  if (cmpMeta.$attrsToReflect$) {
1318
1210
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1319
1211
  cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1320
1212
  }
1321
- // On the first render and *only* on the first render we want to check for
1322
- // any attributes set on the host element which are also set on the vdom
1323
- // node. If we find them, we override the value on the VDom node attrs with
1324
- // the value from the host element, which allows developers building apps
1325
- // with Stencil components to override e.g. the `role` attribute on a
1326
- // component even if it's already set on the `Host`.
1327
- if (isInitialLoad && rootVnode.$attrs$) {
1328
- for (const key of Object.keys(rootVnode.$attrs$)) {
1329
- // We have a special implementation in `setAccessor` for `style` and
1330
- // `class` which reconciles values coming from the VDom with values
1331
- // already present on the DOM element, so we don't want to override those
1332
- // attributes on the VDom tree with values from the host element if they
1333
- // are present.
1334
- //
1335
- // Likewise, `ref` and `key` are special internal values for the Stencil
1336
- // runtime and we don't want to override those either.
1337
- if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
1338
- rootVnode.$attrs$[key] = hostElm[key];
1339
- }
1340
- }
1341
- }
1342
1213
  rootVnode.$tag$ = null;
1343
1214
  rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1344
1215
  hostRef.$vnode$ = rootVnode;
@@ -1359,48 +1230,43 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1359
1230
  // the disconnectCallback from working
1360
1231
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1361
1232
  if (checkSlotRelocate) {
1362
- markSlotContentForRelocation(rootVnode.$elm$);
1363
- for (const relocateData of relocateNodes) {
1364
- const nodeToRelocate = relocateData.$nodeToRelocate$;
1233
+ relocateSlotContent(rootVnode.$elm$);
1234
+ let relocateData;
1235
+ let nodeToRelocate;
1236
+ let orgLocationNode;
1237
+ let parentNodeRef;
1238
+ let insertBeforeNode;
1239
+ let refNode;
1240
+ let i = 0;
1241
+ for (; i < relocateNodes.length; i++) {
1242
+ relocateData = relocateNodes[i];
1243
+ nodeToRelocate = relocateData.$nodeToRelocate$;
1365
1244
  if (!nodeToRelocate['s-ol']) {
1366
1245
  // add a reference node marking this node's original location
1367
1246
  // keep a reference to this node for later lookups
1368
- const orgLocationNode = doc.createTextNode('');
1247
+ orgLocationNode =
1248
+ doc.createTextNode('');
1369
1249
  orgLocationNode['s-nr'] = nodeToRelocate;
1370
1250
  nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1371
1251
  }
1372
1252
  }
1373
- for (const relocateData of relocateNodes) {
1374
- const nodeToRelocate = relocateData.$nodeToRelocate$;
1375
- const slotRefNode = relocateData.$slotRefNode$;
1376
- if (slotRefNode) {
1377
- const parentNodeRef = slotRefNode.parentNode;
1378
- // When determining where to insert content, the most simple case would be
1379
- // to relocate the node immediately following the slot reference node. We do this
1380
- // by getting a reference to the node immediately following the slot reference node
1381
- // since we will use `insertBefore` to manipulate the DOM.
1382
- //
1383
- // If there is no node immediately following the slot reference node, then we will just
1384
- // end up appending the node as the last child of the parent.
1385
- let insertBeforeNode = slotRefNode.nextSibling;
1386
- // If the node we're currently planning on inserting the new node before is an element,
1387
- // we need to do some additional checks to make sure we're inserting the node in the correct order.
1388
- // The use case here would be that we have multiple nodes being relocated to the same slot. So, we want
1389
- // to make sure they get inserted into their new how in the same order they were declared in their original location.
1390
- //
1391
- // TODO(STENCIL-914): Remove `experimentalSlotFixes` check
1392
- {
1393
- let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
1394
- while (orgLocationNode) {
1395
- let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
1396
- if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1397
- refNode = refNode.nextSibling;
1398
- if (!refNode || !refNode['s-nr']) {
1399
- insertBeforeNode = refNode;
1400
- break;
1401
- }
1253
+ for (i = 0; i < relocateNodes.length; i++) {
1254
+ relocateData = relocateNodes[i];
1255
+ nodeToRelocate = relocateData.$nodeToRelocate$;
1256
+ if (relocateData.$slotRefNode$) {
1257
+ // by default we're just going to insert it directly
1258
+ // after the slot reference node
1259
+ parentNodeRef = relocateData.$slotRefNode$.parentNode;
1260
+ insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
1261
+ orgLocationNode = nodeToRelocate['s-ol'];
1262
+ while ((orgLocationNode = orgLocationNode.previousSibling)) {
1263
+ refNode = orgLocationNode['s-nr'];
1264
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1265
+ refNode = refNode.nextSibling;
1266
+ if (!refNode || !refNode['s-nr']) {
1267
+ insertBeforeNode = refNode;
1268
+ break;
1402
1269
  }
1403
- orgLocationNode = orgLocationNode.previousSibling;
1404
1270
  }
1405
1271
  }
1406
1272
  if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
@@ -1410,32 +1276,17 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1410
1276
  // has a different next sibling or parent relocated
1411
1277
  if (nodeToRelocate !== insertBeforeNode) {
1412
1278
  if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1413
- // probably a component in the index.html that doesn't have its hostname set
1279
+ // probably a component in the index.html that doesn't have it's hostname set
1414
1280
  nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1415
1281
  }
1416
- // Add it back to the dom but in its new home
1417
- // If we get to this point and `insertBeforeNode` is `null`, that means
1418
- // we're just going to append the node as the last child of the parent. Passing
1419
- // `null` as the second arg here will trigger that behavior.
1282
+ // add it back to the dom but in its new home
1420
1283
  parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1421
- // Reset the `hidden` value back to what it was defined as originally
1422
- // This solves a problem where a `slot` is dynamically rendered and `hidden` may have
1423
- // been set on content originally, but now it has a slot to go to so it should have
1424
- // the value it was defined as having in the DOM, not what we overrode it to.
1425
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1426
- nodeToRelocate.hidden = (_c = nodeToRelocate['s-ih']) !== null && _c !== void 0 ? _c : false;
1427
- }
1428
1284
  }
1429
1285
  }
1430
1286
  }
1431
1287
  else {
1432
1288
  // this node doesn't have a slot home to go to, so let's hide it
1433
1289
  if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1434
- // Store the initial value of `hidden` so we can reset it later when
1435
- // moving nodes around.
1436
- if (isInitialLoad) {
1437
- nodeToRelocate['s-ih'] = (_d = nodeToRelocate.hidden) !== null && _d !== void 0 ? _d : false;
1438
- }
1439
1290
  nodeToRelocate.hidden = true;
1440
1291
  }
1441
1292
  }
@@ -1556,16 +1407,6 @@ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.th
1556
1407
  */
1557
1408
  const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1558
1409
  (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1559
- /**
1560
- * Update a component given reference to its host elements and so on.
1561
- *
1562
- * @param hostRef an object containing references to the element's host node,
1563
- * VDom nodes, and other metadata
1564
- * @param instance a reference to the underlying host element where it will be
1565
- * rendered
1566
- * @param isInitialLoad whether or not this function is being called as part of
1567
- * the first render cycle
1568
- */
1569
1410
  const updateComponent = async (hostRef, instance, isInitialLoad) => {
1570
1411
  var _a;
1571
1412
  const elm = hostRef.$hostElement$;
@@ -1577,7 +1418,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1577
1418
  }
1578
1419
  const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1579
1420
  {
1580
- callRender(hostRef, instance, elm, isInitialLoad);
1421
+ callRender(hostRef, instance);
1581
1422
  }
1582
1423
  if (rc) {
1583
1424
  // ok, so turns out there are some child host elements
@@ -1601,24 +1442,8 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1601
1442
  }
1602
1443
  }
1603
1444
  };
1604
- /**
1605
- * Handle making the call to the VDom renderer with the proper context given
1606
- * various build variables
1607
- *
1608
- * @param hostRef an object containing references to the element's host node,
1609
- * VDom nodes, and other metadata
1610
- * @param instance a reference to the underlying host element where it will be
1611
- * rendered
1612
- * @param elm the Host element for the component
1613
- * @param isInitialLoad whether or not this function is being called as part of
1614
- * @returns an empty promise
1615
- */
1616
- const callRender = (hostRef, instance, elm, isInitialLoad) => {
1445
+ const callRender = (hostRef, instance, elm) => {
1617
1446
  try {
1618
- /**
1619
- * minification optimization: `allRenderFn` is `true` if all components have a `render`
1620
- * method, so we can call the method immediately. If not, check before calling it.
1621
- */
1622
1447
  instance = instance.render && instance.render();
1623
1448
  {
1624
1449
  hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
@@ -1632,7 +1457,7 @@ const callRender = (hostRef, instance, elm, isInitialLoad) => {
1632
1457
  // or we need to update the css class/attrs on the host element
1633
1458
  // DOM WRITE!
1634
1459
  {
1635
- renderVdom(hostRef, instance, isInitialLoad);
1460
+ renderVdom(hostRef, instance);
1636
1461
  }
1637
1462
  }
1638
1463
  }
@@ -1713,16 +1538,6 @@ const appDidLoad = (who) => {
1713
1538
  }
1714
1539
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1715
1540
  };
1716
- /**
1717
- * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
1718
- * e.g. custom element node. If a build figures out that e.g. no component
1719
- * has a `componentDidLoad` method, the instance method gets removed from the
1720
- * output bundle and this function returns `undefined`.
1721
- * @param instance any object that may or may not contain methods
1722
- * @param method method name
1723
- * @param arg single arbitrary argument
1724
- * @returns result of method call if it exists, otherwise `undefined`
1725
- */
1726
1541
  const safeCall = (instance, method, arg) => {
1727
1542
  if (instance && instance[method]) {
1728
1543
  try {
@@ -1790,14 +1605,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1790
1605
  * @returns a reference to the same constructor passed in (but now mutated)
1791
1606
  */
1792
1607
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1793
- var _a;
1794
- const prototype = Cstr.prototype;
1795
1608
  if (cmpMeta.$members$) {
1796
1609
  if (Cstr.watchers) {
1797
1610
  cmpMeta.$watchers$ = Cstr.watchers;
1798
1611
  }
1799
1612
  // It's better to have a const than two Object.entries()
1800
1613
  const members = Object.entries(cmpMeta.$members$);
1614
+ const prototype = Cstr.prototype;
1801
1615
  members.map(([memberName, [memberFlags]]) => {
1802
1616
  if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1803
1617
  ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
@@ -1820,18 +1634,16 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1820
1634
  // proxyComponent - method
1821
1635
  Object.defineProperty(prototype, memberName, {
1822
1636
  value(...args) {
1823
- var _a;
1824
1637
  const ref = getHostRef(this);
1825
- return (_a = ref === null || ref === void 0 ? void 0 : ref.$onInstancePromise$) === null || _a === void 0 ? void 0 : _a.then(() => { var _a; return (_a = ref.$lazyInstance$) === null || _a === void 0 ? void 0 : _a[memberName](...args); });
1638
+ return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
1826
1639
  },
1827
1640
  });
1828
1641
  }
1829
1642
  });
1830
1643
  if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1831
1644
  const attrNameToPropName = new Map();
1832
- prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1645
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1833
1646
  plt.jmp(() => {
1834
- var _a;
1835
1647
  const propName = attrNameToPropName.get(attrName);
1836
1648
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1837
1649
  // in the case where an attribute was set inline.
@@ -1853,12 +1665,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1853
1665
  // customElements.define('my-component', MyComponent);
1854
1666
  // </script>
1855
1667
  // ```
1856
- // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
1668
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1857
1669
  // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1858
1670
  // to the value that was set inline i.e. "some-value" from above example. When
1859
- // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
1671
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1860
1672
  //
1861
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
1673
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1862
1674
  // by connectedCallback as this attributeChangedCallback will not fire.
1863
1675
  //
1864
1676
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
@@ -1878,67 +1690,26 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1878
1690
  // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1879
1691
  return;
1880
1692
  }
1881
- else if (propName == null) {
1882
- // At this point we should know this is not a "member", so we can treat it like watching an attribute
1883
- // on a vanilla web component
1884
- const hostRef = getHostRef(this);
1885
- const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
1886
- // We only want to trigger the callback(s) if:
1887
- // 1. The instance is ready
1888
- // 2. The watchers are ready
1889
- // 3. The value has changed
1890
- if (flags &&
1891
- !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1892
- flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1893
- newValue !== oldValue) {
1894
- const instance = hostRef.$lazyInstance$ ;
1895
- const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
1896
- entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1897
- if (instance[callbackName] != null) {
1898
- instance[callbackName].call(instance, newValue, oldValue, attrName);
1899
- }
1900
- });
1901
- }
1902
- return;
1903
- }
1904
1693
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1905
1694
  });
1906
1695
  };
1907
- // Create an array of attributes to observe
1908
- // This list in comprised of all strings used within a `@Watch()` decorator
1909
- // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1910
- // As such, there is no way to guarantee type-safety here that a user hasn't entered
1911
- // an invalid attribute.
1912
- Cstr.observedAttributes = Array.from(new Set([
1913
- ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1914
- ...members
1915
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1916
- .map(([propName, m]) => {
1917
- var _a;
1918
- const attrName = m[1] || propName;
1919
- attrNameToPropName.set(attrName, propName);
1920
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1921
- (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
1922
- }
1923
- return attrName;
1924
- }),
1925
- ]));
1696
+ // create an array of attributes to observe
1697
+ // and also create a map of html attribute name to js property name
1698
+ Cstr.observedAttributes = members
1699
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1700
+ .map(([propName, m]) => {
1701
+ const attrName = m[1] || propName;
1702
+ attrNameToPropName.set(attrName, propName);
1703
+ if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1704
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1705
+ }
1706
+ return attrName;
1707
+ });
1926
1708
  }
1927
1709
  }
1928
1710
  return Cstr;
1929
1711
  };
1930
- /**
1931
- * Initialize a Stencil component given a reference to its host element, its
1932
- * runtime bookkeeping data structure, runtime metadata about the component,
1933
- * and (optionally) an HMR version ID.
1934
- *
1935
- * @param elm a host element
1936
- * @param hostRef the element's runtime bookkeeping object
1937
- * @param cmpMeta runtime metadata for the Stencil component
1938
- * @param hmrVersionId an (optional) HMR version ID
1939
- */
1940
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1941
- let Cstr;
1712
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1942
1713
  // initializeComponent
1943
1714
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1944
1715
  // Let the runtime know that the component has been initialized
@@ -2016,8 +1787,6 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2016
1787
  schedule();
2017
1788
  }
2018
1789
  };
2019
- const fireConnectedCallback = (instance) => {
2020
- };
2021
1790
  const connectedCallback = (elm) => {
2022
1791
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
2023
1792
  const hostRef = getHostRef(elm);
@@ -2031,7 +1800,7 @@ const connectedCallback = (elm) => {
2031
1800
  // if the slot polyfill is required we'll need to put some nodes
2032
1801
  // in here to act as original content anchors as we move nodes around
2033
1802
  // host element has been connected to the DOM
2034
- if ((// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
1803
+ if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
2035
1804
  cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
2036
1805
  setContentReference(elm);
2037
1806
  }
@@ -2071,11 +1840,6 @@ const connectedCallback = (elm) => {
2071
1840
  // reattach any event listeners to the host
2072
1841
  // since they would have been removed when disconnected
2073
1842
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
2074
- // fire off connectedCallback() on component instance
2075
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
2076
- else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
2077
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
2078
- }
2079
1843
  }
2080
1844
  endConnected();
2081
1845
  }
@@ -2091,9 +1855,7 @@ const setContentReference = (elm) => {
2091
1855
  contentRefElm['s-cn'] = true;
2092
1856
  elm.insertBefore(contentRefElm, elm.firstChild);
2093
1857
  };
2094
- const disconnectInstance = (instance) => {
2095
- };
2096
- const disconnectedCallback = async (elm) => {
1858
+ const disconnectedCallback = (elm) => {
2097
1859
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
2098
1860
  const hostRef = getHostRef(elm);
2099
1861
  {
@@ -2102,10 +1864,6 @@ const disconnectedCallback = async (elm) => {
2102
1864
  hostRef.$rmListeners$ = undefined;
2103
1865
  }
2104
1866
  }
2105
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
2106
- else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
2107
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
2108
- }
2109
1867
  }
2110
1868
  };
2111
1869
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -2116,27 +1874,20 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2116
1874
  const customElements = win.customElements;
2117
1875
  const head = doc.head;
2118
1876
  const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
2119
- const dataStyles = /*@__PURE__*/ doc.createElement('style');
1877
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
2120
1878
  const deferredConnectedCallbacks = [];
2121
1879
  let appLoadFallback;
2122
1880
  let isBootstrapping = true;
2123
1881
  Object.assign(plt, options);
2124
1882
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
2125
- let hasSlotRelocation = false;
2126
1883
  lazyBundles.map((lazyBundle) => {
2127
1884
  lazyBundle[1].map((compactMeta) => {
2128
- var _a;
2129
1885
  const cmpMeta = {
2130
1886
  $flags$: compactMeta[0],
2131
1887
  $tagName$: compactMeta[1],
2132
1888
  $members$: compactMeta[2],
2133
1889
  $listeners$: compactMeta[3],
2134
1890
  };
2135
- // Check if we are using slots outside the shadow DOM in this component.
2136
- // We'll use this information later to add styles for `slot-fb` elements
2137
- if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
2138
- hasSlotRelocation = true;
2139
- }
2140
1891
  {
2141
1892
  cmpMeta.$members$ = compactMeta[2];
2142
1893
  }
@@ -2147,7 +1898,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2147
1898
  cmpMeta.$attrsToReflect$ = [];
2148
1899
  }
2149
1900
  {
2150
- cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
1901
+ cmpMeta.$watchers$ = {};
2151
1902
  }
2152
1903
  const tagName = cmpMeta.$tagName$;
2153
1904
  const HostElement = class extends HTMLElement {
@@ -2199,25 +1950,15 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2199
1950
  }
2200
1951
  });
2201
1952
  });
2202
- // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
2203
- if (hasSlotRelocation) {
2204
- dataStyles.innerHTML += SLOT_FB_CSS;
2205
- }
2206
- // Add hydration styles
2207
1953
  {
2208
- dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
2209
- }
2210
- // If we have styles, add them to the DOM
2211
- if (dataStyles.innerHTML.length) {
2212
- dataStyles.setAttribute('data-styles', '');
1954
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1955
+ visibilityStyle.setAttribute('data-styles', '');
2213
1956
  // Apply CSP nonce to the style tag if it exists
2214
1957
  const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
2215
1958
  if (nonce != null) {
2216
- dataStyles.setAttribute('nonce', nonce);
1959
+ visibilityStyle.setAttribute('nonce', nonce);
2217
1960
  }
2218
- // Insert the styles into the document head
2219
- // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
2220
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1961
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
2221
1962
  }
2222
1963
  // Process deferred connectedCallbacks now all components have been registered
2223
1964
  isBootstrapping = false;
@@ -2275,40 +2016,13 @@ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !==
2275
2016
  * @returns void
2276
2017
  */
2277
2018
  const setNonce = (nonce) => (plt.$nonce$ = nonce);
2278
- /**
2279
- * A WeakMap mapping runtime component references to their corresponding host reference
2280
- * instances.
2281
- */
2282
2019
  const hostRefs = /*@__PURE__*/ new WeakMap();
2283
- /**
2284
- * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
2285
- *
2286
- * @param ref the runtime ref of interest
2287
- * @returns the Host reference (if found) or undefined
2288
- */
2289
2020
  const getHostRef = (ref) => hostRefs.get(ref);
2290
- /**
2291
- * Register a lazy instance with the {@link hostRefs} object so it's
2292
- * corresponding {@link d.HostRef} can be retrieved later.
2293
- *
2294
- * @param lazyInstance the lazy instance of interest
2295
- * @param hostRef that instances `HostRef` object
2296
- * @returns a reference to the host ref WeakMap
2297
- */
2298
2021
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
2299
- /**
2300
- * Register a host element for a Stencil component, setting up various metadata
2301
- * and callbacks based on {@link BUILD} flags as well as the component's runtime
2302
- * metadata.
2303
- *
2304
- * @param hostElement the host element to register
2305
- * @param cmpMeta runtime metadata for that component
2306
- * @returns a reference to the host ref WeakMap
2307
- */
2308
- const registerHost = (hostElement, cmpMeta) => {
2022
+ const registerHost = (elm, cmpMeta) => {
2309
2023
  const hostRef = {
2310
2024
  $flags$: 0,
2311
- $hostElement$: hostElement,
2025
+ $hostElement$: elm,
2312
2026
  $cmpMeta$: cmpMeta,
2313
2027
  $instanceValues$: new Map(),
2314
2028
  };
@@ -2317,11 +2031,11 @@ const registerHost = (hostElement, cmpMeta) => {
2317
2031
  }
2318
2032
  {
2319
2033
  hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2320
- hostElement['s-p'] = [];
2321
- hostElement['s-rc'] = [];
2034
+ elm['s-p'] = [];
2035
+ elm['s-rc'] = [];
2322
2036
  }
2323
- addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
2324
- return hostRefs.set(hostElement, hostRef);
2037
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
2038
+ return hostRefs.set(elm, hostRef);
2325
2039
  };
2326
2040
  const isMemberInElement = (elm, memberName) => memberName in elm;
2327
2041
  const consoleError = (e, el) => (0, console.error)(e, el);
@@ -2409,7 +2123,7 @@ const flush = () => {
2409
2123
  }
2410
2124
  }
2411
2125
  };
2412
- const nextTick = (cb) => promiseResolve().then(cb);
2126
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2413
2127
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2414
2128
 
2415
2129
  export { Host as H, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };