@revolist/revogrid 3.6.4 → 3.6.5

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 (451) hide show
  1. package/custom-element/_baseIteratee.js +1 -3
  2. package/custom-element/columnService.js +4 -6
  3. package/custom-element/consts.js +1 -3
  4. package/custom-element/data.store.js +33 -55
  5. package/custom-element/debounce.js +1 -3
  6. package/custom-element/dimension.helpers.js +1 -3
  7. package/custom-element/each.js +0 -2
  8. package/custom-element/filter.button.js +0 -2
  9. package/custom-element/identity.js +0 -2
  10. package/custom-element/index.d.ts +16 -9
  11. package/custom-element/index.js +15 -4
  12. package/custom-element/isSymbol.js +1 -3
  13. package/custom-element/keys.js +1 -3
  14. package/custom-element/localScrollService.js +0 -2
  15. package/custom-element/resize-observer.js +3 -5
  16. package/custom-element/revo-grid.js +154 -29
  17. package/custom-element/revogr-clipboard.js +4 -4
  18. package/custom-element/revogr-data.js +0 -2
  19. package/custom-element/revogr-data2.js +3 -14
  20. package/custom-element/revogr-edit.js +0 -2
  21. package/custom-element/revogr-edit2.js +3 -7
  22. package/custom-element/revogr-filter-panel.js +6 -10
  23. package/custom-element/revogr-focus.js +0 -2
  24. package/custom-element/revogr-focus2.js +2 -8
  25. package/custom-element/revogr-header.js +0 -2
  26. package/custom-element/revogr-header2.js +3 -11
  27. package/custom-element/revogr-order-editor.js +0 -2
  28. package/custom-element/revogr-order-editor2.js +3 -8
  29. package/custom-element/revogr-overlay-selection.js +0 -2
  30. package/custom-element/revogr-overlay-selection2.js +3 -15
  31. package/custom-element/revogr-row-headers.js +0 -2
  32. package/custom-element/revogr-row-headers2.js +2 -9
  33. package/custom-element/revogr-scroll-virtual.js +0 -2
  34. package/custom-element/revogr-scroll-virtual2.js +2 -5
  35. package/custom-element/revogr-temp-range.js +0 -2
  36. package/custom-element/revogr-temp-range2.js +4 -8
  37. package/custom-element/revogr-viewport-scroll.js +0 -2
  38. package/custom-element/revogr-viewport-scroll2.js +11 -6
  39. package/custom-element/selection.utils.js +0 -2
  40. package/custom-element/toInteger.js +0 -2
  41. package/custom-element/toNumber.js +1 -3
  42. package/custom-element/utils.js +0 -2
  43. package/dist/cjs/css-shim-9f5bc84d.js +9 -0
  44. package/dist/cjs/{debounce-25dce8a1.js → debounce-6cea2774.js} +1 -3
  45. package/dist/cjs/dom-fcb646f0.js +78 -0
  46. package/dist/cjs/{index-5f3dfe40.js → index-cb904e00.js} +283 -577
  47. package/dist/cjs/index.cjs.js +0 -2
  48. package/dist/cjs/loader.cjs.js +16 -5
  49. package/dist/cjs/{resize-observer-7f159b88.js → resize-observer-bf327d6a.js} +3 -5
  50. package/dist/cjs/revo-grid.cjs.js +59 -11
  51. package/dist/cjs/revo-grid_11.cjs.entry.js +144 -143
  52. package/dist/cjs/revogr-clipboard.cjs.entry.js +3 -4
  53. package/dist/cjs/revogr-filter-panel.cjs.entry.js +6 -11
  54. package/dist/collection/collection-manifest.json +2 -2
  55. package/dist/collection/components/button/button.js +0 -1
  56. package/dist/collection/components/clipboard/revogr-clipboard.js +80 -82
  57. package/dist/collection/components/data/cellRenderer.js +2 -2
  58. package/dist/collection/components/data/columnService.js +3 -4
  59. package/dist/collection/components/data/revogr-data.js +219 -240
  60. package/dist/collection/components/data/rowRenderer.js +0 -1
  61. package/dist/collection/components/header/headerCellRenderer.js +3 -2
  62. package/dist/collection/components/header/headerRenderer.js +3 -2
  63. package/dist/collection/components/header/revogr-header.js +229 -244
  64. package/dist/collection/components/order/orderRenderer.js +5 -2
  65. package/dist/collection/components/order/revogr-order-editor.js +248 -257
  66. package/dist/collection/components/order/rowOrderService.js +0 -1
  67. package/dist/collection/components/overlay/autofill.service.js +0 -1
  68. package/dist/collection/components/overlay/clipboard.service.js +0 -1
  69. package/dist/collection/components/overlay/editors/edit.utils.js +0 -1
  70. package/dist/collection/components/overlay/editors/text.js +0 -1
  71. package/dist/collection/components/overlay/keyboard.service.js +0 -1
  72. package/dist/collection/components/overlay/revogr-edit.js +94 -106
  73. package/dist/collection/components/overlay/revogr-overlay-selection.js +466 -488
  74. package/dist/collection/components/overlay/selection.utils.js +0 -1
  75. package/dist/collection/components/revo-grid/revo-grid-style.css +13 -7
  76. package/dist/collection/components/revo-grid/revo-grid.js +1615 -1562
  77. package/dist/collection/components/revo-grid/viewport.helpers.js +0 -1
  78. package/dist/collection/components/revo-grid/viewport.interfaces.js +3 -1
  79. package/dist/collection/components/revo-grid/viewport.js +5 -2
  80. package/dist/collection/components/revo-grid/viewport.resize.service.js +0 -1
  81. package/dist/collection/components/revo-grid/viewport.scrolling.service.js +0 -1
  82. package/dist/collection/components/revo-grid/viewport.section.js +4 -2
  83. package/dist/collection/components/revo-grid/viewport.service.js +0 -1
  84. package/dist/collection/components/rowHeaders/revogr-row-headers.js +142 -151
  85. package/dist/collection/components/rowHeaders/row-header-render.js +0 -1
  86. package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +4 -2
  87. package/dist/collection/components/scroll/revogr-viewport-scroll.js +164 -161
  88. package/dist/collection/components/scrollable/revogr-scroll-virtual.js +135 -147
  89. package/dist/collection/components/selection-focus/revogr-focus.js +125 -141
  90. package/dist/collection/components/selection-temp-range/revogr-temp-range-style.css +1 -1
  91. package/dist/collection/components/selection-temp-range/revogr-temp-range.js +74 -83
  92. package/dist/collection/global/global.js +0 -1
  93. package/dist/collection/index.js +0 -1
  94. package/dist/collection/plugins/autoSizeColumn.js +0 -1
  95. package/dist/collection/plugins/basePlugin.js +0 -1
  96. package/dist/collection/plugins/dispatcher.js +0 -1
  97. package/dist/collection/plugins/export/csv.js +0 -1
  98. package/dist/collection/plugins/export/export.plugin.js +0 -1
  99. package/dist/collection/plugins/export/types.js +3 -1
  100. package/dist/collection/plugins/filter/conditions/equal.js +0 -1
  101. package/dist/collection/plugins/filter/conditions/number/greaterThan.js +0 -1
  102. package/dist/collection/plugins/filter/conditions/number/greaterThanOrEqual.js +0 -1
  103. package/dist/collection/plugins/filter/conditions/number/lessThan.js +0 -1
  104. package/dist/collection/plugins/filter/conditions/number/lessThanOrEqual.js +0 -1
  105. package/dist/collection/plugins/filter/conditions/set.js +0 -1
  106. package/dist/collection/plugins/filter/conditions/string/beginswith.js +0 -1
  107. package/dist/collection/plugins/filter/conditions/string/contains.js +0 -1
  108. package/dist/collection/plugins/filter/filter.button.js +11 -6
  109. package/dist/collection/plugins/filter/filter.plugin.js +0 -1
  110. package/dist/collection/plugins/filter/filter.pop.js +234 -239
  111. package/dist/collection/plugins/filter/filter.service.js +0 -1
  112. package/dist/collection/plugins/filter/filter.style.css +3 -2
  113. package/dist/collection/plugins/filter/filter.types.js +3 -1
  114. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +0 -1
  115. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js +0 -1
  116. package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js +0 -1
  117. package/dist/collection/plugins/groupingRow/grouping.const.js +0 -1
  118. package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js +0 -1
  119. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +5 -6
  120. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +7 -3
  121. package/dist/collection/plugins/groupingRow/grouping.row.types.js +3 -1
  122. package/dist/collection/plugins/groupingRow/grouping.service.js +0 -1
  123. package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js +0 -1
  124. package/dist/collection/plugins/moveColumn/columnDragPlugin.js +0 -1
  125. package/dist/collection/plugins/moveColumn/columnOrderHandler.js +0 -1
  126. package/dist/collection/plugins/sorting/sorting.plugin.js +3 -4
  127. package/dist/collection/plugins/sorting/sorting.sign.js +0 -1
  128. package/dist/collection/plugins/stretchPlugin.js +0 -1
  129. package/dist/collection/plugins/trimmed/trimmed.plugin.js +0 -1
  130. package/dist/collection/services/cell.helpers.js +0 -1
  131. package/dist/collection/services/column.data.provider.js +7 -8
  132. package/dist/collection/services/data.provider.js +0 -1
  133. package/dist/collection/services/dimension.provider.js +0 -1
  134. package/dist/collection/services/localScrollService.js +0 -1
  135. package/dist/collection/services/resizable.directive.js +3 -2
  136. package/dist/collection/services/selection.store.connector.js +0 -1
  137. package/dist/collection/services/viewport.provider.js +0 -1
  138. package/dist/collection/store/dataSource/data.proxy.js +0 -1
  139. package/dist/collection/store/dataSource/data.store.js +3 -4
  140. package/dist/collection/store/dimension/dimension.helpers.js +0 -1
  141. package/dist/collection/store/dimension/dimension.store.js +3 -5
  142. package/dist/collection/store/selection/selection.helpers.js +0 -1
  143. package/dist/collection/store/selection/selection.store.js +0 -1
  144. package/dist/collection/store/selection/selection.store.service.js +0 -1
  145. package/dist/collection/store/storeTypes.js +0 -1
  146. package/dist/collection/store/viewPort/viewport.helpers.js +0 -1
  147. package/dist/collection/store/viewPort/viewport.store.js +0 -1
  148. package/dist/collection/themeManager/theme.compact.js +0 -1
  149. package/dist/collection/themeManager/theme.default.js +0 -1
  150. package/dist/collection/themeManager/theme.material.js +0 -1
  151. package/dist/collection/themeManager/themeService.js +5 -6
  152. package/dist/collection/utils/closestPolifill.js +0 -1
  153. package/dist/collection/utils/consts.js +0 -1
  154. package/dist/collection/utils/generateAlphabetHeader.js +0 -1
  155. package/dist/collection/utils/keyCodes.js +0 -1
  156. package/dist/collection/utils/keyCodes.utils.js +0 -1
  157. package/dist/collection/utils/platform.js +0 -1
  158. package/dist/collection/utils/resizeObserver.js +0 -1
  159. package/dist/collection/utils/store.utils.js +0 -1
  160. package/dist/collection/utils/utils.js +0 -1
  161. package/dist/esm/css-shim-e1e1ea5e.js +7 -0
  162. package/dist/esm/{debounce-7221834a.js → debounce-e4e6dd45.js} +1 -3
  163. package/dist/esm/dom-21bd1807.js +76 -0
  164. package/dist/esm/{index-068eebfc.js → index-6f753b3c.js} +279 -577
  165. package/dist/esm/index.js +0 -2
  166. package/dist/esm/loader.js +16 -5
  167. package/dist/esm/polyfills/css-shim.js +1 -1
  168. package/dist/esm/{resize-observer-d817c4b6.js → resize-observer-00c48d78.js} +3 -5
  169. package/dist/esm/revo-grid.js +60 -9
  170. package/dist/esm/revo-grid_11.entry.js +144 -143
  171. package/dist/esm/revogr-clipboard.entry.js +3 -4
  172. package/dist/esm/revogr-filter-panel.entry.js +6 -11
  173. package/dist/esm-es5/css-shim-e1e1ea5e.js +4 -0
  174. package/dist/esm-es5/{debounce-7221834a.js → debounce-e4e6dd45.js} +1 -2
  175. package/dist/esm-es5/dom-21bd1807.js +24 -0
  176. package/dist/esm-es5/index-6f753b3c.js +4 -0
  177. package/dist/esm-es5/index.js +0 -1
  178. package/dist/esm-es5/loader.js +1 -2
  179. package/dist/esm-es5/{resize-observer-d817c4b6.js → resize-observer-00c48d78.js} +1 -2
  180. package/dist/esm-es5/revo-grid.js +1 -2
  181. package/dist/esm-es5/revo-grid_11.entry.js +2 -3
  182. package/dist/esm-es5/revogr-clipboard.entry.js +2 -3
  183. package/dist/esm-es5/revogr-filter-panel.entry.js +2 -3
  184. package/dist/revo-grid/css-shim-bcf89cc0.system.js +4 -0
  185. package/dist/revo-grid/css-shim-e1e1ea5e.js +4 -0
  186. package/dist/revo-grid/{debounce-fa358fc7.system.js → debounce-5a33c710.system.js} +1 -2
  187. package/dist/revo-grid/debounce-726bdadb.js +4 -0
  188. package/dist/revo-grid/dom-21bd1807.js +22 -0
  189. package/dist/revo-grid/dom-726246e2.system.js +24 -0
  190. package/dist/revo-grid/index-f14b41a0.system.js +5 -0
  191. package/dist/revo-grid/index-f30d1de1.js +5 -0
  192. package/dist/revo-grid/index.esm.js +0 -2
  193. package/dist/revo-grid/index.system.js +1 -2
  194. package/dist/revo-grid/resize-observer-00c48d78.js +4 -0
  195. package/dist/revo-grid/{resize-observer-64c845eb.system.js → resize-observer-8af0bc0e.system.js} +1 -2
  196. package/dist/revo-grid/revo-grid.esm.js +1 -2
  197. package/dist/revo-grid/revo-grid.js +2 -0
  198. package/dist/revo-grid/revo-grid.system.js +1 -2
  199. package/dist/revo-grid/revo-grid_11.entry.js +1 -2
  200. package/dist/revo-grid/revo-grid_11.system.entry.js +2 -3
  201. package/dist/revo-grid/revogr-clipboard.entry.js +1 -2
  202. package/dist/revo-grid/revogr-clipboard.system.entry.js +2 -3
  203. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -2
  204. package/dist/revo-grid/revogr-filter-panel.system.entry.js +2 -3
  205. package/dist/types/components/data/cellRenderer.d.ts +1 -1
  206. package/dist/types/components/data/columnService.d.ts +4 -4
  207. package/dist/types/components/header/headerCellRenderer.d.ts +1 -1
  208. package/dist/types/components/header/headerRenderer.d.ts +1 -1
  209. package/dist/types/components/order/orderRenderer.d.ts +1 -1
  210. package/dist/types/components/order/rowOrderService.d.ts +1 -1
  211. package/dist/types/components/overlay/autofill.service.d.ts +1 -1
  212. package/dist/types/components/overlay/clipboard.service.d.ts +1 -1
  213. package/dist/types/components/overlay/editors/text.d.ts +1 -1
  214. package/dist/types/components/overlay/keyboard.service.d.ts +1 -1
  215. package/dist/types/components/overlay/selection.utils.d.ts +1 -1
  216. package/dist/types/components/revo-grid/viewport.d.ts +1 -1
  217. package/dist/types/components/revo-grid/viewport.interfaces.d.ts +5 -5
  218. package/dist/types/components/revo-grid/viewport.scrolling.service.d.ts +1 -1
  219. package/dist/types/components/revo-grid/viewport.section.d.ts +1 -1
  220. package/dist/types/components/revo-grid/viewport.service.d.ts +3 -3
  221. package/dist/types/components/rowHeaders/row-header-render.d.ts +1 -1
  222. package/dist/types/components.d.ts +0 -26
  223. package/dist/types/plugins/autoSizeColumn.d.ts +1 -1
  224. package/dist/types/plugins/dispatcher.d.ts +1 -1
  225. package/dist/types/plugins/export/csv.d.ts +1 -1
  226. package/dist/types/plugins/export/export.plugin.d.ts +1 -1
  227. package/dist/types/plugins/export/types.d.ts +2 -2
  228. package/dist/types/plugins/filter/filter.button.d.ts +1 -1
  229. package/dist/types/plugins/filter/filter.plugin.d.ts +6 -6
  230. package/dist/types/plugins/filter/filter.pop.d.ts +4 -4
  231. package/dist/types/plugins/filter/filter.service.d.ts +1 -1
  232. package/dist/types/plugins/filter/filter.types.d.ts +5 -5
  233. package/dist/types/plugins/groupingColumn/columnGroupsRenderer.d.ts +1 -1
  234. package/dist/types/plugins/groupingColumn/grouping.col.plugin.d.ts +1 -1
  235. package/dist/types/plugins/groupingColumn/headerGroupRenderer.d.ts +1 -1
  236. package/dist/types/plugins/groupingRow/grouping.row.renderer.d.ts +1 -1
  237. package/dist/types/plugins/groupingRow/grouping.row.types.d.ts +5 -5
  238. package/dist/types/plugins/groupingRow/grouping.service.d.ts +1 -1
  239. package/dist/types/plugins/moveColumn/columnDragPlugin.d.ts +5 -5
  240. package/dist/types/plugins/sorting/sorting.plugin.d.ts +1 -1
  241. package/dist/types/plugins/sorting/sorting.sign.d.ts +1 -1
  242. package/dist/types/plugins/trimmed/trimmed.plugin.d.ts +2 -2
  243. package/dist/types/services/column.data.provider.d.ts +4 -4
  244. package/dist/types/services/data.provider.d.ts +1 -1
  245. package/dist/types/services/dimension.provider.d.ts +2 -2
  246. package/dist/types/services/localScrollService.d.ts +1 -1
  247. package/dist/types/services/resizable.directive.d.ts +2 -2
  248. package/dist/types/services/selection.store.connector.d.ts +2 -2
  249. package/dist/types/services/viewport.provider.d.ts +1 -1
  250. package/dist/types/stencil-public-runtime.d.ts +19 -91
  251. package/dist/types/store/dataSource/data.proxy.d.ts +1 -1
  252. package/dist/types/store/dataSource/data.store.d.ts +4 -4
  253. package/dist/types/store/dimension/dimension.helpers.d.ts +3 -3
  254. package/dist/types/store/selection/selection.store.d.ts +1 -1
  255. package/dist/types/store/viewPort/viewport.helpers.d.ts +2 -2
  256. package/loader/index.d.ts +0 -9
  257. package/loader/package.json +0 -1
  258. package/package.json +1 -1
  259. package/custom-element/_baseIteratee.js.map +0 -1
  260. package/custom-element/columnService.js.map +0 -1
  261. package/custom-element/consts.js.map +0 -1
  262. package/custom-element/data.store.js.map +0 -1
  263. package/custom-element/debounce.js.map +0 -1
  264. package/custom-element/dimension.helpers.js.map +0 -1
  265. package/custom-element/each.js.map +0 -1
  266. package/custom-element/filter.button.js.map +0 -1
  267. package/custom-element/identity.js.map +0 -1
  268. package/custom-element/index.js.map +0 -1
  269. package/custom-element/isSymbol.js.map +0 -1
  270. package/custom-element/keys.js.map +0 -1
  271. package/custom-element/localScrollService.js.map +0 -1
  272. package/custom-element/resize-observer.js.map +0 -1
  273. package/custom-element/revo-grid.js.map +0 -1
  274. package/custom-element/revogr-clipboard.js.map +0 -1
  275. package/custom-element/revogr-data.js.map +0 -1
  276. package/custom-element/revogr-data2.js.map +0 -1
  277. package/custom-element/revogr-edit.js.map +0 -1
  278. package/custom-element/revogr-edit2.js.map +0 -1
  279. package/custom-element/revogr-filter-panel.js.map +0 -1
  280. package/custom-element/revogr-focus.js.map +0 -1
  281. package/custom-element/revogr-focus2.js.map +0 -1
  282. package/custom-element/revogr-header.js.map +0 -1
  283. package/custom-element/revogr-header2.js.map +0 -1
  284. package/custom-element/revogr-order-editor.js.map +0 -1
  285. package/custom-element/revogr-order-editor2.js.map +0 -1
  286. package/custom-element/revogr-overlay-selection.js.map +0 -1
  287. package/custom-element/revogr-overlay-selection2.js.map +0 -1
  288. package/custom-element/revogr-row-headers.js.map +0 -1
  289. package/custom-element/revogr-row-headers2.js.map +0 -1
  290. package/custom-element/revogr-scroll-virtual.js.map +0 -1
  291. package/custom-element/revogr-scroll-virtual2.js.map +0 -1
  292. package/custom-element/revogr-temp-range.js.map +0 -1
  293. package/custom-element/revogr-temp-range2.js.map +0 -1
  294. package/custom-element/revogr-viewport-scroll.js.map +0 -1
  295. package/custom-element/revogr-viewport-scroll2.js.map +0 -1
  296. package/custom-element/selection.utils.js.map +0 -1
  297. package/custom-element/themeService.js +0 -65
  298. package/custom-element/themeService.js.map +0 -1
  299. package/custom-element/toInteger.js.map +0 -1
  300. package/custom-element/toNumber.js.map +0 -1
  301. package/custom-element/utils.js.map +0 -1
  302. package/dist/cjs/debounce-25dce8a1.js.map +0 -1
  303. package/dist/cjs/index-5f3dfe40.js.map +0 -1
  304. package/dist/cjs/index.cjs.js.map +0 -1
  305. package/dist/cjs/loader.cjs.js.map +0 -1
  306. package/dist/cjs/resize-observer-7f159b88.js.map +0 -1
  307. package/dist/cjs/revo-grid.cjs.js.map +0 -1
  308. package/dist/cjs/revo-grid_11.cjs.entry.js.map +0 -1
  309. package/dist/cjs/revogr-clipboard.cjs.entry.js.map +0 -1
  310. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +0 -1
  311. package/dist/collection/components/button/button.js.map +0 -1
  312. package/dist/collection/components/clipboard/revogr-clipboard.js.map +0 -1
  313. package/dist/collection/components/data/cellRenderer.js.map +0 -1
  314. package/dist/collection/components/data/columnService.js.map +0 -1
  315. package/dist/collection/components/data/revogr-data.js.map +0 -1
  316. package/dist/collection/components/data/rowRenderer.js.map +0 -1
  317. package/dist/collection/components/header/headerCellRenderer.js.map +0 -1
  318. package/dist/collection/components/header/headerRenderer.js.map +0 -1
  319. package/dist/collection/components/header/revogr-header.js.map +0 -1
  320. package/dist/collection/components/order/orderRenderer.js.map +0 -1
  321. package/dist/collection/components/order/revogr-order-editor.js.map +0 -1
  322. package/dist/collection/components/order/rowOrderService.js.map +0 -1
  323. package/dist/collection/components/overlay/autofill.service.js.map +0 -1
  324. package/dist/collection/components/overlay/clipboard.service.js.map +0 -1
  325. package/dist/collection/components/overlay/editors/edit.utils.js.map +0 -1
  326. package/dist/collection/components/overlay/editors/text.js.map +0 -1
  327. package/dist/collection/components/overlay/keyboard.service.js.map +0 -1
  328. package/dist/collection/components/overlay/revogr-edit.js.map +0 -1
  329. package/dist/collection/components/overlay/revogr-overlay-selection.js.map +0 -1
  330. package/dist/collection/components/overlay/selection.utils.js.map +0 -1
  331. package/dist/collection/components/revo-grid/revo-grid.js.map +0 -1
  332. package/dist/collection/components/revo-grid/viewport.helpers.js.map +0 -1
  333. package/dist/collection/components/revo-grid/viewport.interfaces.js.map +0 -1
  334. package/dist/collection/components/revo-grid/viewport.js.map +0 -1
  335. package/dist/collection/components/revo-grid/viewport.resize.service.js.map +0 -1
  336. package/dist/collection/components/revo-grid/viewport.scrolling.service.js.map +0 -1
  337. package/dist/collection/components/revo-grid/viewport.section.js.map +0 -1
  338. package/dist/collection/components/revo-grid/viewport.service.js.map +0 -1
  339. package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +0 -1
  340. package/dist/collection/components/rowHeaders/row-header-render.js.map +0 -1
  341. package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +0 -1
  342. package/dist/collection/components/scrollable/revogr-scroll-virtual.js.map +0 -1
  343. package/dist/collection/components/selection-focus/revogr-focus.js.map +0 -1
  344. package/dist/collection/components/selection-temp-range/revogr-temp-range.js.map +0 -1
  345. package/dist/collection/global/global.js.map +0 -1
  346. package/dist/collection/index.js.map +0 -1
  347. package/dist/collection/plugins/autoSizeColumn.js.map +0 -1
  348. package/dist/collection/plugins/basePlugin.js.map +0 -1
  349. package/dist/collection/plugins/dispatcher.js.map +0 -1
  350. package/dist/collection/plugins/export/csv.js.map +0 -1
  351. package/dist/collection/plugins/export/export.plugin.js.map +0 -1
  352. package/dist/collection/plugins/export/types.js.map +0 -1
  353. package/dist/collection/plugins/filter/conditions/equal.js.map +0 -1
  354. package/dist/collection/plugins/filter/conditions/number/greaterThan.js.map +0 -1
  355. package/dist/collection/plugins/filter/conditions/number/greaterThanOrEqual.js.map +0 -1
  356. package/dist/collection/plugins/filter/conditions/number/lessThan.js.map +0 -1
  357. package/dist/collection/plugins/filter/conditions/number/lessThanOrEqual.js.map +0 -1
  358. package/dist/collection/plugins/filter/conditions/set.js.map +0 -1
  359. package/dist/collection/plugins/filter/conditions/string/beginswith.js.map +0 -1
  360. package/dist/collection/plugins/filter/conditions/string/contains.js.map +0 -1
  361. package/dist/collection/plugins/filter/filter.button.js.map +0 -1
  362. package/dist/collection/plugins/filter/filter.plugin.js.map +0 -1
  363. package/dist/collection/plugins/filter/filter.pop.js.map +0 -1
  364. package/dist/collection/plugins/filter/filter.service.js.map +0 -1
  365. package/dist/collection/plugins/filter/filter.types.js.map +0 -1
  366. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js.map +0 -1
  367. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js.map +0 -1
  368. package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js.map +0 -1
  369. package/dist/collection/plugins/groupingRow/grouping.const.js.map +0 -1
  370. package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js.map +0 -1
  371. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +0 -1
  372. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js.map +0 -1
  373. package/dist/collection/plugins/groupingRow/grouping.row.types.js.map +0 -1
  374. package/dist/collection/plugins/groupingRow/grouping.service.js.map +0 -1
  375. package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js.map +0 -1
  376. package/dist/collection/plugins/moveColumn/columnDragPlugin.js.map +0 -1
  377. package/dist/collection/plugins/moveColumn/columnOrderHandler.js.map +0 -1
  378. package/dist/collection/plugins/sorting/sorting.plugin.js.map +0 -1
  379. package/dist/collection/plugins/sorting/sorting.sign.js.map +0 -1
  380. package/dist/collection/plugins/stretchPlugin.js.map +0 -1
  381. package/dist/collection/plugins/trimmed/trimmed.plugin.js.map +0 -1
  382. package/dist/collection/services/cell.helpers.js.map +0 -1
  383. package/dist/collection/services/column.data.provider.js.map +0 -1
  384. package/dist/collection/services/data.provider.js.map +0 -1
  385. package/dist/collection/services/dimension.provider.js.map +0 -1
  386. package/dist/collection/services/localScrollService.js.map +0 -1
  387. package/dist/collection/services/resizable.directive.js.map +0 -1
  388. package/dist/collection/services/selection.store.connector.js.map +0 -1
  389. package/dist/collection/services/viewport.provider.js.map +0 -1
  390. package/dist/collection/store/dataSource/data.proxy.js.map +0 -1
  391. package/dist/collection/store/dataSource/data.store.js.map +0 -1
  392. package/dist/collection/store/dimension/dimension.helpers.js.map +0 -1
  393. package/dist/collection/store/dimension/dimension.store.js.map +0 -1
  394. package/dist/collection/store/selection/selection.helpers.js.map +0 -1
  395. package/dist/collection/store/selection/selection.store.js.map +0 -1
  396. package/dist/collection/store/selection/selection.store.service.js.map +0 -1
  397. package/dist/collection/store/storeTypes.js.map +0 -1
  398. package/dist/collection/store/viewPort/viewport.helpers.js.map +0 -1
  399. package/dist/collection/store/viewPort/viewport.store.js.map +0 -1
  400. package/dist/collection/themeManager/theme.compact.js.map +0 -1
  401. package/dist/collection/themeManager/theme.default.js.map +0 -1
  402. package/dist/collection/themeManager/theme.material.js.map +0 -1
  403. package/dist/collection/themeManager/themeService.js.map +0 -1
  404. package/dist/collection/utils/closestPolifill.js.map +0 -1
  405. package/dist/collection/utils/consts.js.map +0 -1
  406. package/dist/collection/utils/generateAlphabetHeader.js.map +0 -1
  407. package/dist/collection/utils/keyCodes.js.map +0 -1
  408. package/dist/collection/utils/keyCodes.utils.js.map +0 -1
  409. package/dist/collection/utils/platform.js.map +0 -1
  410. package/dist/collection/utils/resizeObserver.js.map +0 -1
  411. package/dist/collection/utils/store.utils.js.map +0 -1
  412. package/dist/collection/utils/utils.js.map +0 -1
  413. package/dist/esm/debounce-7221834a.js.map +0 -1
  414. package/dist/esm/index-068eebfc.js.map +0 -1
  415. package/dist/esm/index.js.map +0 -1
  416. package/dist/esm/loader.js.map +0 -1
  417. package/dist/esm/resize-observer-d817c4b6.js.map +0 -1
  418. package/dist/esm/revo-grid.js.map +0 -1
  419. package/dist/esm/revo-grid_11.entry.js.map +0 -1
  420. package/dist/esm/revogr-clipboard.entry.js.map +0 -1
  421. package/dist/esm/revogr-filter-panel.entry.js.map +0 -1
  422. package/dist/esm-es5/debounce-7221834a.js.map +0 -1
  423. package/dist/esm-es5/index-068eebfc.js +0 -5
  424. package/dist/esm-es5/index-068eebfc.js.map +0 -1
  425. package/dist/esm-es5/index.js.map +0 -1
  426. package/dist/esm-es5/loader.js.map +0 -1
  427. package/dist/esm-es5/resize-observer-d817c4b6.js.map +0 -1
  428. package/dist/esm-es5/revo-grid.js.map +0 -1
  429. package/dist/esm-es5/revo-grid_11.entry.js.map +0 -1
  430. package/dist/esm-es5/revogr-clipboard.entry.js.map +0 -1
  431. package/dist/esm-es5/revogr-filter-panel.entry.js.map +0 -1
  432. package/dist/revo-grid/debounce-7221834a.js +0 -5
  433. package/dist/revo-grid/debounce-7221834a.js.map +0 -1
  434. package/dist/revo-grid/debounce-fa358fc7.system.js.map +0 -1
  435. package/dist/revo-grid/index-068eebfc.js +0 -6
  436. package/dist/revo-grid/index-068eebfc.js.map +0 -1
  437. package/dist/revo-grid/index-36847b63.system.js +0 -6
  438. package/dist/revo-grid/index-36847b63.system.js.map +0 -1
  439. package/dist/revo-grid/index.esm.js.map +0 -1
  440. package/dist/revo-grid/index.system.js.map +0 -1
  441. package/dist/revo-grid/resize-observer-64c845eb.system.js.map +0 -1
  442. package/dist/revo-grid/resize-observer-d817c4b6.js +0 -5
  443. package/dist/revo-grid/resize-observer-d817c4b6.js.map +0 -1
  444. package/dist/revo-grid/revo-grid.esm.js.map +0 -1
  445. package/dist/revo-grid/revo-grid.system.js.map +0 -1
  446. package/dist/revo-grid/revo-grid_11.entry.js.map +0 -1
  447. package/dist/revo-grid/revo-grid_11.system.entry.js.map +0 -1
  448. package/dist/revo-grid/revogr-clipboard.entry.js.map +0 -1
  449. package/dist/revo-grid/revogr-clipboard.system.entry.js.map +0 -1
  450. package/dist/revo-grid/revogr-filter-panel.entry.js.map +0 -1
  451. package/dist/revo-grid/revogr-filter-panel.system.entry.js.map +0 -1
