@sme.up/ketchup 9.6.5 → 9.6.6

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 (673) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/{f-button-23ec3db5.js → f-button-7de4ca64.js} +2 -2
  3. package/dist/cjs/{f-cell-bcc51c0f.js → f-cell-abe47ff4.js} +7 -7
  4. package/dist/cjs/{f-checkbox-1fa28e76.js → f-checkbox-e19055aa.js} +1 -1
  5. package/dist/cjs/{f-chip-63363ecf.js → f-chip-d98809f9.js} +3 -3
  6. package/dist/cjs/{f-image-f3944c01.js → f-image-b22e12c9.js} +1 -1
  7. package/dist/cjs/{f-paginator-utils-60e05759.js → f-paginator-utils-59c26ee9.js} +3 -3
  8. package/dist/cjs/{f-text-field-354b6c78.js → f-text-field-4cacd928.js} +2 -2
  9. package/dist/cjs/index-380e4fcd.js +1378 -0
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/ketchup.cjs.js +13 -11
  12. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  13. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +113 -85
  14. package/dist/cjs/kup-box.cjs.entry.js +9 -9
  15. package/dist/cjs/kup-calendar.cjs.entry.js +8 -8
  16. package/dist/cjs/kup-card-list.cjs.entry.js +2 -2
  17. package/dist/cjs/kup-cell.cjs.entry.js +9 -9
  18. package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +8 -8
  19. package/dist/cjs/kup-dashboard.cjs.entry.js +7 -7
  20. package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
  21. package/dist/cjs/kup-echart.cjs.entry.js +3 -3
  22. package/dist/cjs/kup-editor.cjs.entry.js +3 -3
  23. package/dist/cjs/kup-family-tree.cjs.entry.js +6 -6
  24. package/dist/cjs/kup-gantt_10.cjs.entry.js +24 -24
  25. package/dist/cjs/kup-grid.cjs.entry.js +2 -2
  26. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  27. package/dist/cjs/kup-image-list.cjs.entry.js +11 -11
  28. package/dist/cjs/kup-input-panel.cjs.entry.js +10 -10
  29. package/dist/cjs/kup-lazy.cjs.entry.js +13 -13
  30. package/dist/cjs/kup-magic-box.cjs.entry.js +6 -6
  31. package/dist/cjs/{kup-manager-e1bfd4f8.js → kup-manager-118c4e57.js} +223 -50
  32. package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
  33. package/dist/cjs/kup-numeric-picker.cjs.entry.js +4 -4
  34. package/dist/cjs/kup-pdf.cjs.entry.js +5 -4
  35. package/dist/cjs/kup-photo-frame.cjs.entry.js +4 -4
  36. package/dist/cjs/kup-planner-renderer.cjs.entry.js +3 -3
  37. package/dist/cjs/kup-planner.cjs.entry.js +4 -4
  38. package/dist/cjs/kup-probe.cjs.entry.js +3 -3
  39. package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
  40. package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
  41. package/dist/cjs/loader.cjs.js +5 -3
  42. package/dist/collection/collection-manifest.json +2 -2
  43. package/dist/collection/components/kup-accordion/kup-accordion.js +1 -1
  44. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +1 -1
  45. package/dist/collection/components/kup-badge/kup-badge-declarations.js +7 -0
  46. package/dist/collection/components/kup-badge/kup-badge.css +12 -17
  47. package/dist/collection/components/kup-badge/kup-badge.js +31 -3
  48. package/dist/collection/components/kup-button-list/kup-button-list.js +1 -1
  49. package/dist/collection/components/kup-calendar/kup-calendar.css +3 -0
  50. package/dist/collection/components/kup-calendar/kup-calendar.js +2 -2
  51. package/dist/collection/components/kup-card/kup-card.css +1 -2
  52. package/dist/collection/components/kup-cell/kup-cell.js +1 -1
  53. package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
  54. package/dist/collection/components/kup-chip/kup-chip.js +2 -2
  55. package/dist/collection/components/kup-color-picker/kup-color-picker.js +2 -2
  56. package/dist/collection/components/kup-combobox/kup-combobox.js +1 -1
  57. package/dist/collection/components/kup-dashboard/kup-dashboard.js +1 -1
  58. package/dist/collection/components/kup-data-table/kup-data-table.js +9 -9
  59. package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
  60. package/dist/collection/components/kup-dialog/kup-dialog.js +1 -1
  61. package/dist/collection/components/kup-drawer/kup-drawer.js +2 -2
  62. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -1
  63. package/dist/collection/components/kup-echart/kup-echart.js +1 -1
  64. package/dist/collection/components/kup-editor/kup-editor.js +1 -1
  65. package/dist/collection/components/kup-family-tree/kup-family-tree.js +2 -2
  66. package/dist/collection/components/kup-form/kup-form.js +2 -2
  67. package/dist/collection/components/kup-image/assets/svg/ACC.svg +1 -0
  68. package/dist/collection/components/kup-image/assets/svg/ACP.svg +1 -0
  69. package/dist/collection/components/kup-image/assets/svg/AML.svg +1 -0
  70. package/dist/collection/components/kup-image/assets/svg/ASD.svg +1 -0
  71. package/dist/collection/components/kup-image/assets/svg/ATM.svg +1 -0
  72. package/dist/collection/components/kup-image/assets/svg/BAS.svg +1 -0
  73. package/dist/collection/components/kup-image/assets/svg/BCD.svg +1 -0
  74. package/dist/collection/components/kup-image/assets/svg/BLB.svg +1 -0
  75. package/dist/collection/components/kup-image/assets/svg/BOX.svg +1 -0
  76. package/dist/collection/components/kup-image/assets/svg/BTM.svg +1 -0
  77. package/dist/collection/components/kup-image/assets/svg/BTN.svg +1 -0
  78. package/dist/collection/components/kup-image/assets/svg/BTO.svg +1 -0
  79. package/dist/collection/components/kup-image/assets/svg/CAL.svg +1 -0
  80. package/dist/collection/components/kup-image/assets/svg/CAM.svg +1 -0
  81. package/dist/collection/components/kup-image/assets/svg/CDE.svg +1 -0
  82. package/dist/collection/components/kup-image/assets/svg/CFG.svg +1 -0
  83. package/dist/collection/components/kup-image/assets/svg/CFM.svg +1 -0
  84. package/dist/collection/components/kup-image/assets/svg/CHI.svg +1 -0
  85. package/dist/collection/components/kup-image/assets/svg/CHK.svg +1 -0
  86. package/dist/collection/components/kup-image/assets/svg/CHL.svg +1 -0
  87. package/dist/collection/components/kup-image/assets/svg/CHM.svg +1 -0
  88. package/dist/collection/components/kup-image/assets/svg/CHT.svg +1 -0
  89. package/dist/collection/components/kup-image/assets/svg/CLP.svg +1 -0
  90. package/dist/collection/components/kup-image/assets/svg/CMB.svg +1 -0
  91. package/dist/collection/components/kup-image/assets/svg/CMS.svg +1 -0
  92. package/dist/collection/components/kup-image/assets/svg/CND.svg +1 -0
  93. package/dist/collection/components/kup-image/assets/svg/COM.svg +1 -0
  94. package/dist/collection/components/kup-image/assets/svg/CUB.svg +1 -0
  95. package/dist/collection/components/kup-image/assets/svg/DBM.svg +1 -0
  96. package/dist/collection/components/kup-image/assets/svg/DEC.svg +1 -0
  97. package/dist/collection/components/kup-image/assets/svg/DEV.svg +1 -0
  98. package/dist/collection/components/kup-image/assets/svg/DOC.svg +1 -0
  99. package/dist/collection/components/kup-image/assets/svg/DSH.svg +1 -0
  100. package/dist/collection/components/kup-image/assets/svg/DSP.svg +1 -0
  101. package/dist/collection/components/kup-image/assets/svg/DYN.svg +1 -0
  102. package/dist/collection/components/kup-image/assets/svg/EDT.svg +1 -0
  103. package/dist/collection/components/kup-image/assets/svg/EML.svg +1 -0
  104. package/dist/collection/components/kup-image/assets/svg/EMU.svg +1 -0
  105. package/dist/collection/components/kup-image/assets/svg/EVT.svg +1 -0
  106. package/dist/collection/components/kup-image/assets/svg/EXA.svg +1 -0
  107. package/dist/collection/components/kup-image/assets/svg/EXB.svg +1 -0
  108. package/dist/collection/components/kup-image/assets/svg/EXC.svg +1 -0
  109. package/dist/collection/components/kup-image/assets/svg/EXD.svg +1 -0
  110. package/dist/collection/components/kup-image/assets/svg/EXE.svg +1 -0
  111. package/dist/collection/components/kup-image/assets/svg/EXU.svg +1 -0
  112. package/dist/collection/components/kup-image/assets/svg/FBK.svg +1 -0
  113. package/dist/collection/components/kup-image/assets/svg/FIS.svg +1 -0
  114. package/dist/collection/components/kup-image/assets/svg/FLD.svg +1 -0
  115. package/dist/collection/components/kup-image/assets/svg/FLU.svg +1 -0
  116. package/dist/collection/components/kup-image/assets/svg/FRE.svg +1 -0
  117. package/dist/collection/components/kup-image/assets/svg/FRM.svg +1 -0
  118. package/dist/collection/components/kup-image/assets/svg/FUP.svg +1 -0
  119. package/dist/collection/components/kup-image/assets/svg/G18.svg +1 -0
  120. package/dist/collection/components/kup-image/assets/svg/G30.svg +1 -0
  121. package/dist/collection/components/kup-image/assets/svg/G53.svg +1 -0
  122. package/dist/collection/components/kup-image/assets/svg/GAU.svg +1 -0
  123. package/dist/collection/components/kup-image/assets/svg/GEO.svg +1 -0
  124. package/dist/collection/components/kup-image/assets/svg/GND.svg +1 -0
  125. package/dist/collection/components/kup-image/assets/svg/GNT.svg +1 -0
  126. package/dist/collection/components/kup-image/assets/svg/GRA.svg +1 -0
  127. package/dist/collection/components/kup-image/assets/svg/GRP.svg +1 -0
  128. package/dist/collection/components/kup-image/assets/svg/HTM.svg +1 -0
  129. package/dist/collection/components/kup-image/assets/svg/HTR.svg +1 -0
  130. package/dist/collection/components/kup-image/assets/svg/IFL.svg +1 -0
  131. package/dist/collection/components/kup-image/assets/svg/IMD.svg +1 -0
  132. package/dist/collection/components/kup-image/assets/svg/IMG.svg +1 -0
  133. package/dist/collection/components/kup-image/assets/svg/IML.svg +1 -0
  134. package/dist/collection/components/kup-image/assets/svg/INP.svg +1 -0
  135. package/dist/collection/components/kup-image/assets/svg/INR.svg +1 -0
  136. package/dist/collection/components/kup-image/assets/svg/INT.svg +1 -0
  137. package/dist/collection/components/kup-image/assets/svg/ITX.svg +1 -0
  138. package/dist/collection/components/kup-image/assets/svg/JSO.svg +1 -0
  139. package/dist/collection/components/kup-image/assets/svg/KNB.svg +1 -0
  140. package/dist/collection/components/kup-image/assets/svg/KNO.svg +1 -0
  141. package/dist/collection/components/kup-image/assets/svg/LAB.svg +1 -0
  142. package/dist/collection/components/kup-image/assets/svg/LBL.svg +1 -0
  143. package/dist/collection/components/kup-image/assets/svg/LIN.svg +1 -0
  144. package/dist/collection/components/kup-image/assets/svg/LST.svg +1 -0
  145. package/dist/collection/components/kup-image/assets/svg/MDF.svg +1 -0
  146. package/dist/collection/components/kup-image/assets/svg/MEM.svg +1 -0
  147. package/dist/collection/components/kup-image/assets/svg/MIN.svg +1 -0
  148. package/dist/collection/components/kup-image/assets/svg/MLV.svg +1 -0
  149. package/dist/collection/components/kup-image/assets/svg/MO.svg +3 -0
  150. package/dist/collection/components/kup-image/assets/svg/MSG.svg +1 -0
  151. package/dist/collection/components/kup-image/assets/svg/MSS.svg +1 -0
  152. package/dist/collection/components/kup-image/assets/svg/OCX.svg +1 -0
  153. package/dist/collection/components/kup-image/assets/svg/OGN.svg +1 -0
  154. package/dist/collection/components/kup-image/assets/svg/OPN.svg +1 -0
  155. package/dist/collection/components/kup-image/assets/svg/OPN2.svg +1 -0
  156. package/dist/collection/components/kup-image/assets/svg/OUT.svg +1 -0
  157. package/dist/collection/components/kup-image/assets/svg/PAT.svg +1 -0
  158. package/dist/collection/components/kup-image/assets/svg/PCK.svg +1 -0
  159. package/dist/collection/components/kup-image/assets/svg/PDF.svg +1 -0
  160. package/dist/collection/components/kup-image/assets/svg/PGB.svg +1 -0
  161. package/dist/collection/components/kup-image/assets/svg/POP.svg +1 -0
  162. package/dist/collection/components/kup-image/assets/svg/POP2.svg +1 -0
  163. package/dist/collection/components/kup-image/assets/svg/PWD.svg +1 -0
  164. package/dist/collection/components/kup-image/assets/svg/QRY.svg +1 -0
  165. package/dist/collection/components/kup-image/assets/svg/RAD.svg +1 -0
  166. package/dist/collection/components/kup-image/assets/svg/REP.svg +1 -0
  167. package/dist/collection/components/kup-image/assets/svg/REP2.svg +1 -0
  168. package/dist/collection/components/kup-image/assets/svg/RNG.svg +1 -0
  169. package/dist/collection/components/kup-image/assets/svg/RTG.svg +1 -0
  170. package/dist/collection/components/kup-image/assets/svg/SEM.svg +1 -0
  171. package/dist/collection/components/kup-image/assets/svg/SET.svg +1 -0
  172. package/dist/collection/components/kup-image/assets/svg/SHE.svg +1 -0
  173. package/dist/collection/components/kup-image/assets/svg/SIG.svg +1 -0
  174. package/dist/collection/components/kup-image/assets/svg/SLD.svg +1 -0
  175. package/dist/collection/components/kup-image/assets/svg/SPC.svg +1 -0
  176. package/dist/collection/components/kup-image/assets/svg/SPL.svg +1 -0
  177. package/dist/collection/components/kup-image/assets/svg/SPN.svg +1 -0
  178. package/dist/collection/components/kup-image/assets/svg/SRC.svg +1 -0
  179. package/dist/collection/components/kup-image/assets/svg/SRI.svg +1 -0
  180. package/dist/collection/components/kup-image/assets/svg/STR.svg +1 -0
  181. package/dist/collection/components/kup-image/assets/svg/SWT.svg +1 -0
  182. package/dist/collection/components/kup-image/assets/svg/SYS.svg +1 -0
  183. package/dist/collection/components/kup-image/assets/svg/TBL.svg +1 -0
  184. package/dist/collection/components/kup-image/assets/svg/TCL.svg +1 -0
  185. package/dist/collection/components/kup-image/assets/svg/TED.svg +1 -0
  186. package/dist/collection/components/kup-image/assets/svg/TIM.svg +1 -0
  187. package/dist/collection/components/kup-image/assets/svg/TML.svg +1 -0
  188. package/dist/collection/components/kup-image/assets/svg/TMP.svg +1 -0
  189. package/dist/collection/components/kup-image/assets/svg/TPK.svg +1 -0
  190. package/dist/collection/components/kup-image/assets/svg/TRA.svg +1 -0
  191. package/dist/collection/components/kup-image/assets/svg/TRE.svg +1 -0
  192. package/dist/collection/components/kup-image/assets/svg/TRG.svg +1 -0
  193. package/dist/collection/components/kup-image/assets/svg/TSC.svg +1 -0
  194. package/dist/collection/components/kup-image/assets/svg/TXT.svg +1 -0
  195. package/dist/collection/components/kup-image/assets/svg/WFD.svg +1 -0
  196. package/dist/collection/components/kup-image/assets/svg/agriculture.svg +3 -0
  197. package/dist/collection/components/kup-image/assets/svg/apparel.svg +3 -0
  198. package/dist/collection/components/kup-image/assets/svg/brescia.svg +6 -0
  199. package/dist/collection/components/kup-image/assets/svg/brusaporto.svg +6 -0
  200. package/dist/collection/components/kup-image/assets/svg/car-repair.svg +3 -0
  201. package/dist/collection/components/kup-image/assets/svg/carbo.svg +9 -0
  202. package/dist/collection/components/kup-image/assets/svg/chemical-product.svg +3 -0
  203. package/dist/collection/components/kup-image/assets/svg/civil-engineering.svg +6 -0
  204. package/dist/collection/components/kup-image/assets/svg/contract.svg +3 -0
  205. package/dist/collection/components/kup-image/assets/svg/customer-service.svg +3 -0
  206. package/dist/collection/components/kup-image/assets/svg/diamond.svg +3 -0
  207. package/dist/collection/components/kup-image/assets/svg/directions-boat.svg +3 -0
  208. package/dist/collection/components/kup-image/assets/svg/directions-car.svg +3 -0
  209. package/dist/collection/components/kup-image/assets/svg/domain-add.svg +3 -0
  210. package/dist/collection/components/kup-image/assets/svg/dresser.svg +3 -0
  211. package/dist/collection/components/kup-image/assets/svg/ecommerce.svg +4 -0
  212. package/dist/collection/components/kup-image/assets/svg/eletrical-services.svg +3 -0
  213. package/dist/collection/components/kup-image/assets/svg/eletronic-equipment.svg +8 -0
  214. package/dist/collection/components/kup-image/assets/svg/erbusco.svg +6 -0
  215. package/dist/collection/components/kup-image/assets/svg/factory.svg +3 -1
  216. package/dist/collection/components/kup-image/assets/svg/faenza.svg +6 -0
  217. package/dist/collection/components/kup-image/assets/svg/fishing.svg +3 -0
  218. package/dist/collection/components/kup-image/assets/svg/flight.svg +3 -1
  219. package/dist/collection/components/kup-image/assets/svg/forest.svg +4 -0
  220. package/dist/collection/components/kup-image/assets/svg/front-loader.svg +3 -0
  221. package/dist/collection/components/kup-image/assets/svg/gallarate.svg +6 -0
  222. package/dist/collection/components/kup-image/assets/svg/general-direction.svg +3 -0
  223. package/dist/collection/components/kup-image/assets/svg/home-repair-service.svg +3 -0
  224. package/dist/collection/components/kup-image/assets/svg/hotel.svg +3 -1
  225. package/dist/collection/components/kup-image/assets/svg/human-resource.svg +3 -0
  226. package/dist/collection/components/kup-image/assets/svg/imola.svg +6 -0
  227. package/dist/collection/components/kup-image/assets/svg/informative-system.svg +8 -0
  228. package/dist/collection/components/kup-image/assets/svg/innovation-tech.svg +3 -0
  229. package/dist/collection/components/kup-image/assets/svg/key.svg +1 -1
  230. package/dist/collection/components/kup-image/assets/svg/knowledge-course.svg +7 -0
  231. package/dist/collection/components/kup-image/assets/svg/knowledge.svg +3 -0
  232. package/dist/collection/components/kup-image/assets/svg/leather.svg +10 -0
  233. package/dist/collection/components/kup-image/assets/svg/lecco.svg +6 -0
  234. package/dist/collection/components/kup-image/assets/svg/local-post-office.svg +3 -0
  235. package/dist/collection/components/kup-image/assets/svg/local-shipping.svg +3 -0
  236. package/dist/collection/components/kup-image/assets/svg/logistic.svg +3 -0
  237. package/dist/collection/components/kup-image/assets/svg/management.svg +3 -0
  238. package/dist/collection/components/kup-image/assets/svg/map.svg +1 -1
  239. package/dist/collection/components/kup-image/assets/svg/marketing.svg +3 -0
  240. package/dist/collection/components/kup-image/assets/svg/metal.svg +3 -0
  241. package/dist/collection/components/kup-image/assets/svg/metallurgy.svg +6 -0
  242. package/dist/collection/components/kup-image/assets/svg/mines.svg +8 -0
  243. package/dist/collection/components/kup-image/assets/svg/mining.svg +9 -0
  244. package/dist/collection/components/kup-image/assets/svg/modena.svg +8 -0
  245. package/dist/collection/components/kup-image/assets/svg/monopoli.svg +6 -0
  246. package/dist/collection/components/kup-image/assets/svg/montichiari.svg +6 -0
  247. package/dist/collection/components/kup-image/assets/svg/nova-milanese.svg +6 -0
  248. package/dist/collection/components/kup-image/assets/svg/oil-barrel.svg +3 -0
  249. package/dist/collection/components/kup-image/assets/svg/osimo.svg +6 -0
  250. package/dist/collection/components/kup-image/assets/svg/padova.svg +6 -0
  251. package/dist/collection/components/kup-image/assets/svg/parma.svg +6 -0
  252. package/dist/collection/components/kup-image/assets/svg/plastics.svg +6 -0
  253. package/dist/collection/components/kup-image/assets/svg/precision-manufacturing.svg +3 -0
  254. package/dist/collection/components/kup-image/assets/svg/production.svg +3 -0
  255. package/dist/collection/components/kup-image/assets/svg/purchase.svg +4 -0
  256. package/dist/collection/components/kup-image/assets/svg/quality.svg +3 -0
  257. package/dist/collection/components/kup-image/assets/svg/question-mark.svg +3 -0
  258. package/dist/collection/components/kup-image/assets/svg/recent-patient.svg +3 -0
  259. package/dist/collection/components/kup-image/assets/svg/recycling.svg +3 -0
  260. package/dist/collection/components/kup-image/assets/svg/reggio-emilia.svg +6 -0
  261. package/dist/collection/components/kup-image/assets/svg/repair.svg +3 -0
  262. package/dist/collection/components/kup-image/assets/svg/research-and-development.svg +3 -0
  263. package/dist/collection/components/kup-image/assets/svg/restaurant.svg +3 -1
  264. package/dist/collection/components/kup-image/assets/svg/rivoli.svg +6 -0
  265. package/dist/collection/components/kup-image/assets/svg/roma.svg +6 -0
  266. package/dist/collection/components/kup-image/assets/svg/sales.svg +3 -0
  267. package/dist/collection/components/kup-image/assets/svg/salo.svg +6 -0
  268. package/dist/collection/components/kup-image/assets/svg/savigliano.svg +6 -0
  269. package/dist/collection/components/kup-image/assets/svg/sewers.svg +6 -0
  270. package/dist/collection/components/kup-image/assets/svg/smoking-rooms.svg +3 -0
  271. package/dist/collection/components/kup-image/assets/svg/store.svg +3 -1
  272. package/dist/collection/components/kup-image/assets/svg/technical-office.svg +3 -0
  273. package/dist/collection/components/kup-image/assets/svg/textile.svg +5 -0
  274. package/dist/collection/components/kup-image/assets/svg/treviolo.svg +6 -0
  275. package/dist/collection/components/kup-image/assets/svg/trolley.svg +4 -0
  276. package/dist/collection/components/kup-image/assets/svg/udine.svg +6 -0
  277. package/dist/collection/components/kup-image/assets/svg/vaccines.svg +3 -0
  278. package/dist/collection/components/kup-image/assets/svg/vercelli.svg +6 -0
  279. package/dist/collection/components/kup-image/assets/svg/vicenza.svg +6 -0
  280. package/dist/collection/components/kup-image/assets/svg/warehouse.svg +3 -0
  281. package/dist/collection/components/kup-image/assets/svg/waste-disposal.svg +3 -0
  282. package/dist/collection/components/kup-image/assets/svg/water-bottle.svg +3 -0
  283. package/dist/collection/components/kup-image/assets/svg/water-pump.svg +3 -0
  284. package/dist/collection/components/kup-image/assets/svg/web.svg +1 -1
  285. package/dist/collection/components/kup-image/assets/svg/wood.svg +4 -0
  286. package/dist/collection/components/kup-image-list/kup-image-list.js +3 -3
  287. package/dist/collection/components/kup-input-panel/kup-input-panel.js +2 -2
  288. package/dist/collection/components/kup-lazy/kup-lazy.js +11 -11
  289. package/dist/collection/components/kup-list/kup-list.js +1 -1
  290. package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
  291. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
  292. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +1 -1
  293. package/dist/collection/components/kup-pdf/kup-pdf.js +23 -2
  294. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +2 -2
  295. package/dist/collection/components/kup-planner/kup-planner.js +1 -1
  296. package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +2 -2
  297. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +2 -2
  298. package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +2 -2
  299. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +3 -3
  300. package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +5 -5
  301. package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +2 -2
  302. package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +1 -1
  303. package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +2 -2
  304. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
  305. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
  306. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +1 -1
  307. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
  308. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
  309. package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
  310. package/dist/collection/components/kup-probe/kup-probe.js +1 -1
  311. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
  312. package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
  313. package/dist/collection/components/kup-rating/kup-rating.js +1 -1
  314. package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
  315. package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
  316. package/dist/collection/components/kup-switch/kup-switch.js +1 -1
  317. package/dist/collection/components/kup-time-picker/kup-time-picker.css +0 -509
  318. package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
  319. package/dist/collection/components/kup-tree/kup-tree.js +6 -6
  320. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +23 -3
  321. package/dist/components/custom-task-list-header.js +2 -2
  322. package/dist/components/kup-accordion.js +1 -1
  323. package/dist/components/kup-autocomplete2.js +104 -75
  324. package/dist/components/kup-calendar.js +3 -3
  325. package/dist/components/kup-cell.js +1 -1
  326. package/dist/components/kup-dashboard.js +1 -1
  327. package/dist/components/kup-drawer.js +2 -2
  328. package/dist/components/kup-echart2.js +1 -1
  329. package/dist/components/kup-editor.js +1 -1
  330. package/dist/components/kup-family-tree.js +2 -2
  331. package/dist/components/kup-gantt-calendar2.js +2 -2
  332. package/dist/components/kup-gantt2.js +2 -2
  333. package/dist/components/kup-grid-renderer2.js +3 -3
  334. package/dist/components/kup-horizontal-scroll2.js +5 -5
  335. package/dist/components/kup-image-list.js +3 -3
  336. package/dist/components/kup-input-panel.js +2 -2
  337. package/dist/components/kup-lazy.js +11 -11
  338. package/dist/components/kup-magic-box.js +3 -3
  339. package/dist/components/kup-manager.js +222 -49
  340. package/dist/components/kup-nav-bar.js +1 -1
  341. package/dist/components/kup-numeric-picker.js +1 -1
  342. package/dist/components/kup-pdf.js +4 -2
  343. package/dist/components/kup-photo-frame.js +2 -2
  344. package/dist/components/kup-planner-renderer2.js +2 -2
  345. package/dist/components/kup-planner.js +1 -1
  346. package/dist/components/kup-probe.js +1 -1
  347. package/dist/components/kup-qlik.js +1 -1
  348. package/dist/components/kup-snackbar.js +1 -1
  349. package/dist/components/kup-standard-tooltip2.js +1 -1
  350. package/dist/components/kup-switcher2.js +1 -1
  351. package/dist/components/kup-task-gantt2.js +2 -2
  352. package/dist/components/kup-task-list-header2.js +7 -7
  353. package/dist/components/kup-task-list-table2.js +1 -1
  354. package/dist/components/kup-task-list2.js +1 -1
  355. package/dist/components/kup-tooltip2.js +1 -1
  356. package/dist/components/kup-vertical-scroll2.js +2 -2
  357. package/dist/esm/app-globals-0f993ce5.js +3 -0
  358. package/dist/esm/{f-button-d6dbcfd6.js → f-button-e63b4537.js} +2 -2
  359. package/dist/esm/{f-cell-7b41415c.js → f-cell-262f3239.js} +7 -7
  360. package/dist/esm/{f-checkbox-ddb6234e.js → f-checkbox-61c142b8.js} +1 -1
  361. package/dist/esm/{f-chip-68d27d7a.js → f-chip-eaf517ff.js} +3 -3
  362. package/dist/esm/{f-image-a67229e5.js → f-image-20e217c8.js} +1 -1
  363. package/dist/esm/{f-paginator-utils-8773e358.js → f-paginator-utils-7ed775bd.js} +3 -3
  364. package/dist/esm/{f-text-field-d364ffd2.js → f-text-field-17075562.js} +2 -2
  365. package/dist/esm/index-95bb3410.js +1345 -0
  366. package/dist/esm/index.js +2 -2
  367. package/dist/esm/ketchup.js +14 -12
  368. package/dist/esm/kup-accordion.entry.js +4 -4
  369. package/dist/esm/kup-autocomplete_27.entry.js +113 -85
  370. package/dist/esm/kup-box.entry.js +9 -9
  371. package/dist/esm/kup-calendar.entry.js +8 -8
  372. package/dist/esm/kup-card-list.entry.js +2 -2
  373. package/dist/esm/kup-cell.entry.js +9 -9
  374. package/dist/esm/kup-custom-task-list-header_4.entry.js +8 -8
  375. package/dist/esm/kup-dashboard.entry.js +7 -7
  376. package/dist/esm/kup-drawer.entry.js +4 -4
  377. package/dist/esm/kup-echart.entry.js +3 -3
  378. package/dist/esm/kup-editor.entry.js +3 -3
  379. package/dist/esm/kup-family-tree.entry.js +6 -6
  380. package/dist/esm/kup-gantt_10.entry.js +24 -24
  381. package/dist/esm/kup-grid.entry.js +2 -2
  382. package/dist/esm/kup-iframe.entry.js +2 -2
  383. package/dist/esm/kup-image-list.entry.js +11 -11
  384. package/dist/esm/kup-input-panel.entry.js +10 -10
  385. package/dist/esm/kup-lazy.entry.js +13 -13
  386. package/dist/esm/kup-magic-box.entry.js +6 -6
  387. package/dist/esm/{kup-manager-a316a70e.js → kup-manager-c974dda6.js} +223 -50
  388. package/dist/esm/kup-nav-bar.entry.js +3 -3
  389. package/dist/esm/kup-numeric-picker.entry.js +4 -4
  390. package/dist/esm/kup-pdf.entry.js +5 -4
  391. package/dist/esm/kup-photo-frame.entry.js +4 -4
  392. package/dist/esm/kup-planner-renderer.entry.js +3 -3
  393. package/dist/esm/kup-planner.entry.js +4 -4
  394. package/dist/esm/kup-probe.entry.js +3 -3
  395. package/dist/esm/kup-qlik.entry.js +3 -3
  396. package/dist/esm/kup-snackbar.entry.js +5 -5
  397. package/dist/esm/loader.js +6 -4
  398. package/dist/ketchup/assets/svg/ACC.svg +1 -0
  399. package/dist/ketchup/assets/svg/ACP.svg +1 -0
  400. package/dist/ketchup/assets/svg/AML.svg +1 -0
  401. package/dist/ketchup/assets/svg/ASD.svg +1 -0
  402. package/dist/ketchup/assets/svg/ATM.svg +1 -0
  403. package/dist/ketchup/assets/svg/BAS.svg +1 -0
  404. package/dist/ketchup/assets/svg/BCD.svg +1 -0
  405. package/dist/ketchup/assets/svg/BLB.svg +1 -0
  406. package/dist/ketchup/assets/svg/BOX.svg +1 -0
  407. package/dist/ketchup/assets/svg/BTM.svg +1 -0
  408. package/dist/ketchup/assets/svg/BTN.svg +1 -0
  409. package/dist/ketchup/assets/svg/BTO.svg +1 -0
  410. package/dist/ketchup/assets/svg/CAL.svg +1 -0
  411. package/dist/ketchup/assets/svg/CAM.svg +1 -0
  412. package/dist/ketchup/assets/svg/CDE.svg +1 -0
  413. package/dist/ketchup/assets/svg/CFG.svg +1 -0
  414. package/dist/ketchup/assets/svg/CFM.svg +1 -0
  415. package/dist/ketchup/assets/svg/CHI.svg +1 -0
  416. package/dist/ketchup/assets/svg/CHK.svg +1 -0
  417. package/dist/ketchup/assets/svg/CHL.svg +1 -0
  418. package/dist/ketchup/assets/svg/CHM.svg +1 -0
  419. package/dist/ketchup/assets/svg/CHT.svg +1 -0
  420. package/dist/ketchup/assets/svg/CLP.svg +1 -0
  421. package/dist/ketchup/assets/svg/CMB.svg +1 -0
  422. package/dist/ketchup/assets/svg/CMS.svg +1 -0
  423. package/dist/ketchup/assets/svg/CND.svg +1 -0
  424. package/dist/ketchup/assets/svg/COM.svg +1 -0
  425. package/dist/ketchup/assets/svg/CUB.svg +1 -0
  426. package/dist/ketchup/assets/svg/DBM.svg +1 -0
  427. package/dist/ketchup/assets/svg/DEC.svg +1 -0
  428. package/dist/ketchup/assets/svg/DEV.svg +1 -0
  429. package/dist/ketchup/assets/svg/DOC.svg +1 -0
  430. package/dist/ketchup/assets/svg/DSH.svg +1 -0
  431. package/dist/ketchup/assets/svg/DSP.svg +1 -0
  432. package/dist/ketchup/assets/svg/DYN.svg +1 -0
  433. package/dist/ketchup/assets/svg/EDT.svg +1 -0
  434. package/dist/ketchup/assets/svg/EML.svg +1 -0
  435. package/dist/ketchup/assets/svg/EMU.svg +1 -0
  436. package/dist/ketchup/assets/svg/EVT.svg +1 -0
  437. package/dist/ketchup/assets/svg/EXA.svg +1 -0
  438. package/dist/ketchup/assets/svg/EXB.svg +1 -0
  439. package/dist/ketchup/assets/svg/EXC.svg +1 -0
  440. package/dist/ketchup/assets/svg/EXD.svg +1 -0
  441. package/dist/ketchup/assets/svg/EXE.svg +1 -0
  442. package/dist/ketchup/assets/svg/EXU.svg +1 -0
  443. package/dist/ketchup/assets/svg/FBK.svg +1 -0
  444. package/dist/ketchup/assets/svg/FIS.svg +1 -0
  445. package/dist/ketchup/assets/svg/FLD.svg +1 -0
  446. package/dist/ketchup/assets/svg/FLU.svg +1 -0
  447. package/dist/ketchup/assets/svg/FRE.svg +1 -0
  448. package/dist/ketchup/assets/svg/FRM.svg +1 -0
  449. package/dist/ketchup/assets/svg/FUP.svg +1 -0
  450. package/dist/ketchup/assets/svg/G18.svg +1 -0
  451. package/dist/ketchup/assets/svg/G30.svg +1 -0
  452. package/dist/ketchup/assets/svg/G53.svg +1 -0
  453. package/dist/ketchup/assets/svg/GAU.svg +1 -0
  454. package/dist/ketchup/assets/svg/GEO.svg +1 -0
  455. package/dist/ketchup/assets/svg/GND.svg +1 -0
  456. package/dist/ketchup/assets/svg/GNT.svg +1 -0
  457. package/dist/ketchup/assets/svg/GRA.svg +1 -0
  458. package/dist/ketchup/assets/svg/GRP.svg +1 -0
  459. package/dist/ketchup/assets/svg/HTM.svg +1 -0
  460. package/dist/ketchup/assets/svg/HTR.svg +1 -0
  461. package/dist/ketchup/assets/svg/IFL.svg +1 -0
  462. package/dist/ketchup/assets/svg/IMD.svg +1 -0
  463. package/dist/ketchup/assets/svg/IMG.svg +1 -0
  464. package/dist/ketchup/assets/svg/IML.svg +1 -0
  465. package/dist/ketchup/assets/svg/INP.svg +1 -0
  466. package/dist/ketchup/assets/svg/INR.svg +1 -0
  467. package/dist/ketchup/assets/svg/INT.svg +1 -0
  468. package/dist/ketchup/assets/svg/ITX.svg +1 -0
  469. package/dist/ketchup/assets/svg/JSO.svg +1 -0
  470. package/dist/ketchup/assets/svg/KNB.svg +1 -0
  471. package/dist/ketchup/assets/svg/KNO.svg +1 -0
  472. package/dist/ketchup/assets/svg/LAB.svg +1 -0
  473. package/dist/ketchup/assets/svg/LBL.svg +1 -0
  474. package/dist/ketchup/assets/svg/LIN.svg +1 -0
  475. package/dist/ketchup/assets/svg/LST.svg +1 -0
  476. package/dist/ketchup/assets/svg/MDF.svg +1 -0
  477. package/dist/ketchup/assets/svg/MEM.svg +1 -0
  478. package/dist/ketchup/assets/svg/MIN.svg +1 -0
  479. package/dist/ketchup/assets/svg/MLV.svg +1 -0
  480. package/dist/ketchup/assets/svg/MO.svg +3 -0
  481. package/dist/ketchup/assets/svg/MSG.svg +1 -0
  482. package/dist/ketchup/assets/svg/MSS.svg +1 -0
  483. package/dist/ketchup/assets/svg/OCX.svg +1 -0
  484. package/dist/ketchup/assets/svg/OGN.svg +1 -0
  485. package/dist/ketchup/assets/svg/OPN.svg +1 -0
  486. package/dist/ketchup/assets/svg/OPN2.svg +1 -0
  487. package/dist/ketchup/assets/svg/OUT.svg +1 -0
  488. package/dist/ketchup/assets/svg/PAT.svg +1 -0
  489. package/dist/ketchup/assets/svg/PCK.svg +1 -0
  490. package/dist/ketchup/assets/svg/PDF.svg +1 -0
  491. package/dist/ketchup/assets/svg/PGB.svg +1 -0
  492. package/dist/ketchup/assets/svg/POP.svg +1 -0
  493. package/dist/ketchup/assets/svg/POP2.svg +1 -0
  494. package/dist/ketchup/assets/svg/PWD.svg +1 -0
  495. package/dist/ketchup/assets/svg/QRY.svg +1 -0
  496. package/dist/ketchup/assets/svg/RAD.svg +1 -0
  497. package/dist/ketchup/assets/svg/REP.svg +1 -0
  498. package/dist/ketchup/assets/svg/REP2.svg +1 -0
  499. package/dist/ketchup/assets/svg/RNG.svg +1 -0
  500. package/dist/ketchup/assets/svg/RTG.svg +1 -0
  501. package/dist/ketchup/assets/svg/SEM.svg +1 -0
  502. package/dist/ketchup/assets/svg/SET.svg +1 -0
  503. package/dist/ketchup/assets/svg/SHE.svg +1 -0
  504. package/dist/ketchup/assets/svg/SIG.svg +1 -0
  505. package/dist/ketchup/assets/svg/SLD.svg +1 -0
  506. package/dist/ketchup/assets/svg/SPC.svg +1 -0
  507. package/dist/ketchup/assets/svg/SPL.svg +1 -0
  508. package/dist/ketchup/assets/svg/SPN.svg +1 -0
  509. package/dist/ketchup/assets/svg/SRC.svg +1 -0
  510. package/dist/ketchup/assets/svg/SRI.svg +1 -0
  511. package/dist/ketchup/assets/svg/STR.svg +1 -0
  512. package/dist/ketchup/assets/svg/SWT.svg +1 -0
  513. package/dist/ketchup/assets/svg/SYS.svg +1 -0
  514. package/dist/ketchup/assets/svg/TBL.svg +1 -0
  515. package/dist/ketchup/assets/svg/TCL.svg +1 -0
  516. package/dist/ketchup/assets/svg/TED.svg +1 -0
  517. package/dist/ketchup/assets/svg/TIM.svg +1 -0
  518. package/dist/ketchup/assets/svg/TML.svg +1 -0
  519. package/dist/ketchup/assets/svg/TMP.svg +1 -0
  520. package/dist/ketchup/assets/svg/TPK.svg +1 -0
  521. package/dist/ketchup/assets/svg/TRA.svg +1 -0
  522. package/dist/ketchup/assets/svg/TRE.svg +1 -0
  523. package/dist/ketchup/assets/svg/TRG.svg +1 -0
  524. package/dist/ketchup/assets/svg/TSC.svg +1 -0
  525. package/dist/ketchup/assets/svg/TXT.svg +1 -0
  526. package/dist/ketchup/assets/svg/WFD.svg +1 -0
  527. package/dist/ketchup/assets/svg/agriculture.svg +3 -0
  528. package/dist/ketchup/assets/svg/apparel.svg +3 -0
  529. package/dist/ketchup/assets/svg/brescia.svg +6 -0
  530. package/dist/ketchup/assets/svg/brusaporto.svg +6 -0
  531. package/dist/ketchup/assets/svg/car-repair.svg +3 -0
  532. package/dist/ketchup/assets/svg/carbo.svg +9 -0
  533. package/dist/ketchup/assets/svg/chemical-product.svg +3 -0
  534. package/dist/ketchup/assets/svg/civil-engineering.svg +6 -0
  535. package/dist/ketchup/assets/svg/contract.svg +3 -0
  536. package/dist/ketchup/assets/svg/customer-service.svg +3 -0
  537. package/dist/ketchup/assets/svg/diamond.svg +3 -0
  538. package/dist/ketchup/assets/svg/directions-boat.svg +3 -0
  539. package/dist/ketchup/assets/svg/directions-car.svg +3 -0
  540. package/dist/ketchup/assets/svg/domain-add.svg +3 -0
  541. package/dist/ketchup/assets/svg/dresser.svg +3 -0
  542. package/dist/ketchup/assets/svg/ecommerce.svg +4 -0
  543. package/dist/ketchup/assets/svg/eletrical-services.svg +3 -0
  544. package/dist/ketchup/assets/svg/eletronic-equipment.svg +8 -0
  545. package/dist/ketchup/assets/svg/erbusco.svg +6 -0
  546. package/dist/ketchup/assets/svg/factory.svg +3 -1
  547. package/dist/ketchup/assets/svg/faenza.svg +6 -0
  548. package/dist/ketchup/assets/svg/fishing.svg +3 -0
  549. package/dist/ketchup/assets/svg/flight.svg +3 -1
  550. package/dist/ketchup/assets/svg/forest.svg +4 -0
  551. package/dist/ketchup/assets/svg/front-loader.svg +3 -0
  552. package/dist/ketchup/assets/svg/gallarate.svg +6 -0
  553. package/dist/ketchup/assets/svg/general-direction.svg +3 -0
  554. package/dist/ketchup/assets/svg/home-repair-service.svg +3 -0
  555. package/dist/ketchup/assets/svg/hotel.svg +3 -1
  556. package/dist/ketchup/assets/svg/human-resource.svg +3 -0
  557. package/dist/ketchup/assets/svg/imola.svg +6 -0
  558. package/dist/ketchup/assets/svg/informative-system.svg +8 -0
  559. package/dist/ketchup/assets/svg/innovation-tech.svg +3 -0
  560. package/dist/ketchup/assets/svg/key.svg +1 -1
  561. package/dist/ketchup/assets/svg/knowledge-course.svg +7 -0
  562. package/dist/ketchup/assets/svg/knowledge.svg +3 -0
  563. package/dist/ketchup/assets/svg/leather.svg +10 -0
  564. package/dist/ketchup/assets/svg/lecco.svg +6 -0
  565. package/dist/ketchup/assets/svg/local-post-office.svg +3 -0
  566. package/dist/ketchup/assets/svg/local-shipping.svg +3 -0
  567. package/dist/ketchup/assets/svg/logistic.svg +3 -0
  568. package/dist/ketchup/assets/svg/management.svg +3 -0
  569. package/dist/ketchup/assets/svg/map.svg +1 -1
  570. package/dist/ketchup/assets/svg/marketing.svg +3 -0
  571. package/dist/ketchup/assets/svg/metal.svg +3 -0
  572. package/dist/ketchup/assets/svg/metallurgy.svg +6 -0
  573. package/dist/ketchup/assets/svg/mines.svg +8 -0
  574. package/dist/ketchup/assets/svg/mining.svg +9 -0
  575. package/dist/ketchup/assets/svg/modena.svg +8 -0
  576. package/dist/ketchup/assets/svg/monopoli.svg +6 -0
  577. package/dist/ketchup/assets/svg/montichiari.svg +6 -0
  578. package/dist/ketchup/assets/svg/nova-milanese.svg +6 -0
  579. package/dist/ketchup/assets/svg/oil-barrel.svg +3 -0
  580. package/dist/ketchup/assets/svg/osimo.svg +6 -0
  581. package/dist/ketchup/assets/svg/padova.svg +6 -0
  582. package/dist/ketchup/assets/svg/parma.svg +6 -0
  583. package/dist/ketchup/assets/svg/plastics.svg +6 -0
  584. package/dist/ketchup/assets/svg/precision-manufacturing.svg +3 -0
  585. package/dist/ketchup/assets/svg/production.svg +3 -0
  586. package/dist/ketchup/assets/svg/purchase.svg +4 -0
  587. package/dist/ketchup/assets/svg/quality.svg +3 -0
  588. package/dist/ketchup/assets/svg/question-mark.svg +3 -0
  589. package/dist/ketchup/assets/svg/recent-patient.svg +3 -0
  590. package/dist/ketchup/assets/svg/recycling.svg +3 -0
  591. package/dist/ketchup/assets/svg/reggio-emilia.svg +6 -0
  592. package/dist/ketchup/assets/svg/repair.svg +3 -0
  593. package/dist/ketchup/assets/svg/research-and-development.svg +3 -0
  594. package/dist/ketchup/assets/svg/restaurant.svg +3 -1
  595. package/dist/ketchup/assets/svg/rivoli.svg +6 -0
  596. package/dist/ketchup/assets/svg/roma.svg +6 -0
  597. package/dist/ketchup/assets/svg/sales.svg +3 -0
  598. package/dist/ketchup/assets/svg/salo.svg +6 -0
  599. package/dist/ketchup/assets/svg/savigliano.svg +6 -0
  600. package/dist/ketchup/assets/svg/sewers.svg +6 -0
  601. package/dist/ketchup/assets/svg/smoking-rooms.svg +3 -0
  602. package/dist/ketchup/assets/svg/store.svg +3 -1
  603. package/dist/ketchup/assets/svg/technical-office.svg +3 -0
  604. package/dist/ketchup/assets/svg/textile.svg +5 -0
  605. package/dist/ketchup/assets/svg/treviolo.svg +6 -0
  606. package/dist/ketchup/assets/svg/trolley.svg +4 -0
  607. package/dist/ketchup/assets/svg/udine.svg +6 -0
  608. package/dist/ketchup/assets/svg/vaccines.svg +3 -0
  609. package/dist/ketchup/assets/svg/vercelli.svg +6 -0
  610. package/dist/ketchup/assets/svg/vicenza.svg +6 -0
  611. package/dist/ketchup/assets/svg/warehouse.svg +3 -0
  612. package/dist/ketchup/assets/svg/waste-disposal.svg +3 -0
  613. package/dist/ketchup/assets/svg/water-bottle.svg +3 -0
  614. package/dist/ketchup/assets/svg/water-pump.svg +3 -0
  615. package/dist/ketchup/assets/svg/web.svg +1 -1
  616. package/dist/ketchup/assets/svg/wood.svg +4 -0
  617. package/dist/ketchup/index.esm.js +1 -1
  618. package/dist/ketchup/ketchup.esm.js +1 -1
  619. package/dist/ketchup/{p-f79ffe77.entry.js → p-02b017a6.entry.js} +1 -1
  620. package/dist/ketchup/{p-2b84db7b.entry.js → p-04d047b1.entry.js} +1 -1
  621. package/dist/ketchup/p-04e2beb5.js +28 -0
  622. package/dist/ketchup/p-0a64bf2c.entry.js +1 -0
  623. package/dist/ketchup/{p-81645576.entry.js → p-1b5eb6f4.entry.js} +2 -2
  624. package/dist/ketchup/{p-9e2533e1.entry.js → p-1fc57b76.entry.js} +1 -1
  625. package/dist/ketchup/p-237f4b66.js +1 -0
  626. package/dist/ketchup/p-2c3aff15.js +1 -0
  627. package/dist/ketchup/{p-2932e7e8.entry.js → p-2ea2fd08.entry.js} +1 -1
  628. package/dist/ketchup/{p-1bcac01f.entry.js → p-4561daec.entry.js} +1 -1
  629. package/dist/ketchup/{p-6961e0ce.entry.js → p-4f4d4b9d.entry.js} +1 -1
  630. package/dist/ketchup/{p-801776bc.js → p-75b2681f.js} +1 -1
  631. package/dist/ketchup/{p-a06974a3.entry.js → p-76f39bd6.entry.js} +1 -1
  632. package/dist/ketchup/p-79a8f8f4.entry.js +16 -0
  633. package/dist/ketchup/{p-556f7ddc.entry.js → p-8c7009f6.entry.js} +1 -1
  634. package/dist/ketchup/{p-fdcfaedd.entry.js → p-90b07248.entry.js} +1 -1
  635. package/dist/ketchup/{p-e2bf2bb6.js → p-9d3a0a51.js} +1 -1
  636. package/dist/ketchup/{p-1e028d95.entry.js → p-9fa95bdb.entry.js} +1 -1
  637. package/dist/ketchup/p-aa62724a.js +2 -0
  638. package/dist/ketchup/p-abd7696c.entry.js +1 -0
  639. package/dist/ketchup/{p-339bbeae.js → p-b169b592.js} +1 -1
  640. package/dist/ketchup/{p-074ccd53.entry.js → p-b5a46daf.entry.js} +1 -1
  641. package/dist/ketchup/{p-1088ab22.entry.js → p-b6e350b5.entry.js} +1 -1
  642. package/dist/ketchup/p-b9884b65.entry.js +1 -0
  643. package/dist/ketchup/{p-65e363c6.entry.js → p-c0be9b3c.entry.js} +1 -1
  644. package/dist/ketchup/{p-5f7d8c21.entry.js → p-c58a6b55.entry.js} +1 -1
  645. package/dist/ketchup/{p-48e45ac0.entry.js → p-c7e28520.entry.js} +1 -1
  646. package/dist/ketchup/{p-f6c8f006.js → p-ca3d9d80.js} +1 -1
  647. package/dist/ketchup/p-cb600014.entry.js +44 -0
  648. package/dist/ketchup/{p-6362738c.entry.js → p-d77fbe3d.entry.js} +1 -1
  649. package/dist/ketchup/{p-dbb6cd8d.entry.js → p-d9a4f193.entry.js} +2 -2
  650. package/dist/ketchup/{p-ccb6dbb0.entry.js → p-dad18517.entry.js} +1 -1
  651. package/dist/ketchup/p-e1255160.js +1 -0
  652. package/dist/ketchup/p-e7eaa6b3.entry.js +9 -0
  653. package/dist/ketchup/{p-2ef90f60.entry.js → p-e850bdf3.entry.js} +1 -1
  654. package/dist/ketchup/{p-c702eb45.entry.js → p-f6f30bb4.entry.js} +1 -1
  655. package/dist/ketchup/{p-fe75ede2.entry.js → p-f943ef5b.entry.js} +1 -1
  656. package/dist/ketchup/{p-b3540f83.js → p-fa1f706e.js} +1 -1
  657. package/dist/types/components/kup-badge/kup-badge-declarations.d.ts +6 -0
  658. package/dist/types/components/kup-badge/kup-badge.d.ts +6 -0
  659. package/dist/types/components/kup-pdf/kup-pdf.d.ts +5 -0
  660. package/dist/types/components.d.ts +22 -0
  661. package/package.json +2 -2
  662. package/dist/cjs/index-958d0399.js +0 -2094
  663. package/dist/esm/index-460631fd.js +0 -2061
  664. package/dist/ketchup/p-042e874a.entry.js +0 -1
  665. package/dist/ketchup/p-25058baa.js +0 -1
  666. package/dist/ketchup/p-47040db6.js +0 -2
  667. package/dist/ketchup/p-6921bc81.entry.js +0 -16
  668. package/dist/ketchup/p-7123d2a4.entry.js +0 -1
  669. package/dist/ketchup/p-8d4050ec.js +0 -28
  670. package/dist/ketchup/p-a6beb822.js +0 -1
  671. package/dist/ketchup/p-abe181d0.entry.js +0 -1
  672. package/dist/ketchup/p-cf44485a.entry.js +0 -9
  673. package/dist/ketchup/p-d2001dec.entry.js +0 -44
