@zanichelli/albe-web-components 2.31.2 → 2.33.1

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 (470) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/types/beans/index.d.ts +4 -0
  3. package/dist/types/components/z-aria-alert/index.d.ts +4 -0
  4. package/dist/types/components/z-visually-hidden/index.d.ts +3 -0
  5. package/dist/types/components.d.ts +28 -0
  6. package/dist/web-components-library/_commonjsHelpers-cb1cd7bb.js +44 -0
  7. package/dist/web-components-library/app-globals-0f993ce5.js +3 -0
  8. package/dist/{esm → web-components-library}/breakpoints-c386984e.js +0 -0
  9. package/dist/web-components-library/css-shim-003e9264.js +4 -0
  10. package/dist/web-components-library/dom-1b195079.js +73 -0
  11. package/dist/{esm/hammer-c807d0b5.js → web-components-library/hammer-52e2c4fe.js} +4 -15
  12. package/dist/{collection/components/icons/icons.js → web-components-library/icons-9a191d79.js} +3 -1
  13. package/dist/web-components-library/index-44936066.js +2832 -0
  14. package/dist/web-components-library/index-8067f807.js +64 -0
  15. package/dist/{esm/index-0258069c.js → web-components-library/index-8f67b3da.js} +6 -1
  16. package/dist/web-components-library/index.esm.js +9 -1
  17. package/dist/web-components-library/shadow-css-c1ad5fdc.js +383 -0
  18. package/dist/{esm/utils-0345e333.js → web-components-library/utils-5e70920f.js} +20 -2
  19. package/dist/web-components-library/web-components-library.css +789 -1
  20. package/dist/web-components-library/web-components-library.esm.js +122 -1
  21. package/dist/web-components-library/z-alert.entry.js +15 -0
  22. package/dist/{esm → web-components-library}/z-app-header.entry.js +1 -1
  23. package/dist/web-components-library/z-app-switcher.entry.js +25 -0
  24. package/dist/web-components-library/z-app-topbar.entry.js +37 -0
  25. package/dist/web-components-library/z-aria-alert.entry.js +14 -0
  26. package/dist/web-components-library/z-avatar.entry.js +39 -0
  27. package/dist/web-components-library/z-body.entry.js +13 -0
  28. package/dist/web-components-library/z-button-filter.entry.js +45 -0
  29. package/dist/web-components-library/z-button-sort.entry.js +50 -0
  30. package/dist/web-components-library/z-button.entry.js +35 -0
  31. package/dist/{esm → web-components-library}/z-candybar.entry.js +1 -1
  32. package/dist/web-components-library/z-card.entry.js +54 -0
  33. package/dist/web-components-library/z-chip.entry.js +20 -0
  34. package/dist/web-components-library/z-combobox.entry.js +166 -0
  35. package/dist/web-components-library/z-contextual-menu.entry.js +36 -0
  36. package/dist/{esm → web-components-library}/z-cookiebar.entry.js +2 -2
  37. package/dist/web-components-library/z-divider.entry.js +22 -0
  38. package/dist/web-components-library/z-footer-link.entry.js +15 -0
  39. package/dist/web-components-library/z-footer-section.entry.js +19 -0
  40. package/dist/web-components-library/z-footer-social.entry.js +15 -0
  41. package/dist/web-components-library/z-footer.entry.js +98 -0
  42. package/dist/web-components-library/z-ghost-loading.entry.js +15 -0
  43. package/dist/{esm → web-components-library}/z-heading.entry.js +1 -1
  44. package/dist/web-components-library/z-icon-package.entry.js +19 -0
  45. package/dist/web-components-library/z-icon.entry.js +24 -0
  46. package/dist/web-components-library/z-info-box.entry.js +21 -0
  47. package/dist/web-components-library/z-input-label.entry.js +17 -0
  48. package/dist/web-components-library/z-input-message.entry.js +20 -0
  49. package/dist/web-components-library/z-input.entry.js +264 -0
  50. package/dist/web-components-library/z-link.entry.js +67 -0
  51. package/dist/web-components-library/z-list-element.entry.js +150 -0
  52. package/dist/web-components-library/z-list-group.entry.js +50 -0
  53. package/dist/web-components-library/z-list.entry.js +30 -0
  54. package/dist/web-components-library/z-logo.entry.js +24 -0
  55. package/dist/web-components-library/z-menu-dropdown.entry.js +56 -0
  56. package/dist/web-components-library/z-menu-section.entry.js +42 -0
  57. package/dist/web-components-library/z-menu.entry.js +106 -0
  58. package/dist/{esm → web-components-library}/z-messages-pocket.entry.js +2 -2
  59. package/dist/{esm → web-components-library}/z-modal-login.entry.js +2 -2
  60. package/dist/web-components-library/z-modal.entry.js +32 -0
  61. package/dist/web-components-library/z-myz-card-alert.entry.js +59 -0
  62. package/dist/web-components-library/z-myz-card-body.entry.js +15 -0
  63. package/dist/web-components-library/z-myz-card-cover.entry.js +18 -0
  64. package/dist/{esm → web-components-library}/z-myz-card-dictionary.entry.js +2 -2
  65. package/dist/{esm → web-components-library}/z-myz-card-footer-sections.entry.js +1 -1
  66. package/dist/web-components-library/z-myz-card-footer.entry.js +48 -0
  67. package/dist/web-components-library/z-myz-card-header.entry.js +34 -0
  68. package/dist/web-components-library/z-myz-card-icon.entry.js +17 -0
  69. package/dist/{esm → web-components-library}/z-myz-card-info.entry.js +3 -3
  70. package/dist/web-components-library/z-myz-card-list.entry.js +33 -0
  71. package/dist/web-components-library/z-myz-card.entry.js +37 -0
  72. package/dist/web-components-library/z-myz-list-item.entry.js +33 -0
  73. package/dist/web-components-library/z-myz-list.entry.js +31 -0
  74. package/dist/{esm → web-components-library}/z-myz-topbar.entry.js +2 -2
  75. package/dist/{esm → web-components-library}/z-navigation-tab.entry.js +1 -1
  76. package/dist/{esm → web-components-library}/z-navigation-tabs.entry.js +2 -2
  77. package/dist/web-components-library/z-notification.entry.js +38 -0
  78. package/dist/{esm → web-components-library}/z-otp.entry.js +2 -2
  79. package/dist/web-components-library/z-pagination-bar.entry.js +126 -0
  80. package/dist/web-components-library/z-pagination-page.entry.js +21 -0
  81. package/dist/web-components-library/z-panel-elem.entry.js +26 -0
  82. package/dist/web-components-library/z-pocket-body.entry.js +23 -0
  83. package/dist/web-components-library/z-pocket-header.entry.js +36 -0
  84. package/dist/{esm → web-components-library}/z-pocket-message.entry.js +1 -1
  85. package/dist/web-components-library/z-pocket.entry.js +68 -0
  86. package/dist/web-components-library/z-popover.entry.js +124 -0
  87. package/dist/web-components-library/z-registro-table-body.entry.js +20 -0
  88. package/dist/web-components-library/z-registro-table-cell.entry.js +30 -0
  89. package/dist/web-components-library/z-registro-table-empty-box.entry.js +24 -0
  90. package/dist/web-components-library/z-registro-table-expanded-row.entry.js +15 -0
  91. package/dist/{esm → web-components-library}/z-registro-table-footer.entry.js +1 -1
  92. package/dist/web-components-library/z-registro-table-head.entry.js +19 -0
  93. package/dist/web-components-library/z-registro-table-header-row.entry.js +18 -0
  94. package/dist/web-components-library/z-registro-table-header.entry.js +80 -0
  95. package/dist/web-components-library/z-registro-table-row.entry.js +39 -0
  96. package/dist/web-components-library/z-registro-table-sticky-footer.entry.js +15 -0
  97. package/dist/web-components-library/z-registro-table.entry.js +78 -0
  98. package/dist/web-components-library/z-select.entry.js +281 -0
  99. package/dist/{esm → web-components-library}/z-slideshow.entry.js +3 -3
  100. package/dist/web-components-library/z-status-tag.entry.js +25 -0
  101. package/dist/web-components-library/z-stepper-item.entry.js +18 -0
  102. package/dist/web-components-library/z-stepper.entry.js +15 -0
  103. package/dist/{esm → web-components-library}/z-toast-notification-list.entry.js +2 -2
  104. package/dist/{esm → web-components-library}/z-toast-notification.entry.js +4 -3
  105. package/dist/web-components-library/z-toggle-button.entry.js +32 -0
  106. package/dist/{collection/components/notification/z-tooltip/index.js → web-components-library/z-tooltip.entry.js} +19 -128
  107. package/dist/web-components-library/z-typography.entry.js +25 -0
  108. package/dist/web-components-library/z-user-dropdown.entry.js +91 -0
  109. package/dist/web-components-library/z-visually-hidden.entry.js +15 -0
  110. package/package.json +1 -1
  111. package/react/components.d.ts +2 -0
  112. package/react/components.js +4 -2
  113. package/react/components.js.map +1 -1
  114. package/www/build/_commonjsHelpers-cb1cd7bb.js +44 -0
  115. package/www/build/app-globals-0f993ce5.js +3 -0
  116. package/{dist/collection/constants/breakpoints.js → www/build/breakpoints-c386984e.js} +2 -1
  117. package/www/build/css-shim-003e9264.js +4 -0
  118. package/www/build/dom-1b195079.js +73 -0
  119. package/{dist/cjs/hammer-6e321f0b.js → www/build/hammer-52e2c4fe.js} +4 -18
  120. package/www/build/icons-9a191d79.js +475 -0
  121. package/www/build/index-44936066.js +2832 -0
  122. package/www/build/index-8067f807.js +64 -0
  123. package/{dist/collection/beans/index.js → www/build/index-8f67b3da.js} +41 -34
  124. package/www/build/index.esm.js +9 -1
  125. package/www/build/shadow-css-c1ad5fdc.js +383 -0
  126. package/{dist/collection/utils/utils.js → www/build/utils-5e70920f.js} +15 -12
  127. package/www/build/web-components-library.css +789 -1
  128. package/www/build/web-components-library.esm.js +122 -1
  129. package/www/build/z-alert.entry.js +15 -0
  130. package/{dist/cjs/z-app-header.cjs.entry.js → www/build/z-app-header.entry.js} +5 -9
  131. package/www/build/z-app-switcher.entry.js +25 -0
  132. package/www/build/z-app-topbar.entry.js +37 -0
  133. package/www/build/z-aria-alert.entry.js +14 -0
  134. package/www/build/z-avatar.entry.js +39 -0
  135. package/www/build/z-body.entry.js +13 -0
  136. package/www/build/z-button-filter.entry.js +45 -0
  137. package/www/build/z-button-sort.entry.js +50 -0
  138. package/www/build/z-button.entry.js +35 -0
  139. package/{dist/cjs/z-candybar.cjs.entry.js → www/build/z-candybar.entry.js} +4 -8
  140. package/www/build/z-card.entry.js +54 -0
  141. package/www/build/z-chip.entry.js +20 -0
  142. package/www/build/z-combobox.entry.js +166 -0
  143. package/www/build/z-contextual-menu.entry.js +36 -0
  144. package/{dist/cjs/z-cookiebar.cjs.entry.js → www/build/z-cookiebar.entry.js} +7 -11
  145. package/www/build/z-divider.entry.js +22 -0
  146. package/www/build/z-footer-link.entry.js +15 -0
  147. package/www/build/z-footer-section.entry.js +19 -0
  148. package/www/build/z-footer-social.entry.js +15 -0
  149. package/www/build/z-footer.entry.js +98 -0
  150. package/www/build/z-ghost-loading.entry.js +15 -0
  151. package/www/build/z-heading.entry.js +13 -0
  152. package/www/build/z-icon-package.entry.js +19 -0
  153. package/www/build/z-icon.entry.js +24 -0
  154. package/www/build/z-info-box.entry.js +21 -0
  155. package/www/build/z-input-label.entry.js +17 -0
  156. package/www/build/z-input-message.entry.js +20 -0
  157. package/www/build/z-input.entry.js +264 -0
  158. package/www/build/z-link.entry.js +67 -0
  159. package/www/build/z-list-element.entry.js +150 -0
  160. package/www/build/z-list-group.entry.js +50 -0
  161. package/www/build/z-list.entry.js +30 -0
  162. package/www/build/z-logo.entry.js +24 -0
  163. package/www/build/z-menu-dropdown.entry.js +56 -0
  164. package/www/build/z-menu-section.entry.js +42 -0
  165. package/www/build/z-menu.entry.js +106 -0
  166. package/{dist/cjs/z-messages-pocket.cjs.entry.js → www/build/z-messages-pocket.entry.js} +13 -17
  167. package/www/build/z-modal-login.entry.js +77 -0
  168. package/www/build/z-modal.entry.js +32 -0
  169. package/www/build/z-myz-card-alert.entry.js +59 -0
  170. package/www/build/z-myz-card-body.entry.js +15 -0
  171. package/www/build/z-myz-card-cover.entry.js +18 -0
  172. package/{dist/cjs/z-myz-card-dictionary.cjs.entry.js → www/build/z-myz-card-dictionary.entry.js} +6 -10
  173. package/{dist/cjs/z-myz-card-footer-sections.cjs.entry.js → www/build/z-myz-card-footer-sections.entry.js} +4 -8
  174. package/www/build/z-myz-card-footer.entry.js +48 -0
  175. package/www/build/z-myz-card-header.entry.js +34 -0
  176. package/www/build/z-myz-card-icon.entry.js +17 -0
  177. package/{dist/cjs/z-myz-card-info.cjs.entry.js → www/build/z-myz-card-info.entry.js} +19 -23
  178. package/www/build/z-myz-card-list.entry.js +33 -0
  179. package/www/build/z-myz-card.entry.js +37 -0
  180. package/www/build/z-myz-list-item.entry.js +33 -0
  181. package/www/build/z-myz-list.entry.js +31 -0
  182. package/{dist/cjs/z-myz-topbar.cjs.entry.js → www/build/z-myz-topbar.entry.js} +29 -33
  183. package/{dist/cjs/z-navigation-tab.cjs.entry.js → www/build/z-navigation-tab.entry.js} +6 -10
  184. package/{dist/cjs/z-navigation-tabs.cjs.entry.js → www/build/z-navigation-tabs.entry.js} +11 -15
  185. package/www/build/z-notification.entry.js +38 -0
  186. package/{dist/cjs/z-otp.cjs.entry.js → www/build/z-otp.entry.js} +8 -12
  187. package/www/build/z-pagination-bar.entry.js +126 -0
  188. package/www/build/z-pagination-page.entry.js +21 -0
  189. package/www/build/z-panel-elem.entry.js +26 -0
  190. package/www/build/z-pocket-body.entry.js +23 -0
  191. package/www/build/z-pocket-header.entry.js +36 -0
  192. package/{dist/cjs/z-pocket-message.cjs.entry.js → www/build/z-pocket-message.entry.js} +4 -8
  193. package/www/build/z-pocket.entry.js +68 -0
  194. package/www/build/z-popover.entry.js +124 -0
  195. package/www/build/z-registro-table-body.entry.js +20 -0
  196. package/www/build/z-registro-table-cell.entry.js +30 -0
  197. package/www/build/z-registro-table-empty-box.entry.js +24 -0
  198. package/www/build/z-registro-table-expanded-row.entry.js +15 -0
  199. package/{dist/cjs/z-registro-table-footer.cjs.entry.js → www/build/z-registro-table-footer.entry.js} +5 -9
  200. package/www/build/z-registro-table-head.entry.js +19 -0
  201. package/www/build/z-registro-table-header-row.entry.js +18 -0
  202. package/www/build/z-registro-table-header.entry.js +80 -0
  203. package/www/build/z-registro-table-row.entry.js +39 -0
  204. package/www/build/z-registro-table-sticky-footer.entry.js +15 -0
  205. package/www/build/z-registro-table.entry.js +78 -0
  206. package/www/build/z-select.entry.js +281 -0
  207. package/{dist/cjs/z-slideshow.cjs.entry.js → www/build/z-slideshow.entry.js} +19 -23
  208. package/www/build/z-status-tag.entry.js +25 -0
  209. package/www/build/z-stepper-item.entry.js +18 -0
  210. package/www/build/z-stepper.entry.js +15 -0
  211. package/{dist/cjs/z-toast-notification-list.cjs.entry.js → www/build/z-toast-notification-list.entry.js} +7 -11
  212. package/{dist/cjs/z-toast-notification.cjs.entry.js → www/build/z-toast-notification.entry.js} +31 -34
  213. package/www/build/z-toggle-button.entry.js +32 -0
  214. package/www/build/z-tooltip.entry.js +270 -0
  215. package/www/build/z-typography.entry.js +25 -0
  216. package/www/build/z-user-dropdown.entry.js +91 -0
  217. package/www/build/z-visually-hidden.entry.js +15 -0
  218. package/www/index.html +44 -31
  219. package/dist/cjs/breakpoints-88c4fd6c.js +0 -7
  220. package/dist/cjs/index-8f4b351d.js +0 -251
  221. package/dist/cjs/index-dee3e21d.js +0 -1694
  222. package/dist/cjs/index.cjs.js +0 -13
  223. package/dist/cjs/loader.cjs.js +0 -21
  224. package/dist/cjs/utils-6d6841cc.js +0 -75
  225. package/dist/cjs/web-components-library.cjs.js +0 -19
  226. package/dist/cjs/z-alert_66.cjs.entry.js +0 -3736
  227. package/dist/cjs/z-heading.cjs.entry.js +0 -17
  228. package/dist/cjs/z-modal-login.cjs.entry.js +0 -81
  229. package/dist/cjs/z-pocket_3.cjs.entry.js +0 -124
  230. package/dist/collection/collection-manifest.json +0 -98
  231. package/dist/collection/components/buttons/z-button/index.js +0 -219
  232. package/dist/collection/components/buttons/z-button/styles.css +0 -231
  233. package/dist/collection/components/buttons/z-button-filter/index.js +0 -155
  234. package/dist/collection/components/buttons/z-button-filter/styles.css +0 -74
  235. package/dist/collection/components/buttons/z-button-sort/index.js +0 -216
  236. package/dist/collection/components/buttons/z-button-sort/styles.css +0 -101
  237. package/dist/collection/components/buttons/z-chip/index.js +0 -59
  238. package/dist/collection/components/buttons/z-chip/styles.css +0 -17
  239. package/dist/collection/components/buttons/z-toggle-button/index.js +0 -122
  240. package/dist/collection/components/buttons/z-toggle-button/styles.css +0 -62
  241. package/dist/collection/components/footer/z-footer/index.js +0 -286
  242. package/dist/collection/components/footer/z-footer/styles.css +0 -242
  243. package/dist/collection/components/footer/z-footer-link/index.js +0 -37
  244. package/dist/collection/components/footer/z-footer-link/styles.css +0 -33
  245. package/dist/collection/components/footer/z-footer-section/index.js +0 -51
  246. package/dist/collection/components/footer/z-footer-section/styles.css +0 -163
  247. package/dist/collection/components/footer/z-footer-social/index.js +0 -68
  248. package/dist/collection/components/footer/z-footer-social/styles.css +0 -23
  249. package/dist/collection/components/icons/z-icon/index.js +0 -110
  250. package/dist/collection/components/icons/z-icon/styles.css +0 -14
  251. package/dist/collection/components/icons/z-icon-package/index.js +0 -20
  252. package/dist/collection/components/icons/z-icon-package/styles.css +0 -16
  253. package/dist/collection/components/indicators/z-stepper/index.js +0 -17
  254. package/dist/collection/components/indicators/z-stepper/styles.css +0 -19
  255. package/dist/collection/components/indicators/z-stepper-item/index.js +0 -93
  256. package/dist/collection/components/indicators/z-stepper-item/styles.css +0 -115
  257. package/dist/collection/components/inputs/z-combobox/index.js +0 -480
  258. package/dist/collection/components/inputs/z-combobox/styles.css +0 -148
  259. package/dist/collection/components/inputs/z-input/index.js +0 -821
  260. package/dist/collection/components/inputs/z-input/styles.css +0 -304
  261. package/dist/collection/components/inputs/z-input-label/index.js +0 -72
  262. package/dist/collection/components/inputs/z-input-label/styles.css +0 -16
  263. package/dist/collection/components/inputs/z-input-message/index.js +0 -64
  264. package/dist/collection/components/inputs/z-input-message/styles.css +0 -33
  265. package/dist/collection/components/inputs/z-select/index.js +0 -647
  266. package/dist/collection/components/inputs/z-select/styles.css +0 -131
  267. package/dist/collection/components/list/z-list/index.js +0 -57
  268. package/dist/collection/components/list/z-list/styles.css +0 -7
  269. package/dist/collection/components/list/z-list-element/index.js +0 -439
  270. package/dist/collection/components/list/z-list-element/styles.css +0 -133
  271. package/dist/collection/components/list/z-list-group/index.js +0 -144
  272. package/dist/collection/components/list/z-list-group/styles.css +0 -22
  273. package/dist/collection/components/list/z-toast-notification-list/index.js +0 -97
  274. package/dist/collection/components/list/z-toast-notification-list/styles.css +0 -107
  275. package/dist/collection/components/logo/z-logo/index.js +0 -128
  276. package/dist/collection/components/logo/z-logo/styles.css +0 -29
  277. package/dist/collection/components/modal/z-modal/index.js +0 -160
  278. package/dist/collection/components/modal/z-modal/styles.css +0 -185
  279. package/dist/collection/components/modal/z-modal-login/index.js +0 -272
  280. package/dist/collection/components/modal/z-modal-login/styles.css +0 -159
  281. package/dist/collection/components/navigation/z-app-header/index.js +0 -267
  282. package/dist/collection/components/navigation/z-app-header/styles.css +0 -445
  283. package/dist/collection/components/navigation/z-app-switcher/index.js +0 -70
  284. package/dist/collection/components/navigation/z-app-switcher/styles.css +0 -35
  285. package/dist/collection/components/navigation/z-app-topbar/index.js +0 -156
  286. package/dist/collection/components/navigation/z-app-topbar/styles.css +0 -71
  287. package/dist/collection/components/navigation/z-link/index.js +0 -309
  288. package/dist/collection/components/navigation/z-link/styles.css +0 -160
  289. package/dist/collection/components/navigation/z-menu/index.js +0 -223
  290. package/dist/collection/components/navigation/z-menu/styles.css +0 -149
  291. package/dist/collection/components/navigation/z-menu-dropdown/index.js +0 -125
  292. package/dist/collection/components/navigation/z-menu-dropdown/styles.css +0 -146
  293. package/dist/collection/components/navigation/z-menu-section/index.js +0 -109
  294. package/dist/collection/components/navigation/z-menu-section/styles.css +0 -91
  295. package/dist/collection/components/navigation/z-navigation-tab/index.js +0 -151
  296. package/dist/collection/components/navigation/z-navigation-tab/styles.css +0 -113
  297. package/dist/collection/components/navigation/z-navigation-tabs/index.js +0 -179
  298. package/dist/collection/components/navigation/z-navigation-tabs/styles.css +0 -117
  299. package/dist/collection/components/navigation/z-user-dropdown/index.js +0 -252
  300. package/dist/collection/components/navigation/z-user-dropdown/styles.css +0 -315
  301. package/dist/collection/components/notification/z-candybar/index.js +0 -18
  302. package/dist/collection/components/notification/z-candybar/styles.css +0 -61
  303. package/dist/collection/components/notification/z-cookiebar/index.js +0 -111
  304. package/dist/collection/components/notification/z-cookiebar/styles.css +0 -109
  305. package/dist/collection/components/notification/z-info-box/index.js +0 -79
  306. package/dist/collection/components/notification/z-info-box/styles.css +0 -23
  307. package/dist/collection/components/notification/z-notification/index.js +0 -171
  308. package/dist/collection/components/notification/z-notification/styles.css +0 -93
  309. package/dist/collection/components/notification/z-toast-notification/index.js +0 -402
  310. package/dist/collection/components/notification/z-toast-notification/styles.css +0 -247
  311. package/dist/collection/components/notification/z-tooltip/styles.css +0 -128
  312. package/dist/collection/components/pagination/z-pagination-bar/index.js +0 -278
  313. package/dist/collection/components/pagination/z-pagination-bar/styles.css +0 -23
  314. package/dist/collection/components/pagination/z-pagination-page/index.js +0 -129
  315. package/dist/collection/components/pagination/z-pagination-page/styles.css +0 -57
  316. package/dist/collection/components/panel/z-panel-elem/index.js +0 -193
  317. package/dist/collection/components/panel/z-panel-elem/styles.css +0 -39
  318. package/dist/collection/components/typography/z-body/index.js +0 -66
  319. package/dist/collection/components/typography/z-heading/index.js +0 -66
  320. package/dist/collection/components/typography/z-typography/index.js +0 -84
  321. package/dist/collection/components/typography/z-typography/styles.css +0 -61
  322. package/dist/collection/components/z-avatar/index.js +0 -137
  323. package/dist/collection/components/z-avatar/styles.css +0 -35
  324. package/dist/collection/components/z-card/index.js +0 -153
  325. package/dist/collection/components/z-card/styles.css +0 -188
  326. package/dist/collection/components/z-contextual-menu/index.js +0 -122
  327. package/dist/collection/components/z-contextual-menu/styles.css +0 -45
  328. package/dist/collection/components/z-divider/index.js +0 -89
  329. package/dist/collection/components/z-divider/styles.css +0 -37
  330. package/dist/collection/components/z-ghost-loading/index.js +0 -14
  331. package/dist/collection/components/z-ghost-loading/styles.css +0 -34
  332. package/dist/collection/components/z-popover/index.js +0 -274
  333. package/dist/collection/components/z-popover/styles.css +0 -236
  334. package/dist/collection/components/z-status-tag/index.js +0 -125
  335. package/dist/collection/components/z-status-tag/styles.css +0 -133
  336. package/dist/collection/constants/icons.js +0 -6
  337. package/dist/collection/index.js +0 -5
  338. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +0 -119
  339. package/dist/collection/snowflakes/myz/card/z-myz-card/styles.css +0 -38
  340. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +0 -148
  341. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/styles.css +0 -62
  342. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +0 -20
  343. package/dist/collection/snowflakes/myz/card/z-myz-card-body/styles.css +0 -13
  344. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +0 -87
  345. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/styles.css +0 -11
  346. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +0 -177
  347. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/styles.css +0 -85
  348. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +0 -190
  349. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/styles.css +0 -137
  350. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +0 -23
  351. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/styles.css +0 -32
  352. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +0 -101
  353. package/dist/collection/snowflakes/myz/card/z-myz-card-header/styles.css +0 -46
  354. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +0 -74
  355. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/styles.css +0 -70
  356. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +0 -213
  357. package/dist/collection/snowflakes/myz/card/z-myz-card-info/styles.css +0 -124
  358. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +0 -53
  359. package/dist/collection/snowflakes/myz/card/z-myz-card-list/styles.css +0 -41
  360. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +0 -70
  361. package/dist/collection/snowflakes/myz/list/z-myz-list/styles.css +0 -4
  362. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +0 -188
  363. package/dist/collection/snowflakes/myz/list/z-myz-list-item/styles.css +0 -48
  364. package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/index.js +0 -121
  365. package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/styles.css +0 -106
  366. package/dist/collection/snowflakes/myz/pocket/z-pocket/index.js +0 -181
  367. package/dist/collection/snowflakes/myz/pocket/z-pocket/styles.css +0 -56
  368. package/dist/collection/snowflakes/myz/pocket/z-pocket-body/index.js +0 -77
  369. package/dist/collection/snowflakes/myz/pocket/z-pocket-body/styles.css +0 -49
  370. package/dist/collection/snowflakes/myz/pocket/z-pocket-header/index.js +0 -86
  371. package/dist/collection/snowflakes/myz/pocket/z-pocket-header/styles.css +0 -40
  372. package/dist/collection/snowflakes/myz/pocket/z-pocket-message/index.js +0 -23
  373. package/dist/collection/snowflakes/myz/pocket/z-pocket-message/styles.css +0 -53
  374. package/dist/collection/snowflakes/myz/topbar/index.js +0 -428
  375. package/dist/collection/snowflakes/myz/topbar/styles.css +0 -594
  376. package/dist/collection/snowflakes/myz/z-alert/index.js +0 -42
  377. package/dist/collection/snowflakes/myz/z-alert/styles.css +0 -28
  378. package/dist/collection/snowflakes/myz/z-otp/index.js +0 -114
  379. package/dist/collection/snowflakes/myz/z-otp/styles.css +0 -47
  380. package/dist/collection/snowflakes/myz/z-slideshow/index.js +0 -165
  381. package/dist/collection/snowflakes/myz/z-slideshow/styles.css +0 -128
  382. package/dist/collection/snowflakes/registro-table/z-registro-table/index.js +0 -365
  383. package/dist/collection/snowflakes/registro-table/z-registro-table/styles.css +0 -166
  384. package/dist/collection/snowflakes/registro-table/z-registro-table-body/index.js +0 -19
  385. package/dist/collection/snowflakes/registro-table/z-registro-table-body/styles.css +0 -9
  386. package/dist/collection/snowflakes/registro-table/z-registro-table-cell/index.js +0 -58
  387. package/dist/collection/snowflakes/registro-table/z-registro-table-cell/styles.css +0 -39
  388. package/dist/collection/snowflakes/registro-table/z-registro-table-empty-box/index.js +0 -69
  389. package/dist/collection/snowflakes/registro-table/z-registro-table-empty-box/styles.css +0 -24
  390. package/dist/collection/snowflakes/registro-table/z-registro-table-expanded-row/index.js +0 -36
  391. package/dist/collection/snowflakes/registro-table/z-registro-table-expanded-row/styles.css +0 -16
  392. package/dist/collection/snowflakes/registro-table/z-registro-table-footer/index.js +0 -18
  393. package/dist/collection/snowflakes/registro-table/z-registro-table-footer/styles.css +0 -5
  394. package/dist/collection/snowflakes/registro-table/z-registro-table-head/index.js +0 -18
  395. package/dist/collection/snowflakes/registro-table/z-registro-table-head/styles.css +0 -5
  396. package/dist/collection/snowflakes/registro-table/z-registro-table-header/index.js +0 -240
  397. package/dist/collection/snowflakes/registro-table/z-registro-table-header/styles.css +0 -67
  398. package/dist/collection/snowflakes/registro-table/z-registro-table-header-row/index.js +0 -37
  399. package/dist/collection/snowflakes/registro-table/z-registro-table-header-row/styles.css +0 -13
  400. package/dist/collection/snowflakes/registro-table/z-registro-table-row/index.js +0 -86
  401. package/dist/collection/snowflakes/registro-table/z-registro-table-row/styles.css +0 -54
  402. package/dist/collection/snowflakes/registro-table/z-registro-table-sticky-footer/index.js +0 -17
  403. package/dist/collection/snowflakes/registro-table/z-registro-table-sticky-footer/styles.css +0 -11
  404. package/dist/collection/themes/index.story.js +0 -18
  405. package/dist/esm/index-fa9e549c.js +0 -1666
  406. package/dist/esm/index.js +0 -9
  407. package/dist/esm/loader.js +0 -17
  408. package/dist/esm/polyfills/core-js.js +0 -11
  409. package/dist/esm/polyfills/css-shim.js +0 -1
  410. package/dist/esm/polyfills/dom.js +0 -79
  411. package/dist/esm/polyfills/es5-html-element.js +0 -1
  412. package/dist/esm/polyfills/index.js +0 -34
  413. package/dist/esm/polyfills/system.js +0 -6
  414. package/dist/esm/web-components-library.js +0 -17
  415. package/dist/esm/z-alert_66.entry.js +0 -3667
  416. package/dist/esm/z-pocket_3.entry.js +0 -118
  417. package/dist/index.cjs.js +0 -1
  418. package/dist/index.js +0 -1
  419. package/dist/web-components-library/p-017370c7.entry.js +0 -1
  420. package/dist/web-components-library/p-02e55441.entry.js +0 -1
  421. package/dist/web-components-library/p-140cc18f.entry.js +0 -1
  422. package/dist/web-components-library/p-18f6f866.entry.js +0 -1
  423. package/dist/web-components-library/p-1c72783c.entry.js +0 -1
  424. package/dist/web-components-library/p-231e7797.entry.js +0 -1
  425. package/dist/web-components-library/p-2f354863.entry.js +0 -1
  426. package/dist/web-components-library/p-35b1f338.entry.js +0 -1
  427. package/dist/web-components-library/p-3cdefa38.entry.js +0 -1
  428. package/dist/web-components-library/p-4a6ec3df.entry.js +0 -1
  429. package/dist/web-components-library/p-5cdcaa8c.entry.js +0 -1
  430. package/dist/web-components-library/p-8902f400.entry.js +0 -7
  431. package/dist/web-components-library/p-8ad12683.entry.js +0 -1
  432. package/dist/web-components-library/p-904a85e4.js +0 -1
  433. package/dist/web-components-library/p-96e3aec6.entry.js +0 -1
  434. package/dist/web-components-library/p-9912e411.js +0 -7
  435. package/dist/web-components-library/p-b80081c9.entry.js +0 -1
  436. package/dist/web-components-library/p-c7af96eb.entry.js +0 -1
  437. package/dist/web-components-library/p-d4830f32.entry.js +0 -1
  438. package/dist/web-components-library/p-d63b9ed3.js +0 -1
  439. package/dist/web-components-library/p-d69e14fb.js +0 -1
  440. package/dist/web-components-library/p-e7304c42.js +0 -1
  441. package/dist/web-components-library/p-f113a03a.entry.js +0 -1
  442. package/dist/web-components-library/p-f83347fd.entry.js +0 -1
  443. package/dist/web-components-library/p-ff6b02d1.entry.js +0 -1
  444. package/www/build/p-017370c7.entry.js +0 -1
  445. package/www/build/p-02e55441.entry.js +0 -1
  446. package/www/build/p-140cc18f.entry.js +0 -1
  447. package/www/build/p-18f6f866.entry.js +0 -1
  448. package/www/build/p-1c72783c.entry.js +0 -1
  449. package/www/build/p-231e7797.entry.js +0 -1
  450. package/www/build/p-2f354863.entry.js +0 -1
  451. package/www/build/p-35b1f338.entry.js +0 -1
  452. package/www/build/p-3cdefa38.entry.js +0 -1
  453. package/www/build/p-4a6ec3df.entry.js +0 -1
  454. package/www/build/p-5cdcaa8c.entry.js +0 -1
  455. package/www/build/p-7206f897.js +0 -1
  456. package/www/build/p-8902f400.entry.js +0 -7
  457. package/www/build/p-8ad12683.entry.js +0 -1
  458. package/www/build/p-904a85e4.js +0 -1
  459. package/www/build/p-96e3aec6.entry.js +0 -1
  460. package/www/build/p-9912e411.js +0 -7
  461. package/www/build/p-b80081c9.entry.js +0 -1
  462. package/www/build/p-c7af96eb.entry.js +0 -1
  463. package/www/build/p-d4830f32.entry.js +0 -1
  464. package/www/build/p-d63b9ed3.js +0 -1
  465. package/www/build/p-d69e14fb.js +0 -1
  466. package/www/build/p-e7304c42.js +0 -1
  467. package/www/build/p-ea943cbd.css +0 -1
  468. package/www/build/p-f113a03a.entry.js +0 -1
  469. package/www/build/p-f83347fd.entry.js +0 -1
  470. package/www/build/p-ff6b02d1.entry.js +0 -1