@@ -3,14 +3,6 @@
3
3
  */
4
4
  const NAMESPACE = 'revo-grid';
5
5
 
6
- /**
7
- * Virtual DOM patching algorithm based on Snabbdom by
8
- * Simon Friis Vindum (@paldepind)
9
- * Licensed under the MIT License
10
- * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
11
- *
12
- * Modified for Stencil's renderer and slot projection
13
- */
14
6
  let contentRef;
15
7
  let hostTagName;
16
8
  let useNativeShadowDom = false;
@@ -19,6 +11,64 @@ let checkSlotRelocate = false;
19
11
  let isSvgMode = false;
20
12
  let renderingRef = null;
21
13
  let queuePending = false;
14
+ const win = typeof window !== 'undefined' ? window : {};
15
+ const CSS = win.CSS ;
16
+ const doc = win.document || { head: {} };
17
+ const plt = {
18
+ $flags$: 0,
19
+ $resourcesUrl$: '',
20
+ jmp: (h) => h(),
21
+ raf: (h) => requestAnimationFrame(h),
22
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
23
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
24
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
25
+ };
26
+ const promiseResolve = (v) => Promise.resolve(v);
27
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
28
+ try {
29
+ new CSSStyleSheet();
30
+ return typeof new CSSStyleSheet().replaceSync === 'function';
31
+ }
32
+ catch (e) { }
33
+ return false;
34
+ })()
35
+ ;
36
+ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
37
+ if (listeners) {
38
+ listeners.map(([flags, name, method]) => {
39
+ const target = getHostListenerTarget(elm, flags) ;
40
+ const handler = hostListenerProxy(hostRef, method);
41
+ const opts = hostListenerOpts(flags);
42
+ plt.ael(target, name, handler, opts);
43
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
44
+ });
45
+ }
46
+ };
47
+ const hostListenerProxy = (hostRef, methodName) => (ev) => {
48
+ try {
49
+ {
50
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
51
+ // instance is ready, let's call it's member method for this event
52
+ hostRef.$lazyInstance$[methodName](ev);
53
+ }
54
+ else {
55
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
56
+ }
57
+ }
58
+ }
59
+ catch (e) {
60
+ consoleError(e);
61
+ }
62
+ };
63
+ const getHostListenerTarget = (elm, flags) => {
64
+ if (flags & 4 /* TargetDocument */)
65
+ return doc;
66
+ return elm;
67
+ };
68
+ // prettier-ignore
69
+ const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
70
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
71
+ const XLINK_NS = 'http://www.w3.org/1999/xlink';
22
72
  const createTime = (fnName, tagName = '') => {
23
73
  {
24
74
  return () => {
@@ -33,8 +83,75 @@ const uniqueTime = (key, measureText) => {
33
83
  };
34
84
  }
35
85
  };
36
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
37
- const XLINK_NS = 'http://www.w3.org/1999/xlink';
86
+ const rootAppliedStyles = new WeakMap();
87
+ const registerStyle = (scopeId, cssText, allowCS) => {
88
+ let style = styles.get(scopeId);
89
+ if (supportsConstructableStylesheets && allowCS) {
90
+ style = (style || new CSSStyleSheet());
91
+ if (typeof style === 'string') {
92
+ style = cssText;
93
+ }
94
+ else {
95
+ style.replaceSync(cssText);
96
+ }
97
+ }
98
+ else {
99
+ style = cssText;
100
+ }
101
+ styles.set(scopeId, style);
102
+ };
103
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
104
+ let scopeId = getScopeId(cmpMeta);
105
+ const style = styles.get(scopeId);
106
+ // if an element is NOT connected then getRootNode() will return the wrong root node
107
+ // so the fallback is to always use the document for the root node in those cases
108
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
109
+ if (style) {
110
+ if (typeof style === 'string') {
111
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
112
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
113
+ let styleElm;
114
+ if (!appliedStyles) {
115
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
116
+ }
117
+ if (!appliedStyles.has(scopeId)) {
118
+ {
119
+ if (plt.$cssShim$) {
120
+ styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */));
121
+ const newScopeId = styleElm['s-sc'];
122
+ if (newScopeId) {
123
+ scopeId = newScopeId;
124
+ // we don't want to add this styleID to the appliedStyles Set
125
+ // since the cssVarShim might need to apply several different
126
+ // stylesheets for the same component
127
+ appliedStyles = null;
128
+ }
129
+ }
130
+ else {
131
+ styleElm = doc.createElement('style');
132
+ styleElm.innerHTML = style;
133
+ }
134
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
135
+ }
136
+ if (appliedStyles) {
137
+ appliedStyles.add(scopeId);
138
+ }
139
+ }
140
+ }
141
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
142
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
143
+ }
144
+ }
145
+ return scopeId;
146
+ };
147
+ const attachStyles = (hostRef) => {
148
+ const cmpMeta = hostRef.$cmpMeta$;
149
+ const elm = hostRef.$hostElement$;
150
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
151
+ addStyle(elm.getRootNode(), cmpMeta, hostRef.$modeName$, elm);
152
+ endAttachStyles();
153
+ };
154
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
38
155
  /**
39
156
  * Default style mode id
40
157
  */
@@ -48,30 +165,11 @@ const EMPTY_OBJ = {};
48
165
  */
49
166
  const SVG_NS = 'http://www.w3.org/2000/svg';
50
167
  const HTML_NS = 'http://www.w3.org/1999/xhtml';
51
- /**
52
- * Check whether a value is a 'complex type', defined here as an object or a
53
- * function.
54
- *
55
- * @param o the value to check
56
- * @returns whether it's a complex type or not
57
- */
58
168
  const isComplexType = (o) => {
59
169
  // https://jsperf.com/typeof-fn-object/5
60
170
  o = typeof o;
61
171
  return o === 'object' || o === 'function';
62
172
  };
63
- /**
64
- * Helper method for querying a `meta` tag that contains a nonce value
65
- * out of a DOM's head.
66
- *
67
- * @param doc The DOM containing the `head` to query against
68
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
69
- * exists or the tag has no content.
70
- */
71
- function queryNonceMetaTagContent(doc) {
72
- var _a, _b, _c;
73
- return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
74
- }
75
173
  /**
76
174
  * Production h() function based on Preact by
77
175
  * Jason Miller (@developit)
@@ -80,6 +178,7 @@ function queryNonceMetaTagContent(doc) {
80
178
  *
81
179
  * Modified for Stencil's compiler and vdom
82
180
  */
181
+ // const stack: any[] = [];
83
182
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
84
183
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
85
184
  const h = (nodeName, vnodeData, ...children) => {
@@ -149,14 +248,6 @@ const h = (nodeName, vnodeData, ...children) => {
149
248
  }
150
249
  return vnode;
151
250
  };
152
- /**
153
- * A utility function for creating a virtual DOM node from a tag and some
154
- * possible text content.
155
- *
156
- * @param tag the tag for this element
157
- * @param text possible text content for the node
158
- * @returns a newly-minted virtual DOM node
159
- */
160
251
  const newVNode = (tag, text) => {
161
252
  const vnode = {
162
253
  $flags$: 0,
@@ -177,31 +268,11 @@ const newVNode = (tag, text) => {
177
268
  return vnode;
178
269
  };
179
270
  const Host = {};
180
- /**
181
- * Check whether a given node is a Host node or not
182
- *
183
- * @param node the virtual DOM node to check
184
- * @returns whether it's a Host node or not
185
- */
186
271
  const isHost = (node) => node && node.$tag$ === Host;
187
- /**
188
- * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
189
- *
190
- * Note that these functions convert from {@link d.VNode} to
191
- * {@link d.ChildNode} to give functional component developers a friendly
192
- * interface.
193
- */
194
272
  const vdomFnUtils = {
195
273
  forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
196
274
  map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
197
275
  };
198
- /**
199
- * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
200
- * friendlier public interface (hence, 'convertToPublic').
201
- *
202
- * @param node the virtual DOM node to convert
203
- * @returns a converted child node
204
- */
205
276
  const convertToPublic = (node) => ({
206
277
  vattrs: node.$attrs$,
207
278
  vchildren: node.$children$,
@@ -210,15 +281,6 @@ const convertToPublic = (node) => ({
210
281
  vtag: node.$tag$,
211
282
  vtext: node.$text$,
212
283
  });
213
- /**
214
- * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
215
- * order to use the resulting object in the virtual DOM. The initial object was
216
- * likely created as part of presenting a public API, so converting it back
217
- * involved making it 'private' again (hence, `convertToPrivate`).
218
- *
219
- * @param node the child node to convert
220
- * @returns a converted virtual DOM node
221
- */
222
284
  const convertToPrivate = (node) => {
223
285
  if (typeof node.vtag === 'function') {
224
286
  const vnodeData = Object.assign({}, node.vattrs);
@@ -237,144 +299,6 @@ const convertToPrivate = (node) => {
237
299
  vnode.$name$ = node.vname;
238
300
  return vnode;
239
301
  };
240
- /**
241
- * Parse a new property value for a given property type.
242
- *
243
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
244
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
245
- * 1. `any`, the type given to `propValue` in the function signature
246
- * 2. the type stored from `propType`.
247
- *
248
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
249
- *
250
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
251
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
252
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
253
- * ```tsx
254
- * <my-cmp prop-val={0}></my-cmp>
255
- * ```
256
- *
257
- * HTML prop values on the other hand, will always a string
258
- *
259
- * @param propValue the new value to coerce to some type
260
- * @param propType the type of the prop, expressed as a binary number
261
- * @returns the parsed/coerced value
262
- */
263
- const parsePropertyValue = (propValue, propType) => {
264
- // ensure this value is of the correct prop type
265
- if (propValue != null && !isComplexType(propValue)) {
266
- if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
267
- // per the HTML spec, any string value means it is a boolean true value
268
- // but we'll cheat here and say that the string "false" is the boolean false
269
- return propValue === 'false' ? false : propValue === '' || !!propValue;
270
- }
271
- if (propType & 2 /* MEMBER_FLAGS.Number */) {
272
- // force it to be a number
273
- return parseFloat(propValue);
274
- }
275
- if (propType & 1 /* MEMBER_FLAGS.String */) {
276
- // could have been passed as a number or boolean
277
- // but we still want it as a string
278
- return String(propValue);
279
- }
280
- // redundant return here for better minification
281
- return propValue;
282
- }
283
- // not sure exactly what type we want
284
- // so no need to change to a different type
285
- return propValue;
286
- };
287
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
288
- const createEvent = (ref, name, flags) => {
289
- const elm = getElement(ref);
290
- return {
291
- emit: (detail) => {
292
- return emitEvent(elm, name, {
293
- bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
294
- composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
295
- cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
296
- detail,
297
- });
298
- },
299
- };
300
- };
301
- /**
302
- * Helper function to create & dispatch a custom Event on a provided target
303
- * @param elm the target of the Event
304
- * @param name the name to give the custom Event
305
- * @param opts options for configuring a custom Event
306
- * @returns the custom Event
307
- */
308
- const emitEvent = (elm, name, opts) => {
309
- const ev = plt.ce(name, opts);
310
- elm.dispatchEvent(ev);
311
- return ev;
312
- };
313
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
314
- const registerStyle = (scopeId, cssText, allowCS) => {
315
- let style = styles.get(scopeId);
316
- if (supportsConstructableStylesheets && allowCS) {
317
- style = (style || new CSSStyleSheet());
318
- if (typeof style === 'string') {
319
- style = cssText;
320
- }
321
- else {
322
- style.replaceSync(cssText);
323
- }
324
- }
325
- else {
326
- style = cssText;
327
- }
328
- styles.set(scopeId, style);
329
- };
330
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
331
- var _a;
332
- let scopeId = getScopeId(cmpMeta);
333
- const style = styles.get(scopeId);
334
- // if an element is NOT connected then getRootNode() will return the wrong root node
335
- // so the fallback is to always use the document for the root node in those cases
336
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
337
- if (style) {
338
- if (typeof style === 'string') {
339
- styleContainerNode = styleContainerNode.head || styleContainerNode;
340
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
341
- let styleElm;
342
- if (!appliedStyles) {
343
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
344
- }
345
- if (!appliedStyles.has(scopeId)) {
346
- {
347
- // TODO(STENCIL-659): Remove code implementing the CSS variable shim
348
- {
349
- styleElm = doc.createElement('style');
350
- styleElm.innerHTML = style;
351
- }
352
- // Apply CSP nonce to the style tag if it exists
353
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
354
- if (nonce != null) {
355
- styleElm.setAttribute('nonce', nonce);
356
- }
357
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
358
- }
359
- if (appliedStyles) {
360
- appliedStyles.add(scopeId);
361
- }
362
- }
363
- }
364
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
365
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
366
- }
367
- }
368
- return scopeId;
369
- };
370
- const attachStyles = (hostRef) => {
371
- const cmpMeta = hostRef.$cmpMeta$;
372
- const elm = hostRef.$hostElement$;
373
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
374
- addStyle(elm.getRootNode(), cmpMeta);
375
- endAttachStyles();
376
- };
377
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
378
302
  /**
379
303
  * Production setAccessor() function based on Preact by
380
304
  * Jason Miller (@developit)
@@ -511,7 +435,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
511
435
  }
512
436
  }
513
437
  }
514
- else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
438
+ else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
515
439
  newValue = newValue === true ? '' : newValue;
516
440
  if (xlink) {
517
441
  elm.setAttributeNS(XLINK_NS, memberName, newValue);
@@ -529,7 +453,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
529
453
  // if the element passed in is a shadow root, which is a document fragment
530
454
  // then we want to be adding attrs/props to the shadow root's "host" element
531
455
  // if it's not a shadow root, then we add attrs/props to the same element
532
- const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
456
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
533
457
  ? newVnode.$elm$.host
534
458
  : newVnode.$elm$;
535
459
  const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
@@ -547,16 +471,6 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
547
471
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
548
472
  }
549
473
  };
550
- /**
551
- * Create a DOM Node corresponding to one of the children of a given VNode.
552
- *
553
- * @param oldParentVNode the parent VNode from the previous render
554
- * @param newParentVNode the parent VNode from the current render
555
- * @param childIndex the index of the VNode, in the _new_ parent node's
556
- * children, for which we will create a new DOM node
557
- * @param parentElm the parent DOM node which our new node will be a child of
558
- * @returns the newly created node
559
- */
560
474
  const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
561
475
  // tslint:disable-next-line: prefer-const
562
476
  const newVNode = newParentVNode.$children$[childIndex];
@@ -570,16 +484,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
570
484
  if (newVNode.$tag$ === 'slot') {
571
485
  newVNode.$flags$ |= newVNode.$children$
572
486
  ? // slot element has fallback content
573
- 2 /* VNODE_FLAGS.isSlotFallback */
487
+ 2 /* isSlotFallback */
574
488
  : // slot element does not have fallback content
575
- 1 /* VNODE_FLAGS.isSlotReference */;
489
+ 1 /* isSlotReference */;
576
490
  }
577
491
  }
578
492
  if (newVNode.$text$ !== null) {
579
493
  // create text node
580
494
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
581
495
  }
582
- else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
496
+ else if (newVNode.$flags$ & 1 /* isSlotReference */) {
583
497
  // create a slot reference node
584
498
  elm = newVNode.$elm$ =
585
499
  doc.createTextNode('');
@@ -589,7 +503,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
589
503
  isSvgMode = newVNode.$tag$ === 'svg';
590
504
  }
591
505
  // create element
592
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
506
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
593
507
  ? 'slot-fb'
594
508
  : newVNode.$tag$)
595
509
  );
@@ -624,7 +538,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
624
538
  }
625
539
  {
626
540
  elm['s-hn'] = hostTagName;
627
- if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
541
+ if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
628
542
  // remember the content reference comment
629
543
  elm['s-sr'] = true;
630
544
  // remember the content reference comment
@@ -643,7 +557,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
643
557
  return elm;
644
558
  };
645
559
  const putBackInOriginalLocation = (parentElm, recursive) => {
646
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
560
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
647
561
  const oldSlotChildNodes = parentElm.childNodes;
648
562
  for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
649
563
  const childNode = oldSlotChildNodes[i];
@@ -664,23 +578,8 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
664
578
  putBackInOriginalLocation(childNode, recursive);
665
579
  }
666
580
  }
667
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
581
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
668
582
  };
669
- /**
670
- * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
671
- * add them to the DOM in the appropriate place.
672
- *
673
- * @param parentElm the DOM node which should be used as a parent for the new
674
- * DOM nodes
675
- * @param before a child of the `parentElm` which the new children should be
676
- * inserted before (optional)
677
- * @param parentVNode the parent virtual DOM node
678
- * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
679
- * @param startIdx the index in the child virtual DOM nodes at which to start
680
- * creating DOM nodes (inclusive)
681
- * @param endIdx the index in the child virtual DOM nodes at which to stop
682
- * creating DOM nodes (inclusive)
683
- */
684
583
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
685
584
  let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
686
585
  let childNode;
@@ -694,19 +593,6 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
694
593
  }
695
594
  }
696
595
  };
697
- /**
698
- * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
699
- * This can be used to, for instance, clean up after a list of children which
700
- * should no longer be shown.
701
- *
702
- * This function also handles some of Stencil's slot relocation logic.
703
- *
704
- * @param vnodes a list of virtual DOM nodes to remove
705
- * @param startIdx the index at which to start removing nodes (inclusive)
706
- * @param endIdx the index at which to stop removing nodes (inclusive)
707
- * @param vnode a VNode
708
- * @param elm an element
709
- */
710
596
  const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
711
597
  for (; startIdx <= endIdx; ++startIdx) {
712
598
  if ((vnode = vnodes[startIdx])) {
@@ -731,74 +617,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
731
617
  }
732
618
  }
733
619
  };
734
- /**
735
- * Reconcile the children of a new VNode with the children of an old VNode by
736
- * traversing the two collections of children, identifying nodes that are
737
- * conserved or changed, calling out to `patch` to make any necessary
738
- * updates to the DOM, and rearranging DOM nodes as needed.
739
- *
740
- * The algorithm for reconciling children works by analyzing two 'windows' onto
741
- * the two arrays of children (`oldCh` and `newCh`). We keep track of the
742
- * 'windows' by storing start and end indices and references to the
743
- * corresponding array entries. Initially the two 'windows' are basically equal
744
- * to the entire array, but we progressively narrow the windows until there are
745
- * no children left to update by doing the following:
746
- *
747
- * 1. Skip any `null` entries at the beginning or end of the two arrays, so
748
- * that if we have an initial array like the following we'll end up dealing
749
- * only with a window bounded by the highlighted elements:
750
- *
751
- * [null, null, VNode1 , ... , VNode2, null, null]
752
- * ^^^^^^ ^^^^^^
753
- *
754
- * 2. Check to see if the elements at the head and tail positions are equal
755
- * across the windows. This will basically detect elements which haven't
756
- * been added, removed, or changed position, i.e. if you had the following
757
- * VNode elements (represented as HTML):
758
- *
759
- * oldVNode: `<div><p><span>HEY</span></p></div>`
760
- * newVNode: `<div><p><span>THERE</span></p></div>`
761
- *
762
- * Then when comparing the children of the `<div>` tag we check the equality
763
- * of the VNodes corresponding to the `<p>` tags and, since they are the
764
- * same tag in the same position, we'd be able to avoid completely
765
- * re-rendering the subtree under them with a new DOM element and would just
766
- * call out to `patch` to handle reconciling their children and so on.
767
- *
768
- * 3. Check, for both windows, to see if the element at the beginning of the
769
- * window corresponds to the element at the end of the other window. This is
770
- * a heuristic which will let us identify _some_ situations in which
771
- * elements have changed position, for instance it _should_ detect that the
772
- * children nodes themselves have not changed but merely moved in the
773
- * following example:
774
- *
775
- * oldVNode: `<div><element-one /><element-two /></div>`
776
- * newVNode: `<div><element-two /><element-one /></div>`
777
- *
778
- * If we find cases like this then we also need to move the concrete DOM
779
- * elements corresponding to the moved children to write the re-order to the
780
- * DOM.
781
- *
782
- * 4. Finally, if VNodes have the `key` attribute set on them we check for any
783
- * nodes in the old children which have the same key as the first element in
784
- * our window on the new children. If we find such a node we handle calling
785
- * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
786
- * what we find.
787
- *
788
- * Finally, once we've narrowed our 'windows' to the point that either of them
789
- * collapse (i.e. they have length 0) we then handle any remaining VNode
790
- * insertion or deletion that needs to happen to get a DOM state that correctly
791
- * reflects the new child VNodes. If, for instance, after our window on the old
792
- * children has collapsed we still have more nodes on the new children that
793
- * we haven't dealt with yet then we need to add them, or if the new children
794
- * collapse but we still have unhandled _old_ children then we need to make
795
- * sure the corresponding DOM nodes are removed.
796
- *
797
- * @param parentElm the node into which the parent VNode is rendered
798
- * @param oldCh the old children of the parent node
799
- * @param newVNode the new VNode which will replace the parent
800
- * @param newCh the new children of the parent node
801
- */
802
620
  const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
803
621
  let oldStartIdx = 0;
804
622
  let newStartIdx = 0;
@@ -814,7 +632,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
814
632
  let elmToMove;
815
633
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
816
634
  if (oldStartVnode == null) {
817
- // VNode might have been moved left
635
+ // Vnode might have been moved left
818
636
  oldStartVnode = oldCh[++oldStartIdx];
819
637
  }
820
638
  else if (oldEndVnode == null) {
@@ -827,100 +645,37 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
827
645
  newEndVnode = newCh[--newEndIdx];
828
646
  }
829
647
  else if (isSameVnode(oldStartVnode, newStartVnode)) {
830
- // if the start nodes are the same then we should patch the new VNode
831
- // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
832
- // indices to reflect that. We don't need to move any DOM Nodes around
833
- // since things are matched up in order.
834
648
  patch(oldStartVnode, newStartVnode);
835
649
  oldStartVnode = oldCh[++oldStartIdx];
836
650
  newStartVnode = newCh[++newStartIdx];
837
651
  }
838
652
  else if (isSameVnode(oldEndVnode, newEndVnode)) {
839
- // likewise, if the end nodes are the same we patch new onto old and
840
- // decrement our end indices, and also likewise in this case we don't
841
- // need to move any DOM Nodes.
842
653
  patch(oldEndVnode, newEndVnode);
843
654
  oldEndVnode = oldCh[--oldEndIdx];
844
655
  newEndVnode = newCh[--newEndIdx];
845
656
  }
846
657
  else if (isSameVnode(oldStartVnode, newEndVnode)) {
847
- // case: "Vnode moved right"
848
- //
849
- // We've found that the last node in our window on the new children is
850
- // the same VNode as the _first_ node in our window on the old children
851
- // we're dealing with now. Visually, this is the layout of these two
852
- // nodes:
853
- //
854
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
855
- // ^^^^^^^^^^^
856
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
857
- // ^^^^^^^^^^^^^
858
- //
859
- // In this situation we need to patch `newEndVnode` onto `oldStartVnode`
860
- // and move the DOM element for `oldStartVnode`.
658
+ // Vnode moved right
861
659
  if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
862
660
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
863
661
  }
864
662
  patch(oldStartVnode, newEndVnode);
865
- // We need to move the element for `oldStartVnode` into a position which
866
- // will be appropriate for `newEndVnode`. For this we can use
867
- // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
868
- // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
869
- // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
870
- //
871
- // <old-start-node />
872
- // <some-intervening-node />
873
- // <old-end-node />
874
- // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
875
- // <next-sibling />
876
- //
877
- // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
878
- // the node for `oldStartVnode` at the end of the children of
879
- // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
880
- // aren't any siblings, and passing `null` to `Node.insertBefore` will
881
- // append it to the children of the parent element.
882
663
  parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
883
664
  oldStartVnode = oldCh[++oldStartIdx];
884
665
  newEndVnode = newCh[--newEndIdx];
885
666
  }
886
667
  else if (isSameVnode(oldEndVnode, newStartVnode)) {
887
- // case: "Vnode moved left"
888
- //
889
- // We've found that the first node in our window on the new children is
890
- // the same VNode as the _last_ node in our window on the old children.
891
- // Visually, this is the layout of these two nodes:
892
- //
893
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
894
- // ^^^^^^^^^^^^^
895
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
896
- // ^^^^^^^^^^^
897
- //
898
- // In this situation we need to patch `newStartVnode` onto `oldEndVnode`
899
- // (which will handle updating any changed attributes, reconciling their
900
- // children etc) but we also need to move the DOM node to which
901
- // `oldEndVnode` corresponds.
668
+ // Vnode moved left
902
669
  if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
903
670
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
904
671
  }
905
672
  patch(oldEndVnode, newStartVnode);
906
- // We've already checked above if `oldStartVnode` and `newStartVnode` are
907
- // the same node, so since we're here we know that they are not. Thus we
908
- // can move the element for `oldEndVnode` _before_ the element for
909
- // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
910
- // future.
911
673
  parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
912
674
  oldEndVnode = oldCh[--oldEndIdx];
913
675
  newStartVnode = newCh[++newStartIdx];
914
676
  }
915
677
  else {
916
- // Here we do some checks to match up old and new nodes based on the
917
- // `$key$` attribute, which is set by putting a `key="my-key"` attribute
918
- // in the JSX for a DOM element in the implementation of a Stencil
919
- // component.
920
- //
921
- // First we check to see if there are any nodes in the array of old
922
- // children which have the same key as the first node in the new
923
- // children.
678
+ // createKeyToOldIdx
924
679
  idxInOld = -1;
925
680
  {
926
681
  for (i = oldStartIdx; i <= oldEndIdx; ++i) {
@@ -931,32 +686,23 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
931
686
  }
932
687
  }
933
688
  if (idxInOld >= 0) {
934
- // We found a node in the old children which matches up with the first
935
- // node in the new children! So let's deal with that
936
689
  elmToMove = oldCh[idxInOld];
937
690
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
938
- // the tag doesn't match so we'll need a new DOM element
939
691
  node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
940
692
  }
941
693
  else {
942
694
  patch(elmToMove, newStartVnode);
943
- // invalidate the matching old node so that we won't try to update it
944
- // again later on
945
695
  oldCh[idxInOld] = undefined;
946
696
  node = elmToMove.$elm$;
947
697
  }
948
698
  newStartVnode = newCh[++newStartIdx];
949
699
  }
950
700
  else {
951
- // We either didn't find an element in the old children that matches
952
- // the key of the first new child OR the build is not using `key`
953
- // attributes at all. In either case we need to create a new element
954
- // for the new node.
701
+ // new element
955
702
  node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
956
703
  newStartVnode = newCh[++newStartIdx];
957
704
  }
958
705
  if (node) {
959
- // if we created a new node then handle inserting it to the DOM
960
706
  {
961
707
  parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
962
708
  }
@@ -964,44 +710,21 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
964
710
  }
965
711
  }
966
712
  if (oldStartIdx > oldEndIdx) {
967
- // we have some more new nodes to add which don't match up with old nodes
968
713
  addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
969
714
  }
970
715
  else if (newStartIdx > newEndIdx) {
971
- // there are nodes in the `oldCh` array which no longer correspond to nodes
972
- // in the new array, so lets remove them (which entails cleaning up the
973
- // relevant DOM nodes)
974
716
  removeVnodes(oldCh, oldStartIdx, oldEndIdx);
975
717
  }
976
718
  };
977
- /**
978
- * Compare two VNodes to determine if they are the same
979
- *
980
- * **NB**: This function is an equality _heuristic_ based on the available
981
- * information set on the two VNodes and can be misleading under certain
982
- * circumstances. In particular, if the two nodes do not have `key` attrs
983
- * (available under `$key$` on VNodes) then the function falls back on merely
984
- * checking that they have the same tag.
985
- *
986
- * So, in other words, if `key` attrs are not set on VNodes which may be
987
- * changing order within a `children` array or something along those lines then
988
- * we could obtain a false negative and then have to do needless re-rendering
989
- * (i.e. we'd say two VNodes aren't equal when in fact they should be).
990
- *
991
- * @param leftVNode the first VNode to check
992
- * @param rightVNode the second VNode to check
993
- * @returns whether they're equal or not
994
- */
995
- const isSameVnode = (leftVNode, rightVNode) => {
719
+ const isSameVnode = (vnode1, vnode2) => {
996
720
  // compare if two vnode to see if they're "technically" the same
997
721
  // need to have the same element tag, and same key to be the same
998
- if (leftVNode.$tag$ === rightVNode.$tag$) {
999
- if (leftVNode.$tag$ === 'slot') {
1000
- return leftVNode.$name$ === rightVNode.$name$;
722
+ if (vnode1.$tag$ === vnode2.$tag$) {
723
+ if (vnode1.$tag$ === 'slot') {
724
+ return vnode1.$name$ === vnode2.$name$;
1001
725
  }
1002
- // this will be set if components in the build have `key` attrs set on them
1003
726
  {
1004
- return leftVNode.$key$ === rightVNode.$key$;
727
+ return vnode1.$key$ === vnode2.$key$;
1005
728
  }
1006
729
  }
1007
730
  return false;
@@ -1014,14 +737,6 @@ const referenceNode = (node) => {
1014
737
  return (node && node['s-ol']) || node;
1015
738
  };
1016
739
  const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
1017
- /**
1018
- * Handle reconciling an outdated VNode with a new one which corresponds to
1019
- * it. This function handles flushing updates to the DOM and reconciling the
1020
- * children of the two nodes (if any).
1021
- *
1022
- * @param oldVNode an old VNode whose DOM element and children we want to update
1023
- * @param newVNode a new VNode representing an updated version of the old one
1024
- */
1025
740
  const patch = (oldVNode, newVNode) => {
1026
741
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
1027
742
  const oldChildren = oldVNode.$children$;
@@ -1035,6 +750,7 @@ const patch = (oldVNode, newVNode) => {
1035
750
  // only add this to the when the compiler sees we're using an svg somewhere
1036
751
  isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1037
752
  }
753
+ // element node
1038
754
  {
1039
755
  if (tag === 'slot')
1040
756
  ;
@@ -1047,7 +763,6 @@ const patch = (oldVNode, newVNode) => {
1047
763
  }
1048
764
  if (oldChildren !== null && newChildren !== null) {
1049
765
  // looks like there's child vnodes for both the old and new vnodes
1050
- // so we need to call `updateChildren` to reconcile them
1051
766
  updateChildren(elm, oldChildren, newVNode, newChildren);
1052
767
  }
1053
768
  else if (newChildren !== null) {
@@ -1088,7 +803,7 @@ const updateFallbackSlotVisibility = (elm) => {
1088
803
  let nodeType;
1089
804
  for (i = 0, ilen = childNodes.length; i < ilen; i++) {
1090
805
  childNode = childNodes[i];
1091
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
806
+ if (childNode.nodeType === 1 /* ElementNode */) {
1092
807
  if (childNode['s-sr']) {
1093
808
  // this is a slot fallback node
1094
809
  // get the slot name for this slot reference node
@@ -1100,7 +815,7 @@ const updateFallbackSlotVisibility = (elm) => {
1100
815
  nodeType = childNodes[j].nodeType;
1101
816
  if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
1102
817
  // this sibling node is from a different component OR is a named fallback slot node
1103
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
818
+ if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
1104
819
  childNode.hidden = true;
1105
820
  break;
1106
821
  }
@@ -1109,8 +824,8 @@ const updateFallbackSlotVisibility = (elm) => {
1109
824
  // this is a default fallback slot node
1110
825
  // any element or text node (with content)
1111
826
  // should hide the default fallback slot node
1112
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1113
- (nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
827
+ if (nodeType === 1 /* ElementNode */ ||
828
+ (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
1114
829
  childNode.hidden = true;
1115
830
  break;
1116
831
  }
@@ -1188,13 +903,13 @@ const relocateSlotContent = (elm) => {
1188
903
  }
1189
904
  }
1190
905
  }
1191
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
906
+ if (childNode.nodeType === 1 /* ElementNode */) {
1192
907
  relocateSlotContent(childNode);
1193
908
  }
1194
909
  }
1195
910
  };
1196
911
  const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1197
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
912
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1198
913
  if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
1199
914
  return true;
1200
915
  }
@@ -1214,18 +929,6 @@ const callNodeRefs = (vNode) => {
1214
929
  vNode.$children$ && vNode.$children$.map(callNodeRefs);
1215
930
  }
1216
931
  };
1217
- /**
1218
- * The main entry point for Stencil's virtual DOM-based rendering engine
1219
- *
1220
- * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1221
- * function will handle creating a virtual DOM tree with a single root, patching
1222
- * the current virtual DOM tree onto an old one (if any), dealing with slot
1223
- * relocation, and reflecting attributes.
1224
- *
1225
- * @param hostRef data needed to root and render the virtual DOM tree, such as
1226
- * the DOM node into which it should be rendered.
1227
- * @param renderFnResults the virtual DOM nodes to be rendered
1228
- */
1229
932
  const renderVdom = (hostRef, renderFnResults) => {
1230
933
  const hostElm = hostRef.$hostElement$;
1231
934
  const cmpMeta = hostRef.$cmpMeta$;
@@ -1237,12 +940,12 @@ const renderVdom = (hostRef, renderFnResults) => {
1237
940
  cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1238
941
  }
1239
942
  rootVnode.$tag$ = null;
1240
- rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
943
+ rootVnode.$flags$ |= 4 /* isHost */;
1241
944
  hostRef.$vnode$ = rootVnode;
1242
945
  rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
1243
946
  {
1244
947
  contentRef = hostElm['s-cr'];
1245
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
948
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1246
949
  // always reset
1247
950
  checkSlotFallbackVisibility = false;
1248
951
  }
@@ -1251,7 +954,7 @@ const renderVdom = (hostRef, renderFnResults) => {
1251
954
  {
1252
955
  // while we're moving nodes around existing nodes, temporarily disable
1253
956
  // the disconnectCallback from working
1254
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
957
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
1255
958
  if (checkSlotRelocate) {
1256
959
  relocateSlotContent(rootVnode.$elm$);
1257
960
  let relocateData;
@@ -1309,7 +1012,7 @@ const renderVdom = (hostRef, renderFnResults) => {
1309
1012
  }
1310
1013
  else {
1311
1014
  // this node doesn't have a slot home to go to, so let's hide it
1312
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1015
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1313
1016
  nodeToRelocate.hidden = true;
1314
1017
  }
1315
1018
  }
@@ -1320,11 +1023,37 @@ const renderVdom = (hostRef, renderFnResults) => {
1320
1023
  }
1321
1024
  // done moving nodes around
1322
1025
  // allow the disconnect callback to work again
1323
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1026
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1324
1027
  // always reset
1325
1028
  relocateNodes.length = 0;
1326
1029
  }
1327
1030
  };
1031
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
1032
+ const createEvent = (ref, name, flags) => {
1033
+ const elm = getElement(ref);
1034
+ return {
1035
+ emit: (detail) => {
1036
+ return emitEvent(elm, name, {
1037
+ bubbles: !!(flags & 4 /* Bubbles */),
1038
+ composed: !!(flags & 2 /* Composed */),
1039
+ cancelable: !!(flags & 1 /* Cancellable */),
1040
+ detail,
1041
+ });
1042
+ },
1043
+ };
1044
+ };
1045
+ /**
1046
+ * Helper function to create & dispatch a custom Event on a provided target
1047
+ * @param elm the target of the Event
1048
+ * @param name the name to give the custom Event
1049
+ * @param opts options for configuring a custom Event
1050
+ * @returns the custom Event
1051
+ */
1052
+ const emitEvent = (elm, name, opts) => {
1053
+ const ev = plt.ce(name, opts);
1054
+ elm.dispatchEvent(ev);
1055
+ return ev;
1056
+ };
1328
1057
  const attachToAncestor = (hostRef, ancestorComponent) => {
1329
1058
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1330
1059
  ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
@@ -1332,10 +1061,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
1332
1061
  };
1333
1062
  const scheduleUpdate = (hostRef, isInitialLoad) => {
1334
1063
  {
1335
- hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1064
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1336
1065
  }
1337
- if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1338
- hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1066
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1067
+ hostRef.$flags$ |= 512 /* needsRerender */;
1339
1068
  return;
1340
1069
  }
1341
1070
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
@@ -1351,7 +1080,7 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
1351
1080
  let promise;
1352
1081
  if (isInitialLoad) {
1353
1082
  {
1354
- hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
1083
+ hostRef.$flags$ |= 256 /* isListenReady */;
1355
1084
  if (hostRef.$queuedListeners$) {
1356
1085
  hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1357
1086
  hostRef.$queuedListeners$ = null;
@@ -1380,6 +1109,9 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1380
1109
  {
1381
1110
  callRender(hostRef, instance);
1382
1111
  }
1112
+ if (plt.$cssShim$) {
1113
+ plt.$cssShim$.updateHost(elm);
1114
+ }
1383
1115
  if (rc) {
1384
1116
  // ok, so turns out there are some child host elements
1385
1117
  // waiting on this parent element to load
@@ -1397,7 +1129,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1397
1129
  }
1398
1130
  else {
1399
1131
  Promise.all(childrenPromises).then(postUpdate);
1400
- hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1132
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1401
1133
  childrenPromises.length = 0;
1402
1134
  }
1403
1135
  }
@@ -1407,10 +1139,10 @@ const callRender = (hostRef, instance, elm) => {
1407
1139
  renderingRef = instance;
1408
1140
  instance = instance.render && instance.render();
1409
1141
  {
1410
- hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1142
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
1411
1143
  }
1412
1144
  {
1413
- hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1145
+ hostRef.$flags$ |= 2 /* hasRendered */;
1414
1146
  }
1415
1147
  {
1416
1148
  {
@@ -1439,8 +1171,8 @@ const postUpdateComponent = (hostRef) => {
1439
1171
  {
1440
1172
  safeCall(instance, 'componentDidRender');
1441
1173
  }
1442
- if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1443
- hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1174
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1175
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1444
1176
  {
1445
1177
  // DOM WRITE!
1446
1178
  addHydratedFlag(elm);
@@ -1469,10 +1201,10 @@ const postUpdateComponent = (hostRef) => {
1469
1201
  hostRef.$onRenderResolve$();
1470
1202
  hostRef.$onRenderResolve$ = undefined;
1471
1203
  }
1472
- if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1204
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
1473
1205
  nextTick(() => scheduleUpdate(hostRef, false));
1474
1206
  }
1475
- hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1207
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
1476
1208
  }
1477
1209
  // ( •_•)
1478
1210
  // ( •_•)>⌐■-■
@@ -1483,7 +1215,7 @@ const forceUpdate = (ref) => {
1483
1215
  const hostRef = getHostRef(ref);
1484
1216
  const isConnected = hostRef.$hostElement$.isConnected;
1485
1217
  if (isConnected &&
1486
- (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1218
+ (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1487
1219
  scheduleUpdate(hostRef, false);
1488
1220
  }
1489
1221
  // Returns "true" when the forced update was successfully scheduled
@@ -1514,6 +1246,53 @@ const then = (promise, thenFn) => {
1514
1246
  };
1515
1247
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1516
1248
  ;
1249
+ /**
1250
+ * Parse a new property value for a given property type.
1251
+ *
1252
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
1253
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
1254
+ * 1. `any`, the type given to `propValue` in the function signature
1255
+ * 2. the type stored from `propType`.
1256
+ *
1257
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
1258
+ *
1259
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
1260
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
1261
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
1262
+ * ```tsx
1263
+ * <my-cmp prop-val={0}></my-cmp>
1264
+ * ```
1265
+ *
1266
+ * HTML prop values on the other hand, will always a string
1267
+ *
1268
+ * @param propValue the new value to coerce to some type
1269
+ * @param propType the type of the prop, expressed as a binary number
1270
+ * @returns the parsed/coerced value
1271
+ */
1272
+ const parsePropertyValue = (propValue, propType) => {
1273
+ // ensure this value is of the correct prop type
1274
+ if (propValue != null && !isComplexType(propValue)) {
1275
+ if (propType & 4 /* Boolean */) {
1276
+ // per the HTML spec, any string value means it is a boolean true value
1277
+ // but we'll cheat here and say that the string "false" is the boolean false
1278
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
1279
+ }
1280
+ if (propType & 2 /* Number */) {
1281
+ // force it to be a number
1282
+ return parseFloat(propValue);
1283
+ }
1284
+ if (propType & 1 /* String */) {
1285
+ // could have been passed as a number or boolean
1286
+ // but we still want it as a string
1287
+ return String(propValue);
1288
+ }
1289
+ // redundant return here for better minification
1290
+ return propValue;
1291
+ }
1292
+ // not sure exactly what type we want
1293
+ // so no need to change to a different type
1294
+ return propValue;
1295
+ };
1517
1296
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1518
1297
  const setValue = (ref, propName, newVal, cmpMeta) => {
1519
1298
  // check our new property value against our internal value
@@ -1526,13 +1305,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1526
1305
  // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1527
1306
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1528
1307
  const didValueChange = newVal !== oldVal && !areBothNaN;
1529
- if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1308
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1530
1309
  // gadzooks! the property's value has changed!!
1531
1310
  // set our new value!
1532
1311
  hostRef.$instanceValues$.set(propName, newVal);
1533
1312
  if (instance) {
1534
1313
  // get an array of method names of watch functions to call
1535
- if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
1314
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1536
1315
  const watchMethods = cmpMeta.$watchers$[propName];
1537
1316
  if (watchMethods) {
1538
1317
  // this instance is watching for when this property changed
@@ -1547,7 +1326,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1547
1326
  });
1548
1327
  }
1549
1328
  }
1550
- if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1329
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1551
1330
  // looks like this value actually changed, so we've got work to do!
1552
1331
  // but only if we've already rendered, otherwise just chill out
1553
1332
  // queue that we need to do an update, but don't worry about queuing
@@ -1557,16 +1336,6 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1557
1336
  }
1558
1337
  }
1559
1338
  };
1560
- /**
1561
- * Attach a series of runtime constructs to a compiled Stencil component
1562
- * constructor, including getters and setters for the `@Prop` and `@State`
1563
- * decorators, callbacks for when attributes change, and so on.
1564
- *
1565
- * @param Cstr the constructor for a component that we need to process
1566
- * @param cmpMeta metadata collected previously about the component
1567
- * @param flags a number used to store a series of bit flags
1568
- * @returns a reference to the same constructor passed in (but now mutated)
1569
- */
1570
1339
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1571
1340
  if (cmpMeta.$members$) {
1572
1341
  if (Cstr.watchers) {
@@ -1576,8 +1345,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1576
1345
  const members = Object.entries(cmpMeta.$members$);
1577
1346
  const prototype = Cstr.prototype;
1578
1347
  members.map(([memberName, [memberFlags]]) => {
1579
- if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1580
- ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1348
+ if ((memberFlags & 31 /* Prop */ ||
1349
+ ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
1581
1350
  // proxyComponent - prop
1582
1351
  Object.defineProperty(prototype, memberName, {
1583
1352
  get() {
@@ -1592,8 +1361,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1592
1361
  enumerable: true,
1593
1362
  });
1594
1363
  }
1595
- else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
1596
- memberFlags & 64 /* MEMBER_FLAGS.Method */) {
1364
+ else if (flags & 1 /* isElementConstructor */ &&
1365
+ memberFlags & 64 /* Method */) {
1597
1366
  // proxyComponent - method
1598
1367
  Object.defineProperty(prototype, memberName, {
1599
1368
  value(...args) {
@@ -1603,7 +1372,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1603
1372
  });
1604
1373
  }
1605
1374
  });
1606
- if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1375
+ if ((flags & 1 /* isElementConstructor */)) {
1607
1376
  const attrNameToPropName = new Map();
1608
1377
  prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1609
1378
  plt.jmp(() => {
@@ -1659,11 +1428,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1659
1428
  // create an array of attributes to observe
1660
1429
  // and also create a map of html attribute name to js property name
1661
1430
  Cstr.observedAttributes = members
1662
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1431
+ .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
1663
1432
  .map(([propName, m]) => {
1664
1433
  const attrName = m[1] || propName;
1665
1434
  attrNameToPropName.set(attrName, propName);
1666
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1435
+ if (m[0] & 512 /* ReflectAttr */) {
1667
1436
  cmpMeta.$attrsToReflect$.push([propName, attrName]);
1668
1437
  }
1669
1438
  return attrName;
@@ -1674,10 +1443,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1674
1443
  };
1675
1444
  const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1676
1445
  // initializeComponent
1677
- if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1446
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1678
1447
  {
1679
1448
  // we haven't initialized this element yet
1680
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1449
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1681
1450
  // lazy loaded components
1682
1451
  // request the component's implementation to be
1683
1452
  // wired up with the host element
@@ -1695,7 +1464,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1695
1464
  {
1696
1465
  cmpMeta.$watchers$ = Cstr.watchers;
1697
1466
  }
1698
- proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1467
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1699
1468
  Cstr.isProxied = true;
1700
1469
  }
1701
1470
  const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
@@ -1703,7 +1472,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1703
1472
  // but let's keep track of when we start and stop
1704
1473
  // so that the getters/setters don't incorrectly step on data
1705
1474
  {
1706
- hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1475
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
1707
1476
  }
1708
1477
  // construct the lazy-loaded component implementation
1709
1478
  // passing the hostRef is very important during
@@ -1716,10 +1485,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1716
1485
  consoleError(e);
1717
1486
  }
1718
1487
  {
1719
- hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1488
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1720
1489
  }
1721
1490
  {
1722
- hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1491
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1723
1492
  }
1724
1493
  endNewInstance();
1725
1494
  fireConnectedCallback(hostRef.$lazyInstance$);
@@ -1730,7 +1499,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1730
1499
  const scopeId = getScopeId(cmpMeta);
1731
1500
  if (!styles.has(scopeId)) {
1732
1501
  const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1733
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1502
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1734
1503
  endRegisterStyles();
1735
1504
  }
1736
1505
  }
@@ -1757,20 +1526,19 @@ const fireConnectedCallback = (instance) => {
1757
1526
  }
1758
1527
  };
1759
1528
  const connectedCallback = (elm) => {
1760
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1529
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1761
1530
  const hostRef = getHostRef(elm);
1762
1531
  const cmpMeta = hostRef.$cmpMeta$;
1763
1532
  const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1764
- if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1533
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1765
1534
  // first time this component has connected
1766
- hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1535
+ hostRef.$flags$ |= 1 /* hasConnected */;
1767
1536
  {
1768
1537
  // initUpdate
1769
1538
  // if the slot polyfill is required we'll need to put some nodes
1770
1539
  // in here to act as original content anchors as we move nodes around
1771
1540
  // host element has been connected to the DOM
1772
- if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
1773
- cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
1541
+ if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1774
1542
  setContentReference(elm);
1775
1543
  }
1776
1544
  }
@@ -1793,7 +1561,7 @@ const connectedCallback = (elm) => {
1793
1561
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1794
1562
  if (cmpMeta.$members$) {
1795
1563
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1796
- if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1564
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1797
1565
  const value = elm[memberName];
1798
1566
  delete elm[memberName];
1799
1567
  elm[memberName] = value;
@@ -1831,7 +1599,7 @@ const setContentReference = (elm) => {
1831
1599
  elm.insertBefore(contentRefElm, elm.firstChild);
1832
1600
  };
1833
1601
  const disconnectedCallback = (elm) => {
1834
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1602
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1835
1603
  const hostRef = getHostRef(elm);
1836
1604
  const instance = hostRef.$lazyInstance$ ;
1837
1605
  {
@@ -1840,13 +1608,16 @@ const disconnectedCallback = (elm) => {
1840
1608
  hostRef.$rmListeners$ = undefined;
1841
1609
  }
1842
1610
  }
1611
+ // clear CSS var-shim tracking
1612
+ if (plt.$cssShim$) {
1613
+ plt.$cssShim$.removeHost(elm);
1614
+ }
1843
1615
  {
1844
1616
  safeCall(instance, 'disconnectedCallback');
1845
1617
  }
1846
1618
  }
1847
1619
  };
1848
1620
  const bootstrapLazy = (lazyBundles, options = {}) => {
1849
- var _a;
1850
1621
  const endBootstrap = createTime();
1851
1622
  const cmpTags = [];
1852
1623
  const exclude = options.exclude || [];
@@ -1911,18 +1682,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1911
1682
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
1912
1683
  if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1913
1684
  cmpTags.push(tagName);
1914
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1685
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1915
1686
  }
1916
1687
  });
1917
1688
  });
1918
1689
  {
1919
1690
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1920
1691
  visibilityStyle.setAttribute('data-styles', '');
1921
- // Apply CSP nonce to the style tag if it exists
1922
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1923
- if (nonce != null) {
1924
- visibilityStyle.setAttribute('nonce', nonce);
1925
- }
1926
1692
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1927
1693
  }
1928
1694
  // Process deferred connectedCallbacks now all components have been registered
@@ -1938,48 +1704,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1938
1704
  // Fallback appLoad event
1939
1705
  endBootstrap();
1940
1706
  };
1941
- const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1942
- if (listeners) {
1943
- listeners.map(([flags, name, method]) => {
1944
- const target = getHostListenerTarget(elm, flags) ;
1945
- const handler = hostListenerProxy(hostRef, method);
1946
- const opts = hostListenerOpts(flags);
1947
- plt.ael(target, name, handler, opts);
1948
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1949
- });
1950
- }
1951
- };
1952
- const hostListenerProxy = (hostRef, methodName) => (ev) => {
1953
- try {
1954
- {
1955
- if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
1956
- // instance is ready, let's call it's member method for this event
1957
- hostRef.$lazyInstance$[methodName](ev);
1958
- }
1959
- else {
1960
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1961
- }
1962
- }
1963
- }
1964
- catch (e) {
1965
- consoleError(e);
1966
- }
1967
- };
1968
- const getHostListenerTarget = (elm, flags) => {
1969
- if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
1970
- return doc;
1971
- return elm;
1972
- };
1973
- // prettier-ignore
1974
- const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1975
- /**
1976
- * Assigns the given value to the nonce property on the runtime platform object.
1977
- * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1978
- * @param nonce The value to be assigned to the platform nonce property.
1979
- * @returns void
1980
- */
1981
- const setNonce = (nonce) => (plt.$nonce$ = nonce);
1982
- const hostRefs = /*@__PURE__*/ new WeakMap();
1707
+ const hostRefs = new WeakMap();
1983
1708
  const getHostRef = (ref) => hostRefs.get(ref);
1984
1709
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1985
1710
  const registerHost = (elm, cmpMeta) => {
@@ -2045,35 +1770,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2045
1770
  return importedModule[exportName];
2046
1771
  }, consoleError);
2047
1772
  };
2048
- const styles = /*@__PURE__*/ new Map();
2049
- const win = typeof window !== 'undefined' ? window : {};
2050
- const doc = win.document || { head: {} };
2051
- const plt = {
2052
- $flags$: 0,
2053
- $resourcesUrl$: '',
2054
- jmp: (h) => h(),
2055
- raf: (h) => requestAnimationFrame(h),
2056
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
2057
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2058
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
2059
- };
2060
- const promiseResolve = (v) => Promise.resolve(v);
2061
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
2062
- try {
2063
- new CSSStyleSheet();
2064
- return typeof new CSSStyleSheet().replaceSync === 'function';
2065
- }
2066
- catch (e) { }
2067
- return false;
2068
- })()
2069
- ;
1773
+ const styles = new Map();
2070
1774
  const queueDomReads = [];
2071
1775
  const queueDomWrites = [];
2072
1776
  const queueTask = (queue, write) => (cb) => {
2073
1777
  queue.push(cb);
2074
1778
  if (!queuePending) {
2075
1779
  queuePending = true;
2076
- if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
1780
+ if (write && plt.$flags$ & 4 /* queueSync */) {
2077
1781
  nextTick(flush);
2078
1782
  }
2079
1783
  else {
@@ -2110,6 +1814,4 @@ const flush = () => {
2110
1814
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2111
1815
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2112
1816
 
2113
- export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, getRenderingRef as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2114
-
2115
- //# sourceMappingURL=index-068eebfc.js.map
1817
+ export { CSS as C, Host as H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, createEvent as c, doc as d, getElement as e, forceUpdate as f, getRenderingRef as g, h, plt as p, registerInstance as r, win as w };