@mgdis/mg-components 5.15.0 → 5.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (479) hide show
  1. package/dist/cjs/{index-fede8ee2.js → index-c042e24b.js} +321 -68
  2. package/dist/cjs/index-c042e24b.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +2 -0
  4. package/dist/cjs/index.cjs.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +5 -12
  6. package/dist/cjs/loader.cjs.js.map +1 -0
  7. package/dist/cjs/{mg-action-more_32.cjs.entry.js → mg-action-more_34.cjs.entry.js} +341 -112
  8. package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -0
  9. package/dist/cjs/mg-components.cjs.js +5 -3
  10. package/dist/cjs/mg-components.cjs.js.map +1 -0
  11. package/dist/cjs/mg-item-more.cjs.entry.js +8 -4
  12. package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -0
  13. package/dist/cjs/{mg-menu.conf-f9d0ddec.js → mg-menu.conf-43aacf30.js} +2 -0
  14. package/dist/cjs/mg-menu.conf-43aacf30.js.map +1 -0
  15. package/dist/collection/assets/icons/index.js +184 -0
  16. package/dist/collection/collection-manifest.json +37 -35
  17. package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -0
  18. package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js.map +1 -0
  19. package/dist/collection/components/atoms/mg-badge/mg-badge.js +6 -4
  20. package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -0
  21. package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js +33 -0
  22. package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js.map +1 -0
  23. package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js +70 -0
  24. package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js.map +1 -0
  25. package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -0
  26. package/dist/collection/components/atoms/mg-button/mg-button.conf.js.map +1 -0
  27. package/dist/collection/components/atoms/mg-button/mg-button.js +10 -6
  28. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -0
  29. package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js +91 -0
  30. package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js.map +1 -0
  31. package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js +142 -0
  32. package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js.map +1 -0
  33. package/dist/collection/components/atoms/mg-card/mg-card.conf.js +1 -0
  34. package/dist/collection/components/atoms/mg-card/mg-card.conf.js.map +1 -0
  35. package/dist/collection/components/atoms/mg-card/mg-card.js +8 -5
  36. package/dist/collection/components/atoms/mg-card/mg-card.js.map +1 -0
  37. package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js +36 -0
  38. package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js.map +1 -0
  39. package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js +43 -0
  40. package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js.map +1 -0
  41. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +3 -2
  42. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js.map +1 -0
  43. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js +15 -0
  44. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js.map +1 -0
  45. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js +42 -0
  46. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js.map +1 -0
  47. package/dist/collection/components/atoms/mg-divider/mg-divider.js +2 -1
  48. package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +1 -0
  49. package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js +11 -0
  50. package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js.map +1 -0
  51. package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js +14 -0
  52. package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js.map +1 -0
  53. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +1 -0
  54. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js.map +1 -0
  55. package/dist/collection/components/atoms/mg-icon/mg-icon.js +11 -7
  56. package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -0
  57. package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js +55 -0
  58. package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js.map +1 -0
  59. package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js +84 -0
  60. package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js.map +1 -0
  61. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +2 -1
  62. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js.map +1 -0
  63. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.js +18 -0
  64. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.js.map +1 -0
  65. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js +27 -0
  66. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js.map +1 -0
  67. package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js +1 -0
  68. package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js.map +1 -0
  69. package/dist/collection/components/atoms/mg-tag/mg-tag.js +6 -4
  70. package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -0
  71. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.js +37 -0
  72. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.js.map +1 -0
  73. package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js +71 -0
  74. package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js.map +1 -0
  75. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.css +43 -0
  76. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +50 -0
  77. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -0
  78. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +1 -0
  79. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -0
  80. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.css +0 -43
  81. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +64 -17
  82. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -0
  83. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js +132 -0
  84. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js.map +1 -0
  85. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js +264 -0
  86. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js.map +1 -0
  87. package/dist/collection/components/molecules/inputs/MgInput.conf.js +1 -0
  88. package/dist/collection/components/molecules/inputs/MgInput.conf.js.map +1 -0
  89. package/dist/collection/components/molecules/inputs/MgInput.js +3 -2
  90. package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -0
  91. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -1
  92. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +1 -0
  93. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +12 -7
  94. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -0
  95. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +1 -0
  96. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -0
  97. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +2 -2
  98. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +18 -12
  99. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -0
  100. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js +243 -0
  101. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js.map +1 -0
  102. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js +581 -0
  103. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js.map +1 -0
  104. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +1 -0
  105. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js.map +1 -0
  106. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +10 -8
  107. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -0
  108. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js +123 -0
  109. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js.map +1 -0
  110. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js +324 -0
  111. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js.map +1 -0
  112. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +1 -0
  113. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js.map +1 -0
  114. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +46 -23
  115. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -0
  116. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js +212 -0
  117. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js.map +1 -0
  118. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js +401 -0
  119. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js.map +1 -0
  120. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +10 -7
  121. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -0
  122. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js +115 -0
  123. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js.map +1 -0
  124. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js +234 -0
  125. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js.map +1 -0
  126. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js +1 -0
  127. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js.map +1 -0
  128. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +10 -7
  129. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -0
  130. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js +154 -0
  131. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js.map +1 -0
  132. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js +295 -0
  133. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js.map +1 -0
  134. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js +1 -0
  135. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js.map +1 -0
  136. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +14 -9
  137. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -0
  138. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js +194 -0
  139. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js.map +1 -0
  140. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js +344 -0
  141. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js.map +1 -0
  142. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +12 -8
  143. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -0
  144. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.js +171 -0
  145. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.js.map +1 -0
  146. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js +280 -0
  147. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js.map +1 -0
  148. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +10 -7
  149. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -0
  150. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js +129 -0
  151. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js.map +1 -0
  152. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js +255 -0
  153. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js.map +1 -0
  154. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js +1 -0
  155. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js.map +1 -0
  156. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +6 -4
  157. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -0
  158. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.js +125 -0
  159. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.js.map +1 -0
  160. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js +203 -0
  161. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js.map +1 -0
  162. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +1 -0
  163. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js.map +1 -0
  164. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +9 -5
  165. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -0
  166. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.js +268 -0
  167. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.js.map +1 -0
  168. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js +175 -0
  169. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js.map +1 -0
  170. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js +1 -0
  171. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js.map +1 -0
  172. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +12 -9
  173. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -0
  174. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.js +119 -0
  175. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.js.map +1 -0
  176. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js +295 -0
  177. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js.map +1 -0
  178. package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js +1 -0
  179. package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js.map +1 -0
  180. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +27 -14
  181. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -0
  182. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js +128 -0
  183. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js.map +1 -0
  184. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js +187 -0
  185. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js.map +1 -0
  186. package/dist/collection/components/molecules/mg-details/mg-details.js +3 -2
  187. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -0
  188. package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js +30 -0
  189. package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js.map +1 -0
  190. package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js +42 -0
  191. package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js.map +1 -0
  192. package/dist/collection/components/molecules/mg-form/mg-form.js +17 -7
  193. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -0
  194. package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js +169 -0
  195. package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js.map +1 -0
  196. package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js +277 -0
  197. package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js.map +1 -0
  198. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +3 -2
  199. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -0
  200. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js +39 -0
  201. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js.map +1 -0
  202. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js +36 -0
  203. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js.map +1 -0
  204. package/dist/collection/components/molecules/mg-item-more/mg-item-more.conf.js +1 -0
  205. package/dist/collection/components/molecules/mg-item-more/mg-item-more.conf.js.map +1 -0
  206. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +15 -9
  207. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -0
  208. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js +85 -0
  209. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js.map +1 -0
  210. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js +106 -0
  211. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js.map +1 -0
  212. package/dist/collection/components/molecules/mg-message/mg-message.conf.js +1 -0
  213. package/dist/collection/components/molecules/mg-message/mg-message.conf.js.map +1 -0
  214. package/dist/collection/components/molecules/mg-message/mg-message.js +7 -5
  215. package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -0
  216. package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js +64 -0
  217. package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js.map +1 -0
  218. package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js +109 -0
  219. package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js.map +1 -0
  220. package/dist/collection/components/molecules/mg-modal/mg-modal.conf.js +5 -0
  221. package/dist/collection/components/molecules/mg-modal/mg-modal.conf.js.map +1 -0
  222. package/dist/collection/components/molecules/mg-modal/mg-modal.js +42 -8
  223. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -0
  224. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js +62 -0
  225. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js.map +1 -0
  226. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js +40 -0
  227. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js.map +1 -0
  228. package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js +26 -0
  229. package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js.map +1 -0
  230. package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js +122 -0
  231. package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js.map +1 -0
  232. package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +1 -0
  233. package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js.map +1 -0
  234. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +5 -4
  235. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -0
  236. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js +57 -0
  237. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js.map +1 -0
  238. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js +121 -0
  239. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js.map +1 -0
  240. package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js +1 -0
  241. package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js.map +1 -0
  242. package/dist/collection/components/molecules/mg-panel/mg-panel.js +10 -7
  243. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -0
  244. package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js +106 -0
  245. package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js.map +1 -0
  246. package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js +223 -0
  247. package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js.map +1 -0
  248. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.css +135 -0
  249. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +101 -0
  250. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -0
  251. package/dist/collection/components/molecules/mg-popover/mg-popover.css +0 -111
  252. package/dist/collection/components/molecules/mg-popover/mg-popover.js +47 -46
  253. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -0
  254. package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.js +148 -0
  255. package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.js.map +1 -0
  256. package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js +130 -0
  257. package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js.map +1 -0
  258. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js +1 -0
  259. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js.map +1 -0
  260. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +5 -3
  261. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -0
  262. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js +55 -0
  263. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js.map +1 -0
  264. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js +55 -0
  265. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js.map +1 -0
  266. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +1 -0
  267. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js.map +1 -0
  268. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +8 -5
  269. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -0
  270. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js +76 -0
  271. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js.map +1 -0
  272. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js +332 -0
  273. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js.map +1 -0
  274. package/dist/collection/index.js +1 -0
  275. package/dist/collection/index.js.map +1 -0
  276. package/dist/collection/locales/index.js +4 -3
  277. package/dist/collection/locales/index.js.map +1 -0
  278. package/dist/collection/locales/index.spec.js +27 -0
  279. package/dist/collection/locales/index.spec.js.map +1 -0
  280. package/dist/collection/stories/icon-gallery.js +4 -3
  281. package/dist/collection/stories/icon-gallery.js.map +1 -0
  282. package/dist/collection/test/typography.e2e.playwright.js +12 -0
  283. package/dist/collection/test/typography.e2e.playwright.js.map +1 -0
  284. package/dist/collection/utils/behaviors.utils.js +1 -0
  285. package/dist/collection/utils/behaviors.utils.js.map +1 -0
  286. package/dist/collection/utils/behaviors.utils.spec.js +57 -0
  287. package/dist/collection/utils/behaviors.utils.spec.js.map +1 -0
  288. package/dist/collection/utils/components.utils.js +9 -7
  289. package/dist/collection/utils/components.utils.js.map +1 -0
  290. package/dist/collection/utils/components.utils.spec.js +120 -0
  291. package/dist/collection/utils/components.utils.spec.js.map +1 -0
  292. package/dist/collection/utils/e2e.test.utils.js +46 -0
  293. package/dist/collection/utils/e2e.test.utils.js.map +1 -0
  294. package/dist/collection/utils/locale.utils.js +1 -0
  295. package/dist/collection/utils/locale.utils.js.map +1 -0
  296. package/dist/collection/utils/locale.utils.spec.js +52 -0
  297. package/dist/collection/utils/locale.utils.spec.js.map +1 -0
  298. package/dist/collection/utils/playwright.e2e.test.utils.js +100 -0
  299. package/dist/collection/utils/playwright.e2e.test.utils.js.map +1 -0
  300. package/dist/collection/utils/stencil.e2e.test.utils.js +33 -0
  301. package/dist/collection/utils/stencil.e2e.test.utils.js.map +1 -0
  302. package/dist/collection/utils/unit.test.utils.js +8 -6
  303. package/dist/collection/utils/unit.test.utils.js.map +1 -0
  304. package/dist/components/MgInput.js +2 -0
  305. package/dist/components/MgInput.js.map +1 -0
  306. package/dist/components/components.utils.js +10 -7
  307. package/dist/components/components.utils.js.map +1 -0
  308. package/dist/components/index.d.ts +5 -35
  309. package/dist/components/index.js +3 -34
  310. package/dist/components/index.js.map +1 -0
  311. package/dist/components/index2.js +2 -0
  312. package/dist/components/index2.js.map +1 -0
  313. package/dist/components/mg-action-more.js +42 -19
  314. package/dist/components/mg-action-more.js.map +1 -0
  315. package/dist/components/mg-badge.js +2 -0
  316. package/dist/components/mg-badge.js.map +1 -0
  317. package/dist/components/mg-badge2.js +8 -1
  318. package/dist/components/mg-badge2.js.map +1 -0
  319. package/dist/components/mg-button.js +2 -0
  320. package/dist/components/mg-button.js.map +1 -0
  321. package/dist/components/mg-button2.js +8 -1
  322. package/dist/components/mg-button2.js.map +1 -0
  323. package/dist/components/mg-card.js +2 -0
  324. package/dist/components/mg-card.js.map +1 -0
  325. package/dist/components/mg-card2.js +6 -1
  326. package/dist/components/mg-card2.js.map +1 -0
  327. package/dist/components/mg-character-left.js +2 -0
  328. package/dist/components/mg-character-left.js.map +1 -0
  329. package/dist/components/mg-character-left2.js +5 -1
  330. package/dist/components/mg-character-left2.js.map +1 -0
  331. package/dist/components/mg-details.js +8 -2
  332. package/dist/components/mg-details.js.map +1 -0
  333. package/dist/components/mg-divider.js +3 -1
  334. package/dist/components/mg-divider.js.map +1 -0
  335. package/dist/components/mg-form.js +17 -4
  336. package/dist/components/mg-form.js.map +1 -0
  337. package/dist/components/mg-icon.js +2 -0
  338. package/dist/components/mg-icon.js.map +1 -0
  339. package/dist/components/mg-icon2.js +87 -17
  340. package/dist/components/mg-icon2.js.map +1 -0
  341. package/dist/components/mg-illustrated-message.js +3 -1
  342. package/dist/components/mg-illustrated-message.js.map +1 -0
  343. package/dist/components/mg-input-checkbox-paginated.js +2 -0
  344. package/dist/components/mg-input-checkbox-paginated.js.map +1 -0
  345. package/dist/components/mg-input-checkbox-paginated2.js +24 -13
  346. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -0
  347. package/dist/components/mg-input-checkbox.js +48 -25
  348. package/dist/components/mg-input-checkbox.js.map +1 -0
  349. package/dist/components/mg-input-date.js +23 -8
  350. package/dist/components/mg-input-date.js.map +1 -0
  351. package/dist/components/mg-input-numeric.js +58 -22
  352. package/dist/components/mg-input-numeric.js.map +1 -0
  353. package/dist/components/mg-input-password.js +21 -8
  354. package/dist/components/mg-input-password.js.map +1 -0
  355. package/dist/components/mg-input-radio.js +22 -8
  356. package/dist/components/mg-input-radio.js.map +1 -0
  357. package/dist/components/mg-input-select.js +2 -0
  358. package/dist/components/mg-input-select.js.map +1 -0
  359. package/dist/components/mg-input-select2.js +22 -8
  360. package/dist/components/mg-input-select2.js.map +1 -0
  361. package/dist/components/mg-input-text.js +2 -0
  362. package/dist/components/mg-input-text.js.map +1 -0
  363. package/dist/components/mg-input-text2.js +24 -10
  364. package/dist/components/mg-input-text2.js.map +1 -0
  365. package/dist/components/mg-input-textarea.js +24 -10
  366. package/dist/components/mg-input-textarea.js.map +1 -0
  367. package/dist/components/mg-input-title.js +2 -0
  368. package/dist/components/mg-input-title.js.map +1 -0
  369. package/dist/components/mg-input-title2.js +6 -1
  370. package/dist/components/mg-input-title2.js.map +1 -0
  371. package/dist/components/mg-input-toggle.js +23 -7
  372. package/dist/components/mg-input-toggle.js.map +1 -0
  373. package/dist/components/mg-item-more.js +31 -17
  374. package/dist/components/mg-item-more.js.map +1 -0
  375. package/dist/components/mg-menu-item.js +2 -0
  376. package/dist/components/mg-menu-item.js.map +1 -0
  377. package/dist/components/mg-menu-item2.js +27 -13
  378. package/dist/components/mg-menu-item2.js.map +1 -0
  379. package/dist/components/mg-menu.conf.js +2 -0
  380. package/dist/components/mg-menu.conf.js.map +1 -0
  381. package/dist/components/mg-menu.js +2 -0
  382. package/dist/components/mg-menu.js.map +1 -0
  383. package/dist/components/mg-menu2.js +8 -1
  384. package/dist/components/mg-menu2.js.map +1 -0
  385. package/dist/components/mg-message.js +8 -1
  386. package/dist/components/mg-message.js.map +1 -0
  387. package/dist/components/mg-modal.js +24 -5
  388. package/dist/components/mg-modal.js.map +1 -0
  389. package/dist/components/mg-pagination.js +2 -0
  390. package/dist/components/mg-pagination.js.map +1 -0
  391. package/dist/components/mg-pagination2.js +22 -11
  392. package/dist/components/mg-pagination2.js.map +1 -0
  393. package/dist/components/mg-panel.js +30 -16
  394. package/dist/components/mg-panel.js.map +1 -0
  395. package/dist/components/mg-popover-content.d.ts +11 -0
  396. package/dist/components/mg-popover-content.js +8 -0
  397. package/dist/components/mg-popover-content.js.map +1 -0
  398. package/dist/components/mg-popover-content2.js +90 -0
  399. package/dist/components/mg-popover-content2.js.map +1 -0
  400. package/dist/components/mg-popover.js +2 -0
  401. package/dist/components/mg-popover.js.map +1 -0
  402. package/dist/components/mg-popover2.js +61 -48
  403. package/dist/components/mg-popover2.js.map +1 -0
  404. package/dist/components/mg-skip-links.js +5 -1
  405. package/dist/components/mg-skip-links.js.map +1 -0
  406. package/dist/components/mg-tabs.js +8 -1
  407. package/dist/components/mg-tabs.js.map +1 -0
  408. package/dist/components/mg-tag.js +7 -1
  409. package/dist/components/mg-tag.js.map +1 -0
  410. package/dist/components/mg-tooltip-content.d.ts +11 -0
  411. package/dist/components/mg-tooltip-content.js +8 -0
  412. package/dist/components/mg-tooltip-content.js.map +1 -0
  413. package/dist/components/mg-tooltip-content2.js +43 -0
  414. package/dist/components/mg-tooltip-content2.js.map +1 -0
  415. package/dist/components/mg-tooltip.js +2 -0
  416. package/dist/components/mg-tooltip.js.map +1 -0
  417. package/dist/components/mg-tooltip2.js +71 -16
  418. package/dist/components/mg-tooltip2.js.map +1 -0
  419. package/dist/components/popper.js +2 -0
  420. package/dist/components/popper.js.map +1 -0
  421. package/dist/esm/{index-1d40b052.js → index-ce01e63b.js} +321 -68
  422. package/dist/esm/index-ce01e63b.js.map +1 -0
  423. package/dist/esm/index.js +2 -0
  424. package/dist/esm/index.js.map +1 -0
  425. package/dist/esm/loader.js +6 -13
  426. package/dist/esm/loader.js.map +1 -0
  427. package/dist/esm/{mg-action-more_32.entry.js → mg-action-more_34.entry.js} +340 -113
  428. package/dist/esm/mg-action-more_34.entry.js.map +1 -0
  429. package/dist/esm/mg-components.js +6 -4
  430. package/dist/esm/mg-components.js.map +1 -0
  431. package/dist/esm/mg-item-more.entry.js +8 -4
  432. package/dist/esm/mg-item-more.entry.js.map +1 -0
  433. package/dist/esm/{mg-menu.conf-2cc079ae.js → mg-menu.conf-012fc9b4.js} +2 -0
  434. package/dist/esm/mg-menu.conf-012fc9b4.js.map +1 -0
  435. package/dist/mg-components/index.esm.js +2 -0
  436. package/dist/mg-components/index.esm.js.map +1 -0
  437. package/dist/mg-components/mg-components.css +1 -1
  438. package/dist/mg-components/mg-components.esm.js +2 -1
  439. package/dist/mg-components/mg-components.esm.js.map +1 -0
  440. package/dist/mg-components/p-1aa89acf.js +3 -0
  441. package/dist/mg-components/p-1aa89acf.js.map +1 -0
  442. package/dist/mg-components/p-1d7d6fa0.js +2 -0
  443. package/dist/mg-components/p-1d7d6fa0.js.map +1 -0
  444. package/dist/mg-components/p-9257e8f1.entry.js +2 -0
  445. package/dist/mg-components/p-9257e8f1.entry.js.map +1 -0
  446. package/dist/mg-components/p-caafc9cf.entry.js +2 -0
  447. package/dist/mg-components/p-caafc9cf.entry.js.map +1 -0
  448. package/dist/types/components/atoms/mg-badge/test/mg-badge.e2e.playwright.d.ts +1 -0
  449. package/dist/types/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.d.ts +14 -0
  450. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +7 -1
  451. package/dist/types/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.d.ts +1 -0
  452. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +19 -0
  453. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +6 -1
  454. package/dist/types/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.d.ts +2 -0
  455. package/dist/types/components/molecules/mg-details/test/mg-details.e2e.playwright.d.ts +1 -0
  456. package/dist/types/components/molecules/mg-form/mg-form.d.ts +8 -0
  457. package/dist/types/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.d.ts +1 -0
  458. package/dist/types/components/molecules/mg-modal/mg-modal.conf.d.ts +8 -0
  459. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +8 -2
  460. package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.playwright.d.ts +1 -0
  461. package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.template.d.ts +12 -0
  462. package/dist/types/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.d.ts +1 -0
  463. package/dist/types/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.d.ts +1 -0
  464. package/dist/types/components/molecules/mg-panel/test/mg-panel.e2e.playwright.d.ts +1 -0
  465. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +47 -0
  466. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +8 -11
  467. package/dist/types/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.d.ts +1 -0
  468. package/dist/types/components.d.ts +79 -0
  469. package/dist/types/stencil-public-runtime.d.ts +43 -17
  470. package/dist/types/test/typography.e2e.playwright.d.ts +1 -0
  471. package/dist/types/utils/e2e.test.utils.d.ts +22 -0
  472. package/dist/types/utils/stencil.e2e.test.utils.d.ts +14 -0
  473. package/loader/index.d.ts +2 -2
  474. package/package.json +7 -7
  475. package/dist/esm/polyfills/css-shim.js +0 -1
  476. package/dist/mg-components/p-067080e4.js +0 -1
  477. package/dist/mg-components/p-3bf1e2f0.js +0 -2
  478. package/dist/mg-components/p-4ae1130f.entry.js +0 -1
  479. package/dist/mg-components/p-6672f590.entry.js +0 -1