@@ -1,1666 +0,0 @@
1
- const NAMESPACE = 'web-components-library';
2
-
3
- let scopeId;
4
- let contentRef;
5
- let hostTagName;
6
- let useNativeShadowDom = false;
7
- let checkSlotFallbackVisibility = false;
8
- let checkSlotRelocate = false;
9
- let isSvgMode = false;
10
- let queuePending = false;
11
- const win = typeof window !== 'undefined' ? window : {};
12
- const doc = win.document || { head: {} };
13
- const plt = {
14
- $flags$: 0,
15
- $resourcesUrl$: '',
16
- jmp: h => h(),
17
- raf: h => requestAnimationFrame(h),
18
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
19
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
20
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
21
- };
22
- const promiseResolve = (v) => Promise.resolve(v);
23
- const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
24
- try {
25
- new CSSStyleSheet();
26
- return typeof (new CSSStyleSheet()).replace === 'function';
27
- }
28
- catch (e) { }
29
- return false;
30
- })()
31
- ;
32
- const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
33
- if (listeners) {
34
- listeners.map(([flags, name, method]) => {
35
- const target = getHostListenerTarget(elm, flags) ;
36
- const handler = hostListenerProxy(hostRef, method);
37
- const opts = hostListenerOpts(flags);
38
- plt.ael(target, name, handler, opts);
39
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
40
- });
41
- }
42
- };
43
- const hostListenerProxy = (hostRef, methodName) => (ev) => {
44
- try {
45
- {
46
- if (hostRef.$flags$ & 256 /* isListenReady */) {
47
- // instance is ready, let's call it's member method for this event
48
- hostRef.$lazyInstance$[methodName](ev);
49
- }
50
- else {
51
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
52
- }
53
- }
54
- }
55
- catch (e) {
56
- consoleError(e);
57
- }
58
- };
59
- const getHostListenerTarget = (elm, flags) => {
60
- if (flags & 4 /* TargetDocument */)
61
- return doc;
62
- if (flags & 8 /* TargetWindow */)
63
- return win;
64
- if (flags & 16 /* TargetBody */)
65
- return doc.body;
66
- return elm;
67
- };
68
- // prettier-ignore
69
- const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
70
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
71
- const XLINK_NS = 'http://www.w3.org/1999/xlink';
72
- const createTime = (fnName, tagName = '') => {
73
- {
74
- return () => {
75
- return;
76
- };
77
- }
78
- };
79
- const uniqueTime = (key, measureText) => {
80
- {
81
- return () => {
82
- return;
83
- };
84
- }
85
- };
86
- const rootAppliedStyles = new WeakMap();
87
- const registerStyle = (scopeId, cssText, allowCS) => {
88
- let style = styles.get(scopeId);
89
- if (supportsConstructibleStylesheets && allowCS) {
90
- style = (style || new CSSStyleSheet());
91
- style.replace(cssText);
92
- }
93
- else {
94
- style = cssText;
95
- }
96
- styles.set(scopeId, style);
97
- };
98
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
99
- let scopeId = getScopeId(cmpMeta);
100
- let style = styles.get(scopeId);
101
- // if an element is NOT connected then getRootNode() will return the wrong root node
102
- // so the fallback is to always use the document for the root node in those cases
103
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
104
- if (style) {
105
- if (typeof style === 'string') {
106
- styleContainerNode = styleContainerNode.head || styleContainerNode;
107
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
108
- let styleElm;
109
- if (!appliedStyles) {
110
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
111
- }
112
- if (!appliedStyles.has(scopeId)) {
113
- {
114
- {
115
- styleElm = doc.createElement('style');
116
- styleElm.innerHTML = style;
117
- }
118
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
119
- }
120
- if (appliedStyles) {
121
- appliedStyles.add(scopeId);
122
- }
123
- }
124
- }
125
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
126
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
127
- }
128
- }
129
- return scopeId;
130
- };
131
- const attachStyles = (hostRef) => {
132
- const cmpMeta = hostRef.$cmpMeta$;
133
- const elm = hostRef.$hostElement$;
134
- const flags = cmpMeta.$flags$;
135
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
136
- const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
137
- if (flags & 10 /* needsScopedEncapsulation */) {
138
- // only required when we're NOT using native shadow dom (slot)
139
- // or this browser doesn't support native shadow dom
140
- // and this host element was NOT created with SSR
141
- // let's pick out the inner content for slot projection
142
- // create a node to represent where the original
143
- // content was first placed, which is useful later on
144
- // DOM WRITE!!
145
- elm['s-sc'] = scopeId;
146
- elm.classList.add(scopeId + '-h');
147
- if (flags & 2 /* scopedCssEncapsulation */) {
148
- elm.classList.add(scopeId + '-s');
149
- }
150
- }
151
- endAttachStyles();
152
- };
153
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
154
- /**
155
- * Default style mode id
156
- */
157
- /**
158
- * Reusable empty obj/array
159
- * Don't add values to these!!
160
- */
161
- const EMPTY_OBJ = {};
162
- /**
163
- * Namespaces
164
- */
165
- const SVG_NS = 'http://www.w3.org/2000/svg';
166
- const HTML_NS = 'http://www.w3.org/1999/xhtml';
167
- const isDef = (v) => v != null;
168
- const isComplexType = (o) => {
169
- // https://jsperf.com/typeof-fn-object/5
170
- o = typeof o;
171
- return o === 'object' || o === 'function';
172
- };
173
- /**
174
- * Production h() function based on Preact by
175
- * Jason Miller (@developit)
176
- * Licensed under the MIT License
177
- * https://github.com/developit/preact/blob/master/LICENSE
178
- *
179
- * Modified for Stencil's compiler and vdom
180
- */
181
- // const stack: any[] = [];
182
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
183
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
184
- const h = (nodeName, vnodeData, ...children) => {
185
- let child = null;
186
- let key = null;
187
- let slotName = null;
188
- let simple = false;
189
- let lastSimple = false;
190
- let vNodeChildren = [];
191
- const walk = (c) => {
192
- for (let i = 0; i < c.length; i++) {
193
- child = c[i];
194
- if (Array.isArray(child)) {
195
- walk(child);
196
- }
197
- else if (child != null && typeof child !== 'boolean') {
198
- if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
199
- child = String(child);
200
- }
201
- if (simple && lastSimple) {
202
- // If the previous child was simple (string), we merge both
203
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
204
- }
205
- else {
206
- // Append a new vNode, if it's text, we create a text vNode
207
- vNodeChildren.push(simple ? newVNode(null, child) : child);
208
- }
209
- lastSimple = simple;
210
- }
211
- }
212
- };
213
- walk(children);
214
- if (vnodeData) {
215
- // normalize class / classname attributes
216
- if (vnodeData.key) {
217
- key = vnodeData.key;
218
- }
219
- if (vnodeData.name) {
220
- slotName = vnodeData.name;
221
- }
222
- {
223
- const classData = vnodeData.className || vnodeData.class;
224
- if (classData) {
225
- vnodeData.class =
226
- typeof classData !== 'object'
227
- ? classData
228
- : Object.keys(classData)
229
- .filter(k => classData[k])
230
- .join(' ');
231
- }
232
- }
233
- }
234
- const vnode = newVNode(nodeName, null);
235
- vnode.$attrs$ = vnodeData;
236
- if (vNodeChildren.length > 0) {
237
- vnode.$children$ = vNodeChildren;
238
- }
239
- {
240
- vnode.$key$ = key;
241
- }
242
- {
243
- vnode.$name$ = slotName;
244
- }
245
- return vnode;
246
- };
247
- const newVNode = (tag, text) => {
248
- const vnode = {
249
- $flags$: 0,
250
- $tag$: tag,
251
- $text$: text,
252
- $elm$: null,
253
- $children$: null,
254
- };
255
- {
256
- vnode.$attrs$ = null;
257
- }
258
- {
259
- vnode.$key$ = null;
260
- }
261
- {
262
- vnode.$name$ = null;
263
- }
264
- return vnode;
265
- };
266
- const Host = {};
267
- const isHost = (node) => node && node.$tag$ === Host;
268
- /**
269
- * Production setAccessor() function based on Preact by
270
- * Jason Miller (@developit)
271
- * Licensed under the MIT License
272
- * https://github.com/developit/preact/blob/master/LICENSE
273
- *
274
- * Modified for Stencil's compiler and vdom
275
- */
276
- const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
277
- if (oldValue !== newValue) {
278
- let isProp = isMemberInElement(elm, memberName);
279
- let ln = memberName.toLowerCase();
280
- if (memberName === 'class') {
281
- const classList = elm.classList;
282
- const oldClasses = parseClassList(oldValue);
283
- const newClasses = parseClassList(newValue);
284
- classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
285
- classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
286
- }
287
- else if (memberName === 'style') {
288
- // update style attribute, css properties and values
289
- {
290
- for (const prop in oldValue) {
291
- if (!newValue || newValue[prop] == null) {
292
- if (prop.includes('-')) {
293
- elm.style.removeProperty(prop);
294
- }
295
- else {
296
- elm.style[prop] = '';
297
- }
298
- }
299
- }
300
- }
301
- for (const prop in newValue) {
302
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
303
- if (prop.includes('-')) {
304
- elm.style.setProperty(prop, newValue[prop]);
305
- }
306
- else {
307
- elm.style[prop] = newValue[prop];
308
- }
309
- }
310
- }
311
- }
312
- else if (memberName === 'key')
313
- ;
314
- else if (memberName === 'ref') {
315
- // minifier will clean this up
316
- if (newValue) {
317
- newValue(elm);
318
- }
319
- }
320
- else if ((!isProp ) && memberName[0] === 'o' && memberName[1] === 'n') {
321
- // Event Handlers
322
- // so if the member name starts with "on" and the 3rd characters is
323
- // a capital letter, and it's not already a member on the element,
324
- // then we're assuming it's an event listener
325
- if (memberName[2] === '-') {
326
- // on- prefixed events
327
- // allows to be explicit about the dom event to listen without any magic
328
- // under the hood:
329
- // <my-cmp on-click> // listens for "click"
330
- // <my-cmp on-Click> // listens for "Click"
331
- // <my-cmp on-ionChange> // listens for "ionChange"
332
- // <my-cmp on-EVENTS> // listens for "EVENTS"
333
- memberName = memberName.slice(3);
334
- }
335
- else if (isMemberInElement(win, ln)) {
336
- // standard event
337
- // the JSX attribute could have been "onMouseOver" and the
338
- // member name "onmouseover" is on the window's prototype
339
- // so let's add the listener "mouseover", which is all lowercased
340
- memberName = ln.slice(2);
341
- }
342
- else {
343
- // custom event
344
- // the JSX attribute could have been "onMyCustomEvent"
345
- // so let's trim off the "on" prefix and lowercase the first character
346
- // and add the listener "myCustomEvent"
347
- // except for the first character, we keep the event name case
348
- memberName = ln[2] + memberName.slice(3);
349
- }
350
- if (oldValue) {
351
- plt.rel(elm, memberName, oldValue, false);
352
- }
353
- if (newValue) {
354
- plt.ael(elm, memberName, newValue, false);
355
- }
356
- }
357
- else {
358
- // Set property if it exists and it's not a SVG
359
- const isComplex = isComplexType(newValue);
360
- if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
361
- try {
362
- if (!elm.tagName.includes('-')) {
363
- let n = newValue == null ? '' : newValue;
364
- // Workaround for Safari, moving the <input> caret when re-assigning the same valued
365
- if (memberName === 'list') {
366
- isProp = false;
367
- // tslint:disable-next-line: triple-equals
368
- }
369
- else if (oldValue == null || elm[memberName] != n) {
370
- elm[memberName] = n;
371
- }
372
- }
373
- else {
374
- elm[memberName] = newValue;
375
- }
376
- }
377
- catch (e) { }
378
- }
379
- /**
380
- * Need to manually update attribute if:
381
- * - memberName is not an attribute
382
- * - if we are rendering the host element in order to reflect attribute
383
- * - if it's a SVG, since properties might not work in <svg>
384
- * - if the newValue is null/undefined or 'false'.
385
- */
386
- let xlink = false;
387
- {
388
- if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
389
- memberName = ln;
390
- xlink = true;
391
- }
392
- }
393
- if (newValue == null || newValue === false) {
394
- if (newValue !== false || elm.getAttribute(memberName) === '') {
395
- if (xlink) {
396
- elm.removeAttributeNS(XLINK_NS, memberName);
397
- }
398
- else {
399
- elm.removeAttribute(memberName);
400
- }
401
- }
402
- }
403
- else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
404
- newValue = newValue === true ? '' : newValue;
405
- if (xlink) {
406
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
407
- }
408
- else {
409
- elm.setAttribute(memberName, newValue);
410
- }
411
- }
412
- }
413
- }
414
- };
415
- const parseClassListRegex = /\s/;
416
- const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
417
- const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
418
- // if the element passed in is a shadow root, which is a document fragment
419
- // then we want to be adding attrs/props to the shadow root's "host" element
420
- // if it's not a shadow root, then we add attrs/props to the same element
421
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
422
- const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
423
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
424
- {
425
- // remove attributes no longer present on the vnode by setting them to undefined
426
- for (memberName in oldVnodeAttrs) {
427
- if (!(memberName in newVnodeAttrs)) {
428
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
429
- }
430
- }
431
- }
432
- // add new & update changed attributes
433
- for (memberName in newVnodeAttrs) {
434
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
435
- }
436
- };
437
- const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
438
- // tslint:disable-next-line: prefer-const
439
- let newVNode = newParentVNode.$children$[childIndex];
440
- let i = 0;
441
- let elm;
442
- let childNode;
443
- let oldVNode;
444
- if (!useNativeShadowDom) {
445
- // remember for later we need to check to relocate nodes
446
- checkSlotRelocate = true;
447
- if (newVNode.$tag$ === 'slot') {
448
- if (scopeId) {
449
- // scoped css needs to add its scoped id to the parent element
450
- parentElm.classList.add(scopeId + '-s');
451
- }
452
- newVNode.$flags$ |= newVNode.$children$
453
- ? // slot element has fallback content
454
- 2 /* isSlotFallback */
455
- : // slot element does not have fallback content
456
- 1 /* isSlotReference */;
457
- }
458
- }
459
- if (newVNode.$text$ !== null) {
460
- // create text node
461
- elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
462
- }
463
- else if (newVNode.$flags$ & 1 /* isSlotReference */) {
464
- // create a slot reference node
465
- elm = newVNode.$elm$ = doc.createTextNode('');
466
- }
467
- else {
468
- if (!isSvgMode) {
469
- isSvgMode = newVNode.$tag$ === 'svg';
470
- }
471
- // create element
472
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$)
473
- );
474
- if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
475
- isSvgMode = false;
476
- }
477
- // add css classes, attrs, props, listeners, etc.
478
- {
479
- updateElement(null, newVNode, isSvgMode);
480
- }
481
- if (isDef(scopeId) && elm['s-si'] !== scopeId) {
482
- // if there is a scopeId and this is the initial render
483
- // then let's add the scopeId as a css class
484
- elm.classList.add((elm['s-si'] = scopeId));
485
- }
486
- if (newVNode.$children$) {
487
- for (i = 0; i < newVNode.$children$.length; ++i) {
488
- // create the node
489
- childNode = createElm(oldParentVNode, newVNode, i, elm);
490
- // return node could have been null
491
- if (childNode) {
492
- // append our new node
493
- elm.appendChild(childNode);
494
- }
495
- }
496
- }
497
- {
498
- if (newVNode.$tag$ === 'svg') {
499
- // Only reset the SVG context when we're exiting <svg> element
500
- isSvgMode = false;
501
- }
502
- else if (elm.tagName === 'foreignObject') {
503
- // Reenter SVG context when we're exiting <foreignObject> element
504
- isSvgMode = true;
505
- }
506
- }
507
- }
508
- {
509
- elm['s-hn'] = hostTagName;
510
- if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
511
- // remember the content reference comment
512
- elm['s-sr'] = true;
513
- // remember the content reference comment
514
- elm['s-cr'] = contentRef;
515
- // remember the slot name, or empty string for default slot
516
- elm['s-sn'] = newVNode.$name$ || '';
517
- // check if we've got an old vnode for this slot
518
- oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
519
- if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
520
- // we've got an old slot vnode and the wrapper is being replaced
521
- // so let's move the old slot content back to it's original location
522
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
523
- }
524
- }
525
- }
526
- return elm;
527
- };
528
- const putBackInOriginalLocation = (parentElm, recursive) => {
529
- plt.$flags$ |= 1 /* isTmpDisconnected */;
530
- const oldSlotChildNodes = parentElm.childNodes;
531
- for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
532
- const childNode = oldSlotChildNodes[i];
533
- if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
534
- // // this child node in the old element is from another component
535
- // // remove this node from the old slot's parent
536
- // childNode.remove();
537
- // and relocate it back to it's original location
538
- parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
539
- // remove the old original location comment entirely
540
- // later on the patch function will know what to do
541
- // and move this to the correct spot in need be
542
- childNode['s-ol'].remove();
543
- childNode['s-ol'] = undefined;
544
- checkSlotRelocate = true;
545
- }
546
- if (recursive) {
547
- putBackInOriginalLocation(childNode, recursive);
548
- }
549
- }
550
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
551
- };
552
- const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
553
- let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
554
- let childNode;
555
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
556
- containerElm = containerElm.shadowRoot;
557
- }
558
- for (; startIdx <= endIdx; ++startIdx) {
559
- if (vnodes[startIdx]) {
560
- childNode = createElm(null, parentVNode, startIdx, parentElm);
561
- if (childNode) {
562
- vnodes[startIdx].$elm$ = childNode;
563
- containerElm.insertBefore(childNode, referenceNode(before) );
564
- }
565
- }
566
- }
567
- };
568
- const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
569
- for (; startIdx <= endIdx; ++startIdx) {
570
- if ((vnode = vnodes[startIdx])) {
571
- elm = vnode.$elm$;
572
- callNodeRefs(vnode);
573
- {
574
- // we're removing this element
575
- // so it's possible we need to show slot fallback content now
576
- checkSlotFallbackVisibility = true;
577
- if (elm['s-ol']) {
578
- // remove the original location comment
579
- elm['s-ol'].remove();
580
- }
581
- else {
582
- // it's possible that child nodes of the node
583
- // that's being removed are slot nodes
584
- putBackInOriginalLocation(elm, true);
585
- }
586
- }
587
- // remove the vnode's element from the dom
588
- elm.remove();
589
- }
590
- }
591
- };
592
- const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
593
- let oldStartIdx = 0;
594
- let newStartIdx = 0;
595
- let idxInOld = 0;
596
- let i = 0;
597
- let oldEndIdx = oldCh.length - 1;
598
- let oldStartVnode = oldCh[0];
599
- let oldEndVnode = oldCh[oldEndIdx];
600
- let newEndIdx = newCh.length - 1;
601
- let newStartVnode = newCh[0];
602
- let newEndVnode = newCh[newEndIdx];
603
- let node;
604
- let elmToMove;
605
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
606
- if (oldStartVnode == null) {
607
- // Vnode might have been moved left
608
- oldStartVnode = oldCh[++oldStartIdx];
609
- }
610
- else if (oldEndVnode == null) {
611
- oldEndVnode = oldCh[--oldEndIdx];
612
- }
613
- else if (newStartVnode == null) {
614
- newStartVnode = newCh[++newStartIdx];
615
- }
616
- else if (newEndVnode == null) {
617
- newEndVnode = newCh[--newEndIdx];
618
- }
619
- else if (isSameVnode(oldStartVnode, newStartVnode)) {
620
- patch(oldStartVnode, newStartVnode);
621
- oldStartVnode = oldCh[++oldStartIdx];
622
- newStartVnode = newCh[++newStartIdx];
623
- }
624
- else if (isSameVnode(oldEndVnode, newEndVnode)) {
625
- patch(oldEndVnode, newEndVnode);
626
- oldEndVnode = oldCh[--oldEndIdx];
627
- newEndVnode = newCh[--newEndIdx];
628
- }
629
- else if (isSameVnode(oldStartVnode, newEndVnode)) {
630
- // Vnode moved right
631
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
632
- putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
633
- }
634
- patch(oldStartVnode, newEndVnode);
635
- parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
636
- oldStartVnode = oldCh[++oldStartIdx];
637
- newEndVnode = newCh[--newEndIdx];
638
- }
639
- else if (isSameVnode(oldEndVnode, newStartVnode)) {
640
- // Vnode moved left
641
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
642
- putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
643
- }
644
- patch(oldEndVnode, newStartVnode);
645
- parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
646
- oldEndVnode = oldCh[--oldEndIdx];
647
- newStartVnode = newCh[++newStartIdx];
648
- }
649
- else {
650
- // createKeyToOldIdx
651
- idxInOld = -1;
652
- {
653
- for (i = oldStartIdx; i <= oldEndIdx; ++i) {
654
- if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
655
- idxInOld = i;
656
- break;
657
- }
658
- }
659
- }
660
- if (idxInOld >= 0) {
661
- elmToMove = oldCh[idxInOld];
662
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
663
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
664
- }
665
- else {
666
- patch(elmToMove, newStartVnode);
667
- oldCh[idxInOld] = undefined;
668
- node = elmToMove.$elm$;
669
- }
670
- newStartVnode = newCh[++newStartIdx];
671
- }
672
- else {
673
- // new element
674
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
675
- newStartVnode = newCh[++newStartIdx];
676
- }
677
- if (node) {
678
- {
679
- parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
680
- }
681
- }
682
- }
683
- }
684
- if (oldStartIdx > oldEndIdx) {
685
- addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
686
- }
687
- else if (newStartIdx > newEndIdx) {
688
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
689
- }
690
- };
691
- const isSameVnode = (vnode1, vnode2) => {
692
- // compare if two vnode to see if they're "technically" the same
693
- // need to have the same element tag, and same key to be the same
694
- if (vnode1.$tag$ === vnode2.$tag$) {
695
- if (vnode1.$tag$ === 'slot') {
696
- return vnode1.$name$ === vnode2.$name$;
697
- }
698
- {
699
- return vnode1.$key$ === vnode2.$key$;
700
- }
701
- }
702
- return false;
703
- };
704
- const referenceNode = (node) => {
705
- // this node was relocated to a new location in the dom
706
- // because of some other component's slot
707
- // but we still have an html comment in place of where
708
- // it's original location was according to it's original vdom
709
- return (node && node['s-ol']) || node;
710
- };
711
- const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
712
- const patch = (oldVNode, newVNode) => {
713
- const elm = (newVNode.$elm$ = oldVNode.$elm$);
714
- const oldChildren = oldVNode.$children$;
715
- const newChildren = newVNode.$children$;
716
- const tag = newVNode.$tag$;
717
- const text = newVNode.$text$;
718
- let defaultHolder;
719
- if (text === null) {
720
- {
721
- // test if we're rendering an svg element, or still rendering nodes inside of one
722
- // only add this to the when the compiler sees we're using an svg somewhere
723
- isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
724
- }
725
- // element node
726
- {
727
- if (tag === 'slot')
728
- ;
729
- else {
730
- // either this is the first render of an element OR it's an update
731
- // AND we already know it's possible it could have changed
732
- // this updates the element's css classes, attrs, props, listeners, etc.
733
- updateElement(oldVNode, newVNode, isSvgMode);
734
- }
735
- }
736
- if (oldChildren !== null && newChildren !== null) {
737
- // looks like there's child vnodes for both the old and new vnodes
738
- updateChildren(elm, oldChildren, newVNode, newChildren);
739
- }
740
- else if (newChildren !== null) {
741
- // no old child vnodes, but there are new child vnodes to add
742
- if (oldVNode.$text$ !== null) {
743
- // the old vnode was text, so be sure to clear it out
744
- elm.textContent = '';
745
- }
746
- // add the new vnode children
747
- addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
748
- }
749
- else if (oldChildren !== null) {
750
- // no new child vnodes, but there are old child vnodes to remove
751
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
752
- }
753
- if (isSvgMode && tag === 'svg') {
754
- isSvgMode = false;
755
- }
756
- }
757
- else if ((defaultHolder = elm['s-cr'])) {
758
- // this element has slotted content
759
- defaultHolder.parentNode.textContent = text;
760
- }
761
- else if (oldVNode.$text$ !== text) {
762
- // update the text content for the text only vnode
763
- // and also only if the text is different than before
764
- elm.data = text;
765
- }
766
- };
767
- const updateFallbackSlotVisibility = (elm) => {
768
- // tslint:disable-next-line: prefer-const
769
- let childNodes = elm.childNodes;
770
- let childNode;
771
- let i;
772
- let ilen;
773
- let j;
774
- let slotNameAttr;
775
- let nodeType;
776
- for (i = 0, ilen = childNodes.length; i < ilen; i++) {
777
- childNode = childNodes[i];
778
- if (childNode.nodeType === 1 /* ElementNode */) {
779
- if (childNode['s-sr']) {
780
- // this is a slot fallback node
781
- // get the slot name for this slot reference node
782
- slotNameAttr = childNode['s-sn'];
783
- // by default always show a fallback slot node
784
- // then hide it if there are other slots in the light dom
785
- childNode.hidden = false;
786
- for (j = 0; j < ilen; j++) {
787
- nodeType = childNodes[j].nodeType;
788
- if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
789
- // this sibling node is from a different component OR is a named fallback slot node
790
- if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
791
- childNode.hidden = true;
792
- break;
793
- }
794
- }
795
- else {
796
- // this is a default fallback slot node
797
- // any element or text node (with content)
798
- // should hide the default fallback slot node
799
- if (nodeType === 1 /* ElementNode */ ||
800
- (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
801
- childNode.hidden = true;
802
- break;
803
- }
804
- }
805
- }
806
- }
807
- // keep drilling down
808
- updateFallbackSlotVisibility(childNode);
809
- }
810
- }
811
- };
812
- const relocateNodes = [];
813
- const relocateSlotContent = (elm) => {
814
- // tslint:disable-next-line: prefer-const
815
- let childNode;
816
- let node;
817
- let hostContentNodes;
818
- let slotNameAttr;
819
- let relocateNodeData;
820
- let j;
821
- let i = 0;
822
- let childNodes = elm.childNodes;
823
- let ilen = childNodes.length;
824
- for (; i < ilen; i++) {
825
- childNode = childNodes[i];
826
- if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
827
- // first got the content reference comment node
828
- // then we got it's parent, which is where all the host content is in now
829
- hostContentNodes = node.parentNode.childNodes;
830
- slotNameAttr = childNode['s-sn'];
831
- for (j = hostContentNodes.length - 1; j >= 0; j--) {
832
- node = hostContentNodes[j];
833
- if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
834
- // let's do some relocating to its new home
835
- // but never relocate a content reference node
836
- // that is suppose to always represent the original content location
837
- if (isNodeLocatedInSlot(node, slotNameAttr)) {
838
- // it's possible we've already decided to relocate this node
839
- relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
840
- // made some changes to slots
841
- // let's make sure we also double check
842
- // fallbacks are correctly hidden or shown
843
- checkSlotFallbackVisibility = true;
844
- node['s-sn'] = node['s-sn'] || slotNameAttr;
845
- if (relocateNodeData) {
846
- // previously we never found a slot home for this node
847
- // but turns out we did, so let's remember it now
848
- relocateNodeData.$slotRefNode$ = childNode;
849
- }
850
- else {
851
- // add to our list of nodes to relocate
852
- relocateNodes.push({
853
- $slotRefNode$: childNode,
854
- $nodeToRelocate$: node,
855
- });
856
- }
857
- if (node['s-sr']) {
858
- relocateNodes.map(relocateNode => {
859
- if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
860
- relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
861
- if (relocateNodeData && !relocateNode.$slotRefNode$) {
862
- relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
863
- }
864
- }
865
- });
866
- }
867
- }
868
- else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {
869
- // so far this element does not have a slot home, not setting slotRefNode on purpose
870
- // if we never find a home for this element then we'll need to hide it
871
- relocateNodes.push({
872
- $nodeToRelocate$: node,
873
- });
874
- }
875
- }
876
- }
877
- }
878
- if (childNode.nodeType === 1 /* ElementNode */) {
879
- relocateSlotContent(childNode);
880
- }
881
- }
882
- };
883
- const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
884
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
885
- if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
886
- return true;
887
- }
888
- if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
889
- return true;
890
- }
891
- return false;
892
- }
893
- if (nodeToRelocate['s-sn'] === slotNameAttr) {
894
- return true;
895
- }
896
- return slotNameAttr === '';
897
- };
898
- const callNodeRefs = (vNode) => {
899
- {
900
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
901
- vNode.$children$ && vNode.$children$.map(callNodeRefs);
902
- }
903
- };
904
- const renderVdom = (hostRef, renderFnResults) => {
905
- const hostElm = hostRef.$hostElement$;
906
- const cmpMeta = hostRef.$cmpMeta$;
907
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
908
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
909
- hostTagName = hostElm.tagName;
910
- if (cmpMeta.$attrsToReflect$) {
911
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
912
- cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
913
- }
914
- rootVnode.$tag$ = null;
915
- rootVnode.$flags$ |= 4 /* isHost */;
916
- hostRef.$vnode$ = rootVnode;
917
- rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
918
- {
919
- scopeId = hostElm['s-sc'];
920
- }
921
- {
922
- contentRef = hostElm['s-cr'];
923
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
924
- // always reset
925
- checkSlotFallbackVisibility = false;
926
- }
927
- // synchronous patch
928
- patch(oldVNode, rootVnode);
929
- {
930
- // while we're moving nodes around existing nodes, temporarily disable
931
- // the disconnectCallback from working
932
- plt.$flags$ |= 1 /* isTmpDisconnected */;
933
- if (checkSlotRelocate) {
934
- relocateSlotContent(rootVnode.$elm$);
935
- let relocateData;
936
- let nodeToRelocate;
937
- let orgLocationNode;
938
- let parentNodeRef;
939
- let insertBeforeNode;
940
- let refNode;
941
- let i = 0;
942
- for (; i < relocateNodes.length; i++) {
943
- relocateData = relocateNodes[i];
944
- nodeToRelocate = relocateData.$nodeToRelocate$;
945
- if (!nodeToRelocate['s-ol']) {
946
- // add a reference node marking this node's original location
947
- // keep a reference to this node for later lookups
948
- orgLocationNode = doc.createTextNode('');
949
- orgLocationNode['s-nr'] = nodeToRelocate;
950
- nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
951
- }
952
- }
953
- for (i = 0; i < relocateNodes.length; i++) {
954
- relocateData = relocateNodes[i];
955
- nodeToRelocate = relocateData.$nodeToRelocate$;
956
- if (relocateData.$slotRefNode$) {
957
- // by default we're just going to insert it directly
958
- // after the slot reference node
959
- parentNodeRef = relocateData.$slotRefNode$.parentNode;
960
- insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
961
- orgLocationNode = nodeToRelocate['s-ol'];
962
- while ((orgLocationNode = orgLocationNode.previousSibling)) {
963
- refNode = orgLocationNode['s-nr'];
964
- if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
965
- refNode = refNode.nextSibling;
966
- if (!refNode || !refNode['s-nr']) {
967
- insertBeforeNode = refNode;
968
- break;
969
- }
970
- }
971
- }
972
- if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) || nodeToRelocate.nextSibling !== insertBeforeNode) {
973
- // we've checked that it's worth while to relocate
974
- // since that the node to relocate
975
- // has a different next sibling or parent relocated
976
- if (nodeToRelocate !== insertBeforeNode) {
977
- if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
978
- // probably a component in the index.html that doesn't have it's hostname set
979
- nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
980
- }
981
- // add it back to the dom but in its new home
982
- parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
983
- }
984
- }
985
- }
986
- else {
987
- // this node doesn't have a slot home to go to, so let's hide it
988
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
989
- nodeToRelocate.hidden = true;
990
- }
991
- }
992
- }
993
- }
994
- if (checkSlotFallbackVisibility) {
995
- updateFallbackSlotVisibility(rootVnode.$elm$);
996
- }
997
- // done moving nodes around
998
- // allow the disconnect callback to work again
999
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1000
- // always reset
1001
- relocateNodes.length = 0;
1002
- }
1003
- };
1004
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
1005
- const createEvent = (ref, name, flags) => {
1006
- const elm = getElement(ref);
1007
- return {
1008
- emit: (detail) => {
1009
- return emitEvent(elm, name, {
1010
- bubbles: !!(flags & 4 /* Bubbles */),
1011
- composed: !!(flags & 2 /* Composed */),
1012
- cancelable: !!(flags & 1 /* Cancellable */),
1013
- detail,
1014
- });
1015
- },
1016
- };
1017
- };
1018
- const emitEvent = (elm, name, opts) => {
1019
- const ev = plt.ce(name, opts);
1020
- elm.dispatchEvent(ev);
1021
- return ev;
1022
- };
1023
- const attachToAncestor = (hostRef, ancestorComponent) => {
1024
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1025
- ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
1026
- }
1027
- };
1028
- const scheduleUpdate = (hostRef, isInitialLoad) => {
1029
- {
1030
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1031
- }
1032
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1033
- hostRef.$flags$ |= 512 /* needsRerender */;
1034
- return;
1035
- }
1036
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1037
- // there is no ancestor component or the ancestor component
1038
- // has already fired off its lifecycle update then
1039
- // fire off the initial update
1040
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1041
- return writeTask(dispatch) ;
1042
- };
1043
- const dispatchHooks = (hostRef, isInitialLoad) => {
1044
- const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1045
- const instance = hostRef.$lazyInstance$ ;
1046
- let promise;
1047
- if (isInitialLoad) {
1048
- {
1049
- hostRef.$flags$ |= 256 /* isListenReady */;
1050
- if (hostRef.$queuedListeners$) {
1051
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1052
- hostRef.$queuedListeners$ = null;
1053
- }
1054
- }
1055
- {
1056
- promise = safeCall(instance, 'componentWillLoad');
1057
- }
1058
- }
1059
- else {
1060
- {
1061
- promise = safeCall(instance, 'componentWillUpdate');
1062
- }
1063
- }
1064
- {
1065
- promise = then(promise, () => safeCall(instance, 'componentWillRender'));
1066
- }
1067
- endSchedule();
1068
- return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
1069
- };
1070
- const updateComponent = async (hostRef, instance, isInitialLoad) => {
1071
- // updateComponent
1072
- const elm = hostRef.$hostElement$;
1073
- const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1074
- const rc = elm['s-rc'];
1075
- if (isInitialLoad) {
1076
- // DOM WRITE!
1077
- attachStyles(hostRef);
1078
- }
1079
- const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1080
- {
1081
- callRender(hostRef, instance);
1082
- }
1083
- if (rc) {
1084
- // ok, so turns out there are some child host elements
1085
- // waiting on this parent element to load
1086
- // let's fire off all update callbacks waiting
1087
- rc.map(cb => cb());
1088
- elm['s-rc'] = undefined;
1089
- }
1090
- endRender();
1091
- endUpdate();
1092
- {
1093
- const childrenPromises = elm['s-p'];
1094
- const postUpdate = () => postUpdateComponent(hostRef);
1095
- if (childrenPromises.length === 0) {
1096
- postUpdate();
1097
- }
1098
- else {
1099
- Promise.all(childrenPromises).then(postUpdate);
1100
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1101
- childrenPromises.length = 0;
1102
- }
1103
- }
1104
- };
1105
- const callRender = (hostRef, instance, elm) => {
1106
- try {
1107
- instance = instance.render() ;
1108
- {
1109
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
1110
- }
1111
- {
1112
- hostRef.$flags$ |= 2 /* hasRendered */;
1113
- }
1114
- {
1115
- {
1116
- // looks like we've got child nodes to render into this host element
1117
- // or we need to update the css class/attrs on the host element
1118
- // DOM WRITE!
1119
- {
1120
- renderVdom(hostRef, instance);
1121
- }
1122
- }
1123
- }
1124
- }
1125
- catch (e) {
1126
- consoleError(e, hostRef.$hostElement$);
1127
- }
1128
- return null;
1129
- };
1130
- const postUpdateComponent = (hostRef) => {
1131
- const tagName = hostRef.$cmpMeta$.$tagName$;
1132
- const elm = hostRef.$hostElement$;
1133
- const endPostUpdate = createTime('postUpdate', tagName);
1134
- const instance = hostRef.$lazyInstance$ ;
1135
- const ancestorComponent = hostRef.$ancestorComponent$;
1136
- {
1137
- safeCall(instance, 'componentDidRender');
1138
- }
1139
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1140
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1141
- {
1142
- // DOM WRITE!
1143
- addHydratedFlag(elm);
1144
- }
1145
- {
1146
- safeCall(instance, 'componentDidLoad');
1147
- }
1148
- endPostUpdate();
1149
- {
1150
- hostRef.$onReadyResolve$(elm);
1151
- if (!ancestorComponent) {
1152
- appDidLoad();
1153
- }
1154
- }
1155
- }
1156
- else {
1157
- endPostUpdate();
1158
- }
1159
- {
1160
- hostRef.$onInstanceResolve$(elm);
1161
- }
1162
- // load events fire from bottom to top
1163
- // the deepest elements load first then bubbles up
1164
- {
1165
- if (hostRef.$onRenderResolve$) {
1166
- hostRef.$onRenderResolve$();
1167
- hostRef.$onRenderResolve$ = undefined;
1168
- }
1169
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1170
- nextTick(() => scheduleUpdate(hostRef, false));
1171
- }
1172
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
1173
- }
1174
- // ( •_•)
1175
- // ( •_•)>⌐■-■
1176
- // (⌐■_■)
1177
- };
1178
- const appDidLoad = (who) => {
1179
- // on appload
1180
- // we have finish the first big initial render
1181
- {
1182
- addHydratedFlag(doc.documentElement);
1183
- }
1184
- nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1185
- };
1186
- const safeCall = (instance, method, arg) => {
1187
- if (instance && instance[method]) {
1188
- try {
1189
- return instance[method](arg);
1190
- }
1191
- catch (e) {
1192
- consoleError(e);
1193
- }
1194
- }
1195
- return undefined;
1196
- };
1197
- const then = (promise, thenFn) => {
1198
- return promise && promise.then ? promise.then(thenFn) : thenFn();
1199
- };
1200
- const addHydratedFlag = (elm) => (elm.classList.add('hydrated') );
1201
- const parsePropertyValue = (propValue, propType) => {
1202
- // ensure this value is of the correct prop type
1203
- if (propValue != null && !isComplexType(propValue)) {
1204
- if (propType & 4 /* Boolean */) {
1205
- // per the HTML spec, any string value means it is a boolean true value
1206
- // but we'll cheat here and say that the string "false" is the boolean false
1207
- return propValue === 'false' ? false : propValue === '' || !!propValue;
1208
- }
1209
- if (propType & 2 /* Number */) {
1210
- // force it to be a number
1211
- return parseFloat(propValue);
1212
- }
1213
- if (propType & 1 /* String */) {
1214
- // could have been passed as a number or boolean
1215
- // but we still want it as a string
1216
- return String(propValue);
1217
- }
1218
- // redundant return here for better minification
1219
- return propValue;
1220
- }
1221
- // not sure exactly what type we want
1222
- // so no need to change to a different type
1223
- return propValue;
1224
- };
1225
- const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1226
- const setValue = (ref, propName, newVal, cmpMeta) => {
1227
- // check our new property value against our internal value
1228
- const hostRef = getHostRef(ref);
1229
- const elm = hostRef.$hostElement$ ;
1230
- const oldVal = hostRef.$instanceValues$.get(propName);
1231
- const flags = hostRef.$flags$;
1232
- const instance = hostRef.$lazyInstance$ ;
1233
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1234
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
1235
- // gadzooks! the property's value has changed!!
1236
- // set our new value!
1237
- hostRef.$instanceValues$.set(propName, newVal);
1238
- if (instance) {
1239
- // get an array of method names of watch functions to call
1240
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1241
- const watchMethods = cmpMeta.$watchers$[propName];
1242
- if (watchMethods) {
1243
- // this instance is watching for when this property changed
1244
- watchMethods.map(watchMethodName => {
1245
- try {
1246
- // fire off each of the watch methods that are watching this property
1247
- instance[watchMethodName](newVal, oldVal, propName);
1248
- }
1249
- catch (e) {
1250
- consoleError(e, elm);
1251
- }
1252
- });
1253
- }
1254
- }
1255
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1256
- // looks like this value actually changed, so we've got work to do!
1257
- // but only if we've already rendered, otherwise just chill out
1258
- // queue that we need to do an update, but don't worry about queuing
1259
- // up millions cuz this function ensures it only runs once
1260
- scheduleUpdate(hostRef, false);
1261
- }
1262
- }
1263
- }
1264
- };
1265
- const proxyComponent = (Cstr, cmpMeta, flags) => {
1266
- if (cmpMeta.$members$) {
1267
- if (Cstr.watchers) {
1268
- cmpMeta.$watchers$ = Cstr.watchers;
1269
- }
1270
- // It's better to have a const than two Object.entries()
1271
- const members = Object.entries(cmpMeta.$members$);
1272
- const prototype = Cstr.prototype;
1273
- members.map(([memberName, [memberFlags]]) => {
1274
- if ((memberFlags & 31 /* Prop */ || ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
1275
- // proxyComponent - prop
1276
- Object.defineProperty(prototype, memberName, {
1277
- get() {
1278
- // proxyComponent, get value
1279
- return getValue(this, memberName);
1280
- },
1281
- set(newValue) {
1282
- // proxyComponent, set value
1283
- setValue(this, memberName, newValue, cmpMeta);
1284
- },
1285
- configurable: true,
1286
- enumerable: true,
1287
- });
1288
- }
1289
- else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1290
- // proxyComponent - method
1291
- Object.defineProperty(prototype, memberName, {
1292
- value(...args) {
1293
- const ref = getHostRef(this);
1294
- return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
1295
- },
1296
- });
1297
- }
1298
- });
1299
- if ((flags & 1 /* isElementConstructor */)) {
1300
- const attrNameToPropName = new Map();
1301
- prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1302
- plt.jmp(() => {
1303
- const propName = attrNameToPropName.get(attrName);
1304
- this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1305
- });
1306
- };
1307
- // create an array of attributes to observe
1308
- // and also create a map of html attribute name to js property name
1309
- Cstr.observedAttributes = members
1310
- .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
1311
- .map(([propName, m]) => {
1312
- const attrName = m[1] || propName;
1313
- attrNameToPropName.set(attrName, propName);
1314
- if (m[0] & 512 /* ReflectAttr */) {
1315
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
1316
- }
1317
- return attrName;
1318
- });
1319
- }
1320
- }
1321
- return Cstr;
1322
- };
1323
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1324
- // initializeComponent
1325
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1326
- {
1327
- // we haven't initialized this element yet
1328
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1329
- // lazy loaded components
1330
- // request the component's implementation to be
1331
- // wired up with the host element
1332
- Cstr = loadModule(cmpMeta);
1333
- if (Cstr.then) {
1334
- // Await creates a micro-task avoid if possible
1335
- const endLoad = uniqueTime();
1336
- Cstr = await Cstr;
1337
- endLoad();
1338
- }
1339
- if (!Cstr.isProxied) {
1340
- // we'eve never proxied this Constructor before
1341
- // let's add the getters/setters to its prototype before
1342
- // the first time we create an instance of the implementation
1343
- {
1344
- cmpMeta.$watchers$ = Cstr.watchers;
1345
- }
1346
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1347
- Cstr.isProxied = true;
1348
- }
1349
- const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1350
- // ok, time to construct the instance
1351
- // but let's keep track of when we start and stop
1352
- // so that the getters/setters don't incorrectly step on data
1353
- {
1354
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
1355
- }
1356
- // construct the lazy-loaded component implementation
1357
- // passing the hostRef is very important during
1358
- // construction in order to directly wire together the
1359
- // host element and the lazy-loaded instance
1360
- try {
1361
- new Cstr(hostRef);
1362
- }
1363
- catch (e) {
1364
- consoleError(e);
1365
- }
1366
- {
1367
- hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1368
- }
1369
- {
1370
- hostRef.$flags$ |= 128 /* isWatchReady */;
1371
- }
1372
- endNewInstance();
1373
- }
1374
- if (Cstr.style) {
1375
- // this component has styles but we haven't registered them yet
1376
- let style = Cstr.style;
1377
- const scopeId = getScopeId(cmpMeta);
1378
- if (!styles.has(scopeId)) {
1379
- const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1380
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1381
- endRegisterStyles();
1382
- }
1383
- }
1384
- }
1385
- // we've successfully created a lazy instance
1386
- const ancestorComponent = hostRef.$ancestorComponent$;
1387
- const schedule = () => scheduleUpdate(hostRef, true);
1388
- if (ancestorComponent && ancestorComponent['s-rc']) {
1389
- // this is the intial load and this component it has an ancestor component
1390
- // but the ancestor component has NOT fired its will update lifecycle yet
1391
- // so let's just cool our jets and wait for the ancestor to continue first
1392
- // this will get fired off when the ancestor component
1393
- // finally gets around to rendering its lazy self
1394
- // fire off the initial update
1395
- ancestorComponent['s-rc'].push(schedule);
1396
- }
1397
- else {
1398
- schedule();
1399
- }
1400
- };
1401
- const connectedCallback = (elm) => {
1402
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1403
- const hostRef = getHostRef(elm);
1404
- const cmpMeta = hostRef.$cmpMeta$;
1405
- const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1406
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1407
- // first time this component has connected
1408
- hostRef.$flags$ |= 1 /* hasConnected */;
1409
- {
1410
- // initUpdate
1411
- // if the slot polyfill is required we'll need to put some nodes
1412
- // in here to act as original content anchors as we move nodes around
1413
- // host element has been connected to the DOM
1414
- if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1415
- setContentReference(elm);
1416
- }
1417
- }
1418
- {
1419
- // find the first ancestor component (if there is one) and register
1420
- // this component as one of the actively loading child components for its ancestor
1421
- let ancestorComponent = elm;
1422
- while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1423
- // climb up the ancestors looking for the first
1424
- // component that hasn't finished its lifecycle update yet
1425
- if (ancestorComponent['s-p']) {
1426
- // we found this components first ancestor component
1427
- // keep a reference to this component's ancestor component
1428
- attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1429
- break;
1430
- }
1431
- }
1432
- }
1433
- // Lazy properties
1434
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1435
- if (cmpMeta.$members$) {
1436
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1437
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1438
- const value = elm[memberName];
1439
- delete elm[memberName];
1440
- elm[memberName] = value;
1441
- }
1442
- });
1443
- }
1444
- {
1445
- initializeComponent(elm, hostRef, cmpMeta);
1446
- }
1447
- }
1448
- else {
1449
- // not the first time this has connected
1450
- // reattach any event listeners to the host
1451
- // since they would have been removed when disconnected
1452
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1453
- }
1454
- endConnected();
1455
- }
1456
- };
1457
- const setContentReference = (elm) => {
1458
- // only required when we're NOT using native shadow dom (slot)
1459
- // or this browser doesn't support native shadow dom
1460
- // and this host element was NOT created with SSR
1461
- // let's pick out the inner content for slot projection
1462
- // create a node to represent where the original
1463
- // content was first placed, which is useful later on
1464
- const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1465
- contentRefElm['s-cn'] = true;
1466
- elm.insertBefore(contentRefElm, elm.firstChild);
1467
- };
1468
- const disconnectedCallback = (elm) => {
1469
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1470
- const hostRef = getHostRef(elm);
1471
- const instance = hostRef.$lazyInstance$ ;
1472
- {
1473
- if (hostRef.$rmListeners$) {
1474
- hostRef.$rmListeners$.map(rmListener => rmListener());
1475
- hostRef.$rmListeners$ = undefined;
1476
- }
1477
- }
1478
- {
1479
- safeCall(instance, 'disconnectedCallback');
1480
- }
1481
- }
1482
- };
1483
- const bootstrapLazy = (lazyBundles, options = {}) => {
1484
- const endBootstrap = createTime();
1485
- const cmpTags = [];
1486
- const exclude = options.exclude || [];
1487
- const customElements = win.customElements;
1488
- const head = doc.head;
1489
- const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1490
- const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1491
- const deferredConnectedCallbacks = [];
1492
- let appLoadFallback;
1493
- let isBootstrapping = true;
1494
- Object.assign(plt, options);
1495
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1496
- lazyBundles.map(lazyBundle => lazyBundle[1].map(compactMeta => {
1497
- const cmpMeta = {
1498
- $flags$: compactMeta[0],
1499
- $tagName$: compactMeta[1],
1500
- $members$: compactMeta[2],
1501
- $listeners$: compactMeta[3],
1502
- };
1503
- {
1504
- cmpMeta.$members$ = compactMeta[2];
1505
- }
1506
- {
1507
- cmpMeta.$listeners$ = compactMeta[3];
1508
- }
1509
- {
1510
- cmpMeta.$attrsToReflect$ = [];
1511
- }
1512
- {
1513
- cmpMeta.$watchers$ = {};
1514
- }
1515
- const tagName = cmpMeta.$tagName$;
1516
- const HostElement = class extends HTMLElement {
1517
- // StencilLazyHost
1518
- constructor(self) {
1519
- // @ts-ignore
1520
- super(self);
1521
- self = this;
1522
- registerHost(self, cmpMeta);
1523
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1524
- // this component is using shadow dom
1525
- // and this browser supports shadow dom
1526
- // add the read-only property "shadowRoot" to the host element
1527
- // adding the shadow root build conditionals to minimize runtime
1528
- {
1529
- {
1530
- self.attachShadow({ mode: 'open' });
1531
- }
1532
- }
1533
- }
1534
- }
1535
- connectedCallback() {
1536
- if (appLoadFallback) {
1537
- clearTimeout(appLoadFallback);
1538
- appLoadFallback = null;
1539
- }
1540
- if (isBootstrapping) {
1541
- // connectedCallback will be processed once all components have been registered
1542
- deferredConnectedCallbacks.push(this);
1543
- }
1544
- else {
1545
- plt.jmp(() => connectedCallback(this));
1546
- }
1547
- }
1548
- disconnectedCallback() {
1549
- plt.jmp(() => disconnectedCallback(this));
1550
- }
1551
- componentOnReady() {
1552
- return getHostRef(this).$onReadyPromise$;
1553
- }
1554
- };
1555
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1556
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1557
- cmpTags.push(tagName);
1558
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1559
- }
1560
- }));
1561
- {
1562
- visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1563
- visibilityStyle.setAttribute('data-styles', '');
1564
- head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1565
- }
1566
- // Process deferred connectedCallbacks now all components have been registered
1567
- isBootstrapping = false;
1568
- if (deferredConnectedCallbacks.length) {
1569
- deferredConnectedCallbacks.map(host => host.connectedCallback());
1570
- }
1571
- else {
1572
- {
1573
- plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1574
- }
1575
- }
1576
- // Fallback appLoad event
1577
- endBootstrap();
1578
- };
1579
- const hostRefs = new WeakMap();
1580
- const getHostRef = (ref) => hostRefs.get(ref);
1581
- const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1582
- const registerHost = (elm, cmpMeta) => {
1583
- const hostRef = {
1584
- $flags$: 0,
1585
- $hostElement$: elm,
1586
- $cmpMeta$: cmpMeta,
1587
- $instanceValues$: new Map(),
1588
- };
1589
- {
1590
- hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));
1591
- }
1592
- {
1593
- hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
1594
- elm['s-p'] = [];
1595
- elm['s-rc'] = [];
1596
- }
1597
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1598
- return hostRefs.set(elm, hostRef);
1599
- };
1600
- const isMemberInElement = (elm, memberName) => memberName in elm;
1601
- const consoleError = (e, el) => (0, console.error)(e, el);
1602
- const cmpModules = /*@__PURE__*/ new Map();
1603
- const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1604
- // loadModuleImport
1605
- const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1606
- const bundleId = cmpMeta.$lazyBundleId$;
1607
- const module = cmpModules.get(bundleId) ;
1608
- if (module) {
1609
- return module[exportName];
1610
- }
1611
- return import(
1612
- /* webpackInclude: /\.entry\.js$/ */
1613
- /* webpackExclude: /\.system\.entry\.js$/ */
1614
- /* webpackMode: "lazy" */
1615
- `./${bundleId}.entry.js${''}`).then(importedModule => {
1616
- {
1617
- cmpModules.set(bundleId, importedModule);
1618
- }
1619
- return importedModule[exportName];
1620
- }, consoleError);
1621
- };
1622
- const styles = new Map();
1623
- const queueDomReads = [];
1624
- const queueDomWrites = [];
1625
- const queueTask = (queue, write) => (cb) => {
1626
- queue.push(cb);
1627
- if (!queuePending) {
1628
- queuePending = true;
1629
- if (write && plt.$flags$ & 4 /* queueSync */) {
1630
- nextTick(flush);
1631
- }
1632
- else {
1633
- plt.raf(flush);
1634
- }
1635
- }
1636
- };
1637
- const consume = (queue) => {
1638
- for (let i = 0; i < queue.length; i++) {
1639
- try {
1640
- queue[i](performance.now());
1641
- }
1642
- catch (e) {
1643
- consoleError(e);
1644
- }
1645
- }
1646
- queue.length = 0;
1647
- };
1648
- const flush = () => {
1649
- // always force a bunch of medium callbacks to run, but still have
1650
- // a throttle on how many can run in a certain time
1651
- // DOM READS!!!
1652
- consume(queueDomReads);
1653
- // DOM WRITES!!!
1654
- {
1655
- consume(queueDomWrites);
1656
- if ((queuePending = queueDomReads.length > 0)) {
1657
- // still more to do yet, but we've run out of time
1658
- // let's let this thing cool off and try again in the next tick
1659
- plt.raf(flush);
1660
- }
1661
- }
1662
- };
1663
- const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1664
- const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1665
-
1666
- export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };