bromcom-ui 2.7.37-rc.0 → 2.7.37-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (704) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/{p-0e480b7b.entry.js → p-02892da0.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-802362ce.entry.js → p-043f3a0d.entry.js} +1 -1
  5. package/dist/bromcom-ui/p-053962ad.entry.js +5 -0
  6. package/dist/bromcom-ui/{p-28e5998b.entry.js → p-0aec8d73.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-1a12fbd0.entry.js → p-0cd7e628.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-0ba73c30.js → p-10caf4ce.js} +1 -1
  9. package/dist/bromcom-ui/{p-384aea58.entry.js → p-13ed55a9.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-b79132b8.entry.js → p-1507f99a.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-83317635.entry.js → p-151d7bec.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-b83dab76.entry.js → p-1a7873c8.entry.js} +1 -1
  13. package/dist/bromcom-ui/p-1dab0ebb.entry.js +5 -0
  14. package/dist/bromcom-ui/{p-4a6777c5.entry.js → p-27d06f30.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-d61b862f.entry.js → p-2806e672.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-6fe3bfd9.entry.js → p-2b332236.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-e4c6d517.entry.js → p-2b346de3.entry.js} +1 -1
  18. package/dist/bromcom-ui/p-2b479251.entry.js +5 -0
  19. package/dist/bromcom-ui/{p-a0a34ab8.entry.js → p-2b7cb17c.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-8631b9b1.entry.js → p-2b91dab0.entry.js} +1 -1
  21. package/dist/bromcom-ui/p-2cca68b4.js +5 -0
  22. package/dist/bromcom-ui/p-2cfa8d1a.js +5 -0
  23. package/dist/bromcom-ui/{p-f164100f.entry.js → p-3455ec3e.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-20fc8571.entry.js → p-34b815f5.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-ad780428.entry.js → p-355e259c.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-154c6135.entry.js → p-35bd1307.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-867ae7b5.entry.js → p-405441b2.entry.js} +1 -1
  28. package/dist/bromcom-ui/p-40aeceda.entry.js +5 -0
  29. package/dist/bromcom-ui/{p-1fed2eec.entry.js → p-41f2ef93.entry.js} +1 -1
  30. package/dist/bromcom-ui/p-444235f5.js +5 -0
  31. package/dist/bromcom-ui/{p-128a5956.js → p-4be4c5bf.js} +1 -1
  32. package/dist/bromcom-ui/p-4c75beb3.entry.js +5 -0
  33. package/dist/bromcom-ui/p-4e0c990d.js +5 -0
  34. package/dist/bromcom-ui/{p-e204cc98.js → p-4f99361a.js} +1 -1
  35. package/dist/bromcom-ui/{p-567d720b.entry.js → p-50c7a3cd.entry.js} +1 -1
  36. package/dist/bromcom-ui/p-522c96a2.js +5 -0
  37. package/dist/bromcom-ui/{p-77206708.entry.js → p-573647ab.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-7fad995d.entry.js → p-591b3100.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-7d45b5b1.entry.js → p-60cee147.entry.js} +1 -1
  40. package/dist/bromcom-ui/{p-c7b9b694.entry.js → p-640244fa.entry.js} +1 -1
  41. package/dist/bromcom-ui/p-6ad01d01.entry.js +5 -0
  42. package/dist/bromcom-ui/{p-173ebc98.entry.js → p-6c7eb43f.entry.js} +1 -1
  43. package/dist/bromcom-ui/{p-5d5c3b9d.entry.js → p-6caa9460.entry.js} +1 -1
  44. package/dist/bromcom-ui/p-705d248e.entry.js +5 -0
  45. package/dist/bromcom-ui/{p-9ecacdbb.entry.js → p-751c94dd.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-5c86edbe.entry.js → p-75a92b4c.entry.js} +1 -1
  47. package/dist/bromcom-ui/p-75f864ae.entry.js +5 -0
  48. package/dist/bromcom-ui/{p-e6877526.entry.js → p-78d48636.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-1c525c05.entry.js → p-7f065a45.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-2a3a7d9c.entry.js → p-8255f60a.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-44b40c51.entry.js → p-8595742c.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-53a811a5.js → p-8b72bce1.js} +1 -1
  53. package/dist/bromcom-ui/{p-8ede9b12.js → p-93010f03.js} +1 -1
  54. package/dist/bromcom-ui/{p-a876e0ac.entry.js → p-9a78235b.entry.js} +1 -1
  55. package/dist/bromcom-ui/p-9efe118a.entry.js +5 -0
  56. package/dist/bromcom-ui/p-a1c849e7.js +5 -0
  57. package/dist/bromcom-ui/p-a63ba9a2.entry.js +5 -0
  58. package/dist/bromcom-ui/{p-60a735c3.entry.js → p-a8073fed.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-21263f24.entry.js → p-a98aecdf.entry.js} +1 -1
  60. package/dist/bromcom-ui/p-af93c8e6.entry.js +5 -0
  61. package/dist/bromcom-ui/p-b265dd24.entry.js +5 -0
  62. package/dist/bromcom-ui/{p-45903f79.entry.js → p-b2bae44d.entry.js} +1 -1
  63. package/dist/bromcom-ui/{p-0843de18.entry.js → p-b2ea4774.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-04b3a72c.entry.js → p-b3a57653.entry.js} +1 -1
  65. package/dist/bromcom-ui/p-b47e5352.entry.js +5 -0
  66. package/dist/bromcom-ui/{p-dbc48ab6.entry.js → p-b4cbf3bd.entry.js} +1 -1
  67. package/dist/bromcom-ui/{p-e3306b8d.entry.js → p-b9983e4b.entry.js} +1 -1
  68. package/dist/bromcom-ui/{p-6c040eb8.js → p-bc868e9e.js} +1 -1
  69. package/dist/bromcom-ui/{p-12c97616.entry.js → p-bf30bf7f.entry.js} +1 -1
  70. package/dist/bromcom-ui/{p-b1f8a594.entry.js → p-c9a20860.entry.js} +1 -1
  71. package/dist/bromcom-ui/{p-20e22beb.js → p-cd0490e2.js} +1 -1
  72. package/dist/bromcom-ui/{p-fa3d2e70.entry.js → p-d87118f3.entry.js} +1 -1
  73. package/dist/bromcom-ui/p-d8f95e30.entry.js +5 -0
  74. package/dist/bromcom-ui/{p-ebadb877.entry.js → p-d9fb53c9.entry.js} +1 -1
  75. package/dist/bromcom-ui/{p-c627dc35.entry.js → p-db11376b.entry.js} +1 -1
  76. package/dist/bromcom-ui/p-dbb106a4.entry.js +5 -0
  77. package/dist/bromcom-ui/{p-ac7386a1.entry.js → p-e467d49f.entry.js} +1 -1
  78. package/dist/bromcom-ui/{p-a032169e.entry.js → p-ea4f2618.entry.js} +1 -1
  79. package/dist/bromcom-ui/{p-c0dd4386.entry.js → p-ef923122.entry.js} +1 -1
  80. package/dist/bromcom-ui/{p-5aee47f0.entry.js → p-f1b1bb76.entry.js} +1 -1
  81. package/dist/bromcom-ui/p-f2caf9d3.entry.js +5 -0
  82. package/dist/bromcom-ui/{p-d700ef1c.entry.js → p-f374395b.entry.js} +1 -1
  83. package/dist/bromcom-ui/{p-be904c55.js → p-f9cb7ae4.js} +1 -1
  84. package/dist/bromcom-ui/{p-1b5695a9.entry.js → p-fa42b2de.entry.js} +1 -1
  85. package/dist/bromcom-ui/p-fcaba9dd.entry.js +5 -0
  86. package/dist/bromcom-ui/p-fe3e3210.js +5 -0
  87. package/dist/cjs/_commonjsHelpers-bd20f4c0.js +29 -0
  88. package/dist/cjs/bcm-2c51bf0c.js +448 -0
  89. package/dist/cjs/bcm-accordion.cjs.entry.js +85 -0
  90. package/dist/cjs/bcm-alert.cjs.entry.js +112 -0
  91. package/dist/cjs/bcm-attendance.cjs.entry.js +50 -0
  92. package/dist/cjs/bcm-autocomplete.cjs.entry.js +155 -0
  93. package/dist/cjs/bcm-avatar_2.cjs.entry.js +156 -0
  94. package/dist/cjs/bcm-box.cjs.entry.js +35 -0
  95. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +67 -0
  96. package/dist/cjs/bcm-button-group.cjs.entry.js +102 -0
  97. package/dist/cjs/bcm-button_4.cjs.entry.js +995 -0
  98. package/dist/cjs/bcm-card.cjs.entry.js +76 -0
  99. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +409 -0
  100. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2570 -0
  101. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +203 -0
  102. package/dist/cjs/bcm-chip.cjs.entry.js +70 -0
  103. package/dist/cjs/bcm-collapse-group.cjs.entry.js +57 -0
  104. package/dist/cjs/bcm-collapse.cjs.entry.js +58 -0
  105. package/dist/cjs/bcm-colorpicker.cjs.entry.js +433 -0
  106. package/dist/cjs/bcm-date-picker.cjs.entry.js +171 -0
  107. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1432 -0
  108. package/dist/cjs/bcm-default.cjs.entry.js +40 -0
  109. package/dist/cjs/bcm-drawer.cjs.entry.js +111 -0
  110. package/dist/cjs/bcm-dropdown.cjs.entry.js +239 -0
  111. package/dist/cjs/bcm-error-layout.cjs.entry.js +78 -0
  112. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +127 -0
  113. package/dist/cjs/bcm-form-2.cjs.entry.js +206 -0
  114. package/dist/cjs/bcm-form-group.cjs.entry.js +45 -0
  115. package/dist/cjs/bcm-input.cjs.entry.js +325 -0
  116. package/dist/cjs/bcm-item.cjs.entry.js +83 -0
  117. package/dist/cjs/bcm-items.cjs.entry.js +61 -0
  118. package/dist/cjs/bcm-label_2.cjs.entry.js +119 -0
  119. package/dist/cjs/bcm-link.cjs.entry.js +62 -0
  120. package/dist/cjs/bcm-linked.cjs.entry.js +179 -0
  121. package/dist/cjs/bcm-list.cjs.entry.js +1768 -0
  122. package/dist/cjs/bcm-menu.cjs.entry.js +248 -0
  123. package/dist/cjs/bcm-message.cjs.entry.js +99 -0
  124. package/dist/cjs/bcm-notification.cjs.entry.js +103 -0
  125. package/dist/cjs/bcm-old-input.cjs.entry.js +398 -0
  126. package/dist/cjs/bcm-old-tag_2.cjs.entry.js +157 -0
  127. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +122 -0
  128. package/dist/cjs/bcm-popconfirm.cjs.entry.js +112 -0
  129. package/dist/cjs/bcm-popover.cjs.entry.js +182 -0
  130. package/dist/cjs/bcm-progress.cjs.entry.js +174 -0
  131. package/dist/cjs/bcm-radio-group.cjs.entry.js +267 -0
  132. package/dist/cjs/bcm-radio.cjs.entry.js +104 -0
  133. package/dist/cjs/bcm-range.cjs.entry.js +189 -0
  134. package/dist/cjs/bcm-result.cjs.entry.js +79 -0
  135. package/dist/cjs/bcm-search.cjs.entry.js +256 -0
  136. package/dist/cjs/bcm-select-group.cjs.entry.js +31 -0
  137. package/dist/cjs/bcm-select-option.cjs.entry.js +37 -0
  138. package/dist/cjs/bcm-select.cjs.entry.js +1198 -0
  139. package/dist/cjs/bcm-skeleton.cjs.entry.js +56 -0
  140. package/dist/cjs/bcm-step.cjs.entry.js +93 -0
  141. package/dist/cjs/bcm-stepper.cjs.entry.js +211 -0
  142. package/dist/cjs/bcm-switch.cjs.entry.js +139 -0
  143. package/dist/cjs/bcm-tab-group.cjs.entry.js +172 -0
  144. package/dist/cjs/bcm-tab-pane.cjs.entry.js +70 -0
  145. package/dist/cjs/bcm-tab.cjs.entry.js +89 -0
  146. package/dist/cjs/bcm-table.cjs.entry.js +78 -0
  147. package/dist/cjs/bcm-tabs-content.cjs.entry.js +62 -0
  148. package/dist/cjs/bcm-tabs.cjs.entry.js +390 -0
  149. package/dist/cjs/bcm-tag.cjs.entry.js +101 -0
  150. package/dist/cjs/bcm-text.cjs.entry.js +60 -0
  151. package/dist/cjs/bcm-textarea.cjs.entry.js +150 -0
  152. package/dist/cjs/bcm-time-picker.cjs.entry.js +139 -0
  153. package/dist/cjs/bcm-timeline-item.cjs.entry.js +55 -0
  154. package/dist/cjs/bcm-timeline.cjs.entry.js +73 -0
  155. package/dist/cjs/bcm-treeview-group.cjs.entry.js +23 -0
  156. package/dist/cjs/bromcom-ui.cjs.js +24 -0
  157. package/dist/cjs/caption-template-954d34bc.js +34 -0
  158. package/dist/cjs/color-helper-c9882bd8.js +490 -0
  159. package/dist/cjs/colors-56282b00.js +224 -0
  160. package/dist/cjs/datetime-helper-eaf4fadb.js +11 -0
  161. package/dist/cjs/element-dragger-a8562f82.js +279 -0
  162. package/dist/cjs/floating-ui-dae608ba.js +1455 -0
  163. package/dist/cjs/generate-716a328d.js +203 -0
  164. package/dist/cjs/global-b0d21446.js +15 -0
  165. package/dist/cjs/index-9d98aa56.js +1864 -0
  166. package/dist/cjs/index-a2b50e51.js +64 -0
  167. package/dist/cjs/index-f8547ecd.js +193 -0
  168. package/dist/cjs/index.cjs.js +6 -0
  169. package/dist/cjs/input-template-4747050f.js +86 -0
  170. package/dist/cjs/is-load-decorator-65755a67.js +56 -0
  171. package/dist/cjs/json-parse-decarator-b8a37140.js +40 -0
  172. package/dist/cjs/label-template-1ed6a569.js +23 -0
  173. package/dist/cjs/loader.cjs.js +26 -0
  174. package/dist/cjs/number-helper-e62c32d5.js +20 -0
  175. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +161 -0
  176. package/dist/cjs/old-bcm-popover.cjs.entry.js +104 -0
  177. package/dist/cjs/popover-placement-87901bb3.js +98 -0
  178. package/dist/cjs/property-decorators-cb2155ed.js +33 -0
  179. package/dist/cjs/slot-template-2ff0d22a.js +15 -0
  180. package/dist/cjs/stepper-states-1be09180.js +83 -0
  181. package/dist/cjs/string-helper-df40a475.js +134 -0
  182. package/dist/cjs/tooltip-helper-a192b748.js +104 -0
  183. package/dist/cjs/types-3871235f.js +32 -0
  184. package/dist/cjs/types-6eb7e028.js +32 -0
  185. package/dist/cjs/types-cc4adee7.js +19 -0
  186. package/dist/cjs/utils-fc077139.js +131 -0
  187. package/dist/cjs/validators-8f5537d4.js +33 -0
  188. package/dist/collection/collection-manifest.json +95 -0
  189. package/dist/collection/components/atoms/avatar/avatar.css +448 -0
  190. package/dist/collection/components/atoms/avatar/avatar.js +259 -0
  191. package/dist/collection/components/atoms/badge/badge.css +481 -0
  192. package/dist/collection/components/atoms/badge/badge.js +224 -0
  193. package/dist/collection/components/atoms/box/box.js +23 -0
  194. package/dist/collection/components/atoms/button/button.css +637 -0
  195. package/dist/collection/components/atoms/button/button.js +525 -0
  196. package/dist/collection/components/atoms/button/types.js +170 -0
  197. package/dist/collection/components/atoms/chip/chip.css +453 -0
  198. package/dist/collection/components/atoms/chip/chip.js +187 -0
  199. package/dist/collection/components/atoms/divider/divider.css +142 -0
  200. package/dist/collection/components/atoms/divider/divider.js +83 -0
  201. package/dist/collection/components/atoms/icon/icon.css +127 -0
  202. package/dist/collection/components/atoms/icon/icon.js +70 -0
  203. package/dist/collection/components/atoms/label/label.css +408 -0
  204. package/dist/collection/components/atoms/label/label.js +216 -0
  205. package/dist/collection/components/atoms/link/link.css +419 -0
  206. package/dist/collection/components/atoms/link/link.js +176 -0
  207. package/dist/collection/components/atoms/states/button.states.js +31 -0
  208. package/dist/collection/components/atoms/tag/tag.js +334 -0
  209. package/dist/collection/components/atoms/tag/types.js +30 -0
  210. package/dist/collection/components/atoms/typography/typography.js +23 -0
  211. package/dist/collection/components/molecules/accordion/accordion.css +127 -0
  212. package/dist/collection/components/molecules/accordion/accordion.js +129 -0
  213. package/dist/collection/components/molecules/alert/alert.css +191 -0
  214. package/dist/collection/components/molecules/alert/alert.js +298 -0
  215. package/dist/collection/components/molecules/alert/types.js +23 -0
  216. package/dist/collection/components/molecules/breadcrumb/breadcrumb.css +201 -0
  217. package/dist/collection/components/molecules/breadcrumb/breadcrumb.js +155 -0
  218. package/dist/collection/components/molecules/breadcrumb/types.js +5 -0
  219. package/dist/collection/components/molecules/button-group/button-group.css +423 -0
  220. package/dist/collection/components/molecules/button-group/button-group.js +235 -0
  221. package/dist/collection/components/molecules/card/card.css +408 -0
  222. package/dist/collection/components/molecules/card/card.js +128 -0
  223. package/dist/collection/components/molecules/checkbox/checkbox-lite.js +237 -0
  224. package/dist/collection/components/molecules/checkbox/checkbox.css +1280 -0
  225. package/dist/collection/components/molecules/checkbox/checkbox.js +688 -0
  226. package/dist/collection/components/molecules/checkbox/group.css +156 -0
  227. package/dist/collection/components/molecules/checkbox/group.js +779 -0
  228. package/dist/collection/components/molecules/drawer/drawer.css +502 -0
  229. package/dist/collection/components/molecules/drawer/drawer.js +272 -0
  230. package/dist/collection/components/molecules/dropdown/dropdown.css +419 -0
  231. package/dist/collection/components/molecules/dropdown/dropdown.js +857 -0
  232. package/dist/collection/components/molecules/empty/empty.js +44 -0
  233. package/dist/collection/components/molecules/error-layout/error-layout.css +396 -0
  234. package/dist/collection/components/molecules/error-layout/error-layout.js +177 -0
  235. package/dist/collection/components/molecules/error-layout/types.js +5 -0
  236. package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +488 -0
  237. package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +322 -0
  238. package/dist/collection/components/molecules/input/input.css +1208 -0
  239. package/dist/collection/components/molecules/input/input.js +1171 -0
  240. package/dist/collection/components/molecules/input/types.js +17 -0
  241. package/dist/collection/components/molecules/item/item.css +446 -0
  242. package/dist/collection/components/molecules/item/item.js +151 -0
  243. package/dist/collection/components/molecules/items/items.js +84 -0
  244. package/dist/collection/components/molecules/linked/linked.js +410 -0
  245. package/dist/collection/components/molecules/menu/menu.css +718 -0
  246. package/dist/collection/components/molecules/menu/menu.js +623 -0
  247. package/dist/collection/components/molecules/message/message.css +165 -0
  248. package/dist/collection/components/molecules/message/message.js +222 -0
  249. package/dist/collection/components/molecules/message/types.js +14 -0
  250. package/dist/collection/components/molecules/modal/modal.css +526 -0
  251. package/dist/collection/components/molecules/modal/modal.js +379 -0
  252. package/dist/collection/components/molecules/notification/notification.css +183 -0
  253. package/dist/collection/components/molecules/notification/notification.js +244 -0
  254. package/dist/collection/components/molecules/notification/types.js +15 -0
  255. package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +563 -0
  256. package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +396 -0
  257. package/dist/collection/components/molecules/popconfirm/popconfirm.css +127 -0
  258. package/dist/collection/components/molecules/popconfirm/popconfirm.js +382 -0
  259. package/dist/collection/components/molecules/popover/popover.js +254 -0
  260. package/dist/collection/components/molecules/progress/progress.css +486 -0
  261. package/dist/collection/components/molecules/progress/progress.js +404 -0
  262. package/dist/collection/components/molecules/progress/types.js +28 -0
  263. package/dist/collection/components/molecules/radio/group.css +798 -0
  264. package/dist/collection/components/molecules/radio/group.js +652 -0
  265. package/dist/collection/components/molecules/radio/radio.css +1280 -0
  266. package/dist/collection/components/molecules/radio/radio.js +291 -0
  267. package/dist/collection/components/molecules/radio/types.js +30 -0
  268. package/dist/collection/components/molecules/range/range.css +570 -0
  269. package/dist/collection/components/molecules/range/range.js +472 -0
  270. package/dist/collection/components/molecules/result/result.css +164 -0
  271. package/dist/collection/components/molecules/result/result.js +143 -0
  272. package/dist/collection/components/molecules/result/types.js +22 -0
  273. package/dist/collection/components/molecules/search/search.css +1208 -0
  274. package/dist/collection/components/molecules/search/search.js +406 -0
  275. package/dist/collection/components/molecules/skeleton/skeleton.js +94 -0
  276. package/dist/collection/components/molecules/states/alert.states.js +25 -0
  277. package/dist/collection/components/molecules/states/checkbox-group.states.js +199 -0
  278. package/dist/collection/components/molecules/states/radio-group.states.js +107 -0
  279. package/dist/collection/components/molecules/states/search.states.js +137 -0
  280. package/dist/collection/components/molecules/states/stepper-states.js +79 -0
  281. package/dist/collection/components/molecules/stepper/step.js +346 -0
  282. package/dist/collection/components/molecules/stepper/stepper.css +617 -0
  283. package/dist/collection/components/molecules/stepper/stepper.js +484 -0
  284. package/dist/collection/components/molecules/switch/switch.css +1272 -0
  285. package/dist/collection/components/molecules/switch/switch.js +716 -0
  286. package/dist/collection/components/molecules/tab-group/tab-group.js +280 -0
  287. package/dist/collection/components/molecules/textarea/textarea.css +1208 -0
  288. package/dist/collection/components/molecules/textarea/textarea.js +731 -0
  289. package/dist/collection/components/molecules/textarea/types.js +13 -0
  290. package/dist/collection/components/molecules/timeline/timeline-item.css +254 -0
  291. package/dist/collection/components/molecules/timeline/timeline-item.js +159 -0
  292. package/dist/collection/components/molecules/timeline/timeline.css +205 -0
  293. package/dist/collection/components/molecules/timeline/timeline.js +125 -0
  294. package/dist/collection/components/molecules/tooltip/tooltip.js +232 -0
  295. package/dist/collection/components/organism/autocomplete/autocomplete.css +168 -0
  296. package/dist/collection/components/organism/autocomplete/autocomplete.js +399 -0
  297. package/dist/collection/components/organism/colorpicker/colorpicker.css +313 -0
  298. package/dist/collection/components/organism/colorpicker/colorpicker.js +774 -0
  299. package/dist/collection/components/organism/colorpicker/static/chess.png +0 -0
  300. package/dist/collection/components/organism/colorpicker/static/color.svg +14 -0
  301. package/dist/collection/components/organism/colorpicker/static/colors.svg +16 -0
  302. package/dist/collection/components/organism/date-picker/date-picker.css +141 -0
  303. package/dist/collection/components/organism/date-picker/date-picker.js +780 -0
  304. package/dist/collection/components/organism/datetime-picker/datetime-picker.css +1429 -0
  305. package/dist/collection/components/organism/datetime-picker/datetime-picker.js +2166 -0
  306. package/dist/collection/components/organism/datetime-picker/types.js +39 -0
  307. package/dist/collection/components/organism/form/form-group.css +131 -0
  308. package/dist/collection/components/organism/form/form-group.js +131 -0
  309. package/dist/collection/components/organism/form/form.css +132 -0
  310. package/dist/collection/components/organism/form/form.js +680 -0
  311. package/dist/collection/components/organism/form-2/bcm-form-components.js +26 -0
  312. package/dist/collection/components/organism/form-2/form-2.css +127 -0
  313. package/dist/collection/components/organism/form-2/form-2.js +329 -0
  314. package/dist/collection/components/organism/list/list-key-control.js +125 -0
  315. package/dist/collection/components/organism/list/list-tag-control.js +172 -0
  316. package/dist/collection/components/organism/list/list.css +2047 -0
  317. package/dist/collection/components/organism/list/list.js +1894 -0
  318. package/dist/collection/components/organism/states/bcm-list2.states.js +532 -0
  319. package/dist/collection/components/organism/time-picker/time-picker.css +141 -0
  320. package/dist/collection/components/organism/time-picker/time-picker.js +627 -0
  321. package/dist/collection/components/other/attendance/attendance.css +433 -0
  322. package/dist/collection/components/other/attendance/attendance.js +87 -0
  323. package/dist/collection/components/other/data-table/table.css +130 -0
  324. package/dist/collection/components/other/data-table/table.js +92 -0
  325. package/dist/collection/components/other/default/default.css +127 -0
  326. package/dist/collection/components/other/default/default.js +54 -0
  327. package/dist/collection/components/other_deprecated/collapse/collapse.css +177 -0
  328. package/dist/collection/components/other_deprecated/collapse/collapse.js +163 -0
  329. package/dist/collection/components/other_deprecated/collapse/group.js +128 -0
  330. package/dist/collection/components/other_deprecated/listbox/listbox-group.css +139 -0
  331. package/dist/collection/components/other_deprecated/listbox/listbox-group.js +93 -0
  332. package/dist/collection/components/other_deprecated/listbox/listbox-item.css +269 -0
  333. package/dist/collection/components/other_deprecated/listbox/listbox-item.js +641 -0
  334. package/dist/collection/components/other_deprecated/listbox/listbox.css +365 -0
  335. package/dist/collection/components/other_deprecated/listbox/listbox.js +1999 -0
  336. package/dist/collection/components/other_deprecated/listbox/types.js +11 -0
  337. package/dist/collection/components/other_deprecated/old-input/old-input.css +1360 -0
  338. package/dist/collection/components/other_deprecated/old-input/old-input.js +1154 -0
  339. package/dist/collection/components/other_deprecated/old-input/types.js +17 -0
  340. package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +582 -0
  341. package/dist/collection/components/other_deprecated/old-popover/old-popover-box.js +422 -0
  342. package/dist/collection/components/other_deprecated/old-popover/old-popover.css +127 -0
  343. package/dist/collection/components/other_deprecated/old-popover/old-popover.js +296 -0
  344. package/dist/collection/components/other_deprecated/old-search/old-search.css +131 -0
  345. package/dist/collection/components/other_deprecated/old-search/old-search.js +496 -0
  346. package/dist/collection/components/other_deprecated/old-tag/old-tag.css +305 -0
  347. package/dist/collection/components/other_deprecated/old-tag/old-tag.js +326 -0
  348. package/dist/collection/components/other_deprecated/old-tag/types.js +30 -0
  349. package/dist/collection/components/other_deprecated/select/group.css +144 -0
  350. package/dist/collection/components/other_deprecated/select/group.js +88 -0
  351. package/dist/collection/components/other_deprecated/select/option.css +164 -0
  352. package/dist/collection/components/other_deprecated/select/option.js +142 -0
  353. package/dist/collection/components/other_deprecated/select/select-box.css +143 -0
  354. package/dist/collection/components/other_deprecated/select/select-box.js +104 -0
  355. package/dist/collection/components/other_deprecated/select/select.css +364 -0
  356. package/dist/collection/components/other_deprecated/select/select.js +2281 -0
  357. package/dist/collection/components/other_deprecated/tabs/tab-pane.css +142 -0
  358. package/dist/collection/components/other_deprecated/tabs/tab-pane.js +168 -0
  359. package/dist/collection/components/other_deprecated/tabs/tab.css +587 -0
  360. package/dist/collection/components/other_deprecated/tabs/tab.js +303 -0
  361. package/dist/collection/components/other_deprecated/tabs/tabs-content.css +136 -0
  362. package/dist/collection/components/other_deprecated/tabs/tabs-content.js +147 -0
  363. package/dist/collection/components/other_deprecated/tabs/tabs.css +212 -0
  364. package/dist/collection/components/other_deprecated/tabs/tabs.js +806 -0
  365. package/dist/collection/components/other_deprecated/tabs/types.js +30 -0
  366. package/dist/collection/components/other_deprecated/text/text.css +429 -0
  367. package/dist/collection/components/other_deprecated/text/text.js +159 -0
  368. package/dist/collection/components/other_deprecated/treeview/treeview-group.css +0 -0
  369. package/dist/collection/components/other_deprecated/treeview/treeview-group.js +18 -0
  370. package/dist/collection/components/other_deprecated/treeview/treeview-item.css +318 -0
  371. package/dist/collection/components/other_deprecated/treeview/treeview-item.js +977 -0
  372. package/dist/collection/components/other_deprecated/treeview/treeview.css +190 -0
  373. package/dist/collection/components/other_deprecated/treeview/treeview.js +1699 -0
  374. package/dist/collection/components/other_deprecated/treeview/types.js +11 -0
  375. package/dist/collection/decorators/id-decorator.js +18 -0
  376. package/dist/collection/decorators/index.js +8 -0
  377. package/dist/collection/decorators/is-load-decorator.js +51 -0
  378. package/dist/collection/decorators/json-parse-decarator.js +35 -0
  379. package/dist/collection/decorators/property-decorators.js +28 -0
  380. package/dist/collection/global/components/_checkbox.css +627 -0
  381. package/dist/collection/global/config.js +45 -0
  382. package/dist/collection/global/global.js +43 -0
  383. package/dist/collection/global/variables/colors.js +220 -0
  384. package/dist/collection/helper/color-helper.js +81 -0
  385. package/dist/collection/helper/datetime-helper.js +7 -0
  386. package/dist/collection/helper/generate.js +168 -0
  387. package/dist/collection/helper/index.js +12 -0
  388. package/dist/collection/helper/number-helper.js +15 -0
  389. package/dist/collection/helper/popover-helper.js +106 -0
  390. package/dist/collection/helper/string-helper.js +65 -0
  391. package/dist/collection/helper/tooltip-helper.js +95 -0
  392. package/dist/collection/helper/validators.js +28 -0
  393. package/dist/collection/index.js +5 -0
  394. package/dist/collection/models/abstract-classes/abstract-key-control.js +97 -0
  395. package/dist/collection/models/bcm-types.js +5 -0
  396. package/dist/collection/models/bcm.js +466 -0
  397. package/dist/collection/models/index.js +6 -0
  398. package/dist/collection/models/states/atoms/bcm-atoms-state.js +5 -0
  399. package/dist/collection/models/states/molecules/bcm-molecules-state.js +5 -0
  400. package/dist/collection/models/states/organisms/bcm-organisms-state.js +5 -0
  401. package/dist/collection/templates/button-template.js +22 -0
  402. package/dist/collection/templates/caption-template.js +29 -0
  403. package/dist/collection/templates/checkbox-group-template.js +10 -0
  404. package/dist/collection/templates/checkbox-template.js +31 -0
  405. package/dist/collection/templates/icon-template.js +24 -0
  406. package/dist/collection/templates/index.js +17 -0
  407. package/dist/collection/templates/info-footer-template.js +16 -0
  408. package/dist/collection/templates/input-template.js +81 -0
  409. package/dist/collection/templates/label-template.js +18 -0
  410. package/dist/collection/templates/list-item-template.js +58 -0
  411. package/dist/collection/templates/list-template.js +24 -0
  412. package/dist/collection/templates/slot-template.js +10 -0
  413. package/dist/collection/templates/step-template.js +26 -0
  414. package/dist/collection/templates/tag-template.js +45 -0
  415. package/dist/collection/types/index.js +5 -0
  416. package/dist/collection/utils/element-dragger.js +274 -0
  417. package/dist/collection/utils/floating-ui.js +95 -0
  418. package/dist/collection/utils/index.js +9 -0
  419. package/dist/collection/utils/popover-placement.js +96 -0
  420. package/dist/collection/utils/utils.js +223 -0
  421. package/dist/collection/utils/validation.js +47 -0
  422. package/dist/esm/_commonjsHelpers-3016b722.js +25 -0
  423. package/dist/esm/bcm-accordion.entry.js +81 -0
  424. package/dist/esm/bcm-alert.entry.js +108 -0
  425. package/dist/esm/bcm-attendance.entry.js +46 -0
  426. package/dist/esm/bcm-autocomplete.entry.js +151 -0
  427. package/dist/esm/bcm-avatar_2.entry.js +151 -0
  428. package/dist/esm/bcm-b8d8a236.js +446 -0
  429. package/dist/esm/bcm-box.entry.js +31 -0
  430. package/dist/esm/bcm-breadcrumb.entry.js +63 -0
  431. package/dist/esm/bcm-button-group.entry.js +98 -0
  432. package/dist/esm/bcm-button_4.entry.js +988 -0
  433. package/dist/esm/bcm-card.entry.js +72 -0
  434. package/dist/esm/bcm-checkbox-group.entry.js +405 -0
  435. package/dist/esm/bcm-checkbox-lite_9.entry.js +2558 -0
  436. package/dist/esm/bcm-checkbox_2.entry.js +198 -0
  437. package/dist/esm/bcm-chip.entry.js +66 -0
  438. package/dist/esm/bcm-collapse-group.entry.js +53 -0
  439. package/dist/esm/bcm-collapse.entry.js +54 -0
  440. package/dist/esm/bcm-colorpicker.entry.js +429 -0
  441. package/dist/esm/bcm-date-picker.entry.js +167 -0
  442. package/dist/esm/bcm-datetime-picker.entry.js +1428 -0
  443. package/dist/esm/bcm-default.entry.js +36 -0
  444. package/dist/esm/bcm-drawer.entry.js +107 -0
  445. package/dist/esm/bcm-dropdown.entry.js +235 -0
  446. package/dist/esm/bcm-error-layout.entry.js +74 -0
  447. package/dist/esm/bcm-expansion-panel.entry.js +123 -0
  448. package/dist/esm/bcm-form-2.entry.js +202 -0
  449. package/dist/esm/bcm-form-group.entry.js +41 -0
  450. package/dist/esm/bcm-input.entry.js +321 -0
  451. package/dist/esm/bcm-item.entry.js +79 -0
  452. package/dist/esm/bcm-items.entry.js +57 -0
  453. package/dist/esm/bcm-label_2.entry.js +114 -0
  454. package/dist/esm/bcm-link.entry.js +58 -0
  455. package/dist/esm/bcm-linked.entry.js +175 -0
  456. package/dist/esm/bcm-list.entry.js +1764 -0
  457. package/dist/esm/bcm-menu.entry.js +244 -0
  458. package/dist/esm/bcm-message.entry.js +95 -0
  459. package/dist/esm/bcm-notification.entry.js +99 -0
  460. package/dist/esm/bcm-old-input.entry.js +394 -0
  461. package/dist/esm/bcm-old-tag_2.entry.js +152 -0
  462. package/dist/esm/bcm-popconfirm-box.entry.js +118 -0
  463. package/dist/esm/bcm-popconfirm.entry.js +108 -0
  464. package/dist/esm/bcm-popover.entry.js +178 -0
  465. package/dist/esm/bcm-progress.entry.js +170 -0
  466. package/dist/esm/bcm-radio-group.entry.js +263 -0
  467. package/dist/esm/bcm-radio.entry.js +100 -0
  468. package/dist/esm/bcm-range.entry.js +185 -0
  469. package/dist/esm/bcm-result.entry.js +75 -0
  470. package/dist/esm/bcm-search.entry.js +252 -0
  471. package/dist/esm/bcm-select-group.entry.js +27 -0
  472. package/dist/esm/bcm-select-option.entry.js +33 -0
  473. package/dist/esm/bcm-select.entry.js +1194 -0
  474. package/dist/esm/bcm-skeleton.entry.js +52 -0
  475. package/dist/esm/bcm-step.entry.js +89 -0
  476. package/dist/esm/bcm-stepper.entry.js +207 -0
  477. package/dist/esm/bcm-switch.entry.js +135 -0
  478. package/dist/esm/bcm-tab-group.entry.js +168 -0
  479. package/dist/esm/bcm-tab-pane.entry.js +66 -0
  480. package/dist/esm/bcm-tab.entry.js +85 -0
  481. package/dist/esm/bcm-table.entry.js +74 -0
  482. package/dist/esm/bcm-tabs-content.entry.js +58 -0
  483. package/dist/esm/bcm-tabs.entry.js +386 -0
  484. package/dist/esm/bcm-tag.entry.js +97 -0
  485. package/dist/esm/bcm-text.entry.js +56 -0
  486. package/dist/esm/bcm-textarea.entry.js +146 -0
  487. package/dist/esm/bcm-time-picker.entry.js +135 -0
  488. package/dist/esm/bcm-timeline-item.entry.js +51 -0
  489. package/dist/esm/bcm-timeline.entry.js +69 -0
  490. package/dist/esm/bcm-treeview-group.entry.js +19 -0
  491. package/dist/esm/bromcom-ui.js +22 -0
  492. package/dist/esm/caption-template-d54ee0c3.js +32 -0
  493. package/dist/esm/color-helper-7e202fd8.js +488 -0
  494. package/dist/esm/colors-1d7854ea.js +222 -0
  495. package/dist/esm/datetime-helper-df25808a.js +9 -0
  496. package/dist/esm/element-dragger-89bb52fd.js +277 -0
  497. package/dist/esm/floating-ui-f03a96ce.js +1453 -0
  498. package/dist/esm/generate-4e9309bd.js +200 -0
  499. package/dist/esm/global-4fad925b.js +13 -0
  500. package/dist/esm/index-2a3eeccc.js +1833 -0
  501. package/dist/esm/index-6e950253.js +191 -0
  502. package/dist/esm/index-ba2edd32.js +62 -0
  503. package/dist/esm/index.js +4 -0
  504. package/dist/esm/input-template-6a8e4cc6.js +84 -0
  505. package/dist/esm/is-load-decorator-b990575a.js +54 -0
  506. package/dist/esm/json-parse-decarator-87ac1cd9.js +38 -0
  507. package/dist/esm/label-template-e3eebfbc.js +21 -0
  508. package/dist/esm/loader.js +22 -0
  509. package/dist/esm/number-helper-f34393b1.js +18 -0
  510. package/dist/esm/old-bcm-popover-box.entry.js +157 -0
  511. package/dist/esm/old-bcm-popover.entry.js +100 -0
  512. package/dist/esm/polyfills/core-js.js +11 -0
  513. package/dist/esm/polyfills/css-shim.js +1 -0
  514. package/dist/esm/polyfills/dom.js +79 -0
  515. package/dist/esm/polyfills/es5-html-element.js +1 -0
  516. package/dist/esm/polyfills/index.js +34 -0
  517. package/dist/esm/polyfills/system.js +6 -0
  518. package/dist/esm/popover-placement-9864294b.js +95 -0
  519. package/dist/esm/property-decorators-f3f1e7de.js +31 -0
  520. package/dist/esm/slot-template-877c4e01.js +13 -0
  521. package/dist/esm/stepper-states-12a190b4.js +81 -0
  522. package/dist/esm/string-helper-74a1648f.js +132 -0
  523. package/dist/esm/tooltip-helper-ae137bee.js +102 -0
  524. package/dist/esm/types-6f06fa1a.js +19 -0
  525. package/dist/esm/types-b211a5eb.js +32 -0
  526. package/dist/esm/types-bfc3bba1.js +32 -0
  527. package/dist/esm/utils-57652744.js +123 -0
  528. package/dist/esm/validators-0e0c76db.js +31 -0
  529. package/dist/index.cjs.js +1 -0
  530. package/dist/index.js +1 -0
  531. package/dist/types/components/atoms/avatar/avatar.d.ts +23 -0
  532. package/dist/types/components/atoms/badge/badge.d.ts +17 -0
  533. package/dist/types/components/atoms/box/box.d.ts +5 -0
  534. package/dist/types/components/atoms/button/button.d.ts +33 -0
  535. package/dist/types/components/atoms/button/types.d.ts +166 -0
  536. package/dist/types/components/atoms/chip/chip.d.ts +24 -0
  537. package/dist/types/components/atoms/divider/divider.d.ts +7 -0
  538. package/dist/types/components/atoms/icon/icon.d.ts +6 -0
  539. package/dist/types/components/atoms/label/label.d.ts +16 -0
  540. package/dist/types/components/atoms/link/link.d.ts +13 -0
  541. package/dist/types/components/atoms/states/button.states.d.ts +7 -0
  542. package/dist/types/components/atoms/tag/tag.d.ts +24 -0
  543. package/dist/types/components/atoms/tag/types.d.ts +29 -0
  544. package/dist/types/components/atoms/typography/typography.d.ts +5 -0
  545. package/dist/types/components/molecules/accordion/accordion.d.ts +11 -0
  546. package/dist/types/components/molecules/alert/alert.d.ts +21 -0
  547. package/dist/types/components/molecules/alert/types.d.ts +25 -0
  548. package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +14 -0
  549. package/dist/types/components/molecules/breadcrumb/types.d.ts +10 -0
  550. package/dist/types/components/molecules/button-group/button-group.d.ts +21 -0
  551. package/dist/types/components/molecules/card/card.d.ts +11 -0
  552. package/dist/types/components/molecules/checkbox/checkbox-lite.d.ts +14 -0
  553. package/dist/types/components/molecules/checkbox/checkbox.d.ts +56 -0
  554. package/dist/types/components/molecules/checkbox/group.d.ts +56 -0
  555. package/dist/types/components/molecules/drawer/drawer.d.ts +21 -0
  556. package/dist/types/components/molecules/dropdown/dropdown.d.ts +55 -0
  557. package/dist/types/components/molecules/empty/empty.d.ts +5 -0
  558. package/dist/types/components/molecules/error-layout/error-layout.d.ts +25 -0
  559. package/dist/types/components/molecules/error-layout/types.d.ts +4 -0
  560. package/dist/types/components/molecules/expansion-panel/expansion-panel.d.ts +31 -0
  561. package/dist/types/components/molecules/input/input.d.ts +82 -0
  562. package/dist/types/components/molecules/input/types.d.ts +13 -0
  563. package/dist/types/components/molecules/item/item.d.ts +13 -0
  564. package/dist/types/components/molecules/items/items.d.ts +10 -0
  565. package/dist/types/components/molecules/linked/linked.d.ts +30 -0
  566. package/dist/types/components/molecules/menu/menu.d.ts +41 -0
  567. package/dist/types/components/molecules/message/message.d.ts +32 -0
  568. package/dist/types/components/molecules/message/types.d.ts +13 -0
  569. package/dist/types/components/molecules/modal/modal.d.ts +26 -0
  570. package/dist/types/components/molecules/notification/notification.d.ts +42 -0
  571. package/dist/types/components/molecules/notification/types.d.ts +14 -0
  572. package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +29 -0
  573. package/dist/types/components/molecules/popconfirm/popconfirm.d.ts +28 -0
  574. package/dist/types/components/molecules/popover/popover.d.ts +20 -0
  575. package/dist/types/components/molecules/progress/progress.d.ts +25 -0
  576. package/dist/types/components/molecules/progress/types.d.ts +14 -0
  577. package/dist/types/components/molecules/radio/group.d.ts +54 -0
  578. package/dist/types/components/molecules/radio/radio.d.ts +21 -0
  579. package/dist/types/components/molecules/radio/types.d.ts +29 -0
  580. package/dist/types/components/molecules/range/range.d.ts +36 -0
  581. package/dist/types/components/molecules/result/result.d.ts +13 -0
  582. package/dist/types/components/molecules/result/types.d.ts +19 -0
  583. package/dist/types/components/molecules/search/search.d.ts +35 -0
  584. package/dist/types/components/molecules/skeleton/skeleton.d.ts +8 -0
  585. package/dist/types/components/molecules/states/alert.states.d.ts +7 -0
  586. package/dist/types/components/molecules/states/checkbox-group.states.d.ts +53 -0
  587. package/dist/types/components/molecules/states/radio-group.states.d.ts +48 -0
  588. package/dist/types/components/molecules/states/search.states.d.ts +14 -0
  589. package/dist/types/components/molecules/states/stepper-states.d.ts +13 -0
  590. package/dist/types/components/molecules/stepper/step.d.ts +25 -0
  591. package/dist/types/components/molecules/stepper/stepper.d.ts +34 -0
  592. package/dist/types/components/molecules/switch/switch.d.ts +46 -0
  593. package/dist/types/components/molecules/tab-group/tab-group.d.ts +18 -0
  594. package/dist/types/components/molecules/textarea/textarea.d.ts +53 -0
  595. package/dist/types/components/molecules/textarea/types.d.ts +9 -0
  596. package/dist/types/components/molecules/timeline/timeline-item.d.ts +16 -0
  597. package/dist/types/components/molecules/timeline/timeline.d.ts +25 -0
  598. package/dist/types/components/molecules/tooltip/tooltip.d.ts +19 -0
  599. package/dist/types/components/organism/autocomplete/autocomplete.d.ts +31 -0
  600. package/dist/types/components/organism/colorpicker/colorpicker.d.ts +176 -0
  601. package/dist/types/components/organism/date-picker/date-picker.d.ts +77 -0
  602. package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +438 -0
  603. package/dist/types/components/organism/datetime-picker/types.d.ts +54 -0
  604. package/dist/types/components/organism/form/form-group.d.ts +10 -0
  605. package/dist/types/components/organism/form/form.d.ts +34 -0
  606. package/dist/types/components/organism/form-2/bcm-form-components.d.ts +2 -0
  607. package/dist/types/components/organism/form-2/form-2.d.ts +25 -0
  608. package/dist/types/components/organism/list/list-key-control.d.ts +18 -0
  609. package/dist/types/components/organism/list/list-tag-control.d.ts +18 -0
  610. package/dist/types/components/organism/list/list.d.ts +140 -0
  611. package/dist/types/components/organism/states/bcm-list2.states.d.ts +28 -0
  612. package/dist/types/components/organism/time-picker/time-picker.d.ts +69 -0
  613. package/dist/types/components/other/attendance/attendance.d.ts +7 -0
  614. package/dist/types/components/other/data-table/table.d.ts +8 -0
  615. package/dist/types/components/other/default/default.d.ts +6 -0
  616. package/dist/types/components/other_deprecated/collapse/collapse.d.ts +12 -0
  617. package/dist/types/components/other_deprecated/collapse/group.d.ts +15 -0
  618. package/dist/types/components/other_deprecated/listbox/listbox-group.d.ts +7 -0
  619. package/dist/types/components/other_deprecated/listbox/listbox-item.d.ts +58 -0
  620. package/dist/types/components/other_deprecated/listbox/listbox.d.ts +152 -0
  621. package/dist/types/components/other_deprecated/listbox/types.d.ts +11 -0
  622. package/dist/types/components/other_deprecated/old-input/old-input.d.ts +80 -0
  623. package/dist/types/components/other_deprecated/old-input/types.d.ts +13 -0
  624. package/dist/types/components/other_deprecated/old-popover/old-popover-box.d.ts +26 -0
  625. package/dist/types/components/other_deprecated/old-popover/old-popover.d.ts +22 -0
  626. package/dist/types/components/other_deprecated/old-search/old-search.d.ts +32 -0
  627. package/dist/types/components/other_deprecated/old-tag/old-tag.d.ts +27 -0
  628. package/dist/types/components/other_deprecated/old-tag/types.d.ts +29 -0
  629. package/dist/types/components/other_deprecated/select/group.d.ts +6 -0
  630. package/dist/types/components/other_deprecated/select/option.d.ts +10 -0
  631. package/dist/types/components/other_deprecated/select/select-box.d.ts +15 -0
  632. package/dist/types/components/other_deprecated/select/select.d.ts +133 -0
  633. package/dist/types/components/other_deprecated/tabs/tab-pane.d.ts +19 -0
  634. package/dist/types/components/other_deprecated/tabs/tab.d.ts +36 -0
  635. package/dist/types/components/other_deprecated/tabs/tabs-content.d.ts +18 -0
  636. package/dist/types/components/other_deprecated/tabs/tabs.d.ts +112 -0
  637. package/dist/types/components/other_deprecated/tabs/types.d.ts +39 -0
  638. package/dist/types/components/other_deprecated/text/text.d.ts +11 -0
  639. package/dist/types/components/other_deprecated/treeview/treeview-group.d.ts +3 -0
  640. package/dist/types/components/other_deprecated/treeview/treeview-item.d.ts +119 -0
  641. package/dist/types/components/other_deprecated/treeview/treeview.d.ts +181 -0
  642. package/dist/types/components/other_deprecated/treeview/types.d.ts +11 -0
  643. package/dist/types/components.d.ts +3532 -0
  644. package/dist/types/decorators/id-decorator.d.ts +4 -0
  645. package/dist/types/decorators/index.d.ts +4 -0
  646. package/dist/types/decorators/is-load-decorator.d.ts +7 -0
  647. package/dist/types/decorators/json-parse-decarator.d.ts +4 -0
  648. package/dist/types/decorators/property-decorators.d.ts +4 -0
  649. package/dist/types/global/variables/colors.d.ts +217 -0
  650. package/dist/types/helper/color-helper.d.ts +16 -0
  651. package/dist/types/helper/datetime-helper.d.ts +3 -0
  652. package/dist/types/helper/generate.d.ts +22 -0
  653. package/dist/types/helper/index.d.ts +8 -0
  654. package/dist/types/helper/number-helper.d.ts +10 -0
  655. package/dist/types/helper/popover-helper.d.ts +31 -0
  656. package/dist/types/helper/string-helper.d.ts +27 -0
  657. package/dist/types/helper/tooltip-helper.d.ts +25 -0
  658. package/dist/types/helper/validators.d.ts +10 -0
  659. package/dist/types/index.d.ts +1 -0
  660. package/dist/types/models/abstract-classes/abstract-key-control.d.ts +31 -0
  661. package/dist/types/models/bcm-types.d.ts +21 -0
  662. package/dist/types/models/bcm.d.ts +456 -0
  663. package/dist/types/models/index.d.ts +2 -0
  664. package/dist/types/models/states/atoms/bcm-atoms-state.d.ts +34 -0
  665. package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +90 -0
  666. package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +78 -0
  667. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  668. package/dist/types/templates/button-template.d.ts +18 -0
  669. package/dist/types/templates/caption-template.d.ts +14 -0
  670. package/dist/types/templates/checkbox-group-template.d.ts +10 -0
  671. package/dist/types/templates/checkbox-template.d.ts +13 -0
  672. package/dist/types/templates/icon-template.d.ts +7 -0
  673. package/dist/types/templates/index.d.ts +13 -0
  674. package/dist/types/templates/info-footer-template.d.ts +10 -0
  675. package/dist/types/templates/input-template.d.ts +34 -0
  676. package/dist/types/templates/label-template.d.ts +12 -0
  677. package/dist/types/templates/list-item-template.d.ts +13 -0
  678. package/dist/types/templates/list-template.d.ts +29 -0
  679. package/dist/types/templates/slot-template.d.ts +8 -0
  680. package/dist/types/templates/step-template.d.ts +17 -0
  681. package/dist/types/templates/tag-template.d.ts +21 -0
  682. package/dist/types/types/index.d.ts +12 -0
  683. package/dist/types/utils/element-dragger.d.ts +146 -0
  684. package/dist/types/utils/floating-ui.d.ts +1 -0
  685. package/dist/types/utils/index.d.ts +5 -0
  686. package/dist/types/utils/popover-placement.d.ts +3 -0
  687. package/dist/types/utils/utils.d.ts +55 -0
  688. package/dist/types/utils/validation.d.ts +19 -0
  689. package/package.json +3 -3
  690. package/dist/bromcom-ui/p-0846712b.js +0 -5
  691. package/dist/bromcom-ui/p-15a38991.entry.js +0 -5
  692. package/dist/bromcom-ui/p-6e391ba6.entry.js +0 -5
  693. package/dist/bromcom-ui/p-75c01665.entry.js +0 -5
  694. package/dist/bromcom-ui/p-7671bea7.entry.js +0 -5
  695. package/dist/bromcom-ui/p-8f394771.js +0 -5
  696. package/dist/bromcom-ui/p-9acadcaa.js +0 -5
  697. package/dist/bromcom-ui/p-9ad3f646.entry.js +0 -5
  698. package/dist/bromcom-ui/p-a3f82827.entry.js +0 -5
  699. package/dist/bromcom-ui/p-a74295dc.js +0 -5
  700. package/dist/bromcom-ui/p-a9ce17d4.js +0 -5
  701. package/dist/bromcom-ui/p-b970549a.entry.js +0 -5
  702. package/dist/bromcom-ui/p-bb698305.js +0 -5
  703. package/dist/bromcom-ui/p-cccebf39.entry.js +0 -5
  704. package/dist/bromcom-ui/p-e372f7a8.entry.js +0 -5
@@ -0,0 +1,1833 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ const NAMESPACE = 'bromcom-ui';
6
+
7
+ let scopeId;
8
+ let contentRef;
9
+ let hostTagName;
10
+ let useNativeShadowDom = false;
11
+ let checkSlotFallbackVisibility = false;
12
+ let checkSlotRelocate = false;
13
+ let isSvgMode = false;
14
+ let renderingRef = null;
15
+ let queuePending = false;
16
+ const win = typeof window !== 'undefined' ? window : {};
17
+ const doc = win.document || { head: {} };
18
+ const plt = {
19
+ $flags$: 0,
20
+ $resourcesUrl$: '',
21
+ jmp: (h) => h(),
22
+ raf: (h) => requestAnimationFrame(h),
23
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
24
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
25
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
26
+ };
27
+ const promiseResolve = (v) => Promise.resolve(v);
28
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
29
+ try {
30
+ new CSSStyleSheet();
31
+ return typeof new CSSStyleSheet().replaceSync === 'function';
32
+ }
33
+ catch (e) { }
34
+ return false;
35
+ })()
36
+ ;
37
+ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
38
+ if (listeners) {
39
+ listeners.map(([flags, name, method]) => {
40
+ const target = getHostListenerTarget(elm, flags) ;
41
+ const handler = hostListenerProxy(hostRef, method);
42
+ const opts = hostListenerOpts(flags);
43
+ plt.ael(target, name, handler, opts);
44
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
45
+ });
46
+ }
47
+ };
48
+ const hostListenerProxy = (hostRef, methodName) => (ev) => {
49
+ try {
50
+ {
51
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
52
+ // instance is ready, let's call it's member method for this event
53
+ hostRef.$lazyInstance$[methodName](ev);
54
+ }
55
+ else {
56
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
57
+ }
58
+ }
59
+ }
60
+ catch (e) {
61
+ consoleError(e);
62
+ }
63
+ };
64
+ const getHostListenerTarget = (elm, flags) => {
65
+ if (flags & 4 /* TargetDocument */)
66
+ return doc;
67
+ if (flags & 8 /* TargetWindow */)
68
+ return win;
69
+ return elm;
70
+ };
71
+ // prettier-ignore
72
+ const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
73
+ const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
74
+ const XLINK_NS = 'http://www.w3.org/1999/xlink';
75
+ const createTime = (fnName, tagName = '') => {
76
+ {
77
+ return () => {
78
+ return;
79
+ };
80
+ }
81
+ };
82
+ const uniqueTime = (key, measureText) => {
83
+ {
84
+ return () => {
85
+ return;
86
+ };
87
+ }
88
+ };
89
+ const rootAppliedStyles = new WeakMap();
90
+ const registerStyle = (scopeId, cssText, allowCS) => {
91
+ let style = styles.get(scopeId);
92
+ if (supportsConstructableStylesheets && allowCS) {
93
+ style = (style || new CSSStyleSheet());
94
+ if (typeof style === 'string') {
95
+ style = cssText;
96
+ }
97
+ else {
98
+ style.replaceSync(cssText);
99
+ }
100
+ }
101
+ else {
102
+ style = cssText;
103
+ }
104
+ styles.set(scopeId, style);
105
+ };
106
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
107
+ let scopeId = getScopeId(cmpMeta);
108
+ const style = styles.get(scopeId);
109
+ // if an element is NOT connected then getRootNode() will return the wrong root node
110
+ // so the fallback is to always use the document for the root node in those cases
111
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
112
+ if (style) {
113
+ if (typeof style === 'string') {
114
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
115
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
116
+ let styleElm;
117
+ if (!appliedStyles) {
118
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
119
+ }
120
+ if (!appliedStyles.has(scopeId)) {
121
+ {
122
+ {
123
+ styleElm = doc.createElement('style');
124
+ styleElm.innerHTML = style;
125
+ }
126
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
127
+ }
128
+ if (appliedStyles) {
129
+ appliedStyles.add(scopeId);
130
+ }
131
+ }
132
+ }
133
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
134
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
135
+ }
136
+ }
137
+ return scopeId;
138
+ };
139
+ const attachStyles = (hostRef) => {
140
+ const cmpMeta = hostRef.$cmpMeta$;
141
+ const elm = hostRef.$hostElement$;
142
+ const flags = cmpMeta.$flags$;
143
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
144
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
145
+ if (flags & 10 /* needsScopedEncapsulation */) {
146
+ // only required when we're NOT using native shadow dom (slot)
147
+ // or this browser doesn't support native shadow dom
148
+ // and this host element was NOT created with SSR
149
+ // let's pick out the inner content for slot projection
150
+ // create a node to represent where the original
151
+ // content was first placed, which is useful later on
152
+ // DOM WRITE!!
153
+ elm['s-sc'] = scopeId;
154
+ elm.classList.add(scopeId + '-h');
155
+ }
156
+ endAttachStyles();
157
+ };
158
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
159
+ /**
160
+ * Default style mode id
161
+ */
162
+ /**
163
+ * Reusable empty obj/array
164
+ * Don't add values to these!!
165
+ */
166
+ const EMPTY_OBJ = {};
167
+ /**
168
+ * Namespaces
169
+ */
170
+ const SVG_NS = 'http://www.w3.org/2000/svg';
171
+ const HTML_NS = 'http://www.w3.org/1999/xhtml';
172
+ const isDef = (v) => v != null;
173
+ const isComplexType = (o) => {
174
+ // https://jsperf.com/typeof-fn-object/5
175
+ o = typeof o;
176
+ return o === 'object' || o === 'function';
177
+ };
178
+ /**
179
+ * Production h() function based on Preact by
180
+ * Jason Miller (@developit)
181
+ * Licensed under the MIT License
182
+ * https://github.com/developit/preact/blob/master/LICENSE
183
+ *
184
+ * Modified for Stencil's compiler and vdom
185
+ */
186
+ // const stack: any[] = [];
187
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
188
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
189
+ const h = (nodeName, vnodeData, ...children) => {
190
+ let child = null;
191
+ let key = null;
192
+ let slotName = null;
193
+ let simple = false;
194
+ let lastSimple = false;
195
+ const vNodeChildren = [];
196
+ const walk = (c) => {
197
+ for (let i = 0; i < c.length; i++) {
198
+ child = c[i];
199
+ if (Array.isArray(child)) {
200
+ walk(child);
201
+ }
202
+ else if (child != null && typeof child !== 'boolean') {
203
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
204
+ child = String(child);
205
+ }
206
+ if (simple && lastSimple) {
207
+ // If the previous child was simple (string), we merge both
208
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
209
+ }
210
+ else {
211
+ // Append a new vNode, if it's text, we create a text vNode
212
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
213
+ }
214
+ lastSimple = simple;
215
+ }
216
+ }
217
+ };
218
+ walk(children);
219
+ if (vnodeData) {
220
+ // normalize class / classname attributes
221
+ if (vnodeData.key) {
222
+ key = vnodeData.key;
223
+ }
224
+ if (vnodeData.name) {
225
+ slotName = vnodeData.name;
226
+ }
227
+ {
228
+ const classData = vnodeData.className || vnodeData.class;
229
+ if (classData) {
230
+ vnodeData.class =
231
+ typeof classData !== 'object'
232
+ ? classData
233
+ : Object.keys(classData)
234
+ .filter((k) => classData[k])
235
+ .join(' ');
236
+ }
237
+ }
238
+ }
239
+ if (typeof nodeName === 'function') {
240
+ // nodeName is a functional component
241
+ return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
242
+ }
243
+ const vnode = newVNode(nodeName, null);
244
+ vnode.$attrs$ = vnodeData;
245
+ if (vNodeChildren.length > 0) {
246
+ vnode.$children$ = vNodeChildren;
247
+ }
248
+ {
249
+ vnode.$key$ = key;
250
+ }
251
+ {
252
+ vnode.$name$ = slotName;
253
+ }
254
+ return vnode;
255
+ };
256
+ const newVNode = (tag, text) => {
257
+ const vnode = {
258
+ $flags$: 0,
259
+ $tag$: tag,
260
+ $text$: text,
261
+ $elm$: null,
262
+ $children$: null,
263
+ };
264
+ {
265
+ vnode.$attrs$ = null;
266
+ }
267
+ {
268
+ vnode.$key$ = null;
269
+ }
270
+ {
271
+ vnode.$name$ = null;
272
+ }
273
+ return vnode;
274
+ };
275
+ const Host = {};
276
+ const isHost = (node) => node && node.$tag$ === Host;
277
+ const vdomFnUtils = {
278
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
279
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
280
+ };
281
+ const convertToPublic = (node) => ({
282
+ vattrs: node.$attrs$,
283
+ vchildren: node.$children$,
284
+ vkey: node.$key$,
285
+ vname: node.$name$,
286
+ vtag: node.$tag$,
287
+ vtext: node.$text$,
288
+ });
289
+ const convertToPrivate = (node) => {
290
+ if (typeof node.vtag === 'function') {
291
+ const vnodeData = Object.assign({}, node.vattrs);
292
+ if (node.vkey) {
293
+ vnodeData.key = node.vkey;
294
+ }
295
+ if (node.vname) {
296
+ vnodeData.name = node.vname;
297
+ }
298
+ return h(node.vtag, vnodeData, ...(node.vchildren || []));
299
+ }
300
+ const vnode = newVNode(node.vtag, node.vtext);
301
+ vnode.$attrs$ = node.vattrs;
302
+ vnode.$children$ = node.vchildren;
303
+ vnode.$key$ = node.vkey;
304
+ vnode.$name$ = node.vname;
305
+ return vnode;
306
+ };
307
+ /**
308
+ * Production setAccessor() function based on Preact by
309
+ * Jason Miller (@developit)
310
+ * Licensed under the MIT License
311
+ * https://github.com/developit/preact/blob/master/LICENSE
312
+ *
313
+ * Modified for Stencil's compiler and vdom
314
+ */
315
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
316
+ if (oldValue !== newValue) {
317
+ let isProp = isMemberInElement(elm, memberName);
318
+ let ln = memberName.toLowerCase();
319
+ if (memberName === 'class') {
320
+ const classList = elm.classList;
321
+ const oldClasses = parseClassList(oldValue);
322
+ const newClasses = parseClassList(newValue);
323
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
324
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
325
+ }
326
+ else if (memberName === 'style') {
327
+ // update style attribute, css properties and values
328
+ {
329
+ for (const prop in oldValue) {
330
+ if (!newValue || newValue[prop] == null) {
331
+ if (prop.includes('-')) {
332
+ elm.style.removeProperty(prop);
333
+ }
334
+ else {
335
+ elm.style[prop] = '';
336
+ }
337
+ }
338
+ }
339
+ }
340
+ for (const prop in newValue) {
341
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
342
+ if (prop.includes('-')) {
343
+ elm.style.setProperty(prop, newValue[prop]);
344
+ }
345
+ else {
346
+ elm.style[prop] = newValue[prop];
347
+ }
348
+ }
349
+ }
350
+ }
351
+ else if (memberName === 'key')
352
+ ;
353
+ else if (memberName === 'ref') {
354
+ // minifier will clean this up
355
+ if (newValue) {
356
+ newValue(elm);
357
+ }
358
+ }
359
+ else if ((!isProp ) &&
360
+ memberName[0] === 'o' &&
361
+ memberName[1] === 'n') {
362
+ // Event Handlers
363
+ // so if the member name starts with "on" and the 3rd characters is
364
+ // a capital letter, and it's not already a member on the element,
365
+ // then we're assuming it's an event listener
366
+ if (memberName[2] === '-') {
367
+ // on- prefixed events
368
+ // allows to be explicit about the dom event to listen without any magic
369
+ // under the hood:
370
+ // <my-cmp on-click> // listens for "click"
371
+ // <my-cmp on-Click> // listens for "Click"
372
+ // <my-cmp on-ionChange> // listens for "ionChange"
373
+ // <my-cmp on-EVENTS> // listens for "EVENTS"
374
+ memberName = memberName.slice(3);
375
+ }
376
+ else if (isMemberInElement(win, ln)) {
377
+ // standard event
378
+ // the JSX attribute could have been "onMouseOver" and the
379
+ // member name "onmouseover" is on the window's prototype
380
+ // so let's add the listener "mouseover", which is all lowercased
381
+ memberName = ln.slice(2);
382
+ }
383
+ else {
384
+ // custom event
385
+ // the JSX attribute could have been "onMyCustomEvent"
386
+ // so let's trim off the "on" prefix and lowercase the first character
387
+ // and add the listener "myCustomEvent"
388
+ // except for the first character, we keep the event name case
389
+ memberName = ln[2] + memberName.slice(3);
390
+ }
391
+ if (oldValue) {
392
+ plt.rel(elm, memberName, oldValue, false);
393
+ }
394
+ if (newValue) {
395
+ plt.ael(elm, memberName, newValue, false);
396
+ }
397
+ }
398
+ else {
399
+ // Set property if it exists and it's not a SVG
400
+ const isComplex = isComplexType(newValue);
401
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
402
+ try {
403
+ if (!elm.tagName.includes('-')) {
404
+ const n = newValue == null ? '' : newValue;
405
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
406
+ if (memberName === 'list') {
407
+ isProp = false;
408
+ }
409
+ else if (oldValue == null || elm[memberName] != n) {
410
+ elm[memberName] = n;
411
+ }
412
+ }
413
+ else {
414
+ elm[memberName] = newValue;
415
+ }
416
+ }
417
+ catch (e) { }
418
+ }
419
+ /**
420
+ * Need to manually update attribute if:
421
+ * - memberName is not an attribute
422
+ * - if we are rendering the host element in order to reflect attribute
423
+ * - if it's a SVG, since properties might not work in <svg>
424
+ * - if the newValue is null/undefined or 'false'.
425
+ */
426
+ let xlink = false;
427
+ {
428
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
429
+ memberName = ln;
430
+ xlink = true;
431
+ }
432
+ }
433
+ if (newValue == null || newValue === false) {
434
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
435
+ if (xlink) {
436
+ elm.removeAttributeNS(XLINK_NS, memberName);
437
+ }
438
+ else {
439
+ elm.removeAttribute(memberName);
440
+ }
441
+ }
442
+ }
443
+ else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
444
+ newValue = newValue === true ? '' : newValue;
445
+ if (xlink) {
446
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
447
+ }
448
+ else {
449
+ elm.setAttribute(memberName, newValue);
450
+ }
451
+ }
452
+ }
453
+ }
454
+ };
455
+ const parseClassListRegex = /\s/;
456
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
457
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
458
+ // if the element passed in is a shadow root, which is a document fragment
459
+ // then we want to be adding attrs/props to the shadow root's "host" element
460
+ // if it's not a shadow root, then we add attrs/props to the same element
461
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
462
+ ? newVnode.$elm$.host
463
+ : newVnode.$elm$;
464
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
465
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
466
+ {
467
+ // remove attributes no longer present on the vnode by setting them to undefined
468
+ for (memberName in oldVnodeAttrs) {
469
+ if (!(memberName in newVnodeAttrs)) {
470
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
471
+ }
472
+ }
473
+ }
474
+ // add new & update changed attributes
475
+ for (memberName in newVnodeAttrs) {
476
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
477
+ }
478
+ };
479
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
480
+ // tslint:disable-next-line: prefer-const
481
+ const newVNode = newParentVNode.$children$[childIndex];
482
+ let i = 0;
483
+ let elm;
484
+ let childNode;
485
+ let oldVNode;
486
+ if (!useNativeShadowDom) {
487
+ // remember for later we need to check to relocate nodes
488
+ checkSlotRelocate = true;
489
+ if (newVNode.$tag$ === 'slot') {
490
+ if (scopeId) {
491
+ // scoped css needs to add its scoped id to the parent element
492
+ parentElm.classList.add(scopeId + '-s');
493
+ }
494
+ newVNode.$flags$ |= newVNode.$children$
495
+ ? // slot element has fallback content
496
+ 2 /* isSlotFallback */
497
+ : // slot element does not have fallback content
498
+ 1 /* isSlotReference */;
499
+ }
500
+ }
501
+ if (newVNode.$text$ !== null) {
502
+ // create text node
503
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
504
+ }
505
+ else if (newVNode.$flags$ & 1 /* isSlotReference */) {
506
+ // create a slot reference node
507
+ elm = newVNode.$elm$ =
508
+ doc.createTextNode('');
509
+ }
510
+ else {
511
+ if (!isSvgMode) {
512
+ isSvgMode = newVNode.$tag$ === 'svg';
513
+ }
514
+ // create element
515
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
516
+ ? 'slot-fb'
517
+ : newVNode.$tag$)
518
+ );
519
+ if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
520
+ isSvgMode = false;
521
+ }
522
+ // add css classes, attrs, props, listeners, etc.
523
+ {
524
+ updateElement(null, newVNode, isSvgMode);
525
+ }
526
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
527
+ // if there is a scopeId and this is the initial render
528
+ // then let's add the scopeId as a css class
529
+ elm.classList.add((elm['s-si'] = scopeId));
530
+ }
531
+ if (newVNode.$children$) {
532
+ for (i = 0; i < newVNode.$children$.length; ++i) {
533
+ // create the node
534
+ childNode = createElm(oldParentVNode, newVNode, i, elm);
535
+ // return node could have been null
536
+ if (childNode) {
537
+ // append our new node
538
+ elm.appendChild(childNode);
539
+ }
540
+ }
541
+ }
542
+ {
543
+ if (newVNode.$tag$ === 'svg') {
544
+ // Only reset the SVG context when we're exiting <svg> element
545
+ isSvgMode = false;
546
+ }
547
+ else if (elm.tagName === 'foreignObject') {
548
+ // Reenter SVG context when we're exiting <foreignObject> element
549
+ isSvgMode = true;
550
+ }
551
+ }
552
+ }
553
+ {
554
+ elm['s-hn'] = hostTagName;
555
+ if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
556
+ // remember the content reference comment
557
+ elm['s-sr'] = true;
558
+ // remember the content reference comment
559
+ elm['s-cr'] = contentRef;
560
+ // remember the slot name, or empty string for default slot
561
+ elm['s-sn'] = newVNode.$name$ || '';
562
+ // check if we've got an old vnode for this slot
563
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
564
+ if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
565
+ // we've got an old slot vnode and the wrapper is being replaced
566
+ // so let's move the old slot content back to it's original location
567
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
568
+ }
569
+ }
570
+ }
571
+ return elm;
572
+ };
573
+ const putBackInOriginalLocation = (parentElm, recursive) => {
574
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
575
+ const oldSlotChildNodes = parentElm.childNodes;
576
+ for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
577
+ const childNode = oldSlotChildNodes[i];
578
+ if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
579
+ // // this child node in the old element is from another component
580
+ // // remove this node from the old slot's parent
581
+ // childNode.remove();
582
+ // and relocate it back to it's original location
583
+ parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
584
+ // remove the old original location comment entirely
585
+ // later on the patch function will know what to do
586
+ // and move this to the correct spot in need be
587
+ childNode['s-ol'].remove();
588
+ childNode['s-ol'] = undefined;
589
+ checkSlotRelocate = true;
590
+ }
591
+ if (recursive) {
592
+ putBackInOriginalLocation(childNode, recursive);
593
+ }
594
+ }
595
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
596
+ };
597
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
598
+ let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
599
+ let childNode;
600
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
601
+ containerElm = containerElm.shadowRoot;
602
+ }
603
+ for (; startIdx <= endIdx; ++startIdx) {
604
+ if (vnodes[startIdx]) {
605
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
606
+ if (childNode) {
607
+ vnodes[startIdx].$elm$ = childNode;
608
+ containerElm.insertBefore(childNode, referenceNode(before) );
609
+ }
610
+ }
611
+ }
612
+ };
613
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
614
+ for (; startIdx <= endIdx; ++startIdx) {
615
+ if ((vnode = vnodes[startIdx])) {
616
+ elm = vnode.$elm$;
617
+ callNodeRefs(vnode);
618
+ {
619
+ // we're removing this element
620
+ // so it's possible we need to show slot fallback content now
621
+ checkSlotFallbackVisibility = true;
622
+ if (elm['s-ol']) {
623
+ // remove the original location comment
624
+ elm['s-ol'].remove();
625
+ }
626
+ else {
627
+ // it's possible that child nodes of the node
628
+ // that's being removed are slot nodes
629
+ putBackInOriginalLocation(elm, true);
630
+ }
631
+ }
632
+ // remove the vnode's element from the dom
633
+ elm.remove();
634
+ }
635
+ }
636
+ };
637
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
638
+ let oldStartIdx = 0;
639
+ let newStartIdx = 0;
640
+ let idxInOld = 0;
641
+ let i = 0;
642
+ let oldEndIdx = oldCh.length - 1;
643
+ let oldStartVnode = oldCh[0];
644
+ let oldEndVnode = oldCh[oldEndIdx];
645
+ let newEndIdx = newCh.length - 1;
646
+ let newStartVnode = newCh[0];
647
+ let newEndVnode = newCh[newEndIdx];
648
+ let node;
649
+ let elmToMove;
650
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
651
+ if (oldStartVnode == null) {
652
+ // Vnode might have been moved left
653
+ oldStartVnode = oldCh[++oldStartIdx];
654
+ }
655
+ else if (oldEndVnode == null) {
656
+ oldEndVnode = oldCh[--oldEndIdx];
657
+ }
658
+ else if (newStartVnode == null) {
659
+ newStartVnode = newCh[++newStartIdx];
660
+ }
661
+ else if (newEndVnode == null) {
662
+ newEndVnode = newCh[--newEndIdx];
663
+ }
664
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
665
+ patch(oldStartVnode, newStartVnode);
666
+ oldStartVnode = oldCh[++oldStartIdx];
667
+ newStartVnode = newCh[++newStartIdx];
668
+ }
669
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
670
+ patch(oldEndVnode, newEndVnode);
671
+ oldEndVnode = oldCh[--oldEndIdx];
672
+ newEndVnode = newCh[--newEndIdx];
673
+ }
674
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
675
+ // Vnode moved right
676
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
677
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
678
+ }
679
+ patch(oldStartVnode, newEndVnode);
680
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
681
+ oldStartVnode = oldCh[++oldStartIdx];
682
+ newEndVnode = newCh[--newEndIdx];
683
+ }
684
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
685
+ // Vnode moved left
686
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
687
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
688
+ }
689
+ patch(oldEndVnode, newStartVnode);
690
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
691
+ oldEndVnode = oldCh[--oldEndIdx];
692
+ newStartVnode = newCh[++newStartIdx];
693
+ }
694
+ else {
695
+ // createKeyToOldIdx
696
+ idxInOld = -1;
697
+ {
698
+ for (i = oldStartIdx; i <= oldEndIdx; ++i) {
699
+ if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
700
+ idxInOld = i;
701
+ break;
702
+ }
703
+ }
704
+ }
705
+ if (idxInOld >= 0) {
706
+ elmToMove = oldCh[idxInOld];
707
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
708
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
709
+ }
710
+ else {
711
+ patch(elmToMove, newStartVnode);
712
+ oldCh[idxInOld] = undefined;
713
+ node = elmToMove.$elm$;
714
+ }
715
+ newStartVnode = newCh[++newStartIdx];
716
+ }
717
+ else {
718
+ // new element
719
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
720
+ newStartVnode = newCh[++newStartIdx];
721
+ }
722
+ if (node) {
723
+ {
724
+ parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
725
+ }
726
+ }
727
+ }
728
+ }
729
+ if (oldStartIdx > oldEndIdx) {
730
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
731
+ }
732
+ else if (newStartIdx > newEndIdx) {
733
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
734
+ }
735
+ };
736
+ const isSameVnode = (vnode1, vnode2) => {
737
+ // compare if two vnode to see if they're "technically" the same
738
+ // need to have the same element tag, and same key to be the same
739
+ if (vnode1.$tag$ === vnode2.$tag$) {
740
+ if (vnode1.$tag$ === 'slot') {
741
+ return vnode1.$name$ === vnode2.$name$;
742
+ }
743
+ {
744
+ return vnode1.$key$ === vnode2.$key$;
745
+ }
746
+ }
747
+ return false;
748
+ };
749
+ const referenceNode = (node) => {
750
+ // this node was relocated to a new location in the dom
751
+ // because of some other component's slot
752
+ // but we still have an html comment in place of where
753
+ // it's original location was according to it's original vdom
754
+ return (node && node['s-ol']) || node;
755
+ };
756
+ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
757
+ const patch = (oldVNode, newVNode) => {
758
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
759
+ const oldChildren = oldVNode.$children$;
760
+ const newChildren = newVNode.$children$;
761
+ const tag = newVNode.$tag$;
762
+ const text = newVNode.$text$;
763
+ let defaultHolder;
764
+ if (text === null) {
765
+ {
766
+ // test if we're rendering an svg element, or still rendering nodes inside of one
767
+ // only add this to the when the compiler sees we're using an svg somewhere
768
+ isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
769
+ }
770
+ // element node
771
+ {
772
+ if (tag === 'slot')
773
+ ;
774
+ else {
775
+ // either this is the first render of an element OR it's an update
776
+ // AND we already know it's possible it could have changed
777
+ // this updates the element's css classes, attrs, props, listeners, etc.
778
+ updateElement(oldVNode, newVNode, isSvgMode);
779
+ }
780
+ }
781
+ if (oldChildren !== null && newChildren !== null) {
782
+ // looks like there's child vnodes for both the old and new vnodes
783
+ updateChildren(elm, oldChildren, newVNode, newChildren);
784
+ }
785
+ else if (newChildren !== null) {
786
+ // no old child vnodes, but there are new child vnodes to add
787
+ if (oldVNode.$text$ !== null) {
788
+ // the old vnode was text, so be sure to clear it out
789
+ elm.textContent = '';
790
+ }
791
+ // add the new vnode children
792
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
793
+ }
794
+ else if (oldChildren !== null) {
795
+ // no new child vnodes, but there are old child vnodes to remove
796
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
797
+ }
798
+ if (isSvgMode && tag === 'svg') {
799
+ isSvgMode = false;
800
+ }
801
+ }
802
+ else if ((defaultHolder = elm['s-cr'])) {
803
+ // this element has slotted content
804
+ defaultHolder.parentNode.textContent = text;
805
+ }
806
+ else if (oldVNode.$text$ !== text) {
807
+ // update the text content for the text only vnode
808
+ // and also only if the text is different than before
809
+ elm.data = text;
810
+ }
811
+ };
812
+ const updateFallbackSlotVisibility = (elm) => {
813
+ // tslint:disable-next-line: prefer-const
814
+ const childNodes = elm.childNodes;
815
+ let childNode;
816
+ let i;
817
+ let ilen;
818
+ let j;
819
+ let slotNameAttr;
820
+ let nodeType;
821
+ for (i = 0, ilen = childNodes.length; i < ilen; i++) {
822
+ childNode = childNodes[i];
823
+ if (childNode.nodeType === 1 /* ElementNode */) {
824
+ if (childNode['s-sr']) {
825
+ // this is a slot fallback node
826
+ // get the slot name for this slot reference node
827
+ slotNameAttr = childNode['s-sn'];
828
+ // by default always show a fallback slot node
829
+ // then hide it if there are other slots in the light dom
830
+ childNode.hidden = false;
831
+ for (j = 0; j < ilen; j++) {
832
+ nodeType = childNodes[j].nodeType;
833
+ if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
834
+ // this sibling node is from a different component OR is a named fallback slot node
835
+ if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
836
+ childNode.hidden = true;
837
+ break;
838
+ }
839
+ }
840
+ else {
841
+ // this is a default fallback slot node
842
+ // any element or text node (with content)
843
+ // should hide the default fallback slot node
844
+ if (nodeType === 1 /* ElementNode */ ||
845
+ (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
846
+ childNode.hidden = true;
847
+ break;
848
+ }
849
+ }
850
+ }
851
+ }
852
+ // keep drilling down
853
+ updateFallbackSlotVisibility(childNode);
854
+ }
855
+ }
856
+ };
857
+ const relocateNodes = [];
858
+ const relocateSlotContent = (elm) => {
859
+ // tslint:disable-next-line: prefer-const
860
+ let childNode;
861
+ let node;
862
+ let hostContentNodes;
863
+ let slotNameAttr;
864
+ let relocateNodeData;
865
+ let j;
866
+ let i = 0;
867
+ const childNodes = elm.childNodes;
868
+ const ilen = childNodes.length;
869
+ for (; i < ilen; i++) {
870
+ childNode = childNodes[i];
871
+ if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
872
+ // first got the content reference comment node
873
+ // then we got it's parent, which is where all the host content is in now
874
+ hostContentNodes = node.parentNode.childNodes;
875
+ slotNameAttr = childNode['s-sn'];
876
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
877
+ node = hostContentNodes[j];
878
+ if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
879
+ // let's do some relocating to its new home
880
+ // but never relocate a content reference node
881
+ // that is suppose to always represent the original content location
882
+ if (isNodeLocatedInSlot(node, slotNameAttr)) {
883
+ // it's possible we've already decided to relocate this node
884
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
885
+ // made some changes to slots
886
+ // let's make sure we also double check
887
+ // fallbacks are correctly hidden or shown
888
+ checkSlotFallbackVisibility = true;
889
+ node['s-sn'] = node['s-sn'] || slotNameAttr;
890
+ if (relocateNodeData) {
891
+ // previously we never found a slot home for this node
892
+ // but turns out we did, so let's remember it now
893
+ relocateNodeData.$slotRefNode$ = childNode;
894
+ }
895
+ else {
896
+ // add to our list of nodes to relocate
897
+ relocateNodes.push({
898
+ $slotRefNode$: childNode,
899
+ $nodeToRelocate$: node,
900
+ });
901
+ }
902
+ if (node['s-sr']) {
903
+ relocateNodes.map((relocateNode) => {
904
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
905
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
906
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
907
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
908
+ }
909
+ }
910
+ });
911
+ }
912
+ }
913
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
914
+ // so far this element does not have a slot home, not setting slotRefNode on purpose
915
+ // if we never find a home for this element then we'll need to hide it
916
+ relocateNodes.push({
917
+ $nodeToRelocate$: node,
918
+ });
919
+ }
920
+ }
921
+ }
922
+ }
923
+ if (childNode.nodeType === 1 /* ElementNode */) {
924
+ relocateSlotContent(childNode);
925
+ }
926
+ }
927
+ };
928
+ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
929
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
930
+ if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
931
+ return true;
932
+ }
933
+ if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
934
+ return true;
935
+ }
936
+ return false;
937
+ }
938
+ if (nodeToRelocate['s-sn'] === slotNameAttr) {
939
+ return true;
940
+ }
941
+ return slotNameAttr === '';
942
+ };
943
+ const callNodeRefs = (vNode) => {
944
+ {
945
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
946
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
947
+ }
948
+ };
949
+ const renderVdom = (hostRef, renderFnResults) => {
950
+ const hostElm = hostRef.$hostElement$;
951
+ const cmpMeta = hostRef.$cmpMeta$;
952
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
953
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
954
+ hostTagName = hostElm.tagName;
955
+ if (cmpMeta.$attrsToReflect$) {
956
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
957
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
958
+ }
959
+ rootVnode.$tag$ = null;
960
+ rootVnode.$flags$ |= 4 /* isHost */;
961
+ hostRef.$vnode$ = rootVnode;
962
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
963
+ {
964
+ scopeId = hostElm['s-sc'];
965
+ }
966
+ {
967
+ contentRef = hostElm['s-cr'];
968
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
969
+ // always reset
970
+ checkSlotFallbackVisibility = false;
971
+ }
972
+ // synchronous patch
973
+ patch(oldVNode, rootVnode);
974
+ {
975
+ // while we're moving nodes around existing nodes, temporarily disable
976
+ // the disconnectCallback from working
977
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
978
+ if (checkSlotRelocate) {
979
+ relocateSlotContent(rootVnode.$elm$);
980
+ let relocateData;
981
+ let nodeToRelocate;
982
+ let orgLocationNode;
983
+ let parentNodeRef;
984
+ let insertBeforeNode;
985
+ let refNode;
986
+ let i = 0;
987
+ for (; i < relocateNodes.length; i++) {
988
+ relocateData = relocateNodes[i];
989
+ nodeToRelocate = relocateData.$nodeToRelocate$;
990
+ if (!nodeToRelocate['s-ol']) {
991
+ // add a reference node marking this node's original location
992
+ // keep a reference to this node for later lookups
993
+ orgLocationNode =
994
+ doc.createTextNode('');
995
+ orgLocationNode['s-nr'] = nodeToRelocate;
996
+ nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
997
+ }
998
+ }
999
+ for (i = 0; i < relocateNodes.length; i++) {
1000
+ relocateData = relocateNodes[i];
1001
+ nodeToRelocate = relocateData.$nodeToRelocate$;
1002
+ if (relocateData.$slotRefNode$) {
1003
+ // by default we're just going to insert it directly
1004
+ // after the slot reference node
1005
+ parentNodeRef = relocateData.$slotRefNode$.parentNode;
1006
+ insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
1007
+ orgLocationNode = nodeToRelocate['s-ol'];
1008
+ while ((orgLocationNode = orgLocationNode.previousSibling)) {
1009
+ refNode = orgLocationNode['s-nr'];
1010
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1011
+ refNode = refNode.nextSibling;
1012
+ if (!refNode || !refNode['s-nr']) {
1013
+ insertBeforeNode = refNode;
1014
+ break;
1015
+ }
1016
+ }
1017
+ }
1018
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1019
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
1020
+ // we've checked that it's worth while to relocate
1021
+ // since that the node to relocate
1022
+ // has a different next sibling or parent relocated
1023
+ if (nodeToRelocate !== insertBeforeNode) {
1024
+ if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1025
+ // probably a component in the index.html that doesn't have it's hostname set
1026
+ nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1027
+ }
1028
+ // add it back to the dom but in its new home
1029
+ parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1030
+ }
1031
+ }
1032
+ }
1033
+ else {
1034
+ // this node doesn't have a slot home to go to, so let's hide it
1035
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1036
+ nodeToRelocate.hidden = true;
1037
+ }
1038
+ }
1039
+ }
1040
+ }
1041
+ if (checkSlotFallbackVisibility) {
1042
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1043
+ }
1044
+ // done moving nodes around
1045
+ // allow the disconnect callback to work again
1046
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1047
+ // always reset
1048
+ relocateNodes.length = 0;
1049
+ }
1050
+ };
1051
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
1052
+ const createEvent = (ref, name, flags) => {
1053
+ const elm = getElement(ref);
1054
+ return {
1055
+ emit: (detail) => {
1056
+ return emitEvent(elm, name, {
1057
+ bubbles: !!(flags & 4 /* Bubbles */),
1058
+ composed: !!(flags & 2 /* Composed */),
1059
+ cancelable: !!(flags & 1 /* Cancellable */),
1060
+ detail,
1061
+ });
1062
+ },
1063
+ };
1064
+ };
1065
+ /**
1066
+ * Helper function to create & dispatch a custom Event on a provided target
1067
+ * @param elm the target of the Event
1068
+ * @param name the name to give the custom Event
1069
+ * @param opts options for configuring a custom Event
1070
+ * @returns the custom Event
1071
+ */
1072
+ const emitEvent = (elm, name, opts) => {
1073
+ const ev = plt.ce(name, opts);
1074
+ elm.dispatchEvent(ev);
1075
+ return ev;
1076
+ };
1077
+ const attachToAncestor = (hostRef, ancestorComponent) => {
1078
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1079
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1080
+ }
1081
+ };
1082
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
1083
+ {
1084
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1085
+ }
1086
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1087
+ hostRef.$flags$ |= 512 /* needsRerender */;
1088
+ return;
1089
+ }
1090
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1091
+ // there is no ancestor component or the ancestor component
1092
+ // has already fired off its lifecycle update then
1093
+ // fire off the initial update
1094
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1095
+ return writeTask(dispatch) ;
1096
+ };
1097
+ const dispatchHooks = (hostRef, isInitialLoad) => {
1098
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1099
+ const instance = hostRef.$lazyInstance$ ;
1100
+ let promise;
1101
+ if (isInitialLoad) {
1102
+ {
1103
+ hostRef.$flags$ |= 256 /* isListenReady */;
1104
+ if (hostRef.$queuedListeners$) {
1105
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1106
+ hostRef.$queuedListeners$ = null;
1107
+ }
1108
+ }
1109
+ {
1110
+ promise = safeCall(instance, 'componentWillLoad');
1111
+ }
1112
+ }
1113
+ else {
1114
+ {
1115
+ promise = safeCall(instance, 'componentWillUpdate');
1116
+ }
1117
+ }
1118
+ {
1119
+ promise = then(promise, () => safeCall(instance, 'componentWillRender'));
1120
+ }
1121
+ endSchedule();
1122
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
1123
+ };
1124
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1125
+ // updateComponent
1126
+ const elm = hostRef.$hostElement$;
1127
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1128
+ const rc = elm['s-rc'];
1129
+ if (isInitialLoad) {
1130
+ // DOM WRITE!
1131
+ attachStyles(hostRef);
1132
+ }
1133
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1134
+ {
1135
+ callRender(hostRef, instance);
1136
+ }
1137
+ if (rc) {
1138
+ // ok, so turns out there are some child host elements
1139
+ // waiting on this parent element to load
1140
+ // let's fire off all update callbacks waiting
1141
+ rc.map((cb) => cb());
1142
+ elm['s-rc'] = undefined;
1143
+ }
1144
+ endRender();
1145
+ endUpdate();
1146
+ {
1147
+ const childrenPromises = elm['s-p'];
1148
+ const postUpdate = () => postUpdateComponent(hostRef);
1149
+ if (childrenPromises.length === 0) {
1150
+ postUpdate();
1151
+ }
1152
+ else {
1153
+ Promise.all(childrenPromises).then(postUpdate);
1154
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1155
+ childrenPromises.length = 0;
1156
+ }
1157
+ }
1158
+ };
1159
+ const callRender = (hostRef, instance, elm) => {
1160
+ try {
1161
+ renderingRef = instance;
1162
+ instance = instance.render() ;
1163
+ {
1164
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
1165
+ }
1166
+ {
1167
+ hostRef.$flags$ |= 2 /* hasRendered */;
1168
+ }
1169
+ {
1170
+ {
1171
+ // looks like we've got child nodes to render into this host element
1172
+ // or we need to update the css class/attrs on the host element
1173
+ // DOM WRITE!
1174
+ {
1175
+ renderVdom(hostRef, instance);
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+ catch (e) {
1181
+ consoleError(e, hostRef.$hostElement$);
1182
+ }
1183
+ renderingRef = null;
1184
+ return null;
1185
+ };
1186
+ const getRenderingRef = () => renderingRef;
1187
+ const postUpdateComponent = (hostRef) => {
1188
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1189
+ const elm = hostRef.$hostElement$;
1190
+ const endPostUpdate = createTime('postUpdate', tagName);
1191
+ const instance = hostRef.$lazyInstance$ ;
1192
+ const ancestorComponent = hostRef.$ancestorComponent$;
1193
+ {
1194
+ safeCall(instance, 'componentDidRender');
1195
+ }
1196
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1197
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1198
+ {
1199
+ // DOM WRITE!
1200
+ addHydratedFlag(elm);
1201
+ }
1202
+ {
1203
+ safeCall(instance, 'componentDidLoad');
1204
+ }
1205
+ endPostUpdate();
1206
+ {
1207
+ hostRef.$onReadyResolve$(elm);
1208
+ if (!ancestorComponent) {
1209
+ appDidLoad();
1210
+ }
1211
+ }
1212
+ }
1213
+ else {
1214
+ {
1215
+ safeCall(instance, 'componentDidUpdate');
1216
+ }
1217
+ endPostUpdate();
1218
+ }
1219
+ {
1220
+ hostRef.$onInstanceResolve$(elm);
1221
+ }
1222
+ // load events fire from bottom to top
1223
+ // the deepest elements load first then bubbles up
1224
+ {
1225
+ if (hostRef.$onRenderResolve$) {
1226
+ hostRef.$onRenderResolve$();
1227
+ hostRef.$onRenderResolve$ = undefined;
1228
+ }
1229
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
1230
+ nextTick(() => scheduleUpdate(hostRef, false));
1231
+ }
1232
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
1233
+ }
1234
+ // ( •_•)
1235
+ // ( •_•)>⌐■-■
1236
+ // (⌐■_■)
1237
+ };
1238
+ const forceUpdate = (ref) => {
1239
+ {
1240
+ const hostRef = getHostRef(ref);
1241
+ const isConnected = hostRef.$hostElement$.isConnected;
1242
+ if (isConnected &&
1243
+ (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1244
+ scheduleUpdate(hostRef, false);
1245
+ }
1246
+ // Returns "true" when the forced update was successfully scheduled
1247
+ return isConnected;
1248
+ }
1249
+ };
1250
+ const appDidLoad = (who) => {
1251
+ // on appload
1252
+ // we have finish the first big initial render
1253
+ {
1254
+ addHydratedFlag(doc.documentElement);
1255
+ }
1256
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1257
+ };
1258
+ const safeCall = (instance, method, arg) => {
1259
+ if (instance && instance[method]) {
1260
+ try {
1261
+ return instance[method](arg);
1262
+ }
1263
+ catch (e) {
1264
+ consoleError(e);
1265
+ }
1266
+ }
1267
+ return undefined;
1268
+ };
1269
+ const then = (promise, thenFn) => {
1270
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
1271
+ };
1272
+ const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
1273
+ ;
1274
+ /**
1275
+ * Parse a new property value for a given property type.
1276
+ *
1277
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
1278
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
1279
+ * 1. `any`, the type given to `propValue` in the function signature
1280
+ * 2. the type stored from `propType`.
1281
+ *
1282
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
1283
+ *
1284
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
1285
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
1286
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
1287
+ * ```tsx
1288
+ * <my-cmp prop-val={0}></my-cmp>
1289
+ * ```
1290
+ *
1291
+ * HTML prop values on the other hand, will always a string
1292
+ *
1293
+ * @param propValue the new value to coerce to some type
1294
+ * @param propType the type of the prop, expressed as a binary number
1295
+ * @returns the parsed/coerced value
1296
+ */
1297
+ const parsePropertyValue = (propValue, propType) => {
1298
+ // ensure this value is of the correct prop type
1299
+ if (propValue != null && !isComplexType(propValue)) {
1300
+ if (propType & 4 /* Boolean */) {
1301
+ // per the HTML spec, any string value means it is a boolean true value
1302
+ // but we'll cheat here and say that the string "false" is the boolean false
1303
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
1304
+ }
1305
+ if (propType & 2 /* Number */) {
1306
+ // force it to be a number
1307
+ return parseFloat(propValue);
1308
+ }
1309
+ if (propType & 1 /* String */) {
1310
+ // could have been passed as a number or boolean
1311
+ // but we still want it as a string
1312
+ return String(propValue);
1313
+ }
1314
+ // redundant return here for better minification
1315
+ return propValue;
1316
+ }
1317
+ // not sure exactly what type we want
1318
+ // so no need to change to a different type
1319
+ return propValue;
1320
+ };
1321
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1322
+ const setValue = (ref, propName, newVal, cmpMeta) => {
1323
+ // check our new property value against our internal value
1324
+ const hostRef = getHostRef(ref);
1325
+ const elm = hostRef.$hostElement$ ;
1326
+ const oldVal = hostRef.$instanceValues$.get(propName);
1327
+ const flags = hostRef.$flags$;
1328
+ const instance = hostRef.$lazyInstance$ ;
1329
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1330
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1331
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1332
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1333
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1334
+ // gadzooks! the property's value has changed!!
1335
+ // set our new value!
1336
+ hostRef.$instanceValues$.set(propName, newVal);
1337
+ if (instance) {
1338
+ // get an array of method names of watch functions to call
1339
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1340
+ const watchMethods = cmpMeta.$watchers$[propName];
1341
+ if (watchMethods) {
1342
+ // this instance is watching for when this property changed
1343
+ watchMethods.map((watchMethodName) => {
1344
+ try {
1345
+ // fire off each of the watch methods that are watching this property
1346
+ instance[watchMethodName](newVal, oldVal, propName);
1347
+ }
1348
+ catch (e) {
1349
+ consoleError(e, elm);
1350
+ }
1351
+ });
1352
+ }
1353
+ }
1354
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1355
+ if (instance.componentShouldUpdate) {
1356
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1357
+ return;
1358
+ }
1359
+ }
1360
+ // looks like this value actually changed, so we've got work to do!
1361
+ // but only if we've already rendered, otherwise just chill out
1362
+ // queue that we need to do an update, but don't worry about queuing
1363
+ // up millions cuz this function ensures it only runs once
1364
+ scheduleUpdate(hostRef, false);
1365
+ }
1366
+ }
1367
+ }
1368
+ };
1369
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
1370
+ if (cmpMeta.$members$) {
1371
+ if (Cstr.watchers) {
1372
+ cmpMeta.$watchers$ = Cstr.watchers;
1373
+ }
1374
+ // It's better to have a const than two Object.entries()
1375
+ const members = Object.entries(cmpMeta.$members$);
1376
+ const prototype = Cstr.prototype;
1377
+ members.map(([memberName, [memberFlags]]) => {
1378
+ if ((memberFlags & 31 /* Prop */ ||
1379
+ ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
1380
+ // proxyComponent - prop
1381
+ Object.defineProperty(prototype, memberName, {
1382
+ get() {
1383
+ // proxyComponent, get value
1384
+ return getValue(this, memberName);
1385
+ },
1386
+ set(newValue) {
1387
+ // proxyComponent, set value
1388
+ setValue(this, memberName, newValue, cmpMeta);
1389
+ },
1390
+ configurable: true,
1391
+ enumerable: true,
1392
+ });
1393
+ }
1394
+ else if (flags & 1 /* isElementConstructor */ &&
1395
+ memberFlags & 64 /* Method */) {
1396
+ // proxyComponent - method
1397
+ Object.defineProperty(prototype, memberName, {
1398
+ value(...args) {
1399
+ const ref = getHostRef(this);
1400
+ return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
1401
+ },
1402
+ });
1403
+ }
1404
+ });
1405
+ if ((flags & 1 /* isElementConstructor */)) {
1406
+ const attrNameToPropName = new Map();
1407
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1408
+ plt.jmp(() => {
1409
+ const propName = attrNameToPropName.get(attrName);
1410
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1411
+ // in the case where an attribute was set inline.
1412
+ // ```html
1413
+ // <my-component some-attribute="some-value"></my-component>
1414
+ // ```
1415
+ //
1416
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1417
+ // programmatically changes it before it has been upgraded as shown below:
1418
+ //
1419
+ // ```html
1420
+ // <!-- this component has _not_ been upgraded yet -->
1421
+ // <my-component id="test" some-attribute="some-value"></my-component>
1422
+ // <script>
1423
+ // // grab non-upgraded component
1424
+ // el = document.querySelector("#test");
1425
+ // el.someAttribute = "another-value";
1426
+ // // upgrade component
1427
+ // customElements.define('my-component', MyComponent);
1428
+ // </script>
1429
+ // ```
1430
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1431
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1432
+ // to the value that was set inline i.e. "some-value" from above example. When
1433
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1434
+ //
1435
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1436
+ // by connectedCallback as this attributeChangedCallback will not fire.
1437
+ //
1438
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1439
+ //
1440
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1441
+ // properties here given that this goes against best practices outlined here
1442
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1443
+ if (this.hasOwnProperty(propName)) {
1444
+ newValue = this[propName];
1445
+ delete this[propName];
1446
+ }
1447
+ else if (prototype.hasOwnProperty(propName) &&
1448
+ typeof this[propName] === 'number' &&
1449
+ this[propName] == newValue) {
1450
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1451
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1452
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1453
+ return;
1454
+ }
1455
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1456
+ });
1457
+ };
1458
+ // create an array of attributes to observe
1459
+ // and also create a map of html attribute name to js property name
1460
+ Cstr.observedAttributes = members
1461
+ .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
1462
+ .map(([propName, m]) => {
1463
+ const attrName = m[1] || propName;
1464
+ attrNameToPropName.set(attrName, propName);
1465
+ if (m[0] & 512 /* ReflectAttr */) {
1466
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1467
+ }
1468
+ return attrName;
1469
+ });
1470
+ }
1471
+ }
1472
+ return Cstr;
1473
+ };
1474
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1475
+ // initializeComponent
1476
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1477
+ {
1478
+ // we haven't initialized this element yet
1479
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1480
+ // lazy loaded components
1481
+ // request the component's implementation to be
1482
+ // wired up with the host element
1483
+ Cstr = loadModule(cmpMeta);
1484
+ if (Cstr.then) {
1485
+ // Await creates a micro-task avoid if possible
1486
+ const endLoad = uniqueTime();
1487
+ Cstr = await Cstr;
1488
+ endLoad();
1489
+ }
1490
+ if (!Cstr.isProxied) {
1491
+ // we've never proxied this Constructor before
1492
+ // let's add the getters/setters to its prototype before
1493
+ // the first time we create an instance of the implementation
1494
+ {
1495
+ cmpMeta.$watchers$ = Cstr.watchers;
1496
+ }
1497
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1498
+ Cstr.isProxied = true;
1499
+ }
1500
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1501
+ // ok, time to construct the instance
1502
+ // but let's keep track of when we start and stop
1503
+ // so that the getters/setters don't incorrectly step on data
1504
+ {
1505
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
1506
+ }
1507
+ // construct the lazy-loaded component implementation
1508
+ // passing the hostRef is very important during
1509
+ // construction in order to directly wire together the
1510
+ // host element and the lazy-loaded instance
1511
+ try {
1512
+ new Cstr(hostRef);
1513
+ }
1514
+ catch (e) {
1515
+ consoleError(e);
1516
+ }
1517
+ {
1518
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1519
+ }
1520
+ {
1521
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1522
+ }
1523
+ endNewInstance();
1524
+ fireConnectedCallback(hostRef.$lazyInstance$);
1525
+ }
1526
+ if (Cstr.style) {
1527
+ // this component has styles but we haven't registered them yet
1528
+ let style = Cstr.style;
1529
+ const scopeId = getScopeId(cmpMeta);
1530
+ if (!styles.has(scopeId)) {
1531
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1532
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1533
+ endRegisterStyles();
1534
+ }
1535
+ }
1536
+ }
1537
+ // we've successfully created a lazy instance
1538
+ const ancestorComponent = hostRef.$ancestorComponent$;
1539
+ const schedule = () => scheduleUpdate(hostRef, true);
1540
+ if (ancestorComponent && ancestorComponent['s-rc']) {
1541
+ // this is the initial load and this component it has an ancestor component
1542
+ // but the ancestor component has NOT fired its will update lifecycle yet
1543
+ // so let's just cool our jets and wait for the ancestor to continue first
1544
+ // this will get fired off when the ancestor component
1545
+ // finally gets around to rendering its lazy self
1546
+ // fire off the initial update
1547
+ ancestorComponent['s-rc'].push(schedule);
1548
+ }
1549
+ else {
1550
+ schedule();
1551
+ }
1552
+ };
1553
+ const fireConnectedCallback = (instance) => {
1554
+ {
1555
+ safeCall(instance, 'connectedCallback');
1556
+ }
1557
+ };
1558
+ const connectedCallback = (elm) => {
1559
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1560
+ const hostRef = getHostRef(elm);
1561
+ const cmpMeta = hostRef.$cmpMeta$;
1562
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1563
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1564
+ // first time this component has connected
1565
+ hostRef.$flags$ |= 1 /* hasConnected */;
1566
+ {
1567
+ // initUpdate
1568
+ // if the slot polyfill is required we'll need to put some nodes
1569
+ // in here to act as original content anchors as we move nodes around
1570
+ // host element has been connected to the DOM
1571
+ if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1572
+ setContentReference(elm);
1573
+ }
1574
+ }
1575
+ {
1576
+ // find the first ancestor component (if there is one) and register
1577
+ // this component as one of the actively loading child components for its ancestor
1578
+ let ancestorComponent = elm;
1579
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1580
+ // climb up the ancestors looking for the first
1581
+ // component that hasn't finished its lifecycle update yet
1582
+ if (ancestorComponent['s-p']) {
1583
+ // we found this components first ancestor component
1584
+ // keep a reference to this component's ancestor component
1585
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1586
+ break;
1587
+ }
1588
+ }
1589
+ }
1590
+ // Lazy properties
1591
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1592
+ if (cmpMeta.$members$) {
1593
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1594
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1595
+ const value = elm[memberName];
1596
+ delete elm[memberName];
1597
+ elm[memberName] = value;
1598
+ }
1599
+ });
1600
+ }
1601
+ {
1602
+ initializeComponent(elm, hostRef, cmpMeta);
1603
+ }
1604
+ }
1605
+ else {
1606
+ // not the first time this has connected
1607
+ // reattach any event listeners to the host
1608
+ // since they would have been removed when disconnected
1609
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1610
+ // fire off connectedCallback() on component instance
1611
+ fireConnectedCallback(hostRef.$lazyInstance$);
1612
+ }
1613
+ endConnected();
1614
+ }
1615
+ };
1616
+ const setContentReference = (elm) => {
1617
+ // only required when we're NOT using native shadow dom (slot)
1618
+ // or this browser doesn't support native shadow dom
1619
+ // and this host element was NOT created with SSR
1620
+ // let's pick out the inner content for slot projection
1621
+ // create a node to represent where the original
1622
+ // content was first placed, which is useful later on
1623
+ const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1624
+ contentRefElm['s-cn'] = true;
1625
+ elm.insertBefore(contentRefElm, elm.firstChild);
1626
+ };
1627
+ const disconnectedCallback = (elm) => {
1628
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1629
+ const hostRef = getHostRef(elm);
1630
+ const instance = hostRef.$lazyInstance$ ;
1631
+ {
1632
+ if (hostRef.$rmListeners$) {
1633
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1634
+ hostRef.$rmListeners$ = undefined;
1635
+ }
1636
+ }
1637
+ {
1638
+ safeCall(instance, 'disconnectedCallback');
1639
+ }
1640
+ }
1641
+ };
1642
+ const bootstrapLazy = (lazyBundles, options = {}) => {
1643
+ const endBootstrap = createTime();
1644
+ const cmpTags = [];
1645
+ const exclude = options.exclude || [];
1646
+ const customElements = win.customElements;
1647
+ const head = doc.head;
1648
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1649
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1650
+ const deferredConnectedCallbacks = [];
1651
+ let appLoadFallback;
1652
+ let isBootstrapping = true;
1653
+ Object.assign(plt, options);
1654
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1655
+ lazyBundles.map((lazyBundle) => {
1656
+ lazyBundle[1].map((compactMeta) => {
1657
+ const cmpMeta = {
1658
+ $flags$: compactMeta[0],
1659
+ $tagName$: compactMeta[1],
1660
+ $members$: compactMeta[2],
1661
+ $listeners$: compactMeta[3],
1662
+ };
1663
+ {
1664
+ cmpMeta.$members$ = compactMeta[2];
1665
+ }
1666
+ {
1667
+ cmpMeta.$listeners$ = compactMeta[3];
1668
+ }
1669
+ {
1670
+ cmpMeta.$attrsToReflect$ = [];
1671
+ }
1672
+ {
1673
+ cmpMeta.$watchers$ = {};
1674
+ }
1675
+ const tagName = cmpMeta.$tagName$;
1676
+ const HostElement = class extends HTMLElement {
1677
+ // StencilLazyHost
1678
+ constructor(self) {
1679
+ // @ts-ignore
1680
+ super(self);
1681
+ self = this;
1682
+ registerHost(self, cmpMeta);
1683
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1684
+ // this component is using shadow dom
1685
+ // and this browser supports shadow dom
1686
+ // add the read-only property "shadowRoot" to the host element
1687
+ // adding the shadow root build conditionals to minimize runtime
1688
+ {
1689
+ {
1690
+ self.attachShadow({ mode: 'open' });
1691
+ }
1692
+ }
1693
+ }
1694
+ }
1695
+ connectedCallback() {
1696
+ if (appLoadFallback) {
1697
+ clearTimeout(appLoadFallback);
1698
+ appLoadFallback = null;
1699
+ }
1700
+ if (isBootstrapping) {
1701
+ // connectedCallback will be processed once all components have been registered
1702
+ deferredConnectedCallbacks.push(this);
1703
+ }
1704
+ else {
1705
+ plt.jmp(() => connectedCallback(this));
1706
+ }
1707
+ }
1708
+ disconnectedCallback() {
1709
+ plt.jmp(() => disconnectedCallback(this));
1710
+ }
1711
+ componentOnReady() {
1712
+ return getHostRef(this).$onReadyPromise$;
1713
+ }
1714
+ };
1715
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1716
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1717
+ cmpTags.push(tagName);
1718
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1719
+ }
1720
+ });
1721
+ });
1722
+ {
1723
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1724
+ visibilityStyle.setAttribute('data-styles', '');
1725
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1726
+ }
1727
+ // Process deferred connectedCallbacks now all components have been registered
1728
+ isBootstrapping = false;
1729
+ if (deferredConnectedCallbacks.length) {
1730
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1731
+ }
1732
+ else {
1733
+ {
1734
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1735
+ }
1736
+ }
1737
+ // Fallback appLoad event
1738
+ endBootstrap();
1739
+ };
1740
+ const getAssetPath = (path) => {
1741
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
1742
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
1743
+ };
1744
+ const hostRefs = new WeakMap();
1745
+ const getHostRef = (ref) => hostRefs.get(ref);
1746
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1747
+ const registerHost = (elm, cmpMeta) => {
1748
+ const hostRef = {
1749
+ $flags$: 0,
1750
+ $hostElement$: elm,
1751
+ $cmpMeta$: cmpMeta,
1752
+ $instanceValues$: new Map(),
1753
+ };
1754
+ {
1755
+ hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
1756
+ }
1757
+ {
1758
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1759
+ elm['s-p'] = [];
1760
+ elm['s-rc'] = [];
1761
+ }
1762
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1763
+ return hostRefs.set(elm, hostRef);
1764
+ };
1765
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1766
+ const consoleError = (e, el) => (0, console.error)(e, el);
1767
+ const cmpModules = /*@__PURE__*/ new Map();
1768
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1769
+ // loadModuleImport
1770
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1771
+ const bundleId = cmpMeta.$lazyBundleId$;
1772
+ const module = cmpModules.get(bundleId) ;
1773
+ if (module) {
1774
+ return module[exportName];
1775
+ }
1776
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1777
+ return import(
1778
+ /* @vite-ignore */
1779
+ /* webpackInclude: /\.entry\.js$/ */
1780
+ /* webpackExclude: /\.system\.entry\.js$/ */
1781
+ /* webpackMode: "lazy" */
1782
+ `./${bundleId}.entry.js${''}`).then((importedModule) => {
1783
+ {
1784
+ cmpModules.set(bundleId, importedModule);
1785
+ }
1786
+ return importedModule[exportName];
1787
+ }, consoleError);
1788
+ };
1789
+ const styles = new Map();
1790
+ const queueDomReads = [];
1791
+ const queueDomWrites = [];
1792
+ const queueTask = (queue, write) => (cb) => {
1793
+ queue.push(cb);
1794
+ if (!queuePending) {
1795
+ queuePending = true;
1796
+ if (write && plt.$flags$ & 4 /* queueSync */) {
1797
+ nextTick(flush);
1798
+ }
1799
+ else {
1800
+ plt.raf(flush);
1801
+ }
1802
+ }
1803
+ };
1804
+ const consume = (queue) => {
1805
+ for (let i = 0; i < queue.length; i++) {
1806
+ try {
1807
+ queue[i](performance.now());
1808
+ }
1809
+ catch (e) {
1810
+ consoleError(e);
1811
+ }
1812
+ }
1813
+ queue.length = 0;
1814
+ };
1815
+ const flush = () => {
1816
+ // always force a bunch of medium callbacks to run, but still have
1817
+ // a throttle on how many can run in a certain time
1818
+ // DOM READS!!!
1819
+ consume(queueDomReads);
1820
+ // DOM WRITES!!!
1821
+ {
1822
+ consume(queueDomWrites);
1823
+ if ((queuePending = queueDomReads.length > 0)) {
1824
+ // still more to do yet, but we've run out of time
1825
+ // let's let this thing cool off and try again in the next tick
1826
+ plt.raf(flush);
1827
+ }
1828
+ }
1829
+ };
1830
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1831
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1832
+
1833
+ export { Host as H, getRenderingRef as a, bootstrapLazy as b, createEvent as c, getAssetPath as d, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r };