@@ -41,6 +41,13 @@ const XLINK_NS = 'http://www.w3.org/1999/xlink';
41
41
  */
42
42
  const EMPTY_OBJ = {};
43
43
  const isDef = (v) => v != null;
44
+ /**
45
+ * Check whether a value is a 'complex type', defined here as an object or a
46
+ * function.
47
+ *
48
+ * @param o the value to check
49
+ * @returns whether it's a complex type or not
50
+ */
44
51
  const isComplexType = (o) => {
45
52
  // https://jsperf.com/typeof-fn-object/5
46
53
  o = typeof o;
@@ -99,13 +106,13 @@ const h = (nodeName, vnodeData, ...children) => {
99
106
  };
100
107
  walk(children);
101
108
  if (vnodeData) {
102
- // normalize class / classname attributes
103
109
  if (vnodeData.key) {
104
110
  key = vnodeData.key;
105
111
  }
106
112
  if (vnodeData.name) {
107
113
  slotName = vnodeData.name;
108
114
  }
115
+ // normalize class / className attributes
109
116
  {
110
117
  const classData = vnodeData.className || vnodeData.class;
111
118
  if (classData) {
@@ -135,6 +142,14 @@ const h = (nodeName, vnodeData, ...children) => {
135
142
  }
136
143
  return vnode;
137
144
  };
145
+ /**
146
+ * A utility function for creating a virtual DOM node from a tag and some
147
+ * possible text content.
148
+ *
149
+ * @param tag the tag for this element
150
+ * @param text possible text content for the node
151
+ * @returns a newly-minted virtual DOM node
152
+ */
138
153
  const newVNode = (tag, text) => {
139
154
  const vnode = {
140
155
  $flags$: 0,
@@ -155,6 +170,12 @@ const newVNode = (tag, text) => {
155
170
  return vnode;
156
171
  };
157
172
  const Host = {};
173
+ /**
174
+ * Check whether a given node is a Host node or not
175
+ *
176
+ * @param node the virtual DOM node to check
177
+ * @returns whether it's a Host node or not
178
+ */
158
179
  const isHost = (node) => node && node.$tag$ === Host;
159
180
  /**
160
181
  * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
@@ -167,6 +188,13 @@ const vdomFnUtils = {
167
188
  forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
168
189
  map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
169
190
  };
191
+ /**
192
+ * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
193
+ * friendlier public interface (hence, 'convertToPublic').
194
+ *
195
+ * @param node the virtual DOM node to convert
196
+ * @returns a converted child node
197
+ */
170
198
  const convertToPublic = (node) => ({
171
199
  vattrs: node.$attrs$,
172
200
  vchildren: node.$children$,
@@ -175,6 +203,15 @@ const convertToPublic = (node) => ({
175
203
  vtag: node.$tag$,
176
204
  vtext: node.$text$,
177
205
  });
206
+ /**
207
+ * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
208
+ * order to use the resulting object in the virtual DOM. The initial object was
209
+ * likely created as part of presenting a public API, so converting it back
210
+ * involved making it 'private' again (hence, `convertToPrivate`).
211
+ *
212
+ * @param node the child node to convert
213
+ * @returns a converted virtual DOM node
214
+ */
178
215
  const convertToPrivate = (node) => {
179
216
  if (typeof node.vtag === 'function') {
180
217
  const vnodeData = Object.assign({}, node.vattrs);
@@ -283,9 +320,9 @@ const registerStyle = (scopeId, cssText, allowCS) => {
283
320
  }
284
321
  styles.set(scopeId, style);
285
322
  };
286
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
323
+ const addStyle = (styleContainerNode, cmpMeta, mode) => {
287
324
  var _a;
288
- let scopeId = getScopeId(cmpMeta);
325
+ const scopeId = getScopeId(cmpMeta);
289
326
  const style = styles.get(scopeId);
290
327
  // if an element is NOT connected then getRootNode() will return the wrong root node
291
328
  // so the fallback is to always use the document for the root node in those cases
@@ -300,10 +337,8 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
300
337
  }
301
338
  if (!appliedStyles.has(scopeId)) {
302
339
  {
303
- {
304
- styleElm = doc.createElement('style');
305
- styleElm.innerHTML = style;
306
- }
340
+ styleElm = doc.createElement('style');
341
+ styleElm.innerHTML = style;
307
342
  // Apply CSP nonce to the style tag if it exists
308
343
  const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
309
344
  if (nonce != null) {
@@ -353,6 +388,21 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
353
388
  *
354
389
  * Modified for Stencil's compiler and vdom
355
390
  */
391
+ /**
392
+ * When running a VDom render set properties present on a VDom node onto the
393
+ * corresponding HTML element.
394
+ *
395
+ * Note that this function has special functionality for the `class`,
396
+ * `style`, `key`, and `ref` attributes, as well as event handlers (like
397
+ * `onClick`, etc). All others are just passed through as-is.
398
+ *
399
+ * @param elm the HTMLElement onto which attributes should be set
400
+ * @param memberName the name of the attribute to set
401
+ * @param oldValue the old value for the attribute
402
+ * @param newValue the new value for the attribute
403
+ * @param isSvg whether we're in an svg context or not
404
+ * @param flags bitflags for Vdom variables
405
+ */
356
406
  const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
357
407
  if (oldValue !== newValue) {
358
408
  let isProp = isMemberInElement(elm, memberName);
@@ -628,6 +678,21 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
628
678
  }
629
679
  plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
630
680
  };
681
+ /**
682
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
683
+ * add them to the DOM in the appropriate place.
684
+ *
685
+ * @param parentElm the DOM node which should be used as a parent for the new
686
+ * DOM nodes
687
+ * @param before a child of the `parentElm` which the new children should be
688
+ * inserted before (optional)
689
+ * @param parentVNode the parent virtual DOM node
690
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
691
+ * @param startIdx the index in the child virtual DOM nodes at which to start
692
+ * creating DOM nodes (inclusive)
693
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
694
+ * creating DOM nodes (inclusive)
695
+ */
631
696
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
632
697
  let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
633
698
  let childNode;
@@ -644,27 +709,41 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
644
709
  }
645
710
  }
646
711
  };
647
- const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
648
- for (; startIdx <= endIdx; ++startIdx) {
649
- if ((vnode = vnodes[startIdx])) {
650
- elm = vnode.$elm$;
651
- callNodeRefs(vnode);
652
- {
653
- // we're removing this element
654
- // so it's possible we need to show slot fallback content now
655
- checkSlotFallbackVisibility = true;
656
- if (elm['s-ol']) {
657
- // remove the original location comment
658
- elm['s-ol'].remove();
659
- }
660
- else {
661
- // it's possible that child nodes of the node
662
- // that's being removed are slot nodes
663
- putBackInOriginalLocation(elm, true);
712
+ /**
713
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
714
+ * This can be used to, for instance, clean up after a list of children which
715
+ * should no longer be shown.
716
+ *
717
+ * This function also handles some of Stencil's slot relocation logic.
718
+ *
719
+ * @param vnodes a list of virtual DOM nodes to remove
720
+ * @param startIdx the index at which to start removing nodes (inclusive)
721
+ * @param endIdx the index at which to stop removing nodes (inclusive)
722
+ */
723
+ const removeVnodes = (vnodes, startIdx, endIdx) => {
724
+ for (let index = startIdx; index <= endIdx; ++index) {
725
+ const vnode = vnodes[index];
726
+ if (vnode) {
727
+ const elm = vnode.$elm$;
728
+ nullifyVNodeRefs(vnode);
729
+ if (elm) {
730
+ {
731
+ // we're removing this element
732
+ // so it's possible we need to show slot fallback content now
733
+ checkSlotFallbackVisibility = true;
734
+ if (elm['s-ol']) {
735
+ // remove the original location comment
736
+ elm['s-ol'].remove();
737
+ }
738
+ else {
739
+ // it's possible that child nodes of the node
740
+ // that's being removed are slot nodes
741
+ putBackInOriginalLocation(elm, true);
742
+ }
664
743
  }
744
+ // remove the vnode's element from the dom
745
+ elm.remove();
665
746
  }
666
- // remove the vnode's element from the dom
667
- elm.remove();
668
747
  }
669
748
  }
670
749
  };
@@ -922,7 +1001,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
922
1001
  *
923
1002
  * So, in other words, if `key` attrs are not set on VNodes which may be
924
1003
  * changing order within a `children` array or something along those lines then
925
- * we could obtain a false positive and then have to do needless re-rendering.
1004
+ * we could obtain a false negative and then have to do needless re-rendering
1005
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
926
1006
  *
927
1007
  * @param leftVNode the first VNode to check
928
1008
  * @param rightVNode the second VNode to check
@@ -1136,22 +1216,68 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1136
1216
  }
1137
1217
  return slotNameAttr === '';
1138
1218
  };
1139
- const callNodeRefs = (vNode) => {
1219
+ /**
1220
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
1221
+ * calling them with `null`. This signals that the DOM element corresponding to
1222
+ * the VDom node has been removed from the DOM.
1223
+ *
1224
+ * @param vNode a virtual DOM node
1225
+ */
1226
+ const nullifyVNodeRefs = (vNode) => {
1140
1227
  {
1141
1228
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1142
- vNode.$children$ && vNode.$children$.map(callNodeRefs);
1229
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1143
1230
  }
1144
1231
  };
1145
- const renderVdom = (hostRef, renderFnResults) => {
1232
+ /**
1233
+ * The main entry point for Stencil's virtual DOM-based rendering engine
1234
+ *
1235
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1236
+ * function will handle creating a virtual DOM tree with a single root, patching
1237
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
1238
+ * relocation, and reflecting attributes.
1239
+ *
1240
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
1241
+ * the DOM node into which it should be rendered.
1242
+ * @param renderFnResults the virtual DOM nodes to be rendered
1243
+ * @param isInitialLoad whether or not this is the first call after page load
1244
+ */
1245
+ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1146
1246
  const hostElm = hostRef.$hostElement$;
1147
1247
  const cmpMeta = hostRef.$cmpMeta$;
1148
1248
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1249
+ // if `renderFnResults` is a Host node then we can use it directly. If not,
1250
+ // we need to call `h` again to wrap the children of our component in a
1251
+ // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
1252
+ // implicitly that the top-level vdom node is 1) an only child and 2)
1253
+ // contains attrs that need to be set on the host element.
1149
1254
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1150
1255
  hostTagName = hostElm.tagName;
1151
1256
  if (cmpMeta.$attrsToReflect$) {
1152
1257
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1153
1258
  cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1154
1259
  }
1260
+ // On the first render and *only* on the first render we want to check for
1261
+ // any attributes set on the host element which are also set on the vdom
1262
+ // node. If we find them, we override the value on the VDom node attrs with
1263
+ // the value from the host element, which allows developers building apps
1264
+ // with Stencil components to override e.g. the `role` attribute on a
1265
+ // component even if it's already set on the `Host`.
1266
+ if (isInitialLoad && rootVnode.$attrs$) {
1267
+ for (const key of Object.keys(rootVnode.$attrs$)) {
1268
+ // We have a special implementation in `setAccessor` for `style` and
1269
+ // `class` which reconciles values coming from the VDom with values
1270
+ // already present on the DOM element, so we don't want to override those
1271
+ // attributes on the VDom tree with values from the host element if they
1272
+ // are present.
1273
+ //
1274
+ // Likewise, `ref` and `key` are special internal values for the Stencil
1275
+ // runtime and we don't want to override those either.
1276
+ if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
1277
+ rootVnode.$attrs$[key] = hostElm[key];
1278
+ }
1279
+ }
1280
+ }
1155
1281
  rootVnode.$tag$ = null;
1156
1282
  rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1157
1283
  hostRef.$vnode$ = rootVnode;
@@ -1218,7 +1344,7 @@ const renderVdom = (hostRef, renderFnResults) => {
1218
1344
  // has a different next sibling or parent relocated
1219
1345
  if (nodeToRelocate !== insertBeforeNode) {
1220
1346
  if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1221
- // probably a component in the index.html that doesn't have it's hostname set
1347
+ // probably a component in the index.html that doesn't have its hostname set
1222
1348
  nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1223
1349
  }
1224
1350
  // add it back to the dom but in its new home
@@ -1264,32 +1390,103 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
1264
1390
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1265
1391
  return writeTask(dispatch) ;
1266
1392
  };
1393
+ /**
1394
+ * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
1395
+ * component lifecycle methods like `componentWillLoad` as well as
1396
+ * {@link updateComponent}, which will kick off the virtual DOM re-render.
1397
+ *
1398
+ * @param hostRef a reference to a host DOM node
1399
+ * @param isInitialLoad whether we're on the initial load or not
1400
+ * @returns an empty Promise which is used to enqueue a series of operations for
1401
+ * the component
1402
+ */
1267
1403
  const dispatchHooks = (hostRef, isInitialLoad) => {
1268
1404
  const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1269
1405
  const instance = hostRef.$lazyInstance$ ;
1270
- let promise;
1406
+ // We're going to use this variable together with `enqueue` to implement a
1407
+ // little promise-based queue. We start out with it `undefined`. When we add
1408
+ // the first function to the queue we'll set this variable to be that
1409
+ // function's return value. When we attempt to add subsequent values to the
1410
+ // queue we'll check that value and, if it was a `Promise`, we'll then chain
1411
+ // the new function off of that `Promise` using `.then()`. This will give our
1412
+ // queue two nice properties:
1413
+ //
1414
+ // 1. If all functions added to the queue are synchronous they'll be called
1415
+ // synchronously right away.
1416
+ // 2. If all functions added to the queue are asynchronous they'll all be
1417
+ // called in order after `dispatchHooks` exits.
1418
+ let maybePromise;
1271
1419
  if (isInitialLoad) {
1272
1420
  {
1273
1421
  hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
1274
1422
  if (hostRef.$queuedListeners$) {
1275
1423
  hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1276
- hostRef.$queuedListeners$ = null;
1424
+ hostRef.$queuedListeners$ = undefined;
1277
1425
  }
1278
1426
  }
1279
1427
  {
1280
- promise = safeCall(instance, 'componentWillLoad');
1428
+ // If `componentWillLoad` returns a `Promise` then we want to wait on
1429
+ // whatever's going on in that `Promise` before we launch into
1430
+ // rendering the component, doing other lifecycle stuff, etc. So
1431
+ // in that case we assign the returned promise to the variable we
1432
+ // declared above to hold a possible 'queueing' Promise
1433
+ maybePromise = safeCall(instance, 'componentWillLoad');
1281
1434
  }
1282
1435
  }
1283
1436
  else {
1284
1437
  {
1285
- promise = safeCall(instance, 'componentWillUpdate');
1438
+ // Like `componentWillLoad` above, we allow Stencil component
1439
+ // authors to return a `Promise` from this lifecycle callback, and
1440
+ // we specify that our runtime will wait for that `Promise` to
1441
+ // resolve before the component re-renders. So if the method
1442
+ // returns a `Promise` we need to keep it around!
1443
+ maybePromise = safeCall(instance, 'componentWillUpdate');
1286
1444
  }
1287
1445
  }
1288
1446
  endSchedule();
1289
- return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
1447
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1290
1448
  };
1449
+ /**
1450
+ * This function uses a Promise to implement a simple first-in, first-out queue
1451
+ * of functions to be called.
1452
+ *
1453
+ * The queue is ordered on the basis of the first argument. If it's
1454
+ * `undefined`, then nothing is on the queue yet, so the provided function can
1455
+ * be called synchronously (although note that this function may return a
1456
+ * `Promise`). The idea is that then the return value of that enqueueing
1457
+ * operation is kept around, so that if it was a `Promise` then subsequent
1458
+ * functions can be enqueued by calling this function again with that `Promise`
1459
+ * as the first argument.
1460
+ *
1461
+ * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
1462
+ * @param fn a function to enqueue
1463
+ * @returns either a `Promise` or the return value of the provided function
1464
+ */
1465
+ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
1466
+ /**
1467
+ * Check that a value is a `Promise`. To check, we first see if the value is an
1468
+ * instance of the `Promise` global. In a few circumstances, in particular if
1469
+ * the global has been overwritten, this is could be misleading, so we also do
1470
+ * a little 'duck typing' check to see if the `.then` property of the value is
1471
+ * defined and a function.
1472
+ *
1473
+ * @param maybePromise it might be a promise!
1474
+ * @returns whether it is or not
1475
+ */
1476
+ const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1477
+ (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1478
+ /**
1479
+ * Update a component given reference to its host elements and so on.
1480
+ *
1481
+ * @param hostRef an object containing references to the element's host node,
1482
+ * VDom nodes, and other metadata
1483
+ * @param instance a reference to the underlying host element where it will be
1484
+ * rendered
1485
+ * @param isInitialLoad whether or not this function is being called as part of
1486
+ * the first render cycle
1487
+ */
1291
1488
  const updateComponent = async (hostRef, instance, isInitialLoad) => {
1292
- // updateComponent
1489
+ var _a;
1293
1490
  const elm = hostRef.$hostElement$;
1294
1491
  const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1295
1492
  const rc = elm['s-rc'];
@@ -1299,7 +1496,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1299
1496
  }
1300
1497
  const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1301
1498
  {
1302
- callRender(hostRef, instance);
1499
+ callRender(hostRef, instance, elm, isInitialLoad);
1303
1500
  }
1304
1501
  if (rc) {
1305
1502
  // ok, so turns out there are some child host elements
@@ -1311,7 +1508,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1311
1508
  endRender();
1312
1509
  endUpdate();
1313
1510
  {
1314
- const childrenPromises = elm['s-p'];
1511
+ const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1315
1512
  const postUpdate = () => postUpdateComponent(hostRef);
1316
1513
  if (childrenPromises.length === 0) {
1317
1514
  postUpdate();
@@ -1323,7 +1520,19 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1323
1520
  }
1324
1521
  }
1325
1522
  };
1326
- const callRender = (hostRef, instance, elm) => {
1523
+ /**
1524
+ * Handle making the call to the VDom renderer with the proper context given
1525
+ * various build variables
1526
+ *
1527
+ * @param hostRef an object containing references to the element's host node,
1528
+ * VDom nodes, and other metadata
1529
+ * @param instance a reference to the underlying host element where it will be
1530
+ * rendered
1531
+ * @param elm the Host element for the component
1532
+ * @param isInitialLoad whether or not this function is being called as part of
1533
+ * @returns an empty promise
1534
+ */
1535
+ const callRender = (hostRef, instance, elm, isInitialLoad) => {
1327
1536
  try {
1328
1537
  instance = instance.render && instance.render();
1329
1538
  {
@@ -1338,7 +1547,7 @@ const callRender = (hostRef, instance, elm) => {
1338
1547
  // or we need to update the css class/attrs on the host element
1339
1548
  // DOM WRITE!
1340
1549
  {
1341
- renderVdom(hostRef, instance);
1550
+ renderVdom(hostRef, instance, isInitialLoad);
1342
1551
  }
1343
1552
  }
1344
1553
  }
@@ -1418,9 +1627,6 @@ const safeCall = (instance, method, arg) => {
1418
1627
  }
1419
1628
  return undefined;
1420
1629
  };
1421
- const then = (promise, thenFn) => {
1422
- return promise && promise.then ? promise.then(thenFn) : thenFn();
1423
- };
1424
1630
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1425
1631
  ;
1426
1632
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
@@ -1477,6 +1683,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1477
1683
  * @returns a reference to the same constructor passed in (but now mutated)
1478
1684
  */
1479
1685
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1686
+ var _a;
1480
1687
  if (cmpMeta.$members$) {
1481
1688
  if (Cstr.watchers) {
1482
1689
  cmpMeta.$watchers$ = Cstr.watchers;
@@ -1514,7 +1721,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1514
1721
  });
1515
1722
  if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1516
1723
  const attrNameToPropName = new Map();
1517
- prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1724
+ prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1518
1725
  plt.jmp(() => {
1519
1726
  const propName = attrNameToPropName.get(attrName);
1520
1727
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
@@ -1537,12 +1744,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1537
1744
  // customElements.define('my-component', MyComponent);
1538
1745
  // </script>
1539
1746
  // ```
1540
- // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1747
+ // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
1541
1748
  // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1542
1749
  // to the value that was set inline i.e. "some-value" from above example. When
1543
- // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1750
+ // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
1544
1751
  //
1545
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1752
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
1546
1753
  // by connectedCallback as this attributeChangedCallback will not fire.
1547
1754
  //
1548
1755
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
@@ -1562,21 +1769,49 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1562
1769
  // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1563
1770
  return;
1564
1771
  }
1772
+ else if (propName == null) {
1773
+ // At this point we should know this is not a "member", so we can treat it like watching an attribute
1774
+ // on a vanilla web component
1775
+ const hostRef = getHostRef(this);
1776
+ const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
1777
+ // We only want to trigger the callback(s) if:
1778
+ // 1. The instance is ready
1779
+ // 2. The watchers are ready
1780
+ // 3. The value has changed
1781
+ if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1782
+ flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1783
+ newValue !== oldValue) {
1784
+ const instance = hostRef.$lazyInstance$ ;
1785
+ const entry = cmpMeta.$watchers$[attrName];
1786
+ entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1787
+ if (instance[callbackName] != null) {
1788
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
1789
+ }
1790
+ });
1791
+ }
1792
+ return;
1793
+ }
1565
1794
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1566
1795
  });
1567
1796
  };
1568
- // create an array of attributes to observe
1569
- // and also create a map of html attribute name to js property name
1570
- Cstr.observedAttributes = members
1571
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1572
- .map(([propName, m]) => {
1573
- const attrName = m[1] || propName;
1574
- attrNameToPropName.set(attrName, propName);
1575
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1576
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
1577
- }
1578
- return attrName;
1579
- });
1797
+ // Create an array of attributes to observe
1798
+ // This list in comprised of all strings used within a `@Watch()` decorator
1799
+ // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1800
+ // As such, there is no way to guarantee type-safety here that a user hasn't entered
1801
+ // an invalid attribute.
1802
+ Cstr.observedAttributes = Array.from(new Set([
1803
+ ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1804
+ ...members
1805
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1806
+ .map(([propName, m]) => {
1807
+ const attrName = m[1] || propName;
1808
+ attrNameToPropName.set(attrName, propName);
1809
+ if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1810
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1811
+ }
1812
+ return attrName;
1813
+ }),
1814
+ ]));
1580
1815
  }
1581
1816
  }
1582
1817
  return Cstr;
@@ -1584,9 +1819,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1584
1819
  const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1585
1820
  // initializeComponent
1586
1821
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1822
+ // Let the runtime know that the component has been initialized
1823
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1587
1824
  {
1588
- // we haven't initialized this element yet
1589
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1590
1825
  // lazy loaded components
1591
1826
  // request the component's implementation to be
1592
1827
  // wired up with the host element
@@ -1659,6 +1894,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1659
1894
  schedule();
1660
1895
  }
1661
1896
  };
1897
+ const fireConnectedCallback = (instance) => {
1898
+ };
1662
1899
  const connectedCallback = (elm) => {
1663
1900
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1664
1901
  const hostRef = getHostRef(elm);
@@ -1672,7 +1909,8 @@ const connectedCallback = (elm) => {
1672
1909
  // if the slot polyfill is required we'll need to put some nodes
1673
1910
  // in here to act as original content anchors as we move nodes around
1674
1911
  // host element has been connected to the DOM
1675
- if ((cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
1912
+ if ((// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
1913
+ cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
1676
1914
  setContentReference(elm);
1677
1915
  }
1678
1916
  }
@@ -1711,6 +1949,11 @@ const connectedCallback = (elm) => {
1711
1949
  // reattach any event listeners to the host
1712
1950
  // since they would have been removed when disconnected
1713
1951
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1952
+ // fire off connectedCallback() on component instance
1953
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1954
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1955
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1956
+ }
1714
1957
  }
1715
1958
  endConnected();
1716
1959
  }
@@ -1726,18 +1969,25 @@ const setContentReference = (elm) => {
1726
1969
  contentRefElm['s-cn'] = true;
1727
1970
  elm.insertBefore(contentRefElm, elm.firstChild);
1728
1971
  };
1729
- const disconnectedCallback = (elm) => {
1972
+ const disconnectInstance = (instance) => {
1973
+ {
1974
+ safeCall(instance, 'disconnectedCallback');
1975
+ }
1976
+ };
1977
+ const disconnectedCallback = async (elm) => {
1730
1978
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1731
1979
  const hostRef = getHostRef(elm);
1732
- const instance = hostRef.$lazyInstance$ ;
1733
1980
  {
1734
1981
  if (hostRef.$rmListeners$) {
1735
1982
  hostRef.$rmListeners$.map((rmListener) => rmListener());
1736
1983
  hostRef.$rmListeners$ = undefined;
1737
1984
  }
1738
1985
  }
1739
- {
1740
- safeCall(instance, 'disconnectedCallback');
1986
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
1987
+ disconnectInstance(hostRef.$lazyInstance$);
1988
+ }
1989
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1990
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1741
1991
  }
1742
1992
  }
1743
1993
  };
@@ -1757,6 +2007,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1757
2007
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1758
2008
  lazyBundles.map((lazyBundle) => {
1759
2009
  lazyBundle[1].map((compactMeta) => {
2010
+ var _a;
1760
2011
  const cmpMeta = {
1761
2012
  $flags$: compactMeta[0],
1762
2013
  $tagName$: compactMeta[1],
@@ -1773,7 +2024,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1773
2024
  cmpMeta.$attrsToReflect$ = [];
1774
2025
  }
1775
2026
  {
1776
- cmpMeta.$watchers$ = {};
2027
+ cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
1777
2028
  }
1778
2029
  const tagName = cmpMeta.$tagName$;
1779
2030
  const HostElement = class extends HTMLElement {
@@ -1997,3 +2248,5 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1997
2248
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1998
2249
 
1999
2250
  export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2251
+
2252
+ //# sourceMappingURL=index-ce01e63b.js.map