@xplortech/apollo-core 1.0.0-beta.17 → 1.0.0-beta.2

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 (459) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/build/style.css +2758 -1516
  3. package/dist/apollo-core/apollo-core.css +14 -4597
  4. package/dist/apollo-core/apollo-core.esm.js +1 -2
  5. package/dist/apollo-core/index.esm.js +0 -2
  6. package/dist/apollo-core/p-09b2f746.entry.js +1 -0
  7. package/dist/apollo-core/p-1b1e7207.entry.js +1 -0
  8. package/dist/apollo-core/p-20389bb6.entry.js +1 -0
  9. package/dist/apollo-core/p-25983fde.entry.js +1 -0
  10. package/dist/apollo-core/p-2f90296c.js +10 -0
  11. package/dist/apollo-core/p-4a348764.entry.js +1 -0
  12. package/dist/apollo-core/p-4e2b69e8.entry.js +1 -0
  13. package/dist/apollo-core/p-84bf6b2d.entry.js +1 -0
  14. package/dist/apollo-core/p-880c0359.entry.js +1 -0
  15. package/dist/apollo-core/p-8e47a5be.entry.js +1 -0
  16. package/dist/apollo-core/p-93958292.entry.js +1 -0
  17. package/dist/apollo-core/p-93c27db5.entry.js +1 -0
  18. package/dist/apollo-core/p-ad90fe4d.js +1 -2
  19. package/dist/apollo-core/p-b2327e2c.entry.js +1 -0
  20. package/dist/apollo-core/p-c3a12469.entry.js +1 -0
  21. package/dist/apollo-core/p-c55b5d9c.entry.js +1 -0
  22. package/dist/apollo-core/p-e369d7af.entry.js +1 -0
  23. package/dist/apollo-core/p-e60ecaef.entry.js +1 -0
  24. package/dist/apollo-core/p-f929c958.js +1 -0
  25. package/dist/cjs/apollo-core.cjs.js +3 -12
  26. package/dist/cjs/{index-000e170c.js → index-54ba5804.js} +216 -768
  27. package/dist/cjs/index.cjs.js +0 -2
  28. package/dist/cjs/loader.cjs.js +3 -6
  29. package/dist/cjs/regular-872f5226.js +16043 -0
  30. package/dist/cjs/v4-14140ff3.js +0 -2
  31. package/dist/cjs/xpl-application-shell.cjs.entry.js +13 -10
  32. package/dist/cjs/xpl-avatar_12.cjs.entry.js +299 -0
  33. package/dist/cjs/xpl-backdrop.cjs.entry.js +5 -3
  34. package/dist/cjs/xpl-button-row.cjs.entry.js +1 -6
  35. package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -10
  36. package/dist/cjs/xpl-divider.cjs.entry.js +1 -4
  37. package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +4 -16
  38. package/dist/cjs/xpl-dropdown_2.cjs.entry.js +12 -14
  39. package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -3
  40. package/dist/cjs/xpl-grid.cjs.entry.js +1 -3
  41. package/dist/cjs/xpl-input.cjs.entry.js +25 -22
  42. package/dist/cjs/xpl-list.cjs.entry.js +25 -4
  43. package/dist/cjs/xpl-main-nav.cjs.entry.js +4 -3
  44. package/dist/cjs/xpl-pagination.cjs.entry.js +2 -7
  45. package/dist/cjs/xpl-select.cjs.entry.js +25 -43
  46. package/dist/cjs/xpl-toggle.cjs.entry.js +4 -9
  47. package/dist/collection/collection-manifest.json +3 -6
  48. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +109 -125
  49. package/dist/collection/components/xpl-avatar/xpl-avatar.js +144 -151
  50. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +28 -27
  51. package/dist/collection/components/xpl-badge/xpl-badge.js +39 -44
  52. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +5 -3
  53. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +5 -3
  54. package/dist/collection/components/xpl-button/xpl-button.js +188 -228
  55. package/dist/collection/components/xpl-button-row/xpl-button-row.js +104 -106
  56. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +171 -182
  57. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +126 -134
  58. package/dist/collection/components/xpl-content-area/xpl-content-area.js +31 -28
  59. package/dist/collection/components/xpl-divider/xpl-divider.js +23 -27
  60. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +41 -47
  61. package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +22 -27
  62. package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +55 -83
  63. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +161 -169
  64. package/dist/collection/components/xpl-grid/xpl-grid.js +1 -2
  65. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +74 -76
  66. package/dist/collection/components/xpl-input/xpl-input.js +419 -397
  67. package/dist/collection/components/xpl-list/xpl-list.js +77 -43
  68. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +54 -48
  69. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +49 -48
  70. package/dist/collection/components/xpl-pagination/xpl-pagination.js +128 -117
  71. package/dist/collection/components/xpl-radio/xpl-radio.js +148 -158
  72. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +4 -3
  73. package/dist/collection/components/xpl-select/xpl-select.js +235 -296
  74. package/dist/collection/components/xpl-table/xpl-table.js +148 -215
  75. package/dist/collection/components/xpl-tag/xpl-tag.js +25 -25
  76. package/dist/collection/components/xpl-toggle/xpl-toggle.js +135 -138
  77. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +52 -79
  78. package/dist/custom-elements/index.d.ts +219 -0
  79. package/dist/custom-elements/index.js +20201 -0
  80. package/dist/esm/apollo-core.js +3 -9
  81. package/dist/esm/{index-56581b5c.js → index-3df6db84.js} +217 -768
  82. package/dist/esm/index.js +0 -2
  83. package/dist/esm/loader.js +3 -6
  84. package/dist/esm/polyfills/css-shim.js +1 -1
  85. package/dist/esm/regular-86225e9d.js +16041 -0
  86. package/dist/esm/v4-929670b7.js +0 -2
  87. package/dist/esm/xpl-application-shell.entry.js +13 -10
  88. package/dist/esm/xpl-avatar_12.entry.js +284 -0
  89. package/dist/esm/xpl-backdrop.entry.js +5 -3
  90. package/dist/esm/xpl-button-row.entry.js +1 -6
  91. package/dist/esm/xpl-choicelist.entry.js +1 -10
  92. package/dist/esm/xpl-divider.entry.js +1 -4
  93. package/dist/esm/xpl-dropdown-group_3.entry.js +4 -16
  94. package/dist/esm/xpl-dropdown_2.entry.js +12 -14
  95. package/dist/esm/xpl-grid-item.entry.js +1 -3
  96. package/dist/esm/xpl-grid.entry.js +1 -3
  97. package/dist/esm/xpl-input.entry.js +25 -22
  98. package/dist/esm/xpl-list.entry.js +25 -4
  99. package/dist/esm/xpl-main-nav.entry.js +4 -3
  100. package/dist/esm/xpl-pagination.entry.js +2 -7
  101. package/dist/esm/xpl-select.entry.js +25 -43
  102. package/dist/esm/xpl-toggle.entry.js +4 -9
  103. package/dist/stories/application-shell.stories.js +8 -18
  104. package/dist/stories/avatar.stories.js +0 -1
  105. package/dist/stories/backdrop.stories.js +0 -1
  106. package/dist/stories/badge.stories.js +0 -1
  107. package/dist/stories/breadcrumbs.stories.js +0 -1
  108. package/dist/stories/button-row.stories.js +0 -1
  109. package/dist/stories/button.stories.js +5 -18
  110. package/dist/stories/checkbox.stories.js +0 -1
  111. package/dist/stories/choicelist.stories.js +0 -1
  112. package/dist/stories/content-area.stories.js +0 -1
  113. package/dist/stories/divider.stories.js +0 -1
  114. package/dist/stories/dropdown.stories.js +65 -74
  115. package/dist/stories/grid.stories.js +0 -1
  116. package/dist/stories/input.stories.js +0 -1
  117. package/dist/stories/list.stories.js +2 -3
  118. package/dist/stories/main-nav.stories.js +0 -1
  119. package/dist/stories/pagination.stories.js +0 -1
  120. package/dist/stories/radio.stories.js +0 -1
  121. package/dist/stories/secondary-nav.stories.js +0 -1
  122. package/dist/stories/select.stories.js +32 -109
  123. package/dist/stories/table.stories.js +7 -24
  124. package/dist/stories/tabs.stories.js +0 -1
  125. package/dist/stories/toggle.stories.js +0 -1
  126. package/dist/stories/utility-bar.stories.js +6 -2
  127. package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/application-shell.stories.d.ts +5 -14
  128. package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/button.stories.d.ts +2 -10
  129. package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/dropdown.stories.d.ts +1 -17
  130. package/dist/types/Users/fernandogelin/Projects/apollo-admin/packages/apollo/.stencil/stories/select.stories.d.ts +74 -0
  131. package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/table.stories.d.ts +1 -22
  132. package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +1 -6
  133. package/dist/types/components/xpl-button/xpl-button.d.ts +0 -6
  134. package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +1 -2
  135. package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +0 -1
  136. package/dist/types/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.d.ts +1 -7
  137. package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +5 -7
  138. package/dist/types/components/xpl-input/xpl-input.d.ts +2 -0
  139. package/dist/types/components/xpl-list/xpl-list.d.ts +3 -2
  140. package/dist/types/components/xpl-select/xpl-select.d.ts +1 -16
  141. package/dist/types/components/xpl-table/xpl-table.d.ts +7 -29
  142. package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +1 -5
  143. package/dist/types/components.d.ts +21 -276
  144. package/dist/types/stencil-public-runtime.d.ts +23 -97
  145. package/loader/index.d.ts +1 -9
  146. package/loader/package.json +0 -1
  147. package/package.json +28 -21
  148. package/LICENSE +0 -21
  149. package/dist/apollo-core/apollo-core.esm.js.map +0 -1
  150. package/dist/apollo-core/index.esm.js.map +0 -1
  151. package/dist/apollo-core/p-1fa46bc3.entry.js +0 -2
  152. package/dist/apollo-core/p-1fa46bc3.entry.js.map +0 -1
  153. package/dist/apollo-core/p-29f4679d.entry.js +0 -2
  154. package/dist/apollo-core/p-29f4679d.entry.js.map +0 -1
  155. package/dist/apollo-core/p-3f3cc34e.entry.js +0 -2
  156. package/dist/apollo-core/p-3f3cc34e.entry.js.map +0 -1
  157. package/dist/apollo-core/p-5372bf3e.entry.js +0 -2
  158. package/dist/apollo-core/p-5372bf3e.entry.js.map +0 -1
  159. package/dist/apollo-core/p-5ceaec87.entry.js +0 -2
  160. package/dist/apollo-core/p-5ceaec87.entry.js.map +0 -1
  161. package/dist/apollo-core/p-60d4d252.entry.js +0 -2
  162. package/dist/apollo-core/p-60d4d252.entry.js.map +0 -1
  163. package/dist/apollo-core/p-6797b2b7.entry.js +0 -7
  164. package/dist/apollo-core/p-6797b2b7.entry.js.map +0 -1
  165. package/dist/apollo-core/p-6acc4122.entry.js +0 -2
  166. package/dist/apollo-core/p-6acc4122.entry.js.map +0 -1
  167. package/dist/apollo-core/p-787bac91.entry.js +0 -2
  168. package/dist/apollo-core/p-787bac91.entry.js.map +0 -1
  169. package/dist/apollo-core/p-7a8e818a.entry.js +0 -2
  170. package/dist/apollo-core/p-7a8e818a.entry.js.map +0 -1
  171. package/dist/apollo-core/p-807d8de9.entry.js +0 -2
  172. package/dist/apollo-core/p-807d8de9.entry.js.map +0 -1
  173. package/dist/apollo-core/p-ad90fe4d.js.map +0 -1
  174. package/dist/apollo-core/p-bcb81e30.entry.js +0 -2
  175. package/dist/apollo-core/p-bcb81e30.entry.js.map +0 -1
  176. package/dist/apollo-core/p-db29ebe0.entry.js +0 -2
  177. package/dist/apollo-core/p-db29ebe0.entry.js.map +0 -1
  178. package/dist/apollo-core/p-e0541e23.entry.js +0 -2
  179. package/dist/apollo-core/p-e0541e23.entry.js.map +0 -1
  180. package/dist/apollo-core/p-e215fc5f.entry.js +0 -2
  181. package/dist/apollo-core/p-e215fc5f.entry.js.map +0 -1
  182. package/dist/apollo-core/p-e8953b60.js +0 -3
  183. package/dist/apollo-core/p-e8953b60.js.map +0 -1
  184. package/dist/apollo-core/p-efa8a79d.entry.js +0 -2
  185. package/dist/apollo-core/p-efa8a79d.entry.js.map +0 -1
  186. package/dist/cjs/apollo-core.cjs.js.map +0 -1
  187. package/dist/cjs/index-000e170c.js.map +0 -1
  188. package/dist/cjs/index.cjs.js.map +0 -1
  189. package/dist/cjs/loader.cjs.js.map +0 -1
  190. package/dist/cjs/v4-14140ff3.js.map +0 -1
  191. package/dist/cjs/xpl-application-shell.cjs.entry.js.map +0 -1
  192. package/dist/cjs/xpl-avatar_15.cjs.entry.js +0 -2278
  193. package/dist/cjs/xpl-avatar_15.cjs.entry.js.map +0 -1
  194. package/dist/cjs/xpl-backdrop.cjs.entry.js.map +0 -1
  195. package/dist/cjs/xpl-button-row.cjs.entry.js.map +0 -1
  196. package/dist/cjs/xpl-choicelist.cjs.entry.js.map +0 -1
  197. package/dist/cjs/xpl-divider.cjs.entry.js.map +0 -1
  198. package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js.map +0 -1
  199. package/dist/cjs/xpl-dropdown_2.cjs.entry.js.map +0 -1
  200. package/dist/cjs/xpl-grid-item.cjs.entry.js.map +0 -1
  201. package/dist/cjs/xpl-grid.cjs.entry.js.map +0 -1
  202. package/dist/cjs/xpl-input.cjs.entry.js.map +0 -1
  203. package/dist/cjs/xpl-list.cjs.entry.js.map +0 -1
  204. package/dist/cjs/xpl-main-nav.cjs.entry.js.map +0 -1
  205. package/dist/cjs/xpl-pagination.cjs.entry.js.map +0 -1
  206. package/dist/cjs/xpl-select.cjs.entry.js.map +0 -1
  207. package/dist/cjs/xpl-toggle.cjs.entry.js.map +0 -1
  208. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js.map +0 -1
  209. package/dist/collection/components/xpl-avatar/xpl-avatar.js.map +0 -1
  210. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js.map +0 -1
  211. package/dist/collection/components/xpl-badge/xpl-badge.js.map +0 -1
  212. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js.map +0 -1
  213. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js.map +0 -1
  214. package/dist/collection/components/xpl-button/xpl-button.js.map +0 -1
  215. package/dist/collection/components/xpl-button-row/xpl-button-row.js.map +0 -1
  216. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js.map +0 -1
  217. package/dist/collection/components/xpl-choicelist/choice.js +0 -2
  218. package/dist/collection/components/xpl-choicelist/choice.js.map +0 -1
  219. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js.map +0 -1
  220. package/dist/collection/components/xpl-content-area/xpl-content-area.js.map +0 -1
  221. package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +0 -8
  222. package/dist/collection/components/xpl-dashboard/xpl-dashboard.js.map +0 -1
  223. package/dist/collection/components/xpl-data-card/xpl-data-card.js +0 -162
  224. package/dist/collection/components/xpl-data-card/xpl-data-card.js.map +0 -1
  225. package/dist/collection/components/xpl-divider/xpl-divider.js.map +0 -1
  226. package/dist/collection/components/xpl-dropdown/dropdownoption.js +0 -2
  227. package/dist/collection/components/xpl-dropdown/dropdownoption.js.map +0 -1
  228. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js.map +0 -1
  229. package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js.map +0 -1
  230. package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js.map +0 -1
  231. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js.map +0 -1
  232. package/dist/collection/components/xpl-grid/xpl-grid.js.map +0 -1
  233. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js.map +0 -1
  234. package/dist/collection/components/xpl-icon/xpl-icon.css +0 -5
  235. package/dist/collection/components/xpl-icon/xpl-icon.js +0 -93
  236. package/dist/collection/components/xpl-icon/xpl-icon.js.map +0 -1
  237. package/dist/collection/components/xpl-input/xpl-input.js.map +0 -1
  238. package/dist/collection/components/xpl-list/listitem.js +0 -2
  239. package/dist/collection/components/xpl-list/listitem.js.map +0 -1
  240. package/dist/collection/components/xpl-list/xpl-list.js.map +0 -1
  241. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js.map +0 -1
  242. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js.map +0 -1
  243. package/dist/collection/components/xpl-pagination/xpl-pagination.js.map +0 -1
  244. package/dist/collection/components/xpl-radio/xpl-radio.js.map +0 -1
  245. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js.map +0 -1
  246. package/dist/collection/components/xpl-select/xpl-select.js.map +0 -1
  247. package/dist/collection/components/xpl-table/xpl-table.js.map +0 -1
  248. package/dist/collection/components/xpl-tag/xpl-tag.js.map +0 -1
  249. package/dist/collection/components/xpl-toggle/xpl-toggle.js.map +0 -1
  250. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js.map +0 -1
  251. package/dist/components/index.d.ts +0 -39
  252. package/dist/components/index.js +0 -82
  253. package/dist/components/index.js.map +0 -1
  254. package/dist/components/v4.js +0 -77
  255. package/dist/components/v4.js.map +0 -1
  256. package/dist/components/xpl-application-shell.d.ts +0 -11
  257. package/dist/components/xpl-application-shell.js +0 -80
  258. package/dist/components/xpl-application-shell.js.map +0 -1
  259. package/dist/components/xpl-avatar.d.ts +0 -11
  260. package/dist/components/xpl-avatar.js +0 -8
  261. package/dist/components/xpl-avatar.js.map +0 -1
  262. package/dist/components/xpl-avatar2.js +0 -51
  263. package/dist/components/xpl-avatar2.js.map +0 -1
  264. package/dist/components/xpl-backdrop.d.ts +0 -11
  265. package/dist/components/xpl-backdrop.js +0 -8
  266. package/dist/components/xpl-backdrop.js.map +0 -1
  267. package/dist/components/xpl-backdrop2.js +0 -35
  268. package/dist/components/xpl-backdrop2.js.map +0 -1
  269. package/dist/components/xpl-badge.d.ts +0 -11
  270. package/dist/components/xpl-badge.js +0 -8
  271. package/dist/components/xpl-badge.js.map +0 -1
  272. package/dist/components/xpl-badge2.js +0 -38
  273. package/dist/components/xpl-badge2.js.map +0 -1
  274. package/dist/components/xpl-breadcrumb-item.d.ts +0 -11
  275. package/dist/components/xpl-breadcrumb-item.js +0 -36
  276. package/dist/components/xpl-breadcrumb-item.js.map +0 -1
  277. package/dist/components/xpl-breadcrumbs.d.ts +0 -11
  278. package/dist/components/xpl-breadcrumbs.js +0 -31
  279. package/dist/components/xpl-breadcrumbs.js.map +0 -1
  280. package/dist/components/xpl-button-row.d.ts +0 -11
  281. package/dist/components/xpl-button-row.js +0 -50
  282. package/dist/components/xpl-button-row.js.map +0 -1
  283. package/dist/components/xpl-button.d.ts +0 -11
  284. package/dist/components/xpl-button.js +0 -8
  285. package/dist/components/xpl-button.js.map +0 -1
  286. package/dist/components/xpl-button2.js +0 -85
  287. package/dist/components/xpl-button2.js.map +0 -1
  288. package/dist/components/xpl-checkbox.d.ts +0 -11
  289. package/dist/components/xpl-checkbox.js +0 -8
  290. package/dist/components/xpl-checkbox.js.map +0 -1
  291. package/dist/components/xpl-checkbox2.js +0 -59
  292. package/dist/components/xpl-checkbox2.js.map +0 -1
  293. package/dist/components/xpl-choicelist.d.ts +0 -11
  294. package/dist/components/xpl-choicelist.js +0 -85
  295. package/dist/components/xpl-choicelist.js.map +0 -1
  296. package/dist/components/xpl-content-area.d.ts +0 -11
  297. package/dist/components/xpl-content-area.js +0 -34
  298. package/dist/components/xpl-content-area.js.map +0 -1
  299. package/dist/components/xpl-dashboard.d.ts +0 -11
  300. package/dist/components/xpl-dashboard.js +0 -31
  301. package/dist/components/xpl-dashboard.js.map +0 -1
  302. package/dist/components/xpl-data-card.d.ts +0 -11
  303. package/dist/components/xpl-data-card.js +0 -80
  304. package/dist/components/xpl-data-card.js.map +0 -1
  305. package/dist/components/xpl-divider.d.ts +0 -11
  306. package/dist/components/xpl-divider.js +0 -36
  307. package/dist/components/xpl-divider.js.map +0 -1
  308. package/dist/components/xpl-dropdown-group.d.ts +0 -11
  309. package/dist/components/xpl-dropdown-group.js +0 -8
  310. package/dist/components/xpl-dropdown-group.js.map +0 -1
  311. package/dist/components/xpl-dropdown-group2.js +0 -69
  312. package/dist/components/xpl-dropdown-group2.js.map +0 -1
  313. package/dist/components/xpl-dropdown-heading.d.ts +0 -11
  314. package/dist/components/xpl-dropdown-heading.js +0 -8
  315. package/dist/components/xpl-dropdown-heading.js.map +0 -1
  316. package/dist/components/xpl-dropdown-heading2.js +0 -31
  317. package/dist/components/xpl-dropdown-heading2.js.map +0 -1
  318. package/dist/components/xpl-dropdown-option.d.ts +0 -11
  319. package/dist/components/xpl-dropdown-option.js +0 -8
  320. package/dist/components/xpl-dropdown-option.js.map +0 -1
  321. package/dist/components/xpl-dropdown-option2.js +0 -89
  322. package/dist/components/xpl-dropdown-option2.js.map +0 -1
  323. package/dist/components/xpl-dropdown.d.ts +0 -11
  324. package/dist/components/xpl-dropdown.js +0 -8
  325. package/dist/components/xpl-dropdown.js.map +0 -1
  326. package/dist/components/xpl-dropdown2.js +0 -147
  327. package/dist/components/xpl-dropdown2.js.map +0 -1
  328. package/dist/components/xpl-grid-item.d.ts +0 -11
  329. package/dist/components/xpl-grid-item.js +0 -45
  330. package/dist/components/xpl-grid-item.js.map +0 -1
  331. package/dist/components/xpl-grid.d.ts +0 -11
  332. package/dist/components/xpl-grid.js +0 -50
  333. package/dist/components/xpl-grid.js.map +0 -1
  334. package/dist/components/xpl-icon.d.ts +0 -11
  335. package/dist/components/xpl-icon.js +0 -8
  336. package/dist/components/xpl-icon.js.map +0 -1
  337. package/dist/components/xpl-icon2.js +0 -1850
  338. package/dist/components/xpl-icon2.js.map +0 -1
  339. package/dist/components/xpl-input.d.ts +0 -11
  340. package/dist/components/xpl-input.js +0 -2574
  341. package/dist/components/xpl-input.js.map +0 -1
  342. package/dist/components/xpl-list.d.ts +0 -11
  343. package/dist/components/xpl-list.js +0 -73
  344. package/dist/components/xpl-list.js.map +0 -1
  345. package/dist/components/xpl-main-nav.d.ts +0 -11
  346. package/dist/components/xpl-main-nav.js +0 -44
  347. package/dist/components/xpl-main-nav.js.map +0 -1
  348. package/dist/components/xpl-nav-item.d.ts +0 -11
  349. package/dist/components/xpl-nav-item.js +0 -44
  350. package/dist/components/xpl-nav-item.js.map +0 -1
  351. package/dist/components/xpl-pagination.d.ts +0 -11
  352. package/dist/components/xpl-pagination.js +0 -100
  353. package/dist/components/xpl-pagination.js.map +0 -1
  354. package/dist/components/xpl-radio.d.ts +0 -11
  355. package/dist/components/xpl-radio.js +0 -8
  356. package/dist/components/xpl-radio.js.map +0 -1
  357. package/dist/components/xpl-radio2.js +0 -57
  358. package/dist/components/xpl-radio2.js.map +0 -1
  359. package/dist/components/xpl-secondary-nav.d.ts +0 -11
  360. package/dist/components/xpl-secondary-nav.js +0 -31
  361. package/dist/components/xpl-secondary-nav.js.map +0 -1
  362. package/dist/components/xpl-select.d.ts +0 -11
  363. package/dist/components/xpl-select.js +0 -704
  364. package/dist/components/xpl-select.js.map +0 -1
  365. package/dist/components/xpl-table.d.ts +0 -11
  366. package/dist/components/xpl-table.js +0 -170
  367. package/dist/components/xpl-table.js.map +0 -1
  368. package/dist/components/xpl-tag.d.ts +0 -11
  369. package/dist/components/xpl-tag.js +0 -8
  370. package/dist/components/xpl-tag.js.map +0 -1
  371. package/dist/components/xpl-tag2.js +0 -33
  372. package/dist/components/xpl-tag2.js.map +0 -1
  373. package/dist/components/xpl-toggle.d.ts +0 -11
  374. package/dist/components/xpl-toggle.js +0 -61
  375. package/dist/components/xpl-toggle.js.map +0 -1
  376. package/dist/components/xpl-utility-bar.d.ts +0 -11
  377. package/dist/components/xpl-utility-bar.js +0 -55
  378. package/dist/components/xpl-utility-bar.js.map +0 -1
  379. package/dist/esm/apollo-core.js.map +0 -1
  380. package/dist/esm/index-56581b5c.js.map +0 -1
  381. package/dist/esm/index.js.map +0 -1
  382. package/dist/esm/loader.js.map +0 -1
  383. package/dist/esm/v4-929670b7.js.map +0 -1
  384. package/dist/esm/xpl-application-shell.entry.js.map +0 -1
  385. package/dist/esm/xpl-avatar_15.entry.js +0 -2260
  386. package/dist/esm/xpl-avatar_15.entry.js.map +0 -1
  387. package/dist/esm/xpl-backdrop.entry.js.map +0 -1
  388. package/dist/esm/xpl-button-row.entry.js.map +0 -1
  389. package/dist/esm/xpl-choicelist.entry.js.map +0 -1
  390. package/dist/esm/xpl-divider.entry.js.map +0 -1
  391. package/dist/esm/xpl-dropdown-group_3.entry.js.map +0 -1
  392. package/dist/esm/xpl-dropdown_2.entry.js.map +0 -1
  393. package/dist/esm/xpl-grid-item.entry.js.map +0 -1
  394. package/dist/esm/xpl-grid.entry.js.map +0 -1
  395. package/dist/esm/xpl-input.entry.js.map +0 -1
  396. package/dist/esm/xpl-list.entry.js.map +0 -1
  397. package/dist/esm/xpl-main-nav.entry.js.map +0 -1
  398. package/dist/esm/xpl-pagination.entry.js.map +0 -1
  399. package/dist/esm/xpl-select.entry.js.map +0 -1
  400. package/dist/esm/xpl-toggle.entry.js.map +0 -1
  401. package/dist/stories/application-shell.stories.js.map +0 -1
  402. package/dist/stories/avatar.stories.js.map +0 -1
  403. package/dist/stories/backdrop.stories.js.map +0 -1
  404. package/dist/stories/badge.stories.js.map +0 -1
  405. package/dist/stories/breadcrumbs.stories.js.map +0 -1
  406. package/dist/stories/button-row.stories.js.map +0 -1
  407. package/dist/stories/button.stories.js.map +0 -1
  408. package/dist/stories/checkbox.stories.js.map +0 -1
  409. package/dist/stories/choicelist.stories.js.map +0 -1
  410. package/dist/stories/content-area.stories.js.map +0 -1
  411. package/dist/stories/dashboard.stories.js +0 -51
  412. package/dist/stories/dashboard.stories.js.map +0 -1
  413. package/dist/stories/data-card.stories.js +0 -70
  414. package/dist/stories/data-card.stories.js.map +0 -1
  415. package/dist/stories/divider.stories.js.map +0 -1
  416. package/dist/stories/dropdown.stories.js.map +0 -1
  417. package/dist/stories/grid.stories.js.map +0 -1
  418. package/dist/stories/icons.stories.js +0 -69
  419. package/dist/stories/icons.stories.js.map +0 -1
  420. package/dist/stories/input.stories.js.map +0 -1
  421. package/dist/stories/list.stories.js.map +0 -1
  422. package/dist/stories/main-nav.stories.js.map +0 -1
  423. package/dist/stories/pagination.stories.js.map +0 -1
  424. package/dist/stories/radio.stories.js.map +0 -1
  425. package/dist/stories/secondary-nav.stories.js.map +0 -1
  426. package/dist/stories/select.stories.js.map +0 -1
  427. package/dist/stories/table.stories.js.map +0 -1
  428. package/dist/stories/tabs.stories.js.map +0 -1
  429. package/dist/stories/toggle.stories.js.map +0 -1
  430. package/dist/stories/utility-bar.stories.js.map +0 -1
  431. package/dist/types/Users/roc/Sites/apollo/.stencil/stories/dashboard.stories.d.ts +0 -31
  432. package/dist/types/Users/roc/Sites/apollo/.stencil/stories/data-card.stories.d.ts +0 -71
  433. package/dist/types/Users/roc/Sites/apollo/.stencil/stories/icons.stories.d.ts +0 -77
  434. package/dist/types/Users/roc/Sites/apollo/.stencil/stories/select.stories.d.ts +0 -134
  435. package/dist/types/components/xpl-choicelist/choice.d.ts +0 -6
  436. package/dist/types/components/xpl-dashboard/xpl-dashboard.d.ts +0 -3
  437. package/dist/types/components/xpl-data-card/xpl-data-card.d.ts +0 -38
  438. package/dist/types/components/xpl-dropdown/dropdownoption.d.ts +0 -11
  439. package/dist/types/components/xpl-icon/xpl-icon.d.ts +0 -17
  440. package/dist/types/components/xpl-list/listitem.d.ts +0 -16
  441. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
  442. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/backdrop.stories.d.ts +0 -0
  443. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
  444. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
  445. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/button-row.stories.d.ts +0 -0
  446. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
  447. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/choicelist.stories.d.ts +0 -0
  448. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/content-area.stories.d.ts +0 -0
  449. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/divider.stories.d.ts +0 -0
  450. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/grid.stories.d.ts +0 -0
  451. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/input.stories.d.ts +0 -0
  452. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/list.stories.d.ts +0 -0
  453. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/main-nav.stories.d.ts +0 -0
  454. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
  455. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
  456. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -0
  457. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
  458. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/toggle.stories.d.ts +0 -0
  459. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects/apollo-admin/packages}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