@@ -1,2094 +0,0 @@
1
- 'use strict';
2
-
3
- function _interopNamespace(e) {
4
- if (e && e.__esModule) return e;
5
- var n = Object.create(null);
6
- if (e) {
7
- Object.keys(e).forEach(function (k) {
8
- if (k !== 'default') {
9
- var d = Object.getOwnPropertyDescriptor(e, k);
10
- Object.defineProperty(n, k, d.get ? d : {
11
- enumerable: true,
12
- get: function () {
13
- return e[k];
14
- }
15
- });
16
- }
17
- });
18
- }
19
- n['default'] = e;
20
- return Object.freeze(n);
21
- }
22
-
23
- const NAMESPACE = 'ketchup';
24
-
25
- /**
26
- * Virtual DOM patching algorithm based on Snabbdom by
27
- * Simon Friis Vindum (@paldepind)
28
- * Licensed under the MIT License
29
- * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
30
- *
31
- * Modified for Stencil's renderer and slot projection
32
- */
33
- let scopeId;
34
- let hostTagName;
35
- let isSvgMode = false;
36
- let queuePending = false;
37
- const getAssetPath = (path) => {
38
- const assetUrl = new URL(path, plt.$resourcesUrl$);
39
- return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
40
- };
41
- const setAssetPath = (path) => (plt.$resourcesUrl$ = path);
42
- const createTime = (fnName, tagName = '') => {
43
- {
44
- return () => {
45
- return;
46
- };
47
- }
48
- };
49
- const uniqueTime = (key, measureText) => {
50
- {
51
- return () => {
52
- return;
53
- };
54
- }
55
- };
56
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
57
- /**
58
- * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
59
- *
60
- * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
61
- * support as of Stencil v4.
62
- */
63
- const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
64
- const XLINK_NS = 'http://www.w3.org/1999/xlink';
65
- /**
66
- * Default style mode id
67
- */
68
- /**
69
- * Reusable empty obj/array
70
- * Don't add values to these!!
71
- */
72
- const EMPTY_OBJ = {};
73
- /**
74
- * Namespaces
75
- */
76
- const SVG_NS = 'http://www.w3.org/2000/svg';
77
- const HTML_NS = 'http://www.w3.org/1999/xhtml';
78
- const isDef = (v) => v != null;
79
- /**
80
- * Check whether a value is a 'complex type', defined here as an object or a
81
- * function.
82
- *
83
- * @param o the value to check
84
- * @returns whether it's a complex type or not
85
- */
86
- const isComplexType = (o) => {
87
- // https://jsperf.com/typeof-fn-object/5
88
- o = typeof o;
89
- return o === 'object' || o === 'function';
90
- };
91
- /**
92
- * Helper method for querying a `meta` tag that contains a nonce value
93
- * out of a DOM's head.
94
- *
95
- * @param doc The DOM containing the `head` to query against
96
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
97
- * exists or the tag has no content.
98
- */
99
- function queryNonceMetaTagContent(doc) {
100
- var _a, _b, _c;
101
- return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
102
- }
103
- /**
104
- * Production h() function based on Preact by
105
- * Jason Miller (@developit)
106
- * Licensed under the MIT License
107
- * https://github.com/developit/preact/blob/master/LICENSE
108
- *
109
- * Modified for Stencil's compiler and vdom
110
- */
111
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
112
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
113
- const h = (nodeName, vnodeData, ...children) => {
114
- let child = null;
115
- let key = null;
116
- let simple = false;
117
- let lastSimple = false;
118
- const vNodeChildren = [];
119
- const walk = (c) => {
120
- for (let i = 0; i < c.length; i++) {
121
- child = c[i];
122
- if (Array.isArray(child)) {
123
- walk(child);
124
- }
125
- else if (child != null && typeof child !== 'boolean') {
126
- if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
127
- child = String(child);
128
- }
129
- if (simple && lastSimple) {
130
- // If the previous child was simple (string), we merge both
131
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
132
- }
133
- else {
134
- // Append a new vNode, if it's text, we create a text vNode
135
- vNodeChildren.push(simple ? newVNode(null, child) : child);
136
- }
137
- lastSimple = simple;
138
- }
139
- }
140
- };
141
- walk(children);
142
- if (vnodeData) {
143
- if (vnodeData.key) {
144
- key = vnodeData.key;
145
- }
146
- // normalize class / className attributes
147
- {
148
- const classData = vnodeData.className || vnodeData.class;
149
- if (classData) {
150
- vnodeData.class =
151
- typeof classData !== 'object'
152
- ? classData
153
- : Object.keys(classData)
154
- .filter((k) => classData[k])
155
- .join(' ');
156
- }
157
- }
158
- }
159
- if (typeof nodeName === 'function') {
160
- // nodeName is a functional component
161
- return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
162
- }
163
- const vnode = newVNode(nodeName, null);
164
- vnode.$attrs$ = vnodeData;
165
- if (vNodeChildren.length > 0) {
166
- vnode.$children$ = vNodeChildren;
167
- }
168
- {
169
- vnode.$key$ = key;
170
- }
171
- return vnode;
172
- };
173
- /**
174
- * A utility function for creating a virtual DOM node from a tag and some
175
- * possible text content.
176
- *
177
- * @param tag the tag for this element
178
- * @param text possible text content for the node
179
- * @returns a newly-minted virtual DOM node
180
- */
181
- const newVNode = (tag, text) => {
182
- const vnode = {
183
- $flags$: 0,
184
- $tag$: tag,
185
- $text$: text,
186
- $elm$: null,
187
- $children$: null,
188
- };
189
- {
190
- vnode.$attrs$ = null;
191
- }
192
- {
193
- vnode.$key$ = null;
194
- }
195
- return vnode;
196
- };
197
- const Host = {};
198
- /**
199
- * Check whether a given node is a Host node or not
200
- *
201
- * @param node the virtual DOM node to check
202
- * @returns whether it's a Host node or not
203
- */
204
- const isHost = (node) => node && node.$tag$ === Host;
205
- /**
206
- * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
207
- *
208
- * Note that these functions convert from {@link d.VNode} to
209
- * {@link d.ChildNode} to give functional component developers a friendly
210
- * interface.
211
- */
212
- const vdomFnUtils = {
213
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
214
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
215
- };
216
- /**
217
- * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
218
- * friendlier public interface (hence, 'convertToPublic').
219
- *
220
- * @param node the virtual DOM node to convert
221
- * @returns a converted child node
222
- */
223
- const convertToPublic = (node) => ({
224
- vattrs: node.$attrs$,
225
- vchildren: node.$children$,
226
- vkey: node.$key$,
227
- vname: node.$name$,
228
- vtag: node.$tag$,
229
- vtext: node.$text$,
230
- });
231
- /**
232
- * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
233
- * order to use the resulting object in the virtual DOM. The initial object was
234
- * likely created as part of presenting a public API, so converting it back
235
- * involved making it 'private' again (hence, `convertToPrivate`).
236
- *
237
- * @param node the child node to convert
238
- * @returns a converted virtual DOM node
239
- */
240
- const convertToPrivate = (node) => {
241
- if (typeof node.vtag === 'function') {
242
- const vnodeData = Object.assign({}, node.vattrs);
243
- if (node.vkey) {
244
- vnodeData.key = node.vkey;
245
- }
246
- if (node.vname) {
247
- vnodeData.name = node.vname;
248
- }
249
- return h(node.vtag, vnodeData, ...(node.vchildren || []));
250
- }
251
- const vnode = newVNode(node.vtag, node.vtext);
252
- vnode.$attrs$ = node.vattrs;
253
- vnode.$children$ = node.vchildren;
254
- vnode.$key$ = node.vkey;
255
- vnode.$name$ = node.vname;
256
- return vnode;
257
- };
258
- /**
259
- * Parse a new property value for a given property type.
260
- *
261
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
262
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
263
- * 1. `any`, the type given to `propValue` in the function signature
264
- * 2. the type stored from `propType`.
265
- *
266
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
267
- *
268
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
269
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
270
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
271
- * ```tsx
272
- * <my-cmp prop-val={0}></my-cmp>
273
- * ```
274
- *
275
- * HTML prop values on the other hand, will always a string
276
- *
277
- * @param propValue the new value to coerce to some type
278
- * @param propType the type of the prop, expressed as a binary number
279
- * @returns the parsed/coerced value
280
- */
281
- const parsePropertyValue = (propValue, propType) => {
282
- // ensure this value is of the correct prop type
283
- if (propValue != null && !isComplexType(propValue)) {
284
- if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
285
- // per the HTML spec, any string value means it is a boolean true value
286
- // but we'll cheat here and say that the string "false" is the boolean false
287
- return propValue === 'false' ? false : propValue === '' || !!propValue;
288
- }
289
- if (propType & 2 /* MEMBER_FLAGS.Number */) {
290
- // force it to be a number
291
- return parseFloat(propValue);
292
- }
293
- if (propType & 1 /* MEMBER_FLAGS.String */) {
294
- // could have been passed as a number or boolean
295
- // but we still want it as a string
296
- return String(propValue);
297
- }
298
- // redundant return here for better minification
299
- return propValue;
300
- }
301
- // not sure exactly what type we want
302
- // so no need to change to a different type
303
- return propValue;
304
- };
305
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
306
- const createEvent = (ref, name, flags) => {
307
- const elm = getElement(ref);
308
- return {
309
- emit: (detail) => {
310
- return emitEvent(elm, name, {
311
- bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
312
- composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
313
- cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
314
- detail,
315
- });
316
- },
317
- };
318
- };
319
- /**
320
- * Helper function to create & dispatch a custom Event on a provided target
321
- * @param elm the target of the Event
322
- * @param name the name to give the custom Event
323
- * @param opts options for configuring a custom Event
324
- * @returns the custom Event
325
- */
326
- const emitEvent = (elm, name, opts) => {
327
- const ev = plt.ce(name, opts);
328
- elm.dispatchEvent(ev);
329
- return ev;
330
- };
331
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
332
- const registerStyle = (scopeId, cssText, allowCS) => {
333
- let style = styles.get(scopeId);
334
- if (supportsConstructableStylesheets && allowCS) {
335
- style = (style || new CSSStyleSheet());
336
- if (typeof style === 'string') {
337
- style = cssText;
338
- }
339
- else {
340
- style.replaceSync(cssText);
341
- }
342
- }
343
- else {
344
- style = cssText;
345
- }
346
- styles.set(scopeId, style);
347
- };
348
- const addStyle = (styleContainerNode, cmpMeta, mode) => {
349
- var _a;
350
- const scopeId = getScopeId(cmpMeta);
351
- const style = styles.get(scopeId);
352
- // if an element is NOT connected then getRootNode() will return the wrong root node
353
- // so the fallback is to always use the document for the root node in those cases
354
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
355
- if (style) {
356
- if (typeof style === 'string') {
357
- styleContainerNode = styleContainerNode.head || styleContainerNode;
358
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
359
- let styleElm;
360
- if (!appliedStyles) {
361
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
362
- }
363
- if (!appliedStyles.has(scopeId)) {
364
- {
365
- styleElm = doc.createElement('style');
366
- styleElm.innerHTML = style;
367
- // Apply CSP nonce to the style tag if it exists
368
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
369
- if (nonce != null) {
370
- styleElm.setAttribute('nonce', nonce);
371
- }
372
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
373
- }
374
- // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
375
- if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
376
- styleElm.innerHTML += SLOT_FB_CSS;
377
- }
378
- if (appliedStyles) {
379
- appliedStyles.add(scopeId);
380
- }
381
- }
382
- }
383
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
384
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
385
- }
386
- }
387
- return scopeId;
388
- };
389
- const attachStyles = (hostRef) => {
390
- const cmpMeta = hostRef.$cmpMeta$;
391
- const elm = hostRef.$hostElement$;
392
- const flags = cmpMeta.$flags$;
393
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
394
- const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
395
- if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
396
- // only required when we're NOT using native shadow dom (slot)
397
- // or this browser doesn't support native shadow dom
398
- // and this host element was NOT created with SSR
399
- // let's pick out the inner content for slot projection
400
- // create a node to represent where the original
401
- // content was first placed, which is useful later on
402
- // DOM WRITE!!
403
- elm['s-sc'] = scopeId;
404
- elm.classList.add(scopeId + '-h');
405
- }
406
- endAttachStyles();
407
- };
408
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
409
- /**
410
- * Production setAccessor() function based on Preact by
411
- * Jason Miller (@developit)
412
- * Licensed under the MIT License
413
- * https://github.com/developit/preact/blob/master/LICENSE
414
- *
415
- * Modified for Stencil's compiler and vdom
416
- */
417
- /**
418
- * When running a VDom render set properties present on a VDom node onto the
419
- * corresponding HTML element.
420
- *
421
- * Note that this function has special functionality for the `class`,
422
- * `style`, `key`, and `ref` attributes, as well as event handlers (like
423
- * `onClick`, etc). All others are just passed through as-is.
424
- *
425
- * @param elm the HTMLElement onto which attributes should be set
426
- * @param memberName the name of the attribute to set
427
- * @param oldValue the old value for the attribute
428
- * @param newValue the new value for the attribute
429
- * @param isSvg whether we're in an svg context or not
430
- * @param flags bitflags for Vdom variables
431
- */
432
- const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
433
- if (oldValue !== newValue) {
434
- let isProp = isMemberInElement(elm, memberName);
435
- let ln = memberName.toLowerCase();
436
- if (memberName === 'class') {
437
- const classList = elm.classList;
438
- const oldClasses = parseClassList(oldValue);
439
- const newClasses = parseClassList(newValue);
440
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
441
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
442
- }
443
- else if (memberName === 'style') {
444
- // update style attribute, css properties and values
445
- {
446
- for (const prop in oldValue) {
447
- if (!newValue || newValue[prop] == null) {
448
- if (prop.includes('-')) {
449
- elm.style.removeProperty(prop);
450
- }
451
- else {
452
- elm.style[prop] = '';
453
- }
454
- }
455
- }
456
- }
457
- for (const prop in newValue) {
458
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
459
- if (prop.includes('-')) {
460
- elm.style.setProperty(prop, newValue[prop]);
461
- }
462
- else {
463
- elm.style[prop] = newValue[prop];
464
- }
465
- }
466
- }
467
- }
468
- else if (memberName === 'key')
469
- ;
470
- else if (memberName === 'ref') {
471
- // minifier will clean this up
472
- if (newValue) {
473
- newValue(elm);
474
- }
475
- }
476
- else if ((!isProp ) &&
477
- memberName[0] === 'o' &&
478
- memberName[1] === 'n') {
479
- // Event Handlers
480
- // so if the member name starts with "on" and the 3rd characters is
481
- // a capital letter, and it's not already a member on the element,
482
- // then we're assuming it's an event listener
483
- if (memberName[2] === '-') {
484
- // on- prefixed events
485
- // allows to be explicit about the dom event to listen without any magic
486
- // under the hood:
487
- // <my-cmp on-click> // listens for "click"
488
- // <my-cmp on-Click> // listens for "Click"
489
- // <my-cmp on-ionChange> // listens for "ionChange"
490
- // <my-cmp on-EVENTS> // listens for "EVENTS"
491
- memberName = memberName.slice(3);
492
- }
493
- else if (isMemberInElement(win, ln)) {
494
- // standard event
495
- // the JSX attribute could have been "onMouseOver" and the
496
- // member name "onmouseover" is on the window's prototype
497
- // so let's add the listener "mouseover", which is all lowercased
498
- memberName = ln.slice(2);
499
- }
500
- else {
501
- // custom event
502
- // the JSX attribute could have been "onMyCustomEvent"
503
- // so let's trim off the "on" prefix and lowercase the first character
504
- // and add the listener "myCustomEvent"
505
- // except for the first character, we keep the event name case
506
- memberName = ln[2] + memberName.slice(3);
507
- }
508
- if (oldValue || newValue) {
509
- // Need to account for "capture" events.
510
- // If the event name ends with "Capture", we'll update the name to remove
511
- // the "Capture" suffix and make sure the event listener is setup to handle the capture event.
512
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
513
- // Make sure we only replace the last instance of "Capture"
514
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
515
- if (oldValue) {
516
- plt.rel(elm, memberName, oldValue, capture);
517
- }
518
- if (newValue) {
519
- plt.ael(elm, memberName, newValue, capture);
520
- }
521
- }
522
- }
523
- else {
524
- // Set property if it exists and it's not a SVG
525
- const isComplex = isComplexType(newValue);
526
- if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
527
- try {
528
- if (!elm.tagName.includes('-')) {
529
- const n = newValue == null ? '' : newValue;
530
- // Workaround for Safari, moving the <input> caret when re-assigning the same valued
531
- if (memberName === 'list') {
532
- isProp = false;
533
- }
534
- else if (oldValue == null || elm[memberName] != n) {
535
- elm[memberName] = n;
536
- }
537
- }
538
- else {
539
- elm[memberName] = newValue;
540
- }
541
- }
542
- catch (e) {
543
- /**
544
- * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
545
- */
546
- }
547
- }
548
- /**
549
- * Need to manually update attribute if:
550
- * - memberName is not an attribute
551
- * - if we are rendering the host element in order to reflect attribute
552
- * - if it's a SVG, since properties might not work in <svg>
553
- * - if the newValue is null/undefined or 'false'.
554
- */
555
- let xlink = false;
556
- {
557
- if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
558
- memberName = ln;
559
- xlink = true;
560
- }
561
- }
562
- if (newValue == null || newValue === false) {
563
- if (newValue !== false || elm.getAttribute(memberName) === '') {
564
- if (xlink) {
565
- elm.removeAttributeNS(XLINK_NS, memberName);
566
- }
567
- else {
568
- elm.removeAttribute(memberName);
569
- }
570
- }
571
- }
572
- else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
573
- newValue = newValue === true ? '' : newValue;
574
- if (xlink) {
575
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
576
- }
577
- else {
578
- elm.setAttribute(memberName, newValue);
579
- }
580
- }
581
- }
582
- }
583
- };
584
- const parseClassListRegex = /\s/;
585
- /**
586
- * Parsed a string of classnames into an array
587
- * @param value className string, e.g. "foo bar baz"
588
- * @returns list of classes, e.g. ["foo", "bar", "baz"]
589
- */
590
- const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
591
- const CAPTURE_EVENT_SUFFIX = 'Capture';
592
- const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
593
- const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
594
- // if the element passed in is a shadow root, which is a document fragment
595
- // then we want to be adding attrs/props to the shadow root's "host" element
596
- // if it's not a shadow root, then we add attrs/props to the same element
597
- const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
598
- ? newVnode.$elm$.host
599
- : newVnode.$elm$;
600
- const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
601
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
602
- {
603
- // remove attributes no longer present on the vnode by setting them to undefined
604
- for (memberName in oldVnodeAttrs) {
605
- if (!(memberName in newVnodeAttrs)) {
606
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
607
- }
608
- }
609
- }
610
- // add new & update changed attributes
611
- for (memberName in newVnodeAttrs) {
612
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
613
- }
614
- };
615
- /**
616
- * Create a DOM Node corresponding to one of the children of a given VNode.
617
- *
618
- * @param oldParentVNode the parent VNode from the previous render
619
- * @param newParentVNode the parent VNode from the current render
620
- * @param childIndex the index of the VNode, in the _new_ parent node's
621
- * children, for which we will create a new DOM node
622
- * @param parentElm the parent DOM node which our new node will be a child of
623
- * @returns the newly created node
624
- */
625
- const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
626
- // tslint:disable-next-line: prefer-const
627
- const newVNode = newParentVNode.$children$[childIndex];
628
- let i = 0;
629
- let elm;
630
- let childNode;
631
- if (newVNode.$text$ !== null) {
632
- // create text node
633
- elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
634
- }
635
- else {
636
- if (!isSvgMode) {
637
- isSvgMode = newVNode.$tag$ === 'svg';
638
- }
639
- // create element
640
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
641
- );
642
- if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
643
- isSvgMode = false;
644
- }
645
- // add css classes, attrs, props, listeners, etc.
646
- {
647
- updateElement(null, newVNode, isSvgMode);
648
- }
649
- if (isDef(scopeId) && elm['s-si'] !== scopeId) {
650
- // if there is a scopeId and this is the initial render
651
- // then let's add the scopeId as a css class
652
- elm.classList.add((elm['s-si'] = scopeId));
653
- }
654
- if (newVNode.$children$) {
655
- for (i = 0; i < newVNode.$children$.length; ++i) {
656
- // create the node
657
- childNode = createElm(oldParentVNode, newVNode, i);
658
- // return node could have been null
659
- if (childNode) {
660
- // append our new node
661
- elm.appendChild(childNode);
662
- }
663
- }
664
- }
665
- {
666
- if (newVNode.$tag$ === 'svg') {
667
- // Only reset the SVG context when we're exiting <svg> element
668
- isSvgMode = false;
669
- }
670
- else if (elm.tagName === 'foreignObject') {
671
- // Reenter SVG context when we're exiting <foreignObject> element
672
- isSvgMode = true;
673
- }
674
- }
675
- }
676
- // This needs to always happen so we can hide nodes that are projected
677
- // to another component but don't end up in a slot
678
- elm['s-hn'] = hostTagName;
679
- return elm;
680
- };
681
- /**
682
- * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
683
- * add them to the DOM in the appropriate place.
684
- *
685
- * @param parentElm the DOM node which should be used as a parent for the new
686
- * DOM nodes
687
- * @param before a child of the `parentElm` which the new children should be
688
- * inserted before (optional)
689
- * @param parentVNode the parent virtual DOM node
690
- * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
691
- * @param startIdx the index in the child virtual DOM nodes at which to start
692
- * creating DOM nodes (inclusive)
693
- * @param endIdx the index in the child virtual DOM nodes at which to stop
694
- * creating DOM nodes (inclusive)
695
- */
696
- const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
697
- let containerElm = (parentElm);
698
- let childNode;
699
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
700
- containerElm = containerElm.shadowRoot;
701
- }
702
- for (; startIdx <= endIdx; ++startIdx) {
703
- if (vnodes[startIdx]) {
704
- childNode = createElm(null, parentVNode, startIdx);
705
- if (childNode) {
706
- vnodes[startIdx].$elm$ = childNode;
707
- containerElm.insertBefore(childNode, before);
708
- }
709
- }
710
- }
711
- };
712
- /**
713
- * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
714
- * This can be used to, for instance, clean up after a list of children which
715
- * should no longer be shown.
716
- *
717
- * This function also handles some of Stencil's slot relocation logic.
718
- *
719
- * @param vnodes a list of virtual DOM nodes to remove
720
- * @param startIdx the index at which to start removing nodes (inclusive)
721
- * @param endIdx the index at which to stop removing nodes (inclusive)
722
- */
723
- const removeVnodes = (vnodes, startIdx, endIdx) => {
724
- for (let index = startIdx; index <= endIdx; ++index) {
725
- const vnode = vnodes[index];
726
- if (vnode) {
727
- const elm = vnode.$elm$;
728
- nullifyVNodeRefs(vnode);
729
- if (elm) {
730
- // remove the vnode's element from the dom
731
- elm.remove();
732
- }
733
- }
734
- }
735
- };
736
- /**
737
- * Reconcile the children of a new VNode with the children of an old VNode by
738
- * traversing the two collections of children, identifying nodes that are
739
- * conserved or changed, calling out to `patch` to make any necessary
740
- * updates to the DOM, and rearranging DOM nodes as needed.
741
- *
742
- * The algorithm for reconciling children works by analyzing two 'windows' onto
743
- * the two arrays of children (`oldCh` and `newCh`). We keep track of the
744
- * 'windows' by storing start and end indices and references to the
745
- * corresponding array entries. Initially the two 'windows' are basically equal
746
- * to the entire array, but we progressively narrow the windows until there are
747
- * no children left to update by doing the following:
748
- *
749
- * 1. Skip any `null` entries at the beginning or end of the two arrays, so
750
- * that if we have an initial array like the following we'll end up dealing
751
- * only with a window bounded by the highlighted elements:
752
- *
753
- * [null, null, VNode1 , ... , VNode2, null, null]
754
- * ^^^^^^ ^^^^^^
755
- *
756
- * 2. Check to see if the elements at the head and tail positions are equal
757
- * across the windows. This will basically detect elements which haven't
758
- * been added, removed, or changed position, i.e. if you had the following
759
- * VNode elements (represented as HTML):
760
- *
761
- * oldVNode: `<div><p><span>HEY</span></p></div>`
762
- * newVNode: `<div><p><span>THERE</span></p></div>`
763
- *
764
- * Then when comparing the children of the `<div>` tag we check the equality
765
- * of the VNodes corresponding to the `<p>` tags and, since they are the
766
- * same tag in the same position, we'd be able to avoid completely
767
- * re-rendering the subtree under them with a new DOM element and would just
768
- * call out to `patch` to handle reconciling their children and so on.
769
- *
770
- * 3. Check, for both windows, to see if the element at the beginning of the
771
- * window corresponds to the element at the end of the other window. This is
772
- * a heuristic which will let us identify _some_ situations in which
773
- * elements have changed position, for instance it _should_ detect that the
774
- * children nodes themselves have not changed but merely moved in the
775
- * following example:
776
- *
777
- * oldVNode: `<div><element-one /><element-two /></div>`
778
- * newVNode: `<div><element-two /><element-one /></div>`
779
- *
780
- * If we find cases like this then we also need to move the concrete DOM
781
- * elements corresponding to the moved children to write the re-order to the
782
- * DOM.
783
- *
784
- * 4. Finally, if VNodes have the `key` attribute set on them we check for any
785
- * nodes in the old children which have the same key as the first element in
786
- * our window on the new children. If we find such a node we handle calling
787
- * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
788
- * what we find.
789
- *
790
- * Finally, once we've narrowed our 'windows' to the point that either of them
791
- * collapse (i.e. they have length 0) we then handle any remaining VNode
792
- * insertion or deletion that needs to happen to get a DOM state that correctly
793
- * reflects the new child VNodes. If, for instance, after our window on the old
794
- * children has collapsed we still have more nodes on the new children that
795
- * we haven't dealt with yet then we need to add them, or if the new children
796
- * collapse but we still have unhandled _old_ children then we need to make
797
- * sure the corresponding DOM nodes are removed.
798
- *
799
- * @param parentElm the node into which the parent VNode is rendered
800
- * @param oldCh the old children of the parent node
801
- * @param newVNode the new VNode which will replace the parent
802
- * @param newCh the new children of the parent node
803
- * @param isInitialRender whether or not this is the first render of the vdom
804
- */
805
- const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
806
- let oldStartIdx = 0;
807
- let newStartIdx = 0;
808
- let idxInOld = 0;
809
- let i = 0;
810
- let oldEndIdx = oldCh.length - 1;
811
- let oldStartVnode = oldCh[0];
812
- let oldEndVnode = oldCh[oldEndIdx];
813
- let newEndIdx = newCh.length - 1;
814
- let newStartVnode = newCh[0];
815
- let newEndVnode = newCh[newEndIdx];
816
- let node;
817
- let elmToMove;
818
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
819
- if (oldStartVnode == null) {
820
- // VNode might have been moved left
821
- oldStartVnode = oldCh[++oldStartIdx];
822
- }
823
- else if (oldEndVnode == null) {
824
- oldEndVnode = oldCh[--oldEndIdx];
825
- }
826
- else if (newStartVnode == null) {
827
- newStartVnode = newCh[++newStartIdx];
828
- }
829
- else if (newEndVnode == null) {
830
- newEndVnode = newCh[--newEndIdx];
831
- }
832
- else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
833
- // if the start nodes are the same then we should patch the new VNode
834
- // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
835
- // indices to reflect that. We don't need to move any DOM Nodes around
836
- // since things are matched up in order.
837
- patch(oldStartVnode, newStartVnode, isInitialRender);
838
- oldStartVnode = oldCh[++oldStartIdx];
839
- newStartVnode = newCh[++newStartIdx];
840
- }
841
- else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
842
- // likewise, if the end nodes are the same we patch new onto old and
843
- // decrement our end indices, and also likewise in this case we don't
844
- // need to move any DOM Nodes.
845
- patch(oldEndVnode, newEndVnode, isInitialRender);
846
- oldEndVnode = oldCh[--oldEndIdx];
847
- newEndVnode = newCh[--newEndIdx];
848
- }
849
- else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
850
- patch(oldStartVnode, newEndVnode, isInitialRender);
851
- // We need to move the element for `oldStartVnode` into a position which
852
- // will be appropriate for `newEndVnode`. For this we can use
853
- // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
854
- // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
855
- // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
856
- //
857
- // <old-start-node />
858
- // <some-intervening-node />
859
- // <old-end-node />
860
- // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
861
- // <next-sibling />
862
- //
863
- // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
864
- // the node for `oldStartVnode` at the end of the children of
865
- // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
866
- // aren't any siblings, and passing `null` to `Node.insertBefore` will
867
- // append it to the children of the parent element.
868
- parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
869
- oldStartVnode = oldCh[++oldStartIdx];
870
- newEndVnode = newCh[--newEndIdx];
871
- }
872
- else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
873
- patch(oldEndVnode, newStartVnode, isInitialRender);
874
- // We've already checked above if `oldStartVnode` and `newStartVnode` are
875
- // the same node, so since we're here we know that they are not. Thus we
876
- // can move the element for `oldEndVnode` _before_ the element for
877
- // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
878
- // future.
879
- parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
880
- oldEndVnode = oldCh[--oldEndIdx];
881
- newStartVnode = newCh[++newStartIdx];
882
- }
883
- else {
884
- // Here we do some checks to match up old and new nodes based on the
885
- // `$key$` attribute, which is set by putting a `key="my-key"` attribute
886
- // in the JSX for a DOM element in the implementation of a Stencil
887
- // component.
888
- //
889
- // First we check to see if there are any nodes in the array of old
890
- // children which have the same key as the first node in the new
891
- // children.
892
- idxInOld = -1;
893
- {
894
- for (i = oldStartIdx; i <= oldEndIdx; ++i) {
895
- if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
896
- idxInOld = i;
897
- break;
898
- }
899
- }
900
- }
901
- if (idxInOld >= 0) {
902
- // We found a node in the old children which matches up with the first
903
- // node in the new children! So let's deal with that
904
- elmToMove = oldCh[idxInOld];
905
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
906
- // the tag doesn't match so we'll need a new DOM element
907
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
908
- }
909
- else {
910
- patch(elmToMove, newStartVnode, isInitialRender);
911
- // invalidate the matching old node so that we won't try to update it
912
- // again later on
913
- oldCh[idxInOld] = undefined;
914
- node = elmToMove.$elm$;
915
- }
916
- newStartVnode = newCh[++newStartIdx];
917
- }
918
- else {
919
- // We either didn't find an element in the old children that matches
920
- // the key of the first new child OR the build is not using `key`
921
- // attributes at all. In either case we need to create a new element
922
- // for the new node.
923
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
924
- newStartVnode = newCh[++newStartIdx];
925
- }
926
- if (node) {
927
- // if we created a new node then handle inserting it to the DOM
928
- {
929
- oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
930
- }
931
- }
932
- }
933
- }
934
- if (oldStartIdx > oldEndIdx) {
935
- // we have some more new nodes to add which don't match up with old nodes
936
- addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
937
- }
938
- else if (newStartIdx > newEndIdx) {
939
- // there are nodes in the `oldCh` array which no longer correspond to nodes
940
- // in the new array, so lets remove them (which entails cleaning up the
941
- // relevant DOM nodes)
942
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
943
- }
944
- };
945
- /**
946
- * Compare two VNodes to determine if they are the same
947
- *
948
- * **NB**: This function is an equality _heuristic_ based on the available
949
- * information set on the two VNodes and can be misleading under certain
950
- * circumstances. In particular, if the two nodes do not have `key` attrs
951
- * (available under `$key$` on VNodes) then the function falls back on merely
952
- * checking that they have the same tag.
953
- *
954
- * So, in other words, if `key` attrs are not set on VNodes which may be
955
- * changing order within a `children` array or something along those lines then
956
- * we could obtain a false negative and then have to do needless re-rendering
957
- * (i.e. we'd say two VNodes aren't equal when in fact they should be).
958
- *
959
- * @param leftVNode the first VNode to check
960
- * @param rightVNode the second VNode to check
961
- * @param isInitialRender whether or not this is the first render of the vdom
962
- * @returns whether they're equal or not
963
- */
964
- const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
965
- // compare if two vnode to see if they're "technically" the same
966
- // need to have the same element tag, and same key to be the same
967
- if (leftVNode.$tag$ === rightVNode.$tag$) {
968
- // this will be set if JSX tags in the build have `key` attrs set on them
969
- // we only want to check this if we're not on the first render since on
970
- // first render `leftVNode.$key$` will always be `null`, so we can be led
971
- // astray and, for instance, accidentally delete a DOM node that we want to
972
- // keep around.
973
- if (!isInitialRender) {
974
- return leftVNode.$key$ === rightVNode.$key$;
975
- }
976
- return true;
977
- }
978
- return false;
979
- };
980
- /**
981
- * Handle reconciling an outdated VNode with a new one which corresponds to
982
- * it. This function handles flushing updates to the DOM and reconciling the
983
- * children of the two nodes (if any).
984
- *
985
- * @param oldVNode an old VNode whose DOM element and children we want to update
986
- * @param newVNode a new VNode representing an updated version of the old one
987
- * @param isInitialRender whether or not this is the first render of the vdom
988
- */
989
- const patch = (oldVNode, newVNode, isInitialRender = false) => {
990
- const elm = (newVNode.$elm$ = oldVNode.$elm$);
991
- const oldChildren = oldVNode.$children$;
992
- const newChildren = newVNode.$children$;
993
- const tag = newVNode.$tag$;
994
- const text = newVNode.$text$;
995
- if (text === null) {
996
- {
997
- // test if we're rendering an svg element, or still rendering nodes inside of one
998
- // only add this to the when the compiler sees we're using an svg somewhere
999
- isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1000
- }
1001
- {
1002
- if (tag === 'slot')
1003
- ;
1004
- else {
1005
- // either this is the first render of an element OR it's an update
1006
- // AND we already know it's possible it could have changed
1007
- // this updates the element's css classes, attrs, props, listeners, etc.
1008
- updateElement(oldVNode, newVNode, isSvgMode);
1009
- }
1010
- }
1011
- if (oldChildren !== null && newChildren !== null) {
1012
- // looks like there's child vnodes for both the old and new vnodes
1013
- // so we need to call `updateChildren` to reconcile them
1014
- updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
1015
- }
1016
- else if (newChildren !== null) {
1017
- // no old child vnodes, but there are new child vnodes to add
1018
- if (oldVNode.$text$ !== null) {
1019
- // the old vnode was text, so be sure to clear it out
1020
- elm.textContent = '';
1021
- }
1022
- // add the new vnode children
1023
- addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
1024
- }
1025
- else if (oldChildren !== null) {
1026
- // no new child vnodes, but there are old child vnodes to remove
1027
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
1028
- }
1029
- if (isSvgMode && tag === 'svg') {
1030
- isSvgMode = false;
1031
- }
1032
- }
1033
- else if (oldVNode.$text$ !== text) {
1034
- // update the text content for the text only vnode
1035
- // and also only if the text is different than before
1036
- elm.data = text;
1037
- }
1038
- };
1039
- /**
1040
- * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
1041
- * them with `null`. This signals that the DOM element corresponding to the VDom
1042
- * node has been removed from the DOM.
1043
- *
1044
- * @param vNode a virtual DOM node
1045
- */
1046
- const nullifyVNodeRefs = (vNode) => {
1047
- {
1048
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1049
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1050
- }
1051
- };
1052
- /**
1053
- * The main entry point for Stencil's virtual DOM-based rendering engine
1054
- *
1055
- * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1056
- * function will handle creating a virtual DOM tree with a single root, patching
1057
- * the current virtual DOM tree onto an old one (if any), dealing with slot
1058
- * relocation, and reflecting attributes.
1059
- *
1060
- * @param hostRef data needed to root and render the virtual DOM tree, such as
1061
- * the DOM node into which it should be rendered.
1062
- * @param renderFnResults the virtual DOM nodes to be rendered
1063
- * @param isInitialLoad whether or not this is the first call after page load
1064
- */
1065
- const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1066
- const hostElm = hostRef.$hostElement$;
1067
- const cmpMeta = hostRef.$cmpMeta$;
1068
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1069
- // if `renderFnResults` is a Host node then we can use it directly. If not,
1070
- // we need to call `h` again to wrap the children of our component in a
1071
- // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
1072
- // implicitly that the top-level vdom node is 1) an only child and 2)
1073
- // contains attrs that need to be set on the host element.
1074
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1075
- hostTagName = hostElm.tagName;
1076
- if (cmpMeta.$attrsToReflect$) {
1077
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1078
- cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1079
- }
1080
- // On the first render and *only* on the first render we want to check for
1081
- // any attributes set on the host element which are also set on the vdom
1082
- // node. If we find them, we override the value on the VDom node attrs with
1083
- // the value from the host element, which allows developers building apps
1084
- // with Stencil components to override e.g. the `role` attribute on a
1085
- // component even if it's already set on the `Host`.
1086
- if (isInitialLoad && rootVnode.$attrs$) {
1087
- for (const key of Object.keys(rootVnode.$attrs$)) {
1088
- // We have a special implementation in `setAccessor` for `style` and
1089
- // `class` which reconciles values coming from the VDom with values
1090
- // already present on the DOM element, so we don't want to override those
1091
- // attributes on the VDom tree with values from the host element if they
1092
- // are present.
1093
- //
1094
- // Likewise, `ref` and `key` are special internal values for the Stencil
1095
- // runtime and we don't want to override those either.
1096
- if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
1097
- rootVnode.$attrs$[key] = hostElm[key];
1098
- }
1099
- }
1100
- }
1101
- rootVnode.$tag$ = null;
1102
- rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1103
- hostRef.$vnode$ = rootVnode;
1104
- rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
1105
- {
1106
- scopeId = hostElm['s-sc'];
1107
- }
1108
- // synchronous patch
1109
- patch(oldVNode, rootVnode, isInitialLoad);
1110
- };
1111
- const attachToAncestor = (hostRef, ancestorComponent) => {
1112
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1113
- ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1114
- }
1115
- };
1116
- const scheduleUpdate = (hostRef, isInitialLoad) => {
1117
- {
1118
- hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1119
- }
1120
- if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1121
- hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1122
- return;
1123
- }
1124
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1125
- // there is no ancestor component or the ancestor component
1126
- // has already fired off its lifecycle update then
1127
- // fire off the initial update
1128
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1129
- return writeTask(dispatch) ;
1130
- };
1131
- /**
1132
- * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
1133
- * component lifecycle methods like `componentWillLoad` as well as
1134
- * {@link updateComponent}, which will kick off the virtual DOM re-render.
1135
- *
1136
- * @param hostRef a reference to a host DOM node
1137
- * @param isInitialLoad whether we're on the initial load or not
1138
- * @returns an empty Promise which is used to enqueue a series of operations for
1139
- * the component
1140
- */
1141
- const dispatchHooks = (hostRef, isInitialLoad) => {
1142
- const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1143
- const instance = hostRef.$lazyInstance$ ;
1144
- // We're going to use this variable together with `enqueue` to implement a
1145
- // little promise-based queue. We start out with it `undefined`. When we add
1146
- // the first function to the queue we'll set this variable to be that
1147
- // function's return value. When we attempt to add subsequent values to the
1148
- // queue we'll check that value and, if it was a `Promise`, we'll then chain
1149
- // the new function off of that `Promise` using `.then()`. This will give our
1150
- // queue two nice properties:
1151
- //
1152
- // 1. If all functions added to the queue are synchronous they'll be called
1153
- // synchronously right away.
1154
- // 2. If all functions added to the queue are asynchronous they'll all be
1155
- // called in order after `dispatchHooks` exits.
1156
- let maybePromise;
1157
- if (isInitialLoad) {
1158
- {
1159
- hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
1160
- if (hostRef.$queuedListeners$) {
1161
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1162
- hostRef.$queuedListeners$ = undefined;
1163
- }
1164
- }
1165
- {
1166
- // If `componentWillLoad` returns a `Promise` then we want to wait on
1167
- // whatever's going on in that `Promise` before we launch into
1168
- // rendering the component, doing other lifecycle stuff, etc. So
1169
- // in that case we assign the returned promise to the variable we
1170
- // declared above to hold a possible 'queueing' Promise
1171
- maybePromise = safeCall(instance, 'componentWillLoad');
1172
- }
1173
- }
1174
- else {
1175
- {
1176
- // Like `componentWillLoad` above, we allow Stencil component
1177
- // authors to return a `Promise` from this lifecycle callback, and
1178
- // we specify that our runtime will wait for that `Promise` to
1179
- // resolve before the component re-renders. So if the method
1180
- // returns a `Promise` we need to keep it around!
1181
- maybePromise = safeCall(instance, 'componentWillUpdate');
1182
- }
1183
- }
1184
- {
1185
- maybePromise = enqueue(maybePromise, () => safeCall(instance, 'componentWillRender'));
1186
- }
1187
- endSchedule();
1188
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1189
- };
1190
- /**
1191
- * This function uses a Promise to implement a simple first-in, first-out queue
1192
- * of functions to be called.
1193
- *
1194
- * The queue is ordered on the basis of the first argument. If it's
1195
- * `undefined`, then nothing is on the queue yet, so the provided function can
1196
- * be called synchronously (although note that this function may return a
1197
- * `Promise`). The idea is that then the return value of that enqueueing
1198
- * operation is kept around, so that if it was a `Promise` then subsequent
1199
- * functions can be enqueued by calling this function again with that `Promise`
1200
- * as the first argument.
1201
- *
1202
- * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
1203
- * @param fn a function to enqueue
1204
- * @returns either a `Promise` or the return value of the provided function
1205
- */
1206
- const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
1207
- /**
1208
- * Check that a value is a `Promise`. To check, we first see if the value is an
1209
- * instance of the `Promise` global. In a few circumstances, in particular if
1210
- * the global has been overwritten, this is could be misleading, so we also do
1211
- * a little 'duck typing' check to see if the `.then` property of the value is
1212
- * defined and a function.
1213
- *
1214
- * @param maybePromise it might be a promise!
1215
- * @returns whether it is or not
1216
- */
1217
- const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1218
- (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1219
- /**
1220
- * Update a component given reference to its host elements and so on.
1221
- *
1222
- * @param hostRef an object containing references to the element's host node,
1223
- * VDom nodes, and other metadata
1224
- * @param instance a reference to the underlying host element where it will be
1225
- * rendered
1226
- * @param isInitialLoad whether or not this function is being called as part of
1227
- * the first render cycle
1228
- */
1229
- const updateComponent = async (hostRef, instance, isInitialLoad) => {
1230
- var _a;
1231
- const elm = hostRef.$hostElement$;
1232
- const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1233
- const rc = elm['s-rc'];
1234
- if (isInitialLoad) {
1235
- // DOM WRITE!
1236
- attachStyles(hostRef);
1237
- }
1238
- const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1239
- {
1240
- callRender(hostRef, instance, elm, isInitialLoad);
1241
- }
1242
- if (rc) {
1243
- // ok, so turns out there are some child host elements
1244
- // waiting on this parent element to load
1245
- // let's fire off all update callbacks waiting
1246
- rc.map((cb) => cb());
1247
- elm['s-rc'] = undefined;
1248
- }
1249
- endRender();
1250
- endUpdate();
1251
- {
1252
- const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1253
- const postUpdate = () => postUpdateComponent(hostRef);
1254
- if (childrenPromises.length === 0) {
1255
- postUpdate();
1256
- }
1257
- else {
1258
- Promise.all(childrenPromises).then(postUpdate);
1259
- hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1260
- childrenPromises.length = 0;
1261
- }
1262
- }
1263
- };
1264
- /**
1265
- * Handle making the call to the VDom renderer with the proper context given
1266
- * various build variables
1267
- *
1268
- * @param hostRef an object containing references to the element's host node,
1269
- * VDom nodes, and other metadata
1270
- * @param instance a reference to the underlying host element where it will be
1271
- * rendered
1272
- * @param elm the Host element for the component
1273
- * @param isInitialLoad whether or not this function is being called as part of
1274
- * @returns an empty promise
1275
- */
1276
- const callRender = (hostRef, instance, elm, isInitialLoad) => {
1277
- try {
1278
- /**
1279
- * minification optimization: `allRenderFn` is `true` if all components have a `render`
1280
- * method, so we can call the method immediately. If not, check before calling it.
1281
- */
1282
- instance = instance.render() ;
1283
- {
1284
- hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1285
- }
1286
- {
1287
- hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1288
- }
1289
- {
1290
- {
1291
- // looks like we've got child nodes to render into this host element
1292
- // or we need to update the css class/attrs on the host element
1293
- // DOM WRITE!
1294
- {
1295
- renderVdom(hostRef, instance, isInitialLoad);
1296
- }
1297
- }
1298
- }
1299
- }
1300
- catch (e) {
1301
- consoleError(e, hostRef.$hostElement$);
1302
- }
1303
- return null;
1304
- };
1305
- const postUpdateComponent = (hostRef) => {
1306
- const tagName = hostRef.$cmpMeta$.$tagName$;
1307
- const elm = hostRef.$hostElement$;
1308
- const endPostUpdate = createTime('postUpdate', tagName);
1309
- const instance = hostRef.$lazyInstance$ ;
1310
- const ancestorComponent = hostRef.$ancestorComponent$;
1311
- {
1312
- safeCall(instance, 'componentDidRender');
1313
- }
1314
- if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1315
- hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1316
- {
1317
- // DOM WRITE!
1318
- addHydratedFlag(elm);
1319
- }
1320
- {
1321
- safeCall(instance, 'componentDidLoad');
1322
- }
1323
- endPostUpdate();
1324
- {
1325
- hostRef.$onReadyResolve$(elm);
1326
- if (!ancestorComponent) {
1327
- appDidLoad();
1328
- }
1329
- }
1330
- }
1331
- else {
1332
- {
1333
- safeCall(instance, 'componentDidUpdate');
1334
- }
1335
- endPostUpdate();
1336
- }
1337
- {
1338
- hostRef.$onInstanceResolve$(elm);
1339
- }
1340
- // load events fire from bottom to top
1341
- // the deepest elements load first then bubbles up
1342
- {
1343
- if (hostRef.$onRenderResolve$) {
1344
- hostRef.$onRenderResolve$();
1345
- hostRef.$onRenderResolve$ = undefined;
1346
- }
1347
- if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1348
- nextTick(() => scheduleUpdate(hostRef, false));
1349
- }
1350
- hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1351
- }
1352
- // ( •_•)
1353
- // ( •_•)>⌐■-■
1354
- // (⌐■_■)
1355
- };
1356
- const forceUpdate = (ref) => {
1357
- {
1358
- const hostRef = getHostRef(ref);
1359
- const isConnected = hostRef.$hostElement$.isConnected;
1360
- if (isConnected &&
1361
- (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1362
- scheduleUpdate(hostRef, false);
1363
- }
1364
- // Returns "true" when the forced update was successfully scheduled
1365
- return isConnected;
1366
- }
1367
- };
1368
- const appDidLoad = (who) => {
1369
- // on appload
1370
- // we have finish the first big initial render
1371
- {
1372
- addHydratedFlag(doc.documentElement);
1373
- }
1374
- nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1375
- };
1376
- /**
1377
- * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
1378
- * e.g. custom element node. If a build figures out that e.g. no component
1379
- * has a `componentDidLoad` method, the instance method gets removed from the
1380
- * output bundle and this function returns `undefined`.
1381
- * @param instance any object that may or may not contain methods
1382
- * @param method method name
1383
- * @param arg single arbitrary argument
1384
- * @returns result of method call if it exists, otherwise `undefined`
1385
- */
1386
- const safeCall = (instance, method, arg) => {
1387
- if (instance && instance[method]) {
1388
- try {
1389
- return instance[method](arg);
1390
- }
1391
- catch (e) {
1392
- consoleError(e);
1393
- }
1394
- }
1395
- return undefined;
1396
- };
1397
- const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1398
- ;
1399
- const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1400
- const setValue = (ref, propName, newVal, cmpMeta) => {
1401
- // check our new property value against our internal value
1402
- const hostRef = getHostRef(ref);
1403
- const elm = hostRef.$hostElement$ ;
1404
- const oldVal = hostRef.$instanceValues$.get(propName);
1405
- const flags = hostRef.$flags$;
1406
- const instance = hostRef.$lazyInstance$ ;
1407
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1408
- // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1409
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1410
- const didValueChange = newVal !== oldVal && !areBothNaN;
1411
- if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1412
- // gadzooks! the property's value has changed!!
1413
- // set our new value!
1414
- hostRef.$instanceValues$.set(propName, newVal);
1415
- if (instance) {
1416
- // get an array of method names of watch functions to call
1417
- if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
1418
- const watchMethods = cmpMeta.$watchers$[propName];
1419
- if (watchMethods) {
1420
- // this instance is watching for when this property changed
1421
- watchMethods.map((watchMethodName) => {
1422
- try {
1423
- // fire off each of the watch methods that are watching this property
1424
- instance[watchMethodName](newVal, oldVal, propName);
1425
- }
1426
- catch (e) {
1427
- consoleError(e, elm);
1428
- }
1429
- });
1430
- }
1431
- }
1432
- if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1433
- // looks like this value actually changed, so we've got work to do!
1434
- // but only if we've already rendered, otherwise just chill out
1435
- // queue that we need to do an update, but don't worry about queuing
1436
- // up millions cuz this function ensures it only runs once
1437
- scheduleUpdate(hostRef, false);
1438
- }
1439
- }
1440
- }
1441
- };
1442
- /**
1443
- * Attach a series of runtime constructs to a compiled Stencil component
1444
- * constructor, including getters and setters for the `@Prop` and `@State`
1445
- * decorators, callbacks for when attributes change, and so on.
1446
- *
1447
- * @param Cstr the constructor for a component that we need to process
1448
- * @param cmpMeta metadata collected previously about the component
1449
- * @param flags a number used to store a series of bit flags
1450
- * @returns a reference to the same constructor passed in (but now mutated)
1451
- */
1452
- const proxyComponent = (Cstr, cmpMeta, flags) => {
1453
- var _a;
1454
- const prototype = Cstr.prototype;
1455
- if (cmpMeta.$members$) {
1456
- if (Cstr.watchers) {
1457
- cmpMeta.$watchers$ = Cstr.watchers;
1458
- }
1459
- // It's better to have a const than two Object.entries()
1460
- const members = Object.entries(cmpMeta.$members$);
1461
- members.map(([memberName, [memberFlags]]) => {
1462
- if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1463
- ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1464
- // proxyComponent - prop
1465
- Object.defineProperty(prototype, memberName, {
1466
- get() {
1467
- // proxyComponent, get value
1468
- return getValue(this, memberName);
1469
- },
1470
- set(newValue) {
1471
- // proxyComponent, set value
1472
- setValue(this, memberName, newValue, cmpMeta);
1473
- },
1474
- configurable: true,
1475
- enumerable: true,
1476
- });
1477
- }
1478
- else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
1479
- memberFlags & 64 /* MEMBER_FLAGS.Method */) {
1480
- // proxyComponent - method
1481
- Object.defineProperty(prototype, memberName, {
1482
- value(...args) {
1483
- var _a;
1484
- const ref = getHostRef(this);
1485
- return (_a = ref === null || ref === void 0 ? void 0 : ref.$onInstancePromise$) === null || _a === void 0 ? void 0 : _a.then(() => { var _a; return (_a = ref.$lazyInstance$) === null || _a === void 0 ? void 0 : _a[memberName](...args); });
1486
- },
1487
- });
1488
- }
1489
- });
1490
- if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1491
- const attrNameToPropName = new Map();
1492
- prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1493
- plt.jmp(() => {
1494
- var _a;
1495
- const propName = attrNameToPropName.get(attrName);
1496
- // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1497
- // in the case where an attribute was set inline.
1498
- // ```html
1499
- // <my-component some-attribute="some-value"></my-component>
1500
- // ```
1501
- //
1502
- // There is an edge case where a developer sets the attribute inline on a custom element and then
1503
- // programmatically changes it before it has been upgraded as shown below:
1504
- //
1505
- // ```html
1506
- // <!-- this component has _not_ been upgraded yet -->
1507
- // <my-component id="test" some-attribute="some-value"></my-component>
1508
- // <script>
1509
- // // grab non-upgraded component
1510
- // el = document.querySelector("#test");
1511
- // el.someAttribute = "another-value";
1512
- // // upgrade component
1513
- // customElements.define('my-component', MyComponent);
1514
- // </script>
1515
- // ```
1516
- // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
1517
- // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1518
- // to the value that was set inline i.e. "some-value" from above example. When
1519
- // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
1520
- //
1521
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
1522
- // by connectedCallback as this attributeChangedCallback will not fire.
1523
- //
1524
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1525
- //
1526
- // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1527
- // properties here given that this goes against best practices outlined here
1528
- // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1529
- if (this.hasOwnProperty(propName)) {
1530
- newValue = this[propName];
1531
- delete this[propName];
1532
- }
1533
- else if (prototype.hasOwnProperty(propName) &&
1534
- typeof this[propName] === 'number' &&
1535
- this[propName] == newValue) {
1536
- // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1537
- // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1538
- // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1539
- return;
1540
- }
1541
- else if (propName == null) {
1542
- // At this point we should know this is not a "member", so we can treat it like watching an attribute
1543
- // on a vanilla web component
1544
- const hostRef = getHostRef(this);
1545
- const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
1546
- // We only want to trigger the callback(s) if:
1547
- // 1. The instance is ready
1548
- // 2. The watchers are ready
1549
- // 3. The value has changed
1550
- if (flags &&
1551
- !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1552
- flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1553
- newValue !== oldValue) {
1554
- const instance = hostRef.$lazyInstance$ ;
1555
- const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
1556
- entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1557
- if (instance[callbackName] != null) {
1558
- instance[callbackName].call(instance, newValue, oldValue, attrName);
1559
- }
1560
- });
1561
- }
1562
- return;
1563
- }
1564
- this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1565
- });
1566
- };
1567
- // Create an array of attributes to observe
1568
- // This list in comprised of all strings used within a `@Watch()` decorator
1569
- // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1570
- // As such, there is no way to guarantee type-safety here that a user hasn't entered
1571
- // an invalid attribute.
1572
- Cstr.observedAttributes = Array.from(new Set([
1573
- ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1574
- ...members
1575
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1576
- .map(([propName, m]) => {
1577
- var _a;
1578
- const attrName = m[1] || propName;
1579
- attrNameToPropName.set(attrName, propName);
1580
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1581
- (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
1582
- }
1583
- return attrName;
1584
- }),
1585
- ]));
1586
- }
1587
- }
1588
- return Cstr;
1589
- };
1590
- /**
1591
- * Initialize a Stencil component given a reference to its host element, its
1592
- * runtime bookkeeping data structure, runtime metadata about the component,
1593
- * and (optionally) an HMR version ID.
1594
- *
1595
- * @param elm a host element
1596
- * @param hostRef the element's runtime bookkeeping object
1597
- * @param cmpMeta runtime metadata for the Stencil component
1598
- * @param hmrVersionId an (optional) HMR version ID
1599
- */
1600
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1601
- let Cstr;
1602
- // initializeComponent
1603
- if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1604
- // Let the runtime know that the component has been initialized
1605
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1606
- {
1607
- // lazy loaded components
1608
- // request the component's implementation to be
1609
- // wired up with the host element
1610
- Cstr = loadModule(cmpMeta);
1611
- if (Cstr.then) {
1612
- // Await creates a micro-task avoid if possible
1613
- const endLoad = uniqueTime();
1614
- Cstr = await Cstr;
1615
- endLoad();
1616
- }
1617
- if (!Cstr.isProxied) {
1618
- // we've never proxied this Constructor before
1619
- // let's add the getters/setters to its prototype before
1620
- // the first time we create an instance of the implementation
1621
- {
1622
- cmpMeta.$watchers$ = Cstr.watchers;
1623
- }
1624
- proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1625
- Cstr.isProxied = true;
1626
- }
1627
- const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1628
- // ok, time to construct the instance
1629
- // but let's keep track of when we start and stop
1630
- // so that the getters/setters don't incorrectly step on data
1631
- {
1632
- hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1633
- }
1634
- // construct the lazy-loaded component implementation
1635
- // passing the hostRef is very important during
1636
- // construction in order to directly wire together the
1637
- // host element and the lazy-loaded instance
1638
- try {
1639
- new Cstr(hostRef);
1640
- }
1641
- catch (e) {
1642
- consoleError(e);
1643
- }
1644
- {
1645
- hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1646
- }
1647
- {
1648
- hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1649
- }
1650
- endNewInstance();
1651
- }
1652
- if (Cstr.style) {
1653
- // this component has styles but we haven't registered them yet
1654
- let style = Cstr.style;
1655
- const scopeId = getScopeId(cmpMeta);
1656
- if (!styles.has(scopeId)) {
1657
- const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1658
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1659
- endRegisterStyles();
1660
- }
1661
- }
1662
- }
1663
- // we've successfully created a lazy instance
1664
- const ancestorComponent = hostRef.$ancestorComponent$;
1665
- const schedule = () => scheduleUpdate(hostRef, true);
1666
- if (ancestorComponent && ancestorComponent['s-rc']) {
1667
- // this is the initial load and this component it has an ancestor component
1668
- // but the ancestor component has NOT fired its will update lifecycle yet
1669
- // so let's just cool our jets and wait for the ancestor to continue first
1670
- // this will get fired off when the ancestor component
1671
- // finally gets around to rendering its lazy self
1672
- // fire off the initial update
1673
- ancestorComponent['s-rc'].push(schedule);
1674
- }
1675
- else {
1676
- schedule();
1677
- }
1678
- };
1679
- const fireConnectedCallback = (instance) => {
1680
- };
1681
- const connectedCallback = (elm) => {
1682
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1683
- const hostRef = getHostRef(elm);
1684
- const cmpMeta = hostRef.$cmpMeta$;
1685
- const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1686
- if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1687
- // first time this component has connected
1688
- hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1689
- {
1690
- // find the first ancestor component (if there is one) and register
1691
- // this component as one of the actively loading child components for its ancestor
1692
- let ancestorComponent = elm;
1693
- while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1694
- // climb up the ancestors looking for the first
1695
- // component that hasn't finished its lifecycle update yet
1696
- if (ancestorComponent['s-p']) {
1697
- // we found this components first ancestor component
1698
- // keep a reference to this component's ancestor component
1699
- attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1700
- break;
1701
- }
1702
- }
1703
- }
1704
- // Lazy properties
1705
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1706
- if (cmpMeta.$members$) {
1707
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1708
- if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1709
- const value = elm[memberName];
1710
- delete elm[memberName];
1711
- elm[memberName] = value;
1712
- }
1713
- });
1714
- }
1715
- {
1716
- initializeComponent(elm, hostRef, cmpMeta);
1717
- }
1718
- }
1719
- else {
1720
- // not the first time this has connected
1721
- // reattach any event listeners to the host
1722
- // since they would have been removed when disconnected
1723
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1724
- // fire off connectedCallback() on component instance
1725
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1726
- else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1727
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1728
- }
1729
- }
1730
- endConnected();
1731
- }
1732
- };
1733
- const disconnectInstance = (instance) => {
1734
- {
1735
- safeCall(instance, 'disconnectedCallback');
1736
- }
1737
- };
1738
- const disconnectedCallback = async (elm) => {
1739
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1740
- const hostRef = getHostRef(elm);
1741
- {
1742
- if (hostRef.$rmListeners$) {
1743
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1744
- hostRef.$rmListeners$ = undefined;
1745
- }
1746
- }
1747
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
1748
- disconnectInstance(hostRef.$lazyInstance$);
1749
- }
1750
- else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1751
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1752
- }
1753
- }
1754
- };
1755
- const bootstrapLazy = (lazyBundles, options = {}) => {
1756
- var _a;
1757
- const endBootstrap = createTime();
1758
- const cmpTags = [];
1759
- const exclude = options.exclude || [];
1760
- const customElements = win.customElements;
1761
- const head = doc.head;
1762
- const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1763
- const dataStyles = /*@__PURE__*/ doc.createElement('style');
1764
- const deferredConnectedCallbacks = [];
1765
- let appLoadFallback;
1766
- let isBootstrapping = true;
1767
- Object.assign(plt, options);
1768
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1769
- let hasSlotRelocation = false;
1770
- lazyBundles.map((lazyBundle) => {
1771
- lazyBundle[1].map((compactMeta) => {
1772
- var _a;
1773
- const cmpMeta = {
1774
- $flags$: compactMeta[0],
1775
- $tagName$: compactMeta[1],
1776
- $members$: compactMeta[2],
1777
- $listeners$: compactMeta[3],
1778
- };
1779
- // Check if we are using slots outside the shadow DOM in this component.
1780
- // We'll use this information later to add styles for `slot-fb` elements
1781
- if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
1782
- hasSlotRelocation = true;
1783
- }
1784
- {
1785
- cmpMeta.$members$ = compactMeta[2];
1786
- }
1787
- {
1788
- cmpMeta.$listeners$ = compactMeta[3];
1789
- }
1790
- {
1791
- cmpMeta.$attrsToReflect$ = [];
1792
- }
1793
- {
1794
- cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
1795
- }
1796
- const tagName = cmpMeta.$tagName$;
1797
- const HostElement = class extends HTMLElement {
1798
- // StencilLazyHost
1799
- constructor(self) {
1800
- // @ts-ignore
1801
- super(self);
1802
- self = this;
1803
- registerHost(self, cmpMeta);
1804
- if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1805
- // this component is using shadow dom
1806
- // and this browser supports shadow dom
1807
- // add the read-only property "shadowRoot" to the host element
1808
- // adding the shadow root build conditionals to minimize runtime
1809
- {
1810
- {
1811
- self.attachShadow({ mode: 'open' });
1812
- }
1813
- }
1814
- }
1815
- }
1816
- connectedCallback() {
1817
- if (appLoadFallback) {
1818
- clearTimeout(appLoadFallback);
1819
- appLoadFallback = null;
1820
- }
1821
- if (isBootstrapping) {
1822
- // connectedCallback will be processed once all components have been registered
1823
- deferredConnectedCallbacks.push(this);
1824
- }
1825
- else {
1826
- plt.jmp(() => connectedCallback(this));
1827
- }
1828
- }
1829
- disconnectedCallback() {
1830
- plt.jmp(() => disconnectedCallback(this));
1831
- }
1832
- componentOnReady() {
1833
- return getHostRef(this).$onReadyPromise$;
1834
- }
1835
- };
1836
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1837
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1838
- cmpTags.push(tagName);
1839
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1840
- }
1841
- });
1842
- });
1843
- // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
1844
- if (hasSlotRelocation) {
1845
- dataStyles.innerHTML += SLOT_FB_CSS;
1846
- }
1847
- // Add hydration styles
1848
- {
1849
- dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
1850
- }
1851
- // If we have styles, add them to the DOM
1852
- if (dataStyles.innerHTML.length) {
1853
- dataStyles.setAttribute('data-styles', '');
1854
- // Apply CSP nonce to the style tag if it exists
1855
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1856
- if (nonce != null) {
1857
- dataStyles.setAttribute('nonce', nonce);
1858
- }
1859
- // Insert the styles into the document head
1860
- // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
1861
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1862
- }
1863
- // Process deferred connectedCallbacks now all components have been registered
1864
- isBootstrapping = false;
1865
- if (deferredConnectedCallbacks.length) {
1866
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1867
- }
1868
- else {
1869
- {
1870
- plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1871
- }
1872
- }
1873
- // Fallback appLoad event
1874
- endBootstrap();
1875
- };
1876
- const Fragment = (_, children) => children;
1877
- const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1878
- if (listeners) {
1879
- listeners.map(([flags, name, method]) => {
1880
- const target = getHostListenerTarget(elm, flags) ;
1881
- const handler = hostListenerProxy(hostRef, method);
1882
- const opts = hostListenerOpts(flags);
1883
- plt.ael(target, name, handler, opts);
1884
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1885
- });
1886
- }
1887
- };
1888
- const hostListenerProxy = (hostRef, methodName) => (ev) => {
1889
- try {
1890
- {
1891
- if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
1892
- // instance is ready, let's call it's member method for this event
1893
- hostRef.$lazyInstance$[methodName](ev);
1894
- }
1895
- else {
1896
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1897
- }
1898
- }
1899
- }
1900
- catch (e) {
1901
- consoleError(e);
1902
- }
1903
- };
1904
- const getHostListenerTarget = (elm, flags) => {
1905
- if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
1906
- return doc;
1907
- return elm;
1908
- };
1909
- // prettier-ignore
1910
- const hostListenerOpts = (flags) => supportsListenerOptions
1911
- ? ({
1912
- passive: (flags & 1 /* LISTENER_FLAGS.Passive */) !== 0,
1913
- capture: (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0,
1914
- })
1915
- : (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1916
- /**
1917
- * Assigns the given value to the nonce property on the runtime platform object.
1918
- * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1919
- * @param nonce The value to be assigned to the platform nonce property.
1920
- * @returns void
1921
- */
1922
- const setNonce = (nonce) => (plt.$nonce$ = nonce);
1923
- /**
1924
- * A WeakMap mapping runtime component references to their corresponding host reference
1925
- * instances.
1926
- *
1927
- * **Note**: If we're in an HMR context we need to store a reference to this
1928
- * value on `window` in order to maintain the mapping of {@link d.RuntimeRef}
1929
- * to {@link d.HostRef} across HMR updates.
1930
- *
1931
- * This is necessary because when HMR updates for a component are processed by
1932
- * the browser-side dev server client the JS bundle for that component is
1933
- * re-fetched. Since the module containing {@link hostRefs} is included in
1934
- * that bundle, if we do not store a reference to it the new iteration of the
1935
- * component will not have access to the previous hostRef map, leading to a
1936
- * bug where the new version of the component cannot properly initialize.
1937
- */
1938
- const hostRefs = new WeakMap();
1939
- /**
1940
- * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
1941
- *
1942
- * @param ref the runtime ref of interest
1943
- * @returns the Host reference (if found) or undefined
1944
- */
1945
- const getHostRef = (ref) => hostRefs.get(ref);
1946
- /**
1947
- * Register a lazy instance with the {@link hostRefs} object so it's
1948
- * corresponding {@link d.HostRef} can be retrieved later.
1949
- *
1950
- * @param lazyInstance the lazy instance of interest
1951
- * @param hostRef that instances `HostRef` object
1952
- * @returns a reference to the host ref WeakMap
1953
- */
1954
- const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1955
- /**
1956
- * Register a host element for a Stencil component, setting up various metadata
1957
- * and callbacks based on {@link BUILD} flags as well as the component's runtime
1958
- * metadata.
1959
- *
1960
- * @param hostElement the host element to register
1961
- * @param cmpMeta runtime metadata for that component
1962
- * @returns a reference to the host ref WeakMap
1963
- */
1964
- const registerHost = (hostElement, cmpMeta) => {
1965
- const hostRef = {
1966
- $flags$: 0,
1967
- $hostElement$: hostElement,
1968
- $cmpMeta$: cmpMeta,
1969
- $instanceValues$: new Map(),
1970
- };
1971
- {
1972
- hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
1973
- }
1974
- {
1975
- hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1976
- hostElement['s-p'] = [];
1977
- hostElement['s-rc'] = [];
1978
- }
1979
- addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
1980
- return hostRefs.set(hostElement, hostRef);
1981
- };
1982
- const isMemberInElement = (elm, memberName) => memberName in elm;
1983
- const consoleError = (e, el) => (0, console.error)(e, el);
1984
- const cmpModules = /*@__PURE__*/ new Map();
1985
- const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1986
- // loadModuleImport
1987
- const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1988
- const bundleId = cmpMeta.$lazyBundleId$;
1989
- const module = cmpModules.get(bundleId) ;
1990
- if (module) {
1991
- return module[exportName];
1992
- }
1993
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1994
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1995
- /* @vite-ignore */
1996
- /* webpackInclude: /\.entry\.js$/ */
1997
- /* webpackExclude: /\.system\.entry\.js$/ */
1998
- /* webpackMode: "lazy" */
1999
- `./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
2000
- {
2001
- cmpModules.set(bundleId, importedModule);
2002
- }
2003
- return importedModule[exportName];
2004
- }, consoleError);
2005
- };
2006
- const styles = /*@__PURE__*/ new Map();
2007
- const win = typeof window !== 'undefined' ? window : {};
2008
- const doc = win.document || { head: {} };
2009
- const plt = {
2010
- $flags$: 0,
2011
- $resourcesUrl$: '',
2012
- jmp: (h) => h(),
2013
- raf: (h) => requestAnimationFrame(h),
2014
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
2015
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2016
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
2017
- };
2018
- const supportsListenerOptions = /*@__PURE__*/ (() => {
2019
- let supportsListenerOptions = false;
2020
- try {
2021
- doc.addEventListener('e', null, Object.defineProperty({}, 'passive', {
2022
- get() {
2023
- supportsListenerOptions = true;
2024
- },
2025
- }));
2026
- }
2027
- catch (e) { }
2028
- return supportsListenerOptions;
2029
- })();
2030
- const promiseResolve = (v) => Promise.resolve(v);
2031
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
2032
- try {
2033
- new CSSStyleSheet();
2034
- return typeof new CSSStyleSheet().replaceSync === 'function';
2035
- }
2036
- catch (e) { }
2037
- return false;
2038
- })()
2039
- ;
2040
- const queueDomReads = [];
2041
- const queueDomWrites = [];
2042
- const queueTask = (queue, write) => (cb) => {
2043
- queue.push(cb);
2044
- if (!queuePending) {
2045
- queuePending = true;
2046
- if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
2047
- nextTick(flush);
2048
- }
2049
- else {
2050
- plt.raf(flush);
2051
- }
2052
- }
2053
- };
2054
- const consume = (queue) => {
2055
- for (let i = 0; i < queue.length; i++) {
2056
- try {
2057
- queue[i](performance.now());
2058
- }
2059
- catch (e) {
2060
- consoleError(e);
2061
- }
2062
- }
2063
- queue.length = 0;
2064
- };
2065
- const flush = () => {
2066
- // always force a bunch of medium callbacks to run, but still have
2067
- // a throttle on how many can run in a certain time
2068
- // DOM READS!!!
2069
- consume(queueDomReads);
2070
- // DOM WRITES!!!
2071
- {
2072
- consume(queueDomWrites);
2073
- if ((queuePending = queueDomReads.length > 0)) {
2074
- // still more to do yet, but we've run out of time
2075
- // let's let this thing cool off and try again in the next tick
2076
- plt.raf(flush);
2077
- }
2078
- }
2079
- };
2080
- const nextTick = (cb) => promiseResolve().then(cb);
2081
- const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2082
-
2083
- exports.Fragment = Fragment;
2084
- exports.Host = Host;
2085
- exports.bootstrapLazy = bootstrapLazy;
2086
- exports.createEvent = createEvent;
2087
- exports.forceUpdate = forceUpdate;
2088
- exports.getAssetPath = getAssetPath;
2089
- exports.getElement = getElement;
2090
- exports.h = h;
2091
- exports.promiseResolve = promiseResolve;
2092
- exports.registerInstance = registerInstance;
2093
- exports.setAssetPath = setAssetPath;
2094
- exports.setNonce = setNonce;