@@ -1,13 +1,5 @@
1
1
  const NAMESPACE = 'apollo-core';
2
2
 
3
- /**
4
- * Virtual DOM patching algorithm based on Snabbdom by
5
- * Simon Friis Vindum (@paldepind)
6
- * Licensed under the MIT License
7
- * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
8
- *
9
- * Modified for Stencil's renderer and slot projection
10
- */
11
3
  let contentRef;
12
4
  let hostTagName;
13
5
  let useNativeShadowDom = false;
@@ -15,6 +7,54 @@ let checkSlotFallbackVisibility = false;
15
7
  let checkSlotRelocate = false;
16
8
  let isSvgMode = false;
17
9
  let queuePending = false;
10
+ const win = typeof window !== 'undefined' ? window : {};
11
+ const doc = win.document || { head: {} };
12
+ const plt = {
13
+ $flags$: 0,
14
+ $resourcesUrl$: '',
15
+ jmp: (h) => h(),
16
+ raf: (h) => requestAnimationFrame(h),
17
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
18
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
19
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
20
+ };
21
+ const promiseResolve = (v) => Promise.resolve(v);
22
+ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
23
+ if (listeners) {
24
+ listeners.map(([flags, name, method]) => {
25
+ const target = getHostListenerTarget(elm, flags) ;
26
+ const handler = hostListenerProxy(hostRef, method);
27
+ const opts = hostListenerOpts(flags);
28
+ plt.ael(target, name, handler, opts);
29
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
30
+ });
31
+ }
32
+ };
33
+ const hostListenerProxy = (hostRef, methodName) => (ev) => {
34
+ try {
35
+ {
36
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
37
+ // instance is ready, let's call it's member method for this event
38
+ hostRef.$lazyInstance$[methodName](ev);
39
+ }
40
+ else {
41
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
42
+ }
43
+ }
44
+ }
45
+ catch (e) {
46
+ consoleError(e);
47
+ }
48
+ };
49
+ const getHostListenerTarget = (elm, flags) => {
50
+ if (flags & 8 /* TargetWindow */)
51
+ return win;
52
+ return elm;
53
+ };
54
+ // prettier-ignore
55
+ const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
56
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
57
+ const XLINK_NS = 'http://www.w3.org/1999/xlink';
18
58
  const createTime = (fnName, tagName = '') => {
19
59
  {
20
60
  return () => {
@@ -29,8 +69,6 @@ const uniqueTime = (key, measureText) => {
29
69
  };
30
70
  }
31
71
  };
32
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
33
- const XLINK_NS = 'http://www.w3.org/1999/xlink';
34
72
  /**
35
73
  * Default style mode id
36
74
  */
@@ -44,30 +82,11 @@ const EMPTY_OBJ = {};
44
82
  */
45
83
  const SVG_NS = 'http://www.w3.org/2000/svg';
46
84
  const HTML_NS = 'http://www.w3.org/1999/xhtml';
47
- /**
48
- * Check whether a value is a 'complex type', defined here as an object or a
49
- * function.
50
- *
51
- * @param o the value to check
52
- * @returns whether it's a complex type or not
53
- */
54
85
  const isComplexType = (o) => {
55
86
  // https://jsperf.com/typeof-fn-object/5
56
87
  o = typeof o;
57
88
  return o === 'object' || o === 'function';
58
89
  };
59
- /**
60
- * Helper method for querying a `meta` tag that contains a nonce value
61
- * out of a DOM's head.
62
- *
63
- * @param doc The DOM containing the `head` to query against
64
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
65
- * exists or the tag has no content.
66
- */
67
- function queryNonceMetaTagContent(doc) {
68
- var _a, _b, _c;
69
- 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;
70
- }
71
90
  /**
72
91
  * Production h() function based on Preact by
73
92
  * Jason Miller (@developit)
@@ -76,6 +95,7 @@ function queryNonceMetaTagContent(doc) {
76
95
  *
77
96
  * Modified for Stencil's compiler and vdom
78
97
  */
98
+ // const stack: any[] = [];
79
99
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
80
100
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
81
101
  const h = (nodeName, vnodeData, ...children) => {
@@ -84,7 +104,7 @@ const h = (nodeName, vnodeData, ...children) => {
84
104
  let slotName = null;
85
105
  let simple = false;
86
106
  let lastSimple = false;
87
- const vNodeChildren = [];
107
+ let vNodeChildren = [];
88
108
  const walk = (c) => {
89
109
  for (let i = 0; i < c.length; i++) {
90
110
  child = c[i];
@@ -145,14 +165,6 @@ const h = (nodeName, vnodeData, ...children) => {
145
165
  }
146
166
  return vnode;
147
167
  };
148
- /**
149
- * A utility function for creating a virtual DOM node from a tag and some
150
- * possible text content.
151
- *
152
- * @param tag the tag for this element
153
- * @param text possible text content for the node
154
- * @returns a newly-minted virtual DOM node
155
- */
156
168
  const newVNode = (tag, text) => {
157
169
  const vnode = {
158
170
  $flags$: 0,
@@ -173,31 +185,11 @@ const newVNode = (tag, text) => {
173
185
  return vnode;
174
186
  };
175
187
  const Host = {};
176
- /**
177
- * Check whether a given node is a Host node or not
178
- *
179
- * @param node the virtual DOM node to check
180
- * @returns whether it's a Host node or not
181
- */
182
188
  const isHost = (node) => node && node.$tag$ === Host;
183
- /**
184
- * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
185
- *
186
- * Note that these functions convert from {@link d.VNode} to
187
- * {@link d.ChildNode} to give functional component developers a friendly
188
- * interface.
189
- */
190
189
  const vdomFnUtils = {
191
190
  forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
192
191
  map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
193
192
  };
194
- /**
195
- * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
196
- * friendlier public interface (hence, 'convertToPublic').
197
- *
198
- * @param node the virtual DOM node to convert
199
- * @returns a converted child node
200
- */
201
193
  const convertToPublic = (node) => ({
202
194
  vattrs: node.$attrs$,
203
195
  vchildren: node.$children$,
@@ -206,15 +198,6 @@ const convertToPublic = (node) => ({
206
198
  vtag: node.$tag$,
207
199
  vtext: node.$text$,
208
200
  });
209
- /**
210
- * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
211
- * order to use the resulting object in the virtual DOM. The initial object was
212
- * likely created as part of presenting a public API, so converting it back
213
- * involved making it 'private' again (hence, `convertToPrivate`).
214
- *
215
- * @param node the child node to convert
216
- * @returns a converted virtual DOM node
217
- */
218
201
  const convertToPrivate = (node) => {
219
202
  if (typeof node.vtag === 'function') {
220
203
  const vnodeData = Object.assign({}, node.vattrs);
@@ -233,144 +216,6 @@ const convertToPrivate = (node) => {
233
216
  vnode.$name$ = node.vname;
234
217
  return vnode;
235
218
  };
236
- /**
237
- * Parse a new property value for a given property type.
238
- *
239
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
240
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
241
- * 1. `any`, the type given to `propValue` in the function signature
242
- * 2. the type stored from `propType`.
243
- *
244
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
245
- *
246
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
247
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
248
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
249
- * ```tsx
250
- * <my-cmp prop-val={0}></my-cmp>
251
- * ```
252
- *
253
- * HTML prop values on the other hand, will always a string
254
- *
255
- * @param propValue the new value to coerce to some type
256
- * @param propType the type of the prop, expressed as a binary number
257
- * @returns the parsed/coerced value
258
- */
259
- const parsePropertyValue = (propValue, propType) => {
260
- // ensure this value is of the correct prop type
261
- if (propValue != null && !isComplexType(propValue)) {
262
- if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
263
- // per the HTML spec, any string value means it is a boolean true value
264
- // but we'll cheat here and say that the string "false" is the boolean false
265
- return propValue === 'false' ? false : propValue === '' || !!propValue;
266
- }
267
- if (propType & 2 /* MEMBER_FLAGS.Number */) {
268
- // force it to be a number
269
- return parseFloat(propValue);
270
- }
271
- if (propType & 1 /* MEMBER_FLAGS.String */) {
272
- // could have been passed as a number or boolean
273
- // but we still want it as a string
274
- return String(propValue);
275
- }
276
- // redundant return here for better minification
277
- return propValue;
278
- }
279
- // not sure exactly what type we want
280
- // so no need to change to a different type
281
- return propValue;
282
- };
283
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
284
- const createEvent = (ref, name, flags) => {
285
- const elm = getElement(ref);
286
- return {
287
- emit: (detail) => {
288
- return emitEvent(elm, name, {
289
- bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
290
- composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
291
- cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
292
- detail,
293
- });
294
- },
295
- };
296
- };
297
- /**
298
- * Helper function to create & dispatch a custom Event on a provided target
299
- * @param elm the target of the Event
300
- * @param name the name to give the custom Event
301
- * @param opts options for configuring a custom Event
302
- * @returns the custom Event
303
- */
304
- const emitEvent = (elm, name, opts) => {
305
- const ev = plt.ce(name, opts);
306
- elm.dispatchEvent(ev);
307
- return ev;
308
- };
309
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
310
- const registerStyle = (scopeId, cssText, allowCS) => {
311
- let style = styles.get(scopeId);
312
- if (supportsConstructableStylesheets && allowCS) {
313
- style = (style || new CSSStyleSheet());
314
- if (typeof style === 'string') {
315
- style = cssText;
316
- }
317
- else {
318
- style.replaceSync(cssText);
319
- }
320
- }
321
- else {
322
- style = cssText;
323
- }
324
- styles.set(scopeId, style);
325
- };
326
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
327
- var _a;
328
- let scopeId = getScopeId(cmpMeta);
329
- const style = styles.get(scopeId);
330
- // if an element is NOT connected then getRootNode() will return the wrong root node
331
- // so the fallback is to always use the document for the root node in those cases
332
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
333
- if (style) {
334
- if (typeof style === 'string') {
335
- styleContainerNode = styleContainerNode.head || styleContainerNode;
336
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
337
- let styleElm;
338
- if (!appliedStyles) {
339
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
340
- }
341
- if (!appliedStyles.has(scopeId)) {
342
- {
343
- // TODO(STENCIL-659): Remove code implementing the CSS variable shim
344
- {
345
- styleElm = doc.createElement('style');
346
- styleElm.innerHTML = style;
347
- }
348
- // Apply CSP nonce to the style tag if it exists
349
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
350
- if (nonce != null) {
351
- styleElm.setAttribute('nonce', nonce);
352
- }
353
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
354
- }
355
- if (appliedStyles) {
356
- appliedStyles.add(scopeId);
357
- }
358
- }
359
- }
360
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
361
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
362
- }
363
- }
364
- return scopeId;
365
- };
366
- const attachStyles = (hostRef) => {
367
- const cmpMeta = hostRef.$cmpMeta$;
368
- const elm = hostRef.$hostElement$;
369
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
370
- addStyle(elm.getRootNode(), cmpMeta);
371
- endAttachStyles();
372
- };
373
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
374
219
  /**
375
220
  * Production setAccessor() function based on Preact by
376
221
  * Jason Miller (@developit)
@@ -468,10 +313,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
468
313
  if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
469
314
  try {
470
315
  if (!elm.tagName.includes('-')) {
471
- const n = newValue == null ? '' : newValue;
316
+ let n = newValue == null ? '' : newValue;
472
317
  // Workaround for Safari, moving the <input> caret when re-assigning the same valued
473
318
  if (memberName === 'list') {
474
319
  isProp = false;
320
+ // tslint:disable-next-line: triple-equals
475
321
  }
476
322
  else if (oldValue == null || elm[memberName] != n) {
477
323
  elm[memberName] = n;
@@ -507,7 +353,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
507
353
  }
508
354
  }
509
355
  }
510
- else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
356
+ else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
511
357
  newValue = newValue === true ? '' : newValue;
512
358
  if (xlink) {
513
359
  elm.setAttributeNS(XLINK_NS, memberName, newValue);
@@ -525,7 +371,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
525
371
  // if the element passed in is a shadow root, which is a document fragment
526
372
  // then we want to be adding attrs/props to the shadow root's "host" element
527
373
  // if it's not a shadow root, then we add attrs/props to the same element
528
- const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
374
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
529
375
  ? newVnode.$elm$.host
530
376
  : newVnode.$elm$;
531
377
  const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
@@ -543,19 +389,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
543
389
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
544
390
  }
545
391
  };
546
- /**
547
- * Create a DOM Node corresponding to one of the children of a given VNode.
548
- *
549
- * @param oldParentVNode the parent VNode from the previous render
550
- * @param newParentVNode the parent VNode from the current render
551
- * @param childIndex the index of the VNode, in the _new_ parent node's
552
- * children, for which we will create a new DOM node
553
- * @param parentElm the parent DOM node which our new node will be a child of
554
- * @returns the newly created node
555
- */
556
392
  const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
557
393
  // tslint:disable-next-line: prefer-const
558
- const newVNode = newParentVNode.$children$[childIndex];
394
+ let newVNode = newParentVNode.$children$[childIndex];
559
395
  let i = 0;
560
396
  let elm;
561
397
  let childNode;
@@ -566,16 +402,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
566
402
  if (newVNode.$tag$ === 'slot') {
567
403
  newVNode.$flags$ |= newVNode.$children$
568
404
  ? // slot element has fallback content
569
- 2 /* VNODE_FLAGS.isSlotFallback */
405
+ 2 /* isSlotFallback */
570
406
  : // slot element does not have fallback content
571
- 1 /* VNODE_FLAGS.isSlotReference */;
407
+ 1 /* isSlotReference */;
572
408
  }
573
409
  }
574
410
  if (newVNode.$text$ !== null) {
575
411
  // create text node
576
412
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
577
413
  }
578
- else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
414
+ else if (newVNode.$flags$ & 1 /* isSlotReference */) {
579
415
  // create a slot reference node
580
416
  elm = newVNode.$elm$ =
581
417
  doc.createTextNode('');
@@ -585,7 +421,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
585
421
  isSvgMode = newVNode.$tag$ === 'svg';
586
422
  }
587
423
  // create element
588
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
424
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
589
425
  ? 'slot-fb'
590
426
  : newVNode.$tag$)
591
427
  );
@@ -620,7 +456,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
620
456
  }
621
457
  {
622
458
  elm['s-hn'] = hostTagName;
623
- if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
459
+ if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
624
460
  // remember the content reference comment
625
461
  elm['s-sr'] = true;
626
462
  // remember the content reference comment
@@ -639,7 +475,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
639
475
  return elm;
640
476
  };
641
477
  const putBackInOriginalLocation = (parentElm, recursive) => {
642
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
478
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
643
479
  const oldSlotChildNodes = parentElm.childNodes;
644
480
  for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
645
481
  const childNode = oldSlotChildNodes[i];
@@ -660,23 +496,8 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
660
496
  putBackInOriginalLocation(childNode, recursive);
661
497
  }
662
498
  }
663
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
499
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
664
500
  };
665
- /**
666
- * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
667
- * add them to the DOM in the appropriate place.
668
- *
669
- * @param parentElm the DOM node which should be used as a parent for the new
670
- * DOM nodes
671
- * @param before a child of the `parentElm` which the new children should be
672
- * inserted before (optional)
673
- * @param parentVNode the parent virtual DOM node
674
- * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
675
- * @param startIdx the index in the child virtual DOM nodes at which to start
676
- * creating DOM nodes (inclusive)
677
- * @param endIdx the index in the child virtual DOM nodes at which to stop
678
- * creating DOM nodes (inclusive)
679
- */
680
501
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
681
502
  let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
682
503
  let childNode;
@@ -690,19 +511,6 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
690
511
  }
691
512
  }
692
513
  };
693
- /**
694
- * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
695
- * This can be used to, for instance, clean up after a list of children which
696
- * should no longer be shown.
697
- *
698
- * This function also handles some of Stencil's slot relocation logic.
699
- *
700
- * @param vnodes a list of virtual DOM nodes to remove
701
- * @param startIdx the index at which to start removing nodes (inclusive)
702
- * @param endIdx the index at which to stop removing nodes (inclusive)
703
- * @param vnode a VNode
704
- * @param elm an element
705
- */
706
514
  const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
707
515
  for (; startIdx <= endIdx; ++startIdx) {
708
516
  if ((vnode = vnodes[startIdx])) {
@@ -727,74 +535,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
727
535
  }
728
536
  }
729
537
  };
730
- /**
731
- * Reconcile the children of a new VNode with the children of an old VNode by
732
- * traversing the two collections of children, identifying nodes that are
733
- * conserved or changed, calling out to `patch` to make any necessary
734
- * updates to the DOM, and rearranging DOM nodes as needed.
735
- *
736
- * The algorithm for reconciling children works by analyzing two 'windows' onto
737
- * the two arrays of children (`oldCh` and `newCh`). We keep track of the
738
- * 'windows' by storing start and end indices and references to the
739
- * corresponding array entries. Initially the two 'windows' are basically equal
740
- * to the entire array, but we progressively narrow the windows until there are
741
- * no children left to update by doing the following:
742
- *
743
- * 1. Skip any `null` entries at the beginning or end of the two arrays, so
744
- * that if we have an initial array like the following we'll end up dealing
745
- * only with a window bounded by the highlighted elements:
746
- *
747
- * [null, null, VNode1 , ... , VNode2, null, null]
748
- * ^^^^^^ ^^^^^^
749
- *
750
- * 2. Check to see if the elements at the head and tail positions are equal
751
- * across the windows. This will basically detect elements which haven't
752
- * been added, removed, or changed position, i.e. if you had the following
753
- * VNode elements (represented as HTML):
754
- *
755
- * oldVNode: `<div><p><span>HEY</span></p></div>`
756
- * newVNode: `<div><p><span>THERE</span></p></div>`
757
- *
758
- * Then when comparing the children of the `<div>` tag we check the equality
759
- * of the VNodes corresponding to the `<p>` tags and, since they are the
760
- * same tag in the same position, we'd be able to avoid completely
761
- * re-rendering the subtree under them with a new DOM element and would just
762
- * call out to `patch` to handle reconciling their children and so on.
763
- *
764
- * 3. Check, for both windows, to see if the element at the beginning of the
765
- * window corresponds to the element at the end of the other window. This is
766
- * a heuristic which will let us identify _some_ situations in which
767
- * elements have changed position, for instance it _should_ detect that the
768
- * children nodes themselves have not changed but merely moved in the
769
- * following example:
770
- *
771
- * oldVNode: `<div><element-one /><element-two /></div>`
772
- * newVNode: `<div><element-two /><element-one /></div>`
773
- *
774
- * If we find cases like this then we also need to move the concrete DOM
775
- * elements corresponding to the moved children to write the re-order to the
776
- * DOM.
777
- *
778
- * 4. Finally, if VNodes have the `key` attribute set on them we check for any
779
- * nodes in the old children which have the same key as the first element in
780
- * our window on the new children. If we find such a node we handle calling
781
- * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
782
- * what we find.
783
- *
784
- * Finally, once we've narrowed our 'windows' to the point that either of them
785
- * collapse (i.e. they have length 0) we then handle any remaining VNode
786
- * insertion or deletion that needs to happen to get a DOM state that correctly
787
- * reflects the new child VNodes. If, for instance, after our window on the old
788
- * children has collapsed we still have more nodes on the new children that
789
- * we haven't dealt with yet then we need to add them, or if the new children
790
- * collapse but we still have unhandled _old_ children then we need to make
791
- * sure the corresponding DOM nodes are removed.
792
- *
793
- * @param parentElm the node into which the parent VNode is rendered
794
- * @param oldCh the old children of the parent node
795
- * @param newVNode the new VNode which will replace the parent
796
- * @param newCh the new children of the parent node
797
- */
798
538
  const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
799
539
  let oldStartIdx = 0;
800
540
  let newStartIdx = 0;
@@ -810,7 +550,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
810
550
  let elmToMove;
811
551
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
812
552
  if (oldStartVnode == null) {
813
- // VNode might have been moved left
553
+ // Vnode might have been moved left
814
554
  oldStartVnode = oldCh[++oldStartIdx];
815
555
  }
816
556
  else if (oldEndVnode == null) {
@@ -823,100 +563,37 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
823
563
  newEndVnode = newCh[--newEndIdx];
824
564
  }
825
565
  else if (isSameVnode(oldStartVnode, newStartVnode)) {
826
- // if the start nodes are the same then we should patch the new VNode
827
- // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
828
- // indices to reflect that. We don't need to move any DOM Nodes around
829
- // since things are matched up in order.
830
566
  patch(oldStartVnode, newStartVnode);
831
567
  oldStartVnode = oldCh[++oldStartIdx];
832
568
  newStartVnode = newCh[++newStartIdx];
833
569
  }
834
570
  else if (isSameVnode(oldEndVnode, newEndVnode)) {
835
- // likewise, if the end nodes are the same we patch new onto old and
836
- // decrement our end indices, and also likewise in this case we don't
837
- // need to move any DOM Nodes.
838
571
  patch(oldEndVnode, newEndVnode);
839
572
  oldEndVnode = oldCh[--oldEndIdx];
840
573
  newEndVnode = newCh[--newEndIdx];
841
574
  }
842
575
  else if (isSameVnode(oldStartVnode, newEndVnode)) {
843
- // case: "Vnode moved right"
844
- //
845
- // We've found that the last node in our window on the new children is
846
- // the same VNode as the _first_ node in our window on the old children
847
- // we're dealing with now. Visually, this is the layout of these two
848
- // nodes:
849
- //
850
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
851
- // ^^^^^^^^^^^
852
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
853
- // ^^^^^^^^^^^^^
854
- //
855
- // In this situation we need to patch `newEndVnode` onto `oldStartVnode`
856
- // and move the DOM element for `oldStartVnode`.
576
+ // Vnode moved right
857
577
  if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
858
578
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
859
579
  }
860
580
  patch(oldStartVnode, newEndVnode);
861
- // We need to move the element for `oldStartVnode` into a position which
862
- // will be appropriate for `newEndVnode`. For this we can use
863
- // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
864
- // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
865
- // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
866
- //
867
- // <old-start-node />
868
- // <some-intervening-node />
869
- // <old-end-node />
870
- // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
871
- // <next-sibling />
872
- //
873
- // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
874
- // the node for `oldStartVnode` at the end of the children of
875
- // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
876
- // aren't any siblings, and passing `null` to `Node.insertBefore` will
877
- // append it to the children of the parent element.
878
581
  parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
879
582
  oldStartVnode = oldCh[++oldStartIdx];
880
583
  newEndVnode = newCh[--newEndIdx];
881
584
  }
882
585
  else if (isSameVnode(oldEndVnode, newStartVnode)) {
883
- // case: "Vnode moved left"
884
- //
885
- // We've found that the first node in our window on the new children is
886
- // the same VNode as the _last_ node in our window on the old children.
887
- // Visually, this is the layout of these two nodes:
888
- //
889
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
890
- // ^^^^^^^^^^^^^
891
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
892
- // ^^^^^^^^^^^
893
- //
894
- // In this situation we need to patch `newStartVnode` onto `oldEndVnode`
895
- // (which will handle updating any changed attributes, reconciling their
896
- // children etc) but we also need to move the DOM node to which
897
- // `oldEndVnode` corresponds.
586
+ // Vnode moved left
898
587
  if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
899
588
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
900
589
  }
901
590
  patch(oldEndVnode, newStartVnode);
902
- // We've already checked above if `oldStartVnode` and `newStartVnode` are
903
- // the same node, so since we're here we know that they are not. Thus we
904
- // can move the element for `oldEndVnode` _before_ the element for
905
- // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
906
- // future.
907
591
  parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
908
592
  oldEndVnode = oldCh[--oldEndIdx];
909
593
  newStartVnode = newCh[++newStartIdx];
910
594
  }
911
595
  else {
912
- // Here we do some checks to match up old and new nodes based on the
913
- // `$key$` attribute, which is set by putting a `key="my-key"` attribute
914
- // in the JSX for a DOM element in the implementation of a Stencil
915
- // component.
916
- //
917
- // First we check to see if there are any nodes in the array of old
918
- // children which have the same key as the first node in the new
919
- // children.
596
+ // createKeyToOldIdx
920
597
  idxInOld = -1;
921
598
  {
922
599
  for (i = oldStartIdx; i <= oldEndIdx; ++i) {
@@ -927,32 +604,23 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
927
604
  }
928
605
  }
929
606
  if (idxInOld >= 0) {
930
- // We found a node in the old children which matches up with the first
931
- // node in the new children! So let's deal with that
932
607
  elmToMove = oldCh[idxInOld];
933
608
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
934
- // the tag doesn't match so we'll need a new DOM element
935
609
  node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
936
610
  }
937
611
  else {
938
612
  patch(elmToMove, newStartVnode);
939
- // invalidate the matching old node so that we won't try to update it
940
- // again later on
941
613
  oldCh[idxInOld] = undefined;
942
614
  node = elmToMove.$elm$;
943
615
  }
944
616
  newStartVnode = newCh[++newStartIdx];
945
617
  }
946
618
  else {
947
- // We either didn't find an element in the old children that matches
948
- // the key of the first new child OR the build is not using `key`
949
- // attributes at all. In either case we need to create a new element
950
- // for the new node.
619
+ // new element
951
620
  node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
952
621
  newStartVnode = newCh[++newStartIdx];
953
622
  }
954
623
  if (node) {
955
- // if we created a new node then handle inserting it to the DOM
956
624
  {
957
625
  parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
958
626
  }
@@ -960,44 +628,21 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
960
628
  }
961
629
  }
962
630
  if (oldStartIdx > oldEndIdx) {
963
- // we have some more new nodes to add which don't match up with old nodes
964
631
  addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
965
632
  }
966
633
  else if (newStartIdx > newEndIdx) {
967
- // there are nodes in the `oldCh` array which no longer correspond to nodes
968
- // in the new array, so lets remove them (which entails cleaning up the
969
- // relevant DOM nodes)
970
634
  removeVnodes(oldCh, oldStartIdx, oldEndIdx);
971
635
  }
972
636
  };
973
- /**
974
- * Compare two VNodes to determine if they are the same
975
- *
976
- * **NB**: This function is an equality _heuristic_ based on the available
977
- * information set on the two VNodes and can be misleading under certain
978
- * circumstances. In particular, if the two nodes do not have `key` attrs
979
- * (available under `$key$` on VNodes) then the function falls back on merely
980
- * checking that they have the same tag.
981
- *
982
- * So, in other words, if `key` attrs are not set on VNodes which may be
983
- * changing order within a `children` array or something along those lines then
984
- * we could obtain a false negative and then have to do needless re-rendering
985
- * (i.e. we'd say two VNodes aren't equal when in fact they should be).
986
- *
987
- * @param leftVNode the first VNode to check
988
- * @param rightVNode the second VNode to check
989
- * @returns whether they're equal or not
990
- */
991
- const isSameVnode = (leftVNode, rightVNode) => {
637
+ const isSameVnode = (vnode1, vnode2) => {
992
638
  // compare if two vnode to see if they're "technically" the same
993
639
  // need to have the same element tag, and same key to be the same
994
- if (leftVNode.$tag$ === rightVNode.$tag$) {
995
- if (leftVNode.$tag$ === 'slot') {
996
- return leftVNode.$name$ === rightVNode.$name$;
640
+ if (vnode1.$tag$ === vnode2.$tag$) {
641
+ if (vnode1.$tag$ === 'slot') {
642
+ return vnode1.$name$ === vnode2.$name$;
997
643
  }
998
- // this will be set if components in the build have `key` attrs set on them
999
644
  {
1000
- return leftVNode.$key$ === rightVNode.$key$;
645
+ return vnode1.$key$ === vnode2.$key$;
1001
646
  }
1002
647
  }
1003
648
  return false;
@@ -1010,14 +655,6 @@ const referenceNode = (node) => {
1010
655
  return (node && node['s-ol']) || node;
1011
656
  };
1012
657
  const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
1013
- /**
1014
- * Handle reconciling an outdated VNode with a new one which corresponds to
1015
- * it. This function handles flushing updates to the DOM and reconciling the
1016
- * children of the two nodes (if any).
1017
- *
1018
- * @param oldVNode an old VNode whose DOM element and children we want to update
1019
- * @param newVNode a new VNode representing an updated version of the old one
1020
- */
1021
658
  const patch = (oldVNode, newVNode) => {
1022
659
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
1023
660
  const oldChildren = oldVNode.$children$;
@@ -1031,6 +668,7 @@ const patch = (oldVNode, newVNode) => {
1031
668
  // only add this to the when the compiler sees we're using an svg somewhere
1032
669
  isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1033
670
  }
671
+ // element node
1034
672
  {
1035
673
  if (tag === 'slot')
1036
674
  ;
@@ -1043,7 +681,6 @@ const patch = (oldVNode, newVNode) => {
1043
681
  }
1044
682
  if (oldChildren !== null && newChildren !== null) {
1045
683
  // looks like there's child vnodes for both the old and new vnodes
1046
- // so we need to call `updateChildren` to reconcile them
1047
684
  updateChildren(elm, oldChildren, newVNode, newChildren);
1048
685
  }
1049
686
  else if (newChildren !== null) {
@@ -1075,7 +712,7 @@ const patch = (oldVNode, newVNode) => {
1075
712
  };
1076
713
  const updateFallbackSlotVisibility = (elm) => {
1077
714
  // tslint:disable-next-line: prefer-const
1078
- const childNodes = elm.childNodes;
715
+ let childNodes = elm.childNodes;
1079
716
  let childNode;
1080
717
  let i;
1081
718
  let ilen;
@@ -1084,7 +721,7 @@ const updateFallbackSlotVisibility = (elm) => {
1084
721
  let nodeType;
1085
722
  for (i = 0, ilen = childNodes.length; i < ilen; i++) {
1086
723
  childNode = childNodes[i];
1087
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
724
+ if (childNode.nodeType === 1 /* ElementNode */) {
1088
725
  if (childNode['s-sr']) {
1089
726
  // this is a slot fallback node
1090
727
  // get the slot name for this slot reference node
@@ -1096,7 +733,7 @@ const updateFallbackSlotVisibility = (elm) => {
1096
733
  nodeType = childNodes[j].nodeType;
1097
734
  if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
1098
735
  // this sibling node is from a different component OR is a named fallback slot node
1099
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
736
+ if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
1100
737
  childNode.hidden = true;
1101
738
  break;
1102
739
  }
@@ -1105,8 +742,8 @@ const updateFallbackSlotVisibility = (elm) => {
1105
742
  // this is a default fallback slot node
1106
743
  // any element or text node (with content)
1107
744
  // should hide the default fallback slot node
1108
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1109
- (nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
745
+ if (nodeType === 1 /* ElementNode */ ||
746
+ (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
1110
747
  childNode.hidden = true;
1111
748
  break;
1112
749
  }
@@ -1128,8 +765,8 @@ const relocateSlotContent = (elm) => {
1128
765
  let relocateNodeData;
1129
766
  let j;
1130
767
  let i = 0;
1131
- const childNodes = elm.childNodes;
1132
- const ilen = childNodes.length;
768
+ let childNodes = elm.childNodes;
769
+ let ilen = childNodes.length;
1133
770
  for (; i < ilen; i++) {
1134
771
  childNode = childNodes[i];
1135
772
  if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
@@ -1184,13 +821,13 @@ const relocateSlotContent = (elm) => {
1184
821
  }
1185
822
  }
1186
823
  }
1187
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
824
+ if (childNode.nodeType === 1 /* ElementNode */) {
1188
825
  relocateSlotContent(childNode);
1189
826
  }
1190
827
  }
1191
828
  };
1192
829
  const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1193
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
830
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1194
831
  if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
1195
832
  return true;
1196
833
  }
@@ -1210,18 +847,6 @@ const callNodeRefs = (vNode) => {
1210
847
  vNode.$children$ && vNode.$children$.map(callNodeRefs);
1211
848
  }
1212
849
  };
1213
- /**
1214
- * The main entry point for Stencil's virtual DOM-based rendering engine
1215
- *
1216
- * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1217
- * function will handle creating a virtual DOM tree with a single root, patching
1218
- * the current virtual DOM tree onto an old one (if any), dealing with slot
1219
- * relocation, and reflecting attributes.
1220
- *
1221
- * @param hostRef data needed to root and render the virtual DOM tree, such as
1222
- * the DOM node into which it should be rendered.
1223
- * @param renderFnResults the virtual DOM nodes to be rendered
1224
- */
1225
850
  const renderVdom = (hostRef, renderFnResults) => {
1226
851
  const hostElm = hostRef.$hostElement$;
1227
852
  const cmpMeta = hostRef.$cmpMeta$;
@@ -1233,12 +858,12 @@ const renderVdom = (hostRef, renderFnResults) => {
1233
858
  cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1234
859
  }
1235
860
  rootVnode.$tag$ = null;
1236
- rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
861
+ rootVnode.$flags$ |= 4 /* isHost */;
1237
862
  hostRef.$vnode$ = rootVnode;
1238
863
  rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
1239
864
  {
1240
865
  contentRef = hostElm['s-cr'];
1241
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
866
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1242
867
  // always reset
1243
868
  checkSlotFallbackVisibility = false;
1244
869
  }
@@ -1247,7 +872,7 @@ const renderVdom = (hostRef, renderFnResults) => {
1247
872
  {
1248
873
  // while we're moving nodes around existing nodes, temporarily disable
1249
874
  // the disconnectCallback from working
1250
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
875
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
1251
876
  if (checkSlotRelocate) {
1252
877
  relocateSlotContent(rootVnode.$elm$);
1253
878
  let relocateData;
@@ -1305,7 +930,7 @@ const renderVdom = (hostRef, renderFnResults) => {
1305
930
  }
1306
931
  else {
1307
932
  // this node doesn't have a slot home to go to, so let's hide it
1308
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
933
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1309
934
  nodeToRelocate.hidden = true;
1310
935
  }
1311
936
  }
@@ -1316,11 +941,30 @@ const renderVdom = (hostRef, renderFnResults) => {
1316
941
  }
1317
942
  // done moving nodes around
1318
943
  // allow the disconnect callback to work again
1319
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
944
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1320
945
  // always reset
1321
946
  relocateNodes.length = 0;
1322
947
  }
1323
948
  };
949
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
950
+ const createEvent = (ref, name, flags) => {
951
+ const elm = getElement(ref);
952
+ return {
953
+ emit: (detail) => {
954
+ return emitEvent(elm, name, {
955
+ bubbles: !!(flags & 4 /* Bubbles */),
956
+ composed: !!(flags & 2 /* Composed */),
957
+ cancelable: !!(flags & 1 /* Cancellable */),
958
+ detail,
959
+ });
960
+ },
961
+ };
962
+ };
963
+ const emitEvent = (elm, name, opts) => {
964
+ const ev = plt.ce(name, opts);
965
+ elm.dispatchEvent(ev);
966
+ return ev;
967
+ };
1324
968
  const attachToAncestor = (hostRef, ancestorComponent) => {
1325
969
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1326
970
  ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
@@ -1328,10 +972,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
1328
972
  };
1329
973
  const scheduleUpdate = (hostRef, isInitialLoad) => {
1330
974
  {
1331
- hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
975
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1332
976
  }
1333
- if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1334
- hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
977
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
978
+ hostRef.$flags$ |= 512 /* needsRerender */;
1335
979
  return;
1336
980
  }
1337
981
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
@@ -1347,7 +991,7 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
1347
991
  let promise;
1348
992
  if (isInitialLoad) {
1349
993
  {
1350
- hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
994
+ hostRef.$flags$ |= 256 /* isListenReady */;
1351
995
  if (hostRef.$queuedListeners$) {
1352
996
  hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1353
997
  hostRef.$queuedListeners$ = null;
@@ -1358,17 +1002,13 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
1358
1002
  }
1359
1003
  }
1360
1004
  endSchedule();
1361
- return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
1005
+ return then(promise, () => updateComponent(hostRef, instance));
1362
1006
  };
1363
1007
  const updateComponent = async (hostRef, instance, isInitialLoad) => {
1364
1008
  // updateComponent
1365
1009
  const elm = hostRef.$hostElement$;
1366
1010
  const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1367
1011
  const rc = elm['s-rc'];
1368
- if (isInitialLoad) {
1369
- // DOM WRITE!
1370
- attachStyles(hostRef);
1371
- }
1372
1012
  const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1373
1013
  {
1374
1014
  callRender(hostRef, instance);
@@ -1390,7 +1030,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1390
1030
  }
1391
1031
  else {
1392
1032
  Promise.all(childrenPromises).then(postUpdate);
1393
- hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1033
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1394
1034
  childrenPromises.length = 0;
1395
1035
  }
1396
1036
  }
@@ -1399,10 +1039,10 @@ const callRender = (hostRef, instance, elm) => {
1399
1039
  try {
1400
1040
  instance = instance.render() ;
1401
1041
  {
1402
- hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1042
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
1403
1043
  }
1404
1044
  {
1405
- hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1045
+ hostRef.$flags$ |= 2 /* hasRendered */;
1406
1046
  }
1407
1047
  {
1408
1048
  {
@@ -1426,11 +1066,8 @@ const postUpdateComponent = (hostRef) => {
1426
1066
  const endPostUpdate = createTime('postUpdate', tagName);
1427
1067
  const instance = hostRef.$lazyInstance$ ;
1428
1068
  const ancestorComponent = hostRef.$ancestorComponent$;
1429
- {
1430
- safeCall(instance, 'componentDidRender');
1431
- }
1432
- if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1433
- hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1069
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1070
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1434
1071
  {
1435
1072
  // DOM WRITE!
1436
1073
  addHydratedFlag(elm);
@@ -1462,10 +1099,10 @@ const postUpdateComponent = (hostRef) => {
1462
1099
  hostRef.$onRenderResolve$();
1463
1100
  hostRef.$onRenderResolve$ = undefined;
1464
1101
  }
1465
- if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1102
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
1466
1103
  nextTick(() => scheduleUpdate(hostRef, false));
1467
1104
  }
1468
- hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1105
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
1469
1106
  }
1470
1107
  // ( •_•)
1471
1108
  // ( •_•)>⌐■-■
@@ -1495,40 +1132,44 @@ const then = (promise, thenFn) => {
1495
1132
  };
1496
1133
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1497
1134
  ;
1135
+ const parsePropertyValue = (propValue, propType) => {
1136
+ // ensure this value is of the correct prop type
1137
+ if (propValue != null && !isComplexType(propValue)) {
1138
+ if (propType & 4 /* Boolean */) {
1139
+ // per the HTML spec, any string value means it is a boolean true value
1140
+ // but we'll cheat here and say that the string "false" is the boolean false
1141
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
1142
+ }
1143
+ if (propType & 2 /* Number */) {
1144
+ // force it to be a number
1145
+ return parseFloat(propValue);
1146
+ }
1147
+ if (propType & 1 /* String */) {
1148
+ // could have been passed as a number or boolean
1149
+ // but we still want it as a string
1150
+ return String(propValue);
1151
+ }
1152
+ // redundant return here for better minification
1153
+ return propValue;
1154
+ }
1155
+ // not sure exactly what type we want
1156
+ // so no need to change to a different type
1157
+ return propValue;
1158
+ };
1498
1159
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1499
1160
  const setValue = (ref, propName, newVal, cmpMeta) => {
1500
1161
  // check our new property value against our internal value
1501
1162
  const hostRef = getHostRef(ref);
1502
- const elm = hostRef.$hostElement$ ;
1503
1163
  const oldVal = hostRef.$instanceValues$.get(propName);
1504
1164
  const flags = hostRef.$flags$;
1505
1165
  const instance = hostRef.$lazyInstance$ ;
1506
1166
  newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1507
- // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1508
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1509
- const didValueChange = newVal !== oldVal && !areBothNaN;
1510
- if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1167
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
1511
1168
  // gadzooks! the property's value has changed!!
1512
1169
  // set our new value!
1513
1170
  hostRef.$instanceValues$.set(propName, newVal);
1514
1171
  if (instance) {
1515
- // get an array of method names of watch functions to call
1516
- if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
1517
- const watchMethods = cmpMeta.$watchers$[propName];
1518
- if (watchMethods) {
1519
- // this instance is watching for when this property changed
1520
- watchMethods.map((watchMethodName) => {
1521
- try {
1522
- // fire off each of the watch methods that are watching this property
1523
- instance[watchMethodName](newVal, oldVal, propName);
1524
- }
1525
- catch (e) {
1526
- consoleError(e, elm);
1527
- }
1528
- });
1529
- }
1530
- }
1531
- if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1172
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1532
1173
  // looks like this value actually changed, so we've got work to do!
1533
1174
  // but only if we've already rendered, otherwise just chill out
1534
1175
  // queue that we need to do an update, but don't worry about queuing
@@ -1538,27 +1179,14 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1538
1179
  }
1539
1180
  }
1540
1181
  };
1541
- /**
1542
- * Attach a series of runtime constructs to a compiled Stencil component
1543
- * constructor, including getters and setters for the `@Prop` and `@State`
1544
- * decorators, callbacks for when attributes change, and so on.
1545
- *
1546
- * @param Cstr the constructor for a component that we need to process
1547
- * @param cmpMeta metadata collected previously about the component
1548
- * @param flags a number used to store a series of bit flags
1549
- * @returns a reference to the same constructor passed in (but now mutated)
1550
- */
1551
1182
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1552
1183
  if (cmpMeta.$members$) {
1553
- if (Cstr.watchers) {
1554
- cmpMeta.$watchers$ = Cstr.watchers;
1555
- }
1556
1184
  // It's better to have a const than two Object.entries()
1557
1185
  const members = Object.entries(cmpMeta.$members$);
1558
1186
  const prototype = Cstr.prototype;
1559
1187
  members.map(([memberName, [memberFlags]]) => {
1560
- if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1561
- ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1188
+ if ((memberFlags & 31 /* Prop */ ||
1189
+ ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
1562
1190
  // proxyComponent - prop
1563
1191
  Object.defineProperty(prototype, memberName, {
1564
1192
  get() {
@@ -1573,8 +1201,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1573
1201
  enumerable: true,
1574
1202
  });
1575
1203
  }
1576
- else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
1577
- memberFlags & 64 /* MEMBER_FLAGS.Method */) {
1204
+ else if (flags & 1 /* isElementConstructor */ &&
1205
+ memberFlags & 64 /* Method */) {
1578
1206
  // proxyComponent - method
1579
1207
  Object.defineProperty(prototype, memberName, {
1580
1208
  value(...args) {
@@ -1584,19 +1212,19 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1584
1212
  });
1585
1213
  }
1586
1214
  });
1587
- if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1215
+ if ((flags & 1 /* isElementConstructor */)) {
1588
1216
  const attrNameToPropName = new Map();
1589
1217
  prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1590
1218
  plt.jmp(() => {
1591
1219
  const propName = attrNameToPropName.get(attrName);
1592
- // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1220
+ // In a webcomponent lifecyle the attributeChangedCallback runs prior to connectedCallback
1593
1221
  // in the case where an attribute was set inline.
1594
1222
  // ```html
1595
1223
  // <my-component some-attribute="some-value"></my-component>
1596
1224
  // ```
1597
1225
  //
1598
- // There is an edge case where a developer sets the attribute inline on a custom element and then
1599
- // programmatically changes it before it has been upgraded as shown below:
1226
+ // There is an edge case where a developer sets the attribute inline on a custom element and then programatically
1227
+ // changes it before it has been upgraded as shown below:
1600
1228
  //
1601
1229
  // ```html
1602
1230
  // <!-- this component has _not_ been upgraded yet -->
@@ -1606,13 +1234,13 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1606
1234
  // el = document.querySelector("#test");
1607
1235
  // el.someAttribute = "another-value";
1608
1236
  // // upgrade component
1609
- // customElements.define('my-component', MyComponent);
1237
+ // cutsomElements.define('my-component', MyComponent);
1610
1238
  // </script>
1611
1239
  // ```
1612
1240
  // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1613
1241
  // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1614
1242
  // to the value that was set inline i.e. "some-value" from above example. When
1615
- // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1243
+ // the connectedCallback attempts to unshadow it will use "some-value" as the intial value rather than "another-value"
1616
1244
  //
1617
1245
  // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1618
1246
  // by connectedCallback as this attributeChangedCallback will not fire.
@@ -1626,25 +1254,17 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1626
1254
  newValue = this[propName];
1627
1255
  delete this[propName];
1628
1256
  }
1629
- else if (prototype.hasOwnProperty(propName) &&
1630
- typeof this[propName] === 'number' &&
1631
- this[propName] == newValue) {
1632
- // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1633
- // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1634
- // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1635
- return;
1636
- }
1637
1257
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1638
1258
  });
1639
1259
  };
1640
1260
  // create an array of attributes to observe
1641
1261
  // and also create a map of html attribute name to js property name
1642
1262
  Cstr.observedAttributes = members
1643
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1263
+ .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
1644
1264
  .map(([propName, m]) => {
1645
1265
  const attrName = m[1] || propName;
1646
1266
  attrNameToPropName.set(attrName, propName);
1647
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1267
+ if (m[0] & 512 /* ReflectAttr */) {
1648
1268
  cmpMeta.$attrsToReflect$.push([propName, attrName]);
1649
1269
  }
1650
1270
  return attrName;
@@ -1655,10 +1275,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1655
1275
  };
1656
1276
  const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1657
1277
  // initializeComponent
1658
- if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1278
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1659
1279
  {
1660
1280
  // we haven't initialized this element yet
1661
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1281
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1662
1282
  // lazy loaded components
1663
1283
  // request the component's implementation to be
1664
1284
  // wired up with the host element
@@ -1670,13 +1290,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1670
1290
  endLoad();
1671
1291
  }
1672
1292
  if (!Cstr.isProxied) {
1673
- // we've never proxied this Constructor before
1674
- // let's add the getters/setters to its prototype before
1675
- // the first time we create an instance of the implementation
1676
- {
1677
- cmpMeta.$watchers$ = Cstr.watchers;
1678
- }
1679
- proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1293
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1680
1294
  Cstr.isProxied = true;
1681
1295
  }
1682
1296
  const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
@@ -1684,7 +1298,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1684
1298
  // but let's keep track of when we start and stop
1685
1299
  // so that the getters/setters don't incorrectly step on data
1686
1300
  {
1687
- hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1301
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
1688
1302
  }
1689
1303
  // construct the lazy-loaded component implementation
1690
1304
  // passing the hostRef is very important during
@@ -1697,30 +1311,17 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1697
1311
  consoleError(e);
1698
1312
  }
1699
1313
  {
1700
- hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1701
- }
1702
- {
1703
- hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1314
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1704
1315
  }
1705
1316
  endNewInstance();
1706
1317
  fireConnectedCallback(hostRef.$lazyInstance$);
1707
1318
  }
1708
- if (Cstr.style) {
1709
- // this component has styles but we haven't registered them yet
1710
- let style = Cstr.style;
1711
- const scopeId = getScopeId(cmpMeta);
1712
- if (!styles.has(scopeId)) {
1713
- const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1714
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1715
- endRegisterStyles();
1716
- }
1717
- }
1718
1319
  }
1719
1320
  // we've successfully created a lazy instance
1720
1321
  const ancestorComponent = hostRef.$ancestorComponent$;
1721
1322
  const schedule = () => scheduleUpdate(hostRef, true);
1722
1323
  if (ancestorComponent && ancestorComponent['s-rc']) {
1723
- // this is the initial load and this component it has an ancestor component
1324
+ // this is the intial load and this component it has an ancestor component
1724
1325
  // but the ancestor component has NOT fired its will update lifecycle yet
1725
1326
  // so let's just cool our jets and wait for the ancestor to continue first
1726
1327
  // this will get fired off when the ancestor component
@@ -1738,20 +1339,19 @@ const fireConnectedCallback = (instance) => {
1738
1339
  }
1739
1340
  };
1740
1341
  const connectedCallback = (elm) => {
1741
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1342
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1742
1343
  const hostRef = getHostRef(elm);
1743
1344
  const cmpMeta = hostRef.$cmpMeta$;
1744
1345
  const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1745
- if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1346
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1746
1347
  // first time this component has connected
1747
- hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1348
+ hostRef.$flags$ |= 1 /* hasConnected */;
1748
1349
  {
1749
1350
  // initUpdate
1750
1351
  // if the slot polyfill is required we'll need to put some nodes
1751
1352
  // in here to act as original content anchors as we move nodes around
1752
1353
  // host element has been connected to the DOM
1753
- if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
1754
- cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
1354
+ if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1755
1355
  setContentReference(elm);
1756
1356
  }
1757
1357
  }
@@ -1774,7 +1374,7 @@ const connectedCallback = (elm) => {
1774
1374
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1775
1375
  if (cmpMeta.$members$) {
1776
1376
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1777
- if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1377
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1778
1378
  const value = elm[memberName];
1779
1379
  delete elm[memberName];
1780
1380
  elm[memberName] = value;
@@ -1808,7 +1408,7 @@ const setContentReference = (elm) => {
1808
1408
  elm.insertBefore(contentRefElm, elm.firstChild);
1809
1409
  };
1810
1410
  const disconnectedCallback = (elm) => {
1811
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1411
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1812
1412
  const hostRef = getHostRef(elm);
1813
1413
  const instance = hostRef.$lazyInstance$ ;
1814
1414
  {
@@ -1823,7 +1423,6 @@ const disconnectedCallback = (elm) => {
1823
1423
  }
1824
1424
  };
1825
1425
  const bootstrapLazy = (lazyBundles, options = {}) => {
1826
- var _a;
1827
1426
  const endBootstrap = createTime();
1828
1427
  const cmpTags = [];
1829
1428
  const exclude = options.exclude || [];
@@ -1836,70 +1435,60 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1836
1435
  let isBootstrapping = true;
1837
1436
  Object.assign(plt, options);
1838
1437
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1839
- lazyBundles.map((lazyBundle) => {
1840
- lazyBundle[1].map((compactMeta) => {
1841
- const cmpMeta = {
1842
- $flags$: compactMeta[0],
1843
- $tagName$: compactMeta[1],
1844
- $members$: compactMeta[2],
1845
- $listeners$: compactMeta[3],
1846
- };
1847
- {
1848
- cmpMeta.$members$ = compactMeta[2];
1849
- }
1850
- {
1851
- cmpMeta.$listeners$ = compactMeta[3];
1852
- }
1853
- {
1854
- cmpMeta.$attrsToReflect$ = [];
1855
- }
1856
- {
1857
- cmpMeta.$watchers$ = {};
1438
+ lazyBundles.map((lazyBundle) => lazyBundle[1].map((compactMeta) => {
1439
+ const cmpMeta = {
1440
+ $flags$: compactMeta[0],
1441
+ $tagName$: compactMeta[1],
1442
+ $members$: compactMeta[2],
1443
+ $listeners$: compactMeta[3],
1444
+ };
1445
+ {
1446
+ cmpMeta.$members$ = compactMeta[2];
1447
+ }
1448
+ {
1449
+ cmpMeta.$listeners$ = compactMeta[3];
1450
+ }
1451
+ {
1452
+ cmpMeta.$attrsToReflect$ = [];
1453
+ }
1454
+ const tagName = cmpMeta.$tagName$;
1455
+ const HostElement = class extends HTMLElement {
1456
+ // StencilLazyHost
1457
+ constructor(self) {
1458
+ // @ts-ignore
1459
+ super(self);
1460
+ self = this;
1461
+ registerHost(self, cmpMeta);
1858
1462
  }
1859
- const tagName = cmpMeta.$tagName$;
1860
- const HostElement = class extends HTMLElement {
1861
- // StencilLazyHost
1862
- constructor(self) {
1863
- // @ts-ignore
1864
- super(self);
1865
- self = this;
1866
- registerHost(self, cmpMeta);
1867
- }
1868
- connectedCallback() {
1869
- if (appLoadFallback) {
1870
- clearTimeout(appLoadFallback);
1871
- appLoadFallback = null;
1872
- }
1873
- if (isBootstrapping) {
1874
- // connectedCallback will be processed once all components have been registered
1875
- deferredConnectedCallbacks.push(this);
1876
- }
1877
- else {
1878
- plt.jmp(() => connectedCallback(this));
1879
- }
1463
+ connectedCallback() {
1464
+ if (appLoadFallback) {
1465
+ clearTimeout(appLoadFallback);
1466
+ appLoadFallback = null;
1880
1467
  }
1881
- disconnectedCallback() {
1882
- plt.jmp(() => disconnectedCallback(this));
1468
+ if (isBootstrapping) {
1469
+ // connectedCallback will be processed once all components have been registered
1470
+ deferredConnectedCallbacks.push(this);
1883
1471
  }
1884
- componentOnReady() {
1885
- return getHostRef(this).$onReadyPromise$;
1472
+ else {
1473
+ plt.jmp(() => connectedCallback(this));
1886
1474
  }
1887
- };
1888
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1889
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1890
- cmpTags.push(tagName);
1891
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1892
1475
  }
1893
- });
1894
- });
1476
+ disconnectedCallback() {
1477
+ plt.jmp(() => disconnectedCallback(this));
1478
+ }
1479
+ componentOnReady() {
1480
+ return getHostRef(this).$onReadyPromise$;
1481
+ }
1482
+ };
1483
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1484
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1485
+ cmpTags.push(tagName);
1486
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1487
+ }
1488
+ }));
1895
1489
  {
1896
1490
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1897
1491
  visibilityStyle.setAttribute('data-styles', '');
1898
- // Apply CSP nonce to the style tag if it exists
1899
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1900
- if (nonce != null) {
1901
- visibilityStyle.setAttribute('nonce', nonce);
1902
- }
1903
1492
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1904
1493
  }
1905
1494
  // Process deferred connectedCallbacks now all components have been registered
@@ -1916,48 +1505,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1916
1505
  endBootstrap();
1917
1506
  };
1918
1507
  const Fragment = (_, children) => children;
1919
- const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1920
- if (listeners) {
1921
- listeners.map(([flags, name, method]) => {
1922
- const target = getHostListenerTarget(elm, flags) ;
1923
- const handler = hostListenerProxy(hostRef, method);
1924
- const opts = hostListenerOpts(flags);
1925
- plt.ael(target, name, handler, opts);
1926
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1927
- });
1928
- }
1929
- };
1930
- const hostListenerProxy = (hostRef, methodName) => (ev) => {
1931
- try {
1932
- {
1933
- if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
1934
- // instance is ready, let's call it's member method for this event
1935
- hostRef.$lazyInstance$[methodName](ev);
1936
- }
1937
- else {
1938
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1939
- }
1940
- }
1941
- }
1942
- catch (e) {
1943
- consoleError(e);
1944
- }
1945
- };
1946
- const getHostListenerTarget = (elm, flags) => {
1947
- if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
1948
- return win;
1949
- return elm;
1950
- };
1951
- // prettier-ignore
1952
- const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1953
- /**
1954
- * Assigns the given value to the nonce property on the runtime platform object.
1955
- * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1956
- * @param nonce The value to be assigned to the platform nonce property.
1957
- * @returns void
1958
- */
1959
- const setNonce = (nonce) => (plt.$nonce$ = nonce);
1960
- const hostRefs = /*@__PURE__*/ new WeakMap();
1508
+ const hostRefs = new WeakMap();
1961
1509
  const getHostRef = (ref) => hostRefs.get(ref);
1962
1510
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1963
1511
  const registerHost = (elm, cmpMeta) => {
@@ -1989,82 +1537,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1989
1537
  if (module) {
1990
1538
  return module[exportName];
1991
1539
  }
1992
-
1993
- if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1994
- const processMod = importedModule => {
1995
- cmpModules.set(bundleId, importedModule);
1996
- return importedModule[exportName];
1997
- }
1998
- switch(bundleId) {
1999
-
2000
- case 'xpl-avatar_15':
2001
- return import(
2002
- /* webpackMode: "lazy" */
2003
- './xpl-avatar_15.entry.js').then(processMod, consoleError);
2004
- case 'xpl-application-shell':
2005
- return import(
2006
- /* webpackMode: "lazy" */
2007
- './xpl-application-shell.entry.js').then(processMod, consoleError);
2008
- case 'xpl-button-row':
2009
- return import(
2010
- /* webpackMode: "lazy" */
2011
- './xpl-button-row.entry.js').then(processMod, consoleError);
2012
- case 'xpl-choicelist':
2013
- return import(
2014
- /* webpackMode: "lazy" */
2015
- './xpl-choicelist.entry.js').then(processMod, consoleError);
2016
- case 'xpl-divider':
2017
- return import(
2018
- /* webpackMode: "lazy" */
2019
- './xpl-divider.entry.js').then(processMod, consoleError);
2020
- case 'xpl-grid':
2021
- return import(
2022
- /* webpackMode: "lazy" */
2023
- './xpl-grid.entry.js').then(processMod, consoleError);
2024
- case 'xpl-grid-item':
2025
- return import(
2026
- /* webpackMode: "lazy" */
2027
- './xpl-grid-item.entry.js').then(processMod, consoleError);
2028
- case 'xpl-input':
2029
- return import(
2030
- /* webpackMode: "lazy" */
2031
- './xpl-input.entry.js').then(processMod, consoleError);
2032
- case 'xpl-list':
2033
- return import(
2034
- /* webpackMode: "lazy" */
2035
- './xpl-list.entry.js').then(processMod, consoleError);
2036
- case 'xpl-main-nav':
2037
- return import(
2038
- /* webpackMode: "lazy" */
2039
- './xpl-main-nav.entry.js').then(processMod, consoleError);
2040
- case 'xpl-pagination':
2041
- return import(
2042
- /* webpackMode: "lazy" */
2043
- './xpl-pagination.entry.js').then(processMod, consoleError);
2044
- case 'xpl-select':
2045
- return import(
2046
- /* webpackMode: "lazy" */
2047
- './xpl-select.entry.js').then(processMod, consoleError);
2048
- case 'xpl-toggle':
2049
- return import(
2050
- /* webpackMode: "lazy" */
2051
- './xpl-toggle.entry.js').then(processMod, consoleError);
2052
- case 'xpl-backdrop':
2053
- return import(
2054
- /* webpackMode: "lazy" */
2055
- './xpl-backdrop.entry.js').then(processMod, consoleError);
2056
- case 'xpl-dropdown_2':
2057
- return import(
2058
- /* webpackMode: "lazy" */
2059
- './xpl-dropdown_2.entry.js').then(processMod, consoleError);
2060
- case 'xpl-dropdown-group_3':
2061
- return import(
2062
- /* webpackMode: "lazy" */
2063
- './xpl-dropdown-group_3.entry.js').then(processMod, consoleError);
2064
- }
2065
- }
2066
1540
  return import(
2067
- /* @vite-ignore */
2068
1541
  /* webpackInclude: /\.entry\.js$/ */
2069
1542
  /* webpackExclude: /\.system\.entry\.js$/ */
2070
1543
  /* webpackMode: "lazy" */
@@ -2075,35 +1548,13 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2075
1548
  return importedModule[exportName];
2076
1549
  }, consoleError);
2077
1550
  };
2078
- const styles = /*@__PURE__*/ new Map();
2079
- const win = typeof window !== 'undefined' ? window : {};
2080
- const doc = win.document || { head: {} };
2081
- const plt = {
2082
- $flags$: 0,
2083
- $resourcesUrl$: '',
2084
- jmp: (h) => h(),
2085
- raf: (h) => requestAnimationFrame(h),
2086
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
2087
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2088
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
2089
- };
2090
- const promiseResolve = (v) => Promise.resolve(v);
2091
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
2092
- try {
2093
- new CSSStyleSheet();
2094
- return typeof new CSSStyleSheet().replaceSync === 'function';
2095
- }
2096
- catch (e) { }
2097
- return false;
2098
- })()
2099
- ;
2100
1551
  const queueDomReads = [];
2101
1552
  const queueDomWrites = [];
2102
1553
  const queueTask = (queue, write) => (cb) => {
2103
1554
  queue.push(cb);
2104
1555
  if (!queuePending) {
2105
1556
  queuePending = true;
2106
- if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
1557
+ if (write && plt.$flags$ & 4 /* queueSync */) {
2107
1558
  nextTick(flush);
2108
1559
  }
2109
1560
  else {
@@ -2140,6 +1591,4 @@ const flush = () => {
2140
1591
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2141
1592
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2142
1593
 
2143
- export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2144
-
2145
- //# sourceMappingURL=index-56581b5c.js.map
1594
+ export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };