@postnord/pn-marketweb-components 2.1.7 → 2.1.9

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 (901) hide show
  1. package/cjs/{index-e3e27c79.js → index-4199ff85.js} +808 -278
  2. package/cjs/{index-28bbc937.js → index-95e5b7f9.js} +1 -1
  3. package/cjs/loader.cjs.js +3 -2
  4. package/cjs/pn-bonus-progressbar-level.cjs.entry.js +2 -2
  5. package/cjs/pn-bonus-progressbar.cjs.entry.js +2 -2
  6. package/cjs/pn-breakpoints.cjs.entry.js +2 -2
  7. package/cjs/pn-chart.cjs.entry.js +3 -2
  8. package/cjs/pn-charts-card.cjs.entry.js +10 -3
  9. package/cjs/pn-choice-button.cjs.entry.js +5 -2
  10. package/cjs/pn-customernumber-selector-option.cjs.entry.js +2 -2
  11. package/cjs/pn-customernumber-selector.cjs.entry.js +2 -2
  12. package/cjs/pn-filter-checkbox.cjs.entry.js +5 -2
  13. package/cjs/pn-find-price-result.cjs.entry.js +7 -4
  14. package/cjs/{pn-find-price-store-a91ce3f6.js → pn-find-price-store-e0d1e412.js} +1 -1
  15. package/cjs/pn-find-price.cjs.entry.js +4 -4
  16. package/cjs/pn-find-service-and-price-result.cjs.entry.js +4 -4
  17. package/cjs/{pn-find-service-and-price-store-16a7936c.js → pn-find-service-and-price-store-6e26630d.js} +1 -1
  18. package/cjs/pn-find-service-and-price.cjs.entry.js +4 -4
  19. package/cjs/pn-language-selector_9.cjs.entry.js +18 -42
  20. package/cjs/pn-line-shape.cjs.entry.js +2 -2
  21. package/cjs/pn-mainnav-link.cjs.entry.js +4 -10
  22. package/cjs/{pn-mainnav-store-61a75ea0.js → pn-mainnav-store-8c337865.js} +1 -1
  23. package/cjs/pn-market-web-components.cjs.js +6 -2
  24. package/cjs/pn-marketweb-input.cjs.entry.js +2 -7
  25. package/cjs/pn-marketweb-search.cjs.entry.js +2 -6
  26. package/cjs/pn-marketweb-sitefooter.cjs.entry.js +10 -15
  27. package/cjs/pn-marketweb-siteheader-login-button_5.cjs.entry.js +12 -10
  28. package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +4 -4
  29. package/cjs/{pn-marketweb-siteheader-store-e29ad918.js → pn-marketweb-siteheader-store-5ced6902.js} +1 -1
  30. package/cjs/pn-marketweb-siteheader.cjs.entry.js +10 -38
  31. package/cjs/pn-parcel-tracker.cjs.entry.js +2 -2
  32. package/cjs/pn-pex-pricefinder.cjs.entry.js +2 -5
  33. package/cjs/pn-product-card_3.cjs.entry.js +15 -4
  34. package/cjs/pn-product-pricelist-result.cjs.entry.js +3 -3
  35. package/cjs/pn-product-pricelist.cjs.entry.js +4 -4
  36. package/cjs/pn-product-tile-info_2.cjs.entry.js +10 -3
  37. package/cjs/pn-product-tile.cjs.entry.js +2 -2
  38. package/cjs/pn-profile-modal-customernumber.cjs.entry.js +2 -2
  39. package/cjs/pn-profile-modal-profile.cjs.entry.js +4 -4
  40. package/cjs/{pn-profile-modal-store-6117e304.js → pn-profile-modal-store-947b08ae.js} +1 -1
  41. package/cjs/pn-profile-modal-type.cjs.entry.js +4 -4
  42. package/cjs/pn-profile-modal.cjs.entry.js +4 -4
  43. package/cjs/pn-profile-selector-option.cjs.entry.js +2 -2
  44. package/cjs/pn-profile-selector.cjs.entry.js +5 -5
  45. package/cjs/pn-proxio-findprice-result.cjs.entry.js +5 -2
  46. package/cjs/pn-proxio-findprice.cjs.entry.js +4 -4
  47. package/cjs/pn-proxio-pricegroup.cjs.entry.js +3 -5
  48. package/cjs/pn-proxio-productcard_4.cjs.entry.js +12 -5
  49. package/cjs/pn-quick-cta.cjs.entry.js +2 -2
  50. package/cjs/pn-quote-card.cjs.entry.js +2 -3
  51. package/cjs/pn-sidenav-level.cjs.entry.js +4 -4
  52. package/cjs/pn-sidenav-link.cjs.entry.js +4 -12
  53. package/cjs/{pn-sidenav-store-d9bd9e00.js → pn-sidenav-store-d2389306.js} +1 -1
  54. package/cjs/pn-sidenav-togglebutton.cjs.entry.js +4 -5
  55. package/cjs/pn-sidenav.cjs.entry.js +4 -6
  56. package/cjs/pn-site-footer_2.cjs.entry.js +3 -4
  57. package/cjs/pn-spotlight.cjs.entry.js +2 -2
  58. package/cjs/pn-stats-info-data.cjs.entry.js +8 -8
  59. package/cjs/pn-stats-info.cjs.entry.js +3 -3
  60. package/cjs/pn-teaser-card.cjs.entry.js +4 -5
  61. package/cjs/pn-titletag.cjs.entry.js +2 -4
  62. package/collection/collection-manifest.json +2 -2
  63. package/collection/components/cards/pn-quote-card/pn-line-shape/pn-line-shape.js +12 -11
  64. package/collection/components/cards/pn-quote-card/pn-quote-card.js +68 -79
  65. package/collection/components/cards/pn-teaser-card/pn-teaser-card.css +23 -23
  66. package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +109 -113
  67. package/collection/components/charts/pn-chart/pn-chart.js +83 -74
  68. package/collection/components/charts/pn-charts-card/pn-charts-card.css +23 -20
  69. package/collection/components/charts/pn-charts-card/pn-charts-card.js +142 -146
  70. package/collection/components/charts/pn-charts-card/pn-charts-card.stories.js +1 -0
  71. package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.js +133 -128
  72. package/collection/components/cta/pn-quick-cta/pn-quick-cta.js +51 -49
  73. package/collection/components/cta/pn-spotlight/pn-spotlight.js +51 -51
  74. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js +120 -115
  75. package/collection/components/data-visualization/pn-stats-info/pn-stats-info.css +16 -16
  76. package/collection/components/data-visualization/pn-stats-info/pn-stats-info.js +82 -79
  77. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.js +93 -87
  78. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js +193 -195
  79. package/collection/components/input/pn-choice-button/pn-choice-button.js +145 -137
  80. package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.js +128 -122
  81. package/collection/components/input/pn-marketweb-input/pn-marketweb-input.js +347 -355
  82. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js +258 -260
  83. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter-types.js +0 -3
  84. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +201 -221
  85. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js +34 -29
  86. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +101 -101
  87. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +110 -105
  88. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.js +51 -45
  89. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +176 -183
  90. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +259 -256
  91. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js +170 -172
  92. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.js +84 -75
  93. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +509 -560
  94. package/collection/components/minor/pn-titletag/pn-titletag.js +51 -49
  95. package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +119 -123
  96. package/collection/components/navigation/pn-language-selector/pn-language-selector.js +71 -64
  97. package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +58 -58
  98. package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +92 -97
  99. package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +39 -33
  100. package/collection/components/navigation/pn-mainnav/pn-mainnav.js +182 -183
  101. package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js +29 -22
  102. package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js +128 -134
  103. package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +39 -34
  104. package/collection/components/navigation/pn-sidenav/pn-sidenav.js +71 -66
  105. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.js +34 -29
  106. package/collection/components/navigation/pn-site-footer/pn-site-footer.js +68 -75
  107. package/collection/components/navigation/pn-site-selector/pn-site-selector-item.js +85 -89
  108. package/collection/components/navigation/pn-site-selector/pn-site-selector.js +73 -73
  109. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +68 -67
  110. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +90 -90
  111. package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js +85 -79
  112. package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +182 -188
  113. package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +91 -84
  114. package/collection/components/profile/pn-profile-modal/pn-profile-modal.js +116 -115
  115. package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +68 -67
  116. package/collection/components/profile/pn-profile-selector/pn-profile-selector.js +78 -76
  117. package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js +48 -42
  118. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +163 -179
  119. package/collection/components/widgets/pn-find-price/pn-find-price.js +99 -113
  120. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +66 -67
  121. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +133 -148
  122. package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js +87 -102
  123. package/collection/components/widgets/pn-product-card/pn-product-card-info.js +92 -94
  124. package/collection/components/widgets/pn-product-card/pn-product-card-price.js +138 -131
  125. package/collection/components/widgets/pn-product-card/pn-product-card.js +12 -21
  126. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +101 -108
  127. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +137 -140
  128. package/collection/components/widgets/pn-product-tile/pn-product-tile-info.js +70 -62
  129. package/collection/components/widgets/pn-product-tile/pn-product-tile-price.js +87 -83
  130. package/collection/components/widgets/pn-product-tile/pn-product-tile.js +12 -16
  131. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js +187 -188
  132. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +117 -131
  133. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +130 -145
  134. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +87 -82
  135. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +55 -57
  136. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.js +70 -61
  137. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +12 -20
  138. package/components/MarketWebContextService.js +316 -0
  139. package/components/_commonjsHelpers.js +32 -0
  140. package/components/convert.js +1823 -0
  141. package/components/data.js +37 -0
  142. package/components/index.d.ts +100 -0
  143. package/components/index.js +71 -0
  144. package/components/index2.js +187 -0
  145. package/components/pn-bonus-progressbar-level.d.ts +11 -0
  146. package/components/pn-bonus-progressbar-level.js +65 -0
  147. package/components/pn-bonus-progressbar.d.ts +11 -0
  148. package/components/pn-bonus-progressbar.js +128 -0
  149. package/components/pn-breakpoints.d.ts +11 -0
  150. package/components/pn-breakpoints.js +45 -0
  151. package/components/pn-chart.d.ts +11 -0
  152. package/components/pn-chart.js +22151 -0
  153. package/components/pn-charts-card.d.ts +11 -0
  154. package/components/pn-charts-card.js +51 -0
  155. package/components/pn-choice-button.d.ts +11 -0
  156. package/components/pn-choice-button.js +6 -0
  157. package/components/pn-choice-button2.js +61 -0
  158. package/components/pn-customernumber-selector-option.d.ts +11 -0
  159. package/components/pn-customernumber-selector-option.js +41 -0
  160. package/components/pn-customernumber-selector.d.ts +11 -0
  161. package/components/pn-customernumber-selector.js +77 -0
  162. package/components/pn-filter-checkbox.d.ts +11 -0
  163. package/components/pn-filter-checkbox.js +93 -0
  164. package/components/pn-find-price-result.d.ts +11 -0
  165. package/components/pn-find-price-result.js +6 -0
  166. package/components/pn-find-price-result2.js +192 -0
  167. package/components/pn-find-price.d.ts +11 -0
  168. package/components/pn-find-price.js +281 -0
  169. package/components/pn-find-service-and-price-result.d.ts +11 -0
  170. package/components/pn-find-service-and-price-result.js +6 -0
  171. package/components/pn-find-service-and-price-result2.js +96 -0
  172. package/components/pn-find-service-and-price.d.ts +11 -0
  173. package/components/pn-find-service-and-price.js +314 -0
  174. package/components/pn-language-selector-option.d.ts +11 -0
  175. package/components/pn-language-selector-option.js +6 -0
  176. package/components/pn-language-selector-option2.js +51 -0
  177. package/components/pn-language-selector.d.ts +11 -0
  178. package/components/pn-language-selector.js +6 -0
  179. package/components/pn-language-selector2.js +133 -0
  180. package/components/pn-line-shape.d.ts +11 -0
  181. package/components/pn-line-shape.js +35 -0
  182. package/components/pn-mainnav-level.d.ts +11 -0
  183. package/components/pn-mainnav-level.js +6 -0
  184. package/components/pn-mainnav-level2.js +117 -0
  185. package/components/pn-mainnav-link.d.ts +11 -0
  186. package/components/pn-mainnav-link.js +6 -0
  187. package/components/pn-mainnav-link2.js +57 -0
  188. package/components/pn-mainnav-list.d.ts +11 -0
  189. package/components/pn-mainnav-list.js +6 -0
  190. package/components/pn-mainnav-list2.js +39 -0
  191. package/{esm/pn-mainnav-store-28571e54.js → components/pn-mainnav-store.js} +1 -1
  192. package/components/pn-mainnav.d.ts +11 -0
  193. package/components/pn-mainnav.js +6 -0
  194. package/components/pn-mainnav2.js +120 -0
  195. package/components/pn-marketweb-input.d.ts +11 -0
  196. package/components/pn-marketweb-input.js +6 -0
  197. package/components/pn-marketweb-input2.js +102 -0
  198. package/components/pn-marketweb-search.d.ts +11 -0
  199. package/components/pn-marketweb-search.js +129 -0
  200. package/components/pn-marketweb-sitefooter.d.ts +11 -0
  201. package/components/pn-marketweb-sitefooter.js +335 -0
  202. package/components/pn-marketweb-siteheader-login-button.d.ts +11 -0
  203. package/components/pn-marketweb-siteheader-login-button.js +6 -0
  204. package/components/pn-marketweb-siteheader-login-button2.js +79 -0
  205. package/components/pn-marketweb-siteheader-login-linklist.d.ts +11 -0
  206. package/components/pn-marketweb-siteheader-login-linklist.js +6 -0
  207. package/components/pn-marketweb-siteheader-login-linklist2.js +105 -0
  208. package/components/pn-marketweb-siteheader-login-links.d.ts +11 -0
  209. package/components/pn-marketweb-siteheader-login-links.js +6 -0
  210. package/components/pn-marketweb-siteheader-login-links2.js +116 -0
  211. package/components/pn-marketweb-siteheader-login-mypage-button.d.ts +11 -0
  212. package/components/pn-marketweb-siteheader-login-mypage-button.js +6 -0
  213. package/components/pn-marketweb-siteheader-login-mypage-button2.js +36 -0
  214. package/components/pn-marketweb-siteheader-login-profileselection.d.ts +11 -0
  215. package/components/pn-marketweb-siteheader-login-profileselection.js +6 -0
  216. package/components/pn-marketweb-siteheader-login-profileselection2.js +234 -0
  217. package/components/pn-marketweb-siteheader-login.d.ts +11 -0
  218. package/components/pn-marketweb-siteheader-login.js +6 -0
  219. package/components/pn-marketweb-siteheader-login2.js +589 -0
  220. package/components/pn-marketweb-siteheader-search.d.ts +11 -0
  221. package/components/pn-marketweb-siteheader-search.js +6 -0
  222. package/components/pn-marketweb-siteheader-search2.js +131 -0
  223. package/components/pn-marketweb-siteheader-unified-login.d.ts +11 -0
  224. package/components/pn-marketweb-siteheader-unified-login.js +6 -0
  225. package/components/pn-marketweb-siteheader-unified-login2.js +52 -0
  226. package/components/pn-marketweb-siteheader.d.ts +11 -0
  227. package/components/pn-marketweb-siteheader.js +551 -0
  228. package/components/pn-parcel-tracker.d.ts +11 -0
  229. package/components/pn-parcel-tracker.js +58 -0
  230. package/components/pn-pex-pricefinder.d.ts +11 -0
  231. package/components/pn-pex-pricefinder.js +156 -0
  232. package/components/pn-product-card-info.d.ts +11 -0
  233. package/components/pn-product-card-info.js +6 -0
  234. package/components/pn-product-card-info2.js +45 -0
  235. package/components/pn-product-card-price.d.ts +11 -0
  236. package/components/pn-product-card-price.js +6 -0
  237. package/components/pn-product-card-price2.js +48 -0
  238. package/components/pn-product-card.d.ts +11 -0
  239. package/components/pn-product-card.js +6 -0
  240. package/components/pn-product-card2.js +30 -0
  241. package/components/pn-product-pricelist-result.d.ts +11 -0
  242. package/components/pn-product-pricelist-result.js +130 -0
  243. package/components/pn-product-pricelist.d.ts +11 -0
  244. package/components/pn-product-pricelist.js +259 -0
  245. package/components/pn-product-tile-info.d.ts +11 -0
  246. package/components/pn-product-tile-info.js +6 -0
  247. package/components/pn-product-tile-info2.js +38 -0
  248. package/components/pn-product-tile-price.d.ts +11 -0
  249. package/components/pn-product-tile-price.js +6 -0
  250. package/components/pn-product-tile-price2.js +42 -0
  251. package/components/pn-product-tile.d.ts +11 -0
  252. package/components/pn-product-tile.js +33 -0
  253. package/components/pn-profile-modal-customernumber.d.ts +11 -0
  254. package/components/pn-profile-modal-customernumber.js +46 -0
  255. package/components/pn-profile-modal-profile.d.ts +11 -0
  256. package/components/pn-profile-modal-profile.js +71 -0
  257. package/{esm/pn-profile-modal-store-ae9e0d5a.js → components/pn-profile-modal-store.js} +1 -1
  258. package/components/pn-profile-modal-type.d.ts +11 -0
  259. package/components/pn-profile-modal-type.js +56 -0
  260. package/components/pn-profile-modal.d.ts +11 -0
  261. package/components/pn-profile-modal.js +92 -0
  262. package/components/pn-profile-selector-option.d.ts +11 -0
  263. package/components/pn-profile-selector-option.js +41 -0
  264. package/components/pn-profile-selector.d.ts +11 -0
  265. package/components/pn-profile-selector.js +79 -0
  266. package/components/pn-proxio-findprice-result.d.ts +11 -0
  267. package/components/pn-proxio-findprice-result.js +6 -0
  268. package/components/pn-proxio-findprice-result2.js +122 -0
  269. package/components/pn-proxio-findprice.d.ts +11 -0
  270. package/components/pn-proxio-findprice.js +374 -0
  271. package/components/pn-proxio-pricegroup.d.ts +11 -0
  272. package/components/pn-proxio-pricegroup.js +194 -0
  273. package/components/pn-proxio-productcard-description.d.ts +11 -0
  274. package/components/pn-proxio-productcard-description.js +6 -0
  275. package/components/pn-proxio-productcard-description2.js +43 -0
  276. package/components/pn-proxio-productcard-information.d.ts +11 -0
  277. package/components/pn-proxio-productcard-information.js +6 -0
  278. package/components/pn-proxio-productcard-information2.js +37 -0
  279. package/components/pn-proxio-productcard-pricelink.d.ts +11 -0
  280. package/components/pn-proxio-productcard-pricelink.js +6 -0
  281. package/components/pn-proxio-productcard-pricelink2.js +38 -0
  282. package/components/pn-proxio-productcard.d.ts +11 -0
  283. package/components/pn-proxio-productcard.js +6 -0
  284. package/components/pn-proxio-productcard2.js +30 -0
  285. package/components/pn-quick-cta.d.ts +11 -0
  286. package/components/pn-quick-cta.js +39 -0
  287. package/components/pn-quote-card.d.ts +11 -0
  288. package/components/pn-quote-card.js +41 -0
  289. package/components/pn-sidenav-level.d.ts +11 -0
  290. package/components/pn-sidenav-level.js +84 -0
  291. package/components/pn-sidenav-link.d.ts +11 -0
  292. package/components/pn-sidenav-link.js +87 -0
  293. package/{esm/pn-sidenav-store-50b186d6.js → components/pn-sidenav-store.js} +1 -1
  294. package/components/pn-sidenav-togglebutton.d.ts +11 -0
  295. package/components/pn-sidenav-togglebutton.js +45 -0
  296. package/components/pn-sidenav.d.ts +11 -0
  297. package/components/pn-sidenav.js +95 -0
  298. package/components/pn-site-footer-col.d.ts +11 -0
  299. package/components/pn-site-footer-col.js +6 -0
  300. package/components/pn-site-footer-col2.js +33 -0
  301. package/components/pn-site-footer.d.ts +11 -0
  302. package/components/pn-site-footer.js +6 -0
  303. package/components/pn-site-footer2.js +38 -0
  304. package/components/pn-site-selector-item.d.ts +11 -0
  305. package/components/pn-site-selector-item.js +6 -0
  306. package/components/pn-site-selector-item2.js +39 -0
  307. package/components/pn-site-selector.d.ts +11 -0
  308. package/components/pn-site-selector.js +6 -0
  309. package/components/pn-site-selector2.js +69 -0
  310. package/components/pn-spotlight.d.ts +11 -0
  311. package/components/pn-spotlight.js +39 -0
  312. package/components/pn-stats-info-data.d.ts +11 -0
  313. package/components/pn-stats-info-data.js +6 -0
  314. package/components/pn-stats-info-data2.js +157 -0
  315. package/components/pn-stats-info.d.ts +11 -0
  316. package/components/pn-stats-info.js +59 -0
  317. package/components/pn-teaser-card.d.ts +11 -0
  318. package/components/pn-teaser-card.js +56 -0
  319. package/components/pn-titletag.d.ts +11 -0
  320. package/components/pn-titletag.js +6 -0
  321. package/components/pn-titletag2.js +36 -0
  322. package/components/translations.js +19 -0
  323. package/esm/{index-7b21ecff.js → index-7f77b0ba.js} +1 -1
  324. package/esm/{index-5397620b.js → index-c118284d.js} +808 -279
  325. package/esm/loader.js +3 -2
  326. package/esm/pn-bonus-progressbar-level.entry.js +2 -2
  327. package/esm/pn-bonus-progressbar.entry.js +2 -2
  328. package/esm/pn-breakpoints.entry.js +2 -2
  329. package/esm/pn-chart.entry.js +3 -2
  330. package/esm/pn-charts-card.entry.js +10 -3
  331. package/esm/pn-choice-button.entry.js +5 -2
  332. package/esm/pn-customernumber-selector-option.entry.js +2 -2
  333. package/esm/pn-customernumber-selector.entry.js +2 -2
  334. package/esm/pn-filter-checkbox.entry.js +5 -2
  335. package/esm/pn-find-price-result.entry.js +7 -4
  336. package/esm/{pn-find-price-store-bde5071d.js → pn-find-price-store-e13b6651.js} +1 -1
  337. package/esm/pn-find-price.entry.js +4 -4
  338. package/esm/pn-find-service-and-price-result.entry.js +4 -4
  339. package/esm/{pn-find-service-and-price-store-65df46a0.js → pn-find-service-and-price-store-f09ca219.js} +1 -1
  340. package/esm/pn-find-service-and-price.entry.js +4 -4
  341. package/esm/pn-language-selector_9.entry.js +18 -42
  342. package/esm/pn-line-shape.entry.js +2 -2
  343. package/esm/pn-mainnav-link.entry.js +4 -10
  344. package/esm/pn-mainnav-store-5d91f523.js +17 -0
  345. package/esm/pn-market-web-components.js +3 -2
  346. package/esm/pn-marketweb-input.entry.js +2 -7
  347. package/esm/pn-marketweb-search.entry.js +2 -6
  348. package/esm/pn-marketweb-sitefooter.entry.js +10 -15
  349. package/esm/pn-marketweb-siteheader-login-button_5.entry.js +12 -10
  350. package/esm/pn-marketweb-siteheader-login-linklist.entry.js +4 -4
  351. package/esm/{pn-marketweb-siteheader-store-cd0a1dab.js → pn-marketweb-siteheader-store-9df5290d.js} +1 -1
  352. package/esm/pn-marketweb-siteheader.entry.js +10 -38
  353. package/esm/pn-parcel-tracker.entry.js +2 -2
  354. package/esm/pn-pex-pricefinder.entry.js +2 -5
  355. package/esm/pn-product-card_3.entry.js +15 -4
  356. package/esm/pn-product-pricelist-result.entry.js +3 -3
  357. package/esm/pn-product-pricelist.entry.js +4 -4
  358. package/esm/pn-product-tile-info_2.entry.js +10 -3
  359. package/esm/pn-product-tile.entry.js +2 -2
  360. package/esm/pn-profile-modal-customernumber.entry.js +2 -2
  361. package/esm/pn-profile-modal-profile.entry.js +4 -4
  362. package/esm/pn-profile-modal-store-81f53310.js +15 -0
  363. package/esm/pn-profile-modal-type.entry.js +4 -4
  364. package/esm/pn-profile-modal.entry.js +4 -4
  365. package/esm/pn-profile-selector-option.entry.js +2 -2
  366. package/esm/pn-profile-selector.entry.js +5 -5
  367. package/esm/pn-proxio-findprice-result.entry.js +5 -2
  368. package/esm/pn-proxio-findprice.entry.js +4 -4
  369. package/esm/pn-proxio-pricegroup.entry.js +3 -5
  370. package/esm/pn-proxio-productcard_4.entry.js +12 -5
  371. package/esm/pn-quick-cta.entry.js +2 -2
  372. package/esm/pn-quote-card.entry.js +2 -3
  373. package/esm/pn-sidenav-level.entry.js +4 -4
  374. package/esm/pn-sidenav-link.entry.js +4 -12
  375. package/esm/pn-sidenav-store-94be19c8.js +14 -0
  376. package/esm/pn-sidenav-togglebutton.entry.js +4 -5
  377. package/esm/pn-sidenav.entry.js +4 -6
  378. package/esm/pn-site-footer_2.entry.js +3 -4
  379. package/esm/pn-spotlight.entry.js +2 -2
  380. package/esm/pn-stats-info-data.entry.js +8 -8
  381. package/esm/pn-stats-info.entry.js +3 -3
  382. package/esm/pn-teaser-card.entry.js +4 -5
  383. package/esm/pn-titletag.entry.js +2 -4
  384. package/esm/polyfills/css-shim.js +1 -1
  385. package/esm-es5/MarketWebContextService-872043cc.js +1 -1
  386. package/esm-es5/convert-f6377d13.js +1 -1
  387. package/esm-es5/{index-7b21ecff.js → index-7f77b0ba.js} +1 -1
  388. package/esm-es5/index-c118284d.js +1 -0
  389. package/esm-es5/loader.js +1 -1
  390. package/esm-es5/pn-bonus-progressbar-level.entry.js +1 -1
  391. package/esm-es5/pn-bonus-progressbar.entry.js +1 -1
  392. package/esm-es5/pn-breakpoints.entry.js +1 -1
  393. package/esm-es5/pn-chart.entry.js +2 -2
  394. package/esm-es5/pn-charts-card.entry.js +1 -1
  395. package/esm-es5/pn-choice-button.entry.js +1 -1
  396. package/esm-es5/pn-customernumber-selector-option.entry.js +1 -1
  397. package/esm-es5/pn-customernumber-selector.entry.js +1 -1
  398. package/esm-es5/pn-filter-checkbox.entry.js +1 -1
  399. package/esm-es5/pn-find-price-result.entry.js +1 -1
  400. package/esm-es5/{pn-find-price-store-bde5071d.js → pn-find-price-store-e13b6651.js} +1 -1
  401. package/esm-es5/pn-find-price.entry.js +1 -1
  402. package/esm-es5/pn-find-service-and-price-result.entry.js +1 -1
  403. package/esm-es5/{pn-find-service-and-price-store-65df46a0.js → pn-find-service-and-price-store-f09ca219.js} +1 -1
  404. package/esm-es5/pn-find-service-and-price.entry.js +1 -1
  405. package/esm-es5/pn-language-selector_9.entry.js +1 -1
  406. package/esm-es5/pn-line-shape.entry.js +1 -1
  407. package/esm-es5/pn-mainnav-link.entry.js +1 -1
  408. package/esm-es5/{pn-mainnav-store-28571e54.js → pn-mainnav-store-5d91f523.js} +1 -1
  409. package/esm-es5/pn-market-web-components.js +1 -1
  410. package/esm-es5/pn-marketweb-input.entry.js +1 -1
  411. package/esm-es5/pn-marketweb-search.entry.js +1 -1
  412. package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
  413. package/esm-es5/pn-marketweb-siteheader-login-button_5.entry.js +1 -1
  414. package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -1
  415. package/esm-es5/pn-marketweb-siteheader-store-9df5290d.js +1 -0
  416. package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
  417. package/esm-es5/pn-parcel-tracker.entry.js +1 -1
  418. package/esm-es5/pn-pex-pricefinder.entry.js +1 -1
  419. package/esm-es5/pn-product-card_3.entry.js +1 -1
  420. package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
  421. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  422. package/esm-es5/pn-product-tile-info_2.entry.js +1 -1
  423. package/esm-es5/pn-product-tile.entry.js +1 -1
  424. package/esm-es5/pn-profile-modal-customernumber.entry.js +1 -1
  425. package/esm-es5/pn-profile-modal-profile.entry.js +1 -1
  426. package/esm-es5/{pn-profile-modal-store-ae9e0d5a.js → pn-profile-modal-store-81f53310.js} +1 -1
  427. package/esm-es5/pn-profile-modal-type.entry.js +1 -1
  428. package/esm-es5/pn-profile-modal.entry.js +1 -1
  429. package/esm-es5/pn-profile-selector-option.entry.js +1 -1
  430. package/esm-es5/pn-profile-selector.entry.js +1 -1
  431. package/esm-es5/pn-proxio-findprice-result.entry.js +1 -1
  432. package/esm-es5/pn-proxio-findprice.entry.js +1 -1
  433. package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
  434. package/esm-es5/pn-proxio-productcard_4.entry.js +1 -1
  435. package/esm-es5/pn-quick-cta.entry.js +1 -1
  436. package/esm-es5/pn-quote-card.entry.js +1 -1
  437. package/esm-es5/pn-sidenav-level.entry.js +1 -1
  438. package/esm-es5/pn-sidenav-link.entry.js +1 -1
  439. package/esm-es5/{pn-sidenav-store-50b186d6.js → pn-sidenav-store-94be19c8.js} +1 -1
  440. package/esm-es5/pn-sidenav-togglebutton.entry.js +1 -1
  441. package/esm-es5/pn-sidenav.entry.js +1 -1
  442. package/esm-es5/pn-site-footer_2.entry.js +1 -1
  443. package/esm-es5/pn-spotlight.entry.js +1 -1
  444. package/esm-es5/pn-stats-info-data.entry.js +1 -1
  445. package/esm-es5/pn-stats-info.entry.js +1 -1
  446. package/esm-es5/pn-teaser-card.entry.js +1 -1
  447. package/esm-es5/pn-titletag.entry.js +1 -1
  448. package/loader/cdn.js +3 -0
  449. package/loader/index.cjs.js +3 -0
  450. package/loader/index.d.ts +21 -0
  451. package/loader/index.es2017.js +3 -0
  452. package/{umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/es5-html-element.js → loader/index.js} +4 -1
  453. package/loader/package.json +11 -0
  454. package/package.json +7 -5
  455. package/pn-market-web-components/{p-13baed17.system.entry.js → p-02632961.system.entry.js} +1 -1
  456. package/pn-market-web-components/{p-1c38553b.system.entry.js → p-0c46847e.system.entry.js} +1 -1
  457. package/pn-market-web-components/p-0f1115aa.entry.js +1 -0
  458. package/pn-market-web-components/p-0fbcacf3.system.entry.js +1 -0
  459. package/pn-market-web-components/{p-3738a2df.system.js → p-13d2d138.system.js} +1 -1
  460. package/pn-market-web-components/p-1545fb34.entry.js +1 -0
  461. package/pn-market-web-components/p-156fedd7.entry.js +1 -0
  462. package/pn-market-web-components/p-15e680a8.entry.js +1 -0
  463. package/pn-market-web-components/p-1646c170.system.entry.js +1 -0
  464. package/pn-market-web-components/p-17fb8d9e.entry.js +1 -0
  465. package/pn-market-web-components/p-18abec91.entry.js +1 -0
  466. package/pn-market-web-components/p-1a9b2a0e.system.entry.js +1 -0
  467. package/pn-market-web-components/p-1c382898.entry.js +1 -0
  468. package/pn-market-web-components/{p-fc1083d2.system.entry.js → p-1d50340b.system.entry.js} +1 -1
  469. package/pn-market-web-components/{p-1ce871c5.system.entry.js → p-1fb4eae4.system.entry.js} +1 -1
  470. package/pn-market-web-components/{p-80dce81e.system.entry.js → p-2145d5e0.system.entry.js} +1 -1
  471. package/pn-market-web-components/p-247cd393.entry.js +1 -0
  472. package/pn-market-web-components/{p-c9fb0f01.system.entry.js → p-2e507907.system.entry.js} +2 -2
  473. package/pn-market-web-components/p-31fd7a95.system.js +1 -1
  474. package/pn-market-web-components/p-34c0b146.entry.js +1 -0
  475. package/pn-market-web-components/p-37d26cef.entry.js +1 -0
  476. package/pn-market-web-components/p-38f135fd.entry.js +1 -0
  477. package/pn-market-web-components/{p-a5f75560.system.js → p-396b254a.system.js} +1 -1
  478. package/pn-market-web-components/{p-94958580.system.js → p-3a450371.system.js} +1 -1
  479. package/pn-market-web-components/p-3f37d2e3.entry.js +1 -0
  480. package/pn-market-web-components/p-4410d66d.system.entry.js +1 -0
  481. package/pn-market-web-components/{p-add7d76c.system.js → p-441249d9.system.js} +1 -1
  482. package/pn-market-web-components/p-44c05fba.entry.js +1 -0
  483. package/pn-market-web-components/p-44f58f15.js +1 -0
  484. package/pn-market-web-components/p-47d717a3.entry.js +1 -0
  485. package/pn-market-web-components/p-48c74c53.entry.js +1 -0
  486. package/pn-market-web-components/p-498e7738.system.entry.js +1 -0
  487. package/pn-market-web-components/p-49f60496.entry.js +1 -0
  488. package/pn-market-web-components/{p-f6ea7c38.system.entry.js → p-4b85fd2b.system.entry.js} +1 -1
  489. package/pn-market-web-components/p-4bd540a4.system.entry.js +1 -0
  490. package/pn-market-web-components/{p-7079df88.system.entry.js → p-4d561de4.system.entry.js} +1 -1
  491. package/pn-market-web-components/p-4ef54288.entry.js +1 -0
  492. package/pn-market-web-components/p-507f8886.entry.js +1 -0
  493. package/pn-market-web-components/{p-74d35edf.system.entry.js → p-545a40a7.system.entry.js} +1 -1
  494. package/pn-market-web-components/{p-4a03854b.system.entry.js → p-589a9a4c.system.entry.js} +1 -1
  495. package/pn-market-web-components/{p-c62a91ba.system.entry.js → p-5a41c1bb.system.entry.js} +1 -1
  496. package/pn-market-web-components/{p-723b9901.system.entry.js → p-5a506356.system.entry.js} +1 -1
  497. package/pn-market-web-components/p-5a6761da.js +1 -0
  498. package/pn-market-web-components/{p-def0a6a2.system.entry.js → p-5b5f4a52.system.entry.js} +1 -1
  499. package/pn-market-web-components/p-5e768b73.entry.js +1 -0
  500. package/pn-market-web-components/{p-f782ce94.system.entry.js → p-658f6ff7.system.entry.js} +1 -1
  501. package/pn-market-web-components/{p-8117b79e.system.entry.js → p-68324e6f.system.entry.js} +1 -1
  502. package/pn-market-web-components/{p-5703e89b.system.entry.js → p-6a4ae9af.system.entry.js} +1 -1
  503. package/pn-market-web-components/p-6b5ff47f.entry.js +1 -0
  504. package/pn-market-web-components/{p-7b9fb94f.system.entry.js → p-6d050c3a.system.entry.js} +1 -1
  505. package/pn-market-web-components/{p-a275bffb.system.entry.js → p-6e43a937.system.entry.js} +1 -1
  506. package/pn-market-web-components/{p-02ea55ad.system.js → p-6f1d6a1a.system.js} +1 -1
  507. package/pn-market-web-components/p-73ee3141.entry.js +1 -0
  508. package/pn-market-web-components/p-773b59c0.entry.js +24 -0
  509. package/pn-market-web-components/p-7c1b31e8.js +2 -0
  510. package/pn-market-web-components/{p-28c4b4d9.system.entry.js → p-7d463116.system.entry.js} +1 -1
  511. package/pn-market-web-components/p-7d992089.entry.js +1 -0
  512. package/pn-market-web-components/p-7dff99ed.entry.js +1 -0
  513. package/pn-market-web-components/p-8079dfd5.system.entry.js +1 -0
  514. package/pn-market-web-components/p-82db879c.entry.js +1 -0
  515. package/pn-market-web-components/p-833bab34.entry.js +1 -0
  516. package/pn-market-web-components/{p-290d5824.system.entry.js → p-853e6559.system.entry.js} +1 -1
  517. package/pn-market-web-components/p-85513296.entry.js +1 -0
  518. package/pn-market-web-components/{p-f58bde56.js → p-8666d14d.js} +1 -1
  519. package/pn-market-web-components/p-8766fa86.system.js +1 -1
  520. package/pn-market-web-components/{p-450cbe76.system.entry.js → p-8ca063a9.system.entry.js} +1 -1
  521. package/pn-market-web-components/{p-9edaf6b6.system.entry.js → p-8cefd900.system.entry.js} +1 -1
  522. package/pn-market-web-components/p-8d4dfd26.entry.js +1 -0
  523. package/pn-market-web-components/p-8f0a682f.entry.js +1 -0
  524. package/pn-market-web-components/p-8f32fa2b.system.entry.js +1 -0
  525. package/pn-market-web-components/p-8fe65c6a.entry.js +1 -0
  526. package/pn-market-web-components/{p-58a57436.system.entry.js → p-8fee0115.system.entry.js} +1 -1
  527. package/pn-market-web-components/{p-aa271997.system.entry.js → p-9010c32a.system.entry.js} +1 -1
  528. package/pn-market-web-components/p-924ca115.entry.js +1 -0
  529. package/pn-market-web-components/{p-f312ff98.system.entry.js → p-939b5792.system.entry.js} +1 -1
  530. package/pn-market-web-components/p-9407ee64.system.entry.js +1 -0
  531. package/pn-market-web-components/p-9429ca78.entry.js +1 -0
  532. package/pn-market-web-components/p-9826ba22.system.entry.js +1 -0
  533. package/pn-market-web-components/p-9a1c267d.entry.js +1 -0
  534. package/pn-market-web-components/{p-4f67721e.system.entry.js → p-9f95b3c9.system.entry.js} +1 -1
  535. package/pn-market-web-components/{p-0cacf9fb.js → p-a1a58fe4.js} +1 -1
  536. package/pn-market-web-components/p-a5faec68.system.js +2 -0
  537. package/pn-market-web-components/p-a799fee1.entry.js +1 -0
  538. package/pn-market-web-components/{p-2718b89a.system.entry.js → p-abfed655.system.entry.js} +1 -1
  539. package/pn-market-web-components/p-ac62dc33.entry.js +1 -0
  540. package/pn-market-web-components/p-ad1f57dc.entry.js +1 -0
  541. package/pn-market-web-components/{p-dbe032f7.system.js → p-ad836c55.system.js} +1 -1
  542. package/pn-market-web-components/p-b0102ff6.entry.js +1 -0
  543. package/pn-market-web-components/p-b5587c0d.entry.js +1 -0
  544. package/pn-market-web-components/{p-625fb7fb.system.entry.js → p-b890f3f9.system.entry.js} +1 -1
  545. package/pn-market-web-components/p-beefd9f7.entry.js +1 -0
  546. package/pn-market-web-components/p-bfe239ca.js +1 -1
  547. package/pn-market-web-components/p-c0db1ffd.js +1 -0
  548. package/pn-market-web-components/p-c1d9a064.entry.js +1 -0
  549. package/pn-market-web-components/{p-84699999.js → p-c5727e83.js} +1 -1
  550. package/pn-market-web-components/{p-447ef543.system.entry.js → p-c576ac3e.system.entry.js} +1 -1
  551. package/pn-market-web-components/p-c668f453.entry.js +1 -0
  552. package/pn-market-web-components/p-c7e8ab14.entry.js +1 -0
  553. package/pn-market-web-components/p-c9742318.entry.js +1 -0
  554. package/pn-market-web-components/{p-af415c1a.system.entry.js → p-ca1f0abc.system.entry.js} +1 -1
  555. package/pn-market-web-components/p-cd6b402e.system.entry.js +1 -0
  556. package/pn-market-web-components/p-d295ef71.system.js +1 -0
  557. package/pn-market-web-components/{p-825b8fb8.system.js → p-d34c9be2.system.js} +1 -1
  558. package/pn-market-web-components/p-d5ae9797.entry.js +1 -0
  559. package/pn-market-web-components/p-d5c7420f.system.entry.js +1 -0
  560. package/pn-market-web-components/p-d6ee168b.system.entry.js +1 -0
  561. package/pn-market-web-components/p-d70e685c.entry.js +1 -0
  562. package/pn-market-web-components/p-dbd7837e.entry.js +1 -0
  563. package/pn-market-web-components/p-dc598ef8.entry.js +1 -0
  564. package/pn-market-web-components/p-e0e45eb0.system.entry.js +1 -0
  565. package/pn-market-web-components/p-e1513762.entry.js +1 -0
  566. package/pn-market-web-components/{p-36a1b8e1.system.entry.js → p-e4961116.system.entry.js} +1 -1
  567. package/pn-market-web-components/p-e4fbd06c.entry.js +1 -0
  568. package/pn-market-web-components/{p-93cecc43.system.entry.js → p-e737c51d.system.entry.js} +1 -1
  569. package/pn-market-web-components/p-ebb7b59b.system.entry.js +1 -0
  570. package/pn-market-web-components/{p-86f06e26.js → p-ecaad0c1.js} +1 -1
  571. package/pn-market-web-components/p-ed5e91eb.system.entry.js +1 -0
  572. package/pn-market-web-components/{p-e6fa11ad.system.entry.js → p-ef721555.system.entry.js} +1 -1
  573. package/pn-market-web-components/{p-1151bf60.system.entry.js → p-f7cb2ef9.system.entry.js} +1 -1
  574. package/pn-market-web-components/p-fba88e93.entry.js +1 -0
  575. package/pn-market-web-components/p-ff975b67.entry.js +1 -0
  576. package/pn-market-web-components/{p-b88337dd.system.entry.js → p-ffe18938.system.entry.js} +1 -1
  577. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  578. package/pn-market-web-components/pn-market-web-components.js +2 -1
  579. package/types/components.d.ts +53 -21
  580. package/types/stencil-public-runtime.d.ts +79 -7
  581. package/custom-elements/index.d.ts +0 -459
  582. package/custom-elements/index.js +0 -29946
  583. package/esm-es5/index-5397620b.js +0 -1
  584. package/esm-es5/pn-marketweb-siteheader-store-cd0a1dab.js +0 -1
  585. package/pn-market-web-components/p-0796f9b2.entry.js +0 -1
  586. package/pn-market-web-components/p-0862b4b6.entry.js +0 -1
  587. package/pn-market-web-components/p-10eafcd7.entry.js +0 -1
  588. package/pn-market-web-components/p-15112837.entry.js +0 -1
  589. package/pn-market-web-components/p-16c4bc50.entry.js +0 -1
  590. package/pn-market-web-components/p-17c4004f.entry.js +0 -1
  591. package/pn-market-web-components/p-1ca41ab1.entry.js +0 -1
  592. package/pn-market-web-components/p-227e1d46.entry.js +0 -1
  593. package/pn-market-web-components/p-2423d620.system.entry.js +0 -1
  594. package/pn-market-web-components/p-249964b5.entry.js +0 -1
  595. package/pn-market-web-components/p-25496649.system.entry.js +0 -1
  596. package/pn-market-web-components/p-2a598ee8.entry.js +0 -1
  597. package/pn-market-web-components/p-2c7ba802.entry.js +0 -1
  598. package/pn-market-web-components/p-2da8e5e8.system.entry.js +0 -1
  599. package/pn-market-web-components/p-2e3bde56.entry.js +0 -1
  600. package/pn-market-web-components/p-35fcd76c.system.entry.js +0 -1
  601. package/pn-market-web-components/p-36654f2a.system.js +0 -1
  602. package/pn-market-web-components/p-381b3ec0.entry.js +0 -1
  603. package/pn-market-web-components/p-3969ec4d.entry.js +0 -1
  604. package/pn-market-web-components/p-479b970a.entry.js +0 -1
  605. package/pn-market-web-components/p-499bb3ac.entry.js +0 -1
  606. package/pn-market-web-components/p-4bef1bf3.entry.js +0 -1
  607. package/pn-market-web-components/p-557328e3.system.entry.js +0 -1
  608. package/pn-market-web-components/p-58e8d7d5.js +0 -1
  609. package/pn-market-web-components/p-59be826b.system.entry.js +0 -1
  610. package/pn-market-web-components/p-61dbe832.entry.js +0 -1
  611. package/pn-market-web-components/p-67380aa4.entry.js +0 -1
  612. package/pn-market-web-components/p-67887512.system.js +0 -1
  613. package/pn-market-web-components/p-679ebd2a.system.entry.js +0 -1
  614. package/pn-market-web-components/p-715d1ef7.entry.js +0 -1
  615. package/pn-market-web-components/p-7ce41d14.entry.js +0 -1
  616. package/pn-market-web-components/p-7fd8b012.entry.js +0 -1
  617. package/pn-market-web-components/p-81426cd9.entry.js +0 -1
  618. package/pn-market-web-components/p-81d764a0.entry.js +0 -1
  619. package/pn-market-web-components/p-84193b02.system.entry.js +0 -1
  620. package/pn-market-web-components/p-88185835.entry.js +0 -1
  621. package/pn-market-web-components/p-885bc8d7.system.entry.js +0 -1
  622. package/pn-market-web-components/p-8afa354b.system.entry.js +0 -1
  623. package/pn-market-web-components/p-8b684578.entry.js +0 -1
  624. package/pn-market-web-components/p-8e146205.entry.js +0 -1
  625. package/pn-market-web-components/p-8e38c337.entry.js +0 -1
  626. package/pn-market-web-components/p-8e4d292f.entry.js +0 -1
  627. package/pn-market-web-components/p-8ef45246.entry.js +0 -1
  628. package/pn-market-web-components/p-9344cd23.js +0 -1
  629. package/pn-market-web-components/p-951861fa.entry.js +0 -1
  630. package/pn-market-web-components/p-98a7ddd1.system.entry.js +0 -1
  631. package/pn-market-web-components/p-996d8a6a.entry.js +0 -1
  632. package/pn-market-web-components/p-9aa09635.entry.js +0 -1
  633. package/pn-market-web-components/p-9b855b11.entry.js +0 -24
  634. package/pn-market-web-components/p-a247058b.system.entry.js +0 -1
  635. package/pn-market-web-components/p-a7bb94a0.entry.js +0 -1
  636. package/pn-market-web-components/p-a921d3fd.system.entry.js +0 -1
  637. package/pn-market-web-components/p-aba46e52.system.entry.js +0 -1
  638. package/pn-market-web-components/p-b3bf353f.entry.js +0 -1
  639. package/pn-market-web-components/p-b5fde443.entry.js +0 -1
  640. package/pn-market-web-components/p-b9a84e67.entry.js +0 -1
  641. package/pn-market-web-components/p-bb626ab4.js +0 -1
  642. package/pn-market-web-components/p-bd22aaac.entry.js +0 -1
  643. package/pn-market-web-components/p-c714a790.entry.js +0 -1
  644. package/pn-market-web-components/p-d0155ddf.entry.js +0 -1
  645. package/pn-market-web-components/p-d57f4246.system.entry.js +0 -1
  646. package/pn-market-web-components/p-d775d725.entry.js +0 -1
  647. package/pn-market-web-components/p-d7e3d918.entry.js +0 -1
  648. package/pn-market-web-components/p-e32dc098.entry.js +0 -1
  649. package/pn-market-web-components/p-e397e11b.entry.js +0 -1
  650. package/pn-market-web-components/p-e9576f26.entry.js +0 -1
  651. package/pn-market-web-components/p-e9fe5c54.entry.js +0 -1
  652. package/pn-market-web-components/p-eb4eed7f.entry.js +0 -1
  653. package/pn-market-web-components/p-ecdf2b69.system.entry.js +0 -1
  654. package/pn-market-web-components/p-f61342c3.js +0 -1
  655. package/pn-market-web-components/p-f774e2cc.entry.js +0 -1
  656. package/pn-market-web-components/p-fc974bca.entry.js +0 -1
  657. package/pn-market-web-components/p-fea72975.entry.js +0 -1
  658. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/LICENSE.md +0 -27
  659. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/bin/stencil +0 -57
  660. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/config-flags.d.ts +0 -122
  661. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +0 -2609
  662. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.d.ts +0 -19
  663. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +0 -2583
  664. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/package.json +0 -14
  665. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.d.ts +0 -24
  666. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.d.ts +0 -18505
  667. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.iterable.d.ts +0 -341
  668. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.collection.d.ts +0 -150
  669. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.core.d.ts +0 -559
  670. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.d.ts +0 -30
  671. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.generator.d.ts +0 -79
  672. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.iterable.d.ts +0 -498
  673. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.promise.d.ts +0 -83
  674. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.proxy.d.ts +0 -130
  675. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.reflect.d.ts +0 -146
  676. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.d.ts +0 -48
  677. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.wellknown.d.ts +0 -324
  678. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.array.include.d.ts +0 -118
  679. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.d.ts +0 -22
  680. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.full.d.ts +0 -25
  681. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.d.ts +0 -26
  682. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.full.d.ts +0 -25
  683. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.intl.d.ts +0 -47
  684. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.object.d.ts +0 -51
  685. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.sharedmemory.d.ts +0 -137
  686. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.string.d.ts +0 -47
  687. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.typedarrays.d.ts +0 -55
  688. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asyncgenerator.d.ts +0 -79
  689. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asynciterable.d.ts +0 -45
  690. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.d.ts +0 -26
  691. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.full.d.ts +0 -25
  692. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.intl.d.ts +0 -73
  693. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.promise.d.ts +0 -32
  694. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.regexp.d.ts +0 -39
  695. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.array.d.ts +0 -85
  696. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.d.ts +0 -26
  697. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.full.d.ts +0 -25
  698. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.intl.d.ts +0 -25
  699. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.object.d.ts +0 -35
  700. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.string.d.ts +0 -39
  701. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.symbol.d.ts +0 -26
  702. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.bigint.d.ts +0 -730
  703. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.d.ts +0 -29
  704. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.date.d.ts +0 -44
  705. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.full.d.ts +0 -25
  706. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.intl.d.ts +0 -433
  707. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.number.d.ts +0 -30
  708. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.promise.d.ts +0 -49
  709. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.sharedmemory.d.ts +0 -99
  710. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.string.d.ts +0 -30
  711. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.symbol.wellknown.d.ts +0 -39
  712. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.d.ts +0 -25
  713. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.full.d.ts +0 -25
  714. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.intl.d.ts +0 -154
  715. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.promise.d.ts +0 -50
  716. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.string.d.ts +0 -35
  717. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.weakref.d.ts +0 -75
  718. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.array.d.ts +0 -123
  719. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.d.ts +0 -27
  720. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.error.d.ts +0 -75
  721. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.full.d.ts +0 -25
  722. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.intl.d.ts +0 -111
  723. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.object.d.ts +0 -28
  724. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.sharedmemory.d.ts +0 -27
  725. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.string.d.ts +0 -27
  726. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es5.d.ts +0 -4526
  727. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es6.d.ts +0 -25
  728. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.d.ts +0 -22
  729. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.full.d.ts +0 -25
  730. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.intl.d.ts +0 -30
  731. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.promise.d.ts +0 -43
  732. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.string.d.ts +0 -35
  733. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.weakref.d.ts +0 -75
  734. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.scripthost.d.ts +0 -327
  735. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.d.ts +0 -6192
  736. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.importscripts.d.ts +0 -26
  737. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.iterable.d.ts +0 -175
  738. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/package.json +0 -8
  739. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.d.ts +0 -73
  740. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.js +0 -70673
  741. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.min.js +0 -4
  742. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/sys/in-memory-fs.d.ts +0 -218
  743. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/transpile.d.ts +0 -32
  744. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dependencies.json +0 -120
  745. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/app-error.d.ts +0 -18
  746. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/events.d.ts +0 -6
  747. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-components.d.ts +0 -1
  748. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-external-styles.d.ts +0 -1
  749. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-images.d.ts +0 -1
  750. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-inline-styles.d.ts +0 -1
  751. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-util.d.ts +0 -9
  752. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-window.d.ts +0 -10
  753. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.d.ts +0 -6
  754. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.js +0 -808
  755. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/logger.d.ts +0 -5
  756. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/package.json +0 -8
  757. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/progress.d.ts +0 -3
  758. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/status.d.ts +0 -4
  759. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/hmr-util.spec.d.ts +0 -1
  760. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/status.spec.d.ts +0 -1
  761. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/connector.html +0 -6
  762. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.d.ts +0 -3
  763. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.js +0 -264
  764. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/open-in-editor-api.js +0 -1
  765. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/package.json +0 -8
  766. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-process.js +0 -1799
  767. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-worker-thread.js +0 -39
  768. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/static/favicon.ico +0 -0
  769. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/directory-index.html +0 -132
  770. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/initial-load.html +0 -160
  771. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/visualstudio.vbs +0 -82
  772. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/ws.js +0 -1
  773. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/xdg-open +0 -1066
  774. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.cjs +0 -92
  775. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.d.ts +0 -4
  776. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.js +0 -88
  777. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/package.json +0 -15
  778. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/css-shim.js +0 -4
  779. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/dom.js +0 -73
  780. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/index.js +0 -3371
  781. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/package.json +0 -8
  782. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-browser.js +0 -142
  783. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-esm.js +0 -23
  784. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/core-js.js +0 -11
  785. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/css-shim.js +0 -1
  786. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/dom.js +0 -79
  787. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/index.js +0 -34
  788. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/system.js +0 -6
  789. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/shadow-css.js +0 -387
  790. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +0 -1143
  791. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/package.json +0 -7
  792. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.d.ts +0 -217
  793. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.js +0 -777
  794. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/shadow-css.js +0 -143
  795. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.d.ts +0 -4
  796. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.js +0 -2
  797. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/package.json +0 -9
  798. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.cjs +0 -1
  799. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.d.ts +0 -51
  800. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.js +0 -16
  801. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-ext-modules.d.ts +0 -41
  802. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-private.d.ts +0 -2268
  803. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-compiler.d.ts +0 -2338
  804. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-docs.d.ts +0 -140
  805. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-runtime.d.ts +0 -1637
  806. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +0 -1105
  807. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/package.json +0 -7
  808. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/shadow-css.js +0 -143
  809. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.cjs +0 -4858
  810. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +0 -1020
  811. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +0 -4822
  812. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/package.json +0 -15
  813. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/package.json +0 -190
  814. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/readme.md +0 -99
  815. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/favicon.ico +0 -0
  816. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/logo.png +0 -0
  817. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.css +0 -1
  818. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.esm.js +0 -1
  819. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.js +0 -33
  820. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/index.esm.js +0 -0
  821. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-081b0641.js +0 -1
  822. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-227a1e18.entry.js +0 -1
  823. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-2c298727.entry.js +0 -1
  824. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-5479268c.entry.js +0 -1
  825. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-573ec8a4.entry.js +0 -1
  826. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6ba08604.entry.js +0 -1
  827. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6bc63295.entry.js +0 -1
  828. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7a3759fd.entry.js +0 -1
  829. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7b4e3ba7.js +0 -1
  830. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-988eb362.css +0 -1
  831. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-9b6a9315.js +0 -1
  832. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-b4cc611c.entry.js +0 -1
  833. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-d1bf53f5.entry.js +0 -1
  834. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e2efe0df.js +0 -1
  835. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e8ca6d97.entry.js +0 -1
  836. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-ec2f13e0.entry.js +0 -1
  837. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f0b99977.entry.js +0 -1
  838. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f4745c2f.entry.js +0 -1
  839. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-fbbae598.js +0 -1
  840. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/host.config.json +0 -15
  841. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/index.html +0 -1
  842. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/manifest.json +0 -13
  843. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/connector.js +0 -2
  844. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +0 -661
  845. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/local-connector.js +0 -2
  846. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/package.json +0 -15
  847. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/pixel-match.js +0 -2807
  848. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/autoprefixer.js +0 -8
  849. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/glob.js +0 -1
  850. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/graceful-fs.js +0 -1
  851. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.d.ts +0 -22
  852. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.js +0 -6121
  853. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/node-fetch.js +0 -1
  854. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/package.json +0 -8
  855. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/prompts.js +0 -1
  856. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/worker.js +0 -52
  857. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.d.ts +0 -12
  858. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +0 -4155
  859. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-config.d.ts +0 -16
  860. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-environment.d.ts +0 -15
  861. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-preprocessor.d.ts +0 -59
  862. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-runner.d.ts +0 -10
  863. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-screenshot.d.ts +0 -2
  864. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-serializer.d.ts +0 -4
  865. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-setup-test-framework.d.ts +0 -1
  866. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-config.spec.d.ts +0 -1
  867. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-preprocessor.spec.d.ts +0 -1
  868. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-runner.spec.d.ts +0 -1
  869. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-serializer.spec.d.ts +0 -1
  870. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-environment.js +0 -3
  871. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preprocessor.js +0 -3
  872. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preset.js +0 -37
  873. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-runner.js +0 -3
  874. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-setuptestframework.js +0 -3
  875. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/attributes.d.ts +0 -14
  876. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/class-list.d.ts +0 -12
  877. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/events.d.ts +0 -21
  878. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/html.d.ts +0 -12
  879. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/index.d.ts +0 -23
  880. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/screenshot.d.ts +0 -5
  881. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/text.d.ts +0 -4
  882. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mock-fetch.d.ts +0 -11
  883. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mocks.d.ts +0 -56
  884. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +0 -8
  885. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/index.d.ts +0 -2
  886. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-browser.d.ts +0 -6
  887. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-declarations.d.ts +0 -429
  888. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-element.d.ts +0 -67
  889. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
  890. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-events.d.ts +0 -21
  891. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-page.d.ts +0 -2
  892. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-screenshot.d.ts +0 -4
  893. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/reset-build-conditionals.d.ts +0 -2
  894. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/spec-page.d.ts +0 -2
  895. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test/testing-utils.spec.d.ts +0 -1
  896. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test-transpile.d.ts +0 -2
  897. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-logger.d.ts +0 -25
  898. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-sys.d.ts +0 -6
  899. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-utils.d.ts +0 -79
  900. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing.d.ts +0 -2
  901. /package/{custom-elements → components}/mockresponse.js +0 -0
@@ -1,2583 +0,0 @@
1
- /*!
2
- Stencil CLI v2.22.2 | MIT Licensed | https://stenciljs.com
3
- */
4
- /**
5
- * Convert a string from dash-case / kebab-case to PascalCase (or CamelCase,
6
- * or whatever you call it!)
7
- *
8
- * @param str a string to convert
9
- * @returns a converted string
10
- */
11
- const dashToPascalCase = (str) => str
12
- .toLowerCase()
13
- .split('-')
14
- .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
15
- .join('');
16
- /**
17
- * Convert a string to 'camelCase'
18
- *
19
- * @param str the string to convert
20
- * @returns the converted string
21
- */
22
- const toCamelCase = (str) => {
23
- const pascalCase = dashToPascalCase(str);
24
- return pascalCase.charAt(0).toLowerCase() + pascalCase.slice(1);
25
- };
26
- const isFunction = (v) => typeof v === 'function';
27
- const isString = (v) => typeof v === 'string';
28
-
29
- /**
30
- * Builds a template `Diagnostic` entity for a build error. The created `Diagnostic` is returned, and have little
31
- * detail attached to it regarding the specifics of the error - it is the responsibility of the caller of this method
32
- * to attach the specifics of the error message.
33
- *
34
- * The created `Diagnostic` is pushed to the `diagnostics` argument as a side effect of calling this method.
35
- *
36
- * @param diagnostics the existing diagnostics that the created template `Diagnostic` should be added to
37
- * @returns the created `Diagnostic`
38
- */
39
- const buildError = (diagnostics) => {
40
- const diagnostic = {
41
- level: 'error',
42
- type: 'build',
43
- header: 'Build Error',
44
- messageText: 'build error',
45
- relFilePath: null,
46
- absFilePath: null,
47
- lines: [],
48
- };
49
- if (diagnostics) {
50
- diagnostics.push(diagnostic);
51
- }
52
- return diagnostic;
53
- };
54
- /**
55
- * Builds a diagnostic from an `Error`, appends it to the `diagnostics` parameter, and returns the created diagnostic
56
- * @param diagnostics the series of diagnostics the newly created diagnostics should be added to
57
- * @param err the error to derive information from in generating the diagnostic
58
- * @param msg an optional message to use in place of `err` to generate the diagnostic
59
- * @returns the generated diagnostic
60
- */
61
- const catchError = (diagnostics, err, msg) => {
62
- const diagnostic = {
63
- level: 'error',
64
- type: 'build',
65
- header: 'Build Error',
66
- messageText: 'build error',
67
- relFilePath: null,
68
- absFilePath: null,
69
- lines: [],
70
- };
71
- if (isString(msg)) {
72
- diagnostic.messageText = msg.length ? msg : 'UNKNOWN ERROR';
73
- }
74
- else if (err != null) {
75
- if (err.stack != null) {
76
- diagnostic.messageText = err.stack.toString();
77
- }
78
- else {
79
- if (err.message != null) {
80
- diagnostic.messageText = err.message.length ? err.message : 'UNKNOWN ERROR';
81
- }
82
- else {
83
- diagnostic.messageText = err.toString();
84
- }
85
- }
86
- }
87
- if (diagnostics != null && !shouldIgnoreError(diagnostic.messageText)) {
88
- diagnostics.push(diagnostic);
89
- }
90
- return diagnostic;
91
- };
92
- /**
93
- * Determine if the provided diagnostics have any build errors
94
- * @param diagnostics the diagnostics to inspect
95
- * @returns true if any of the diagnostics in the list provided are errors that did not occur at runtime. false
96
- * otherwise.
97
- */
98
- const hasError = (diagnostics) => {
99
- if (diagnostics == null || diagnostics.length === 0) {
100
- return false;
101
- }
102
- return diagnostics.some((d) => d.level === 'error' && d.type !== 'runtime');
103
- };
104
- const shouldIgnoreError = (msg) => {
105
- return msg === TASK_CANCELED_MSG;
106
- };
107
- const TASK_CANCELED_MSG = `task canceled`;
108
-
109
- /**
110
- * Convert Windows backslash paths to slash paths: foo\\bar ➔ foo/bar
111
- * Forward-slash paths can be used in Windows as long as they're not
112
- * extended-length paths and don't contain any non-ascii characters.
113
- * This was created since the path methods in Node.js outputs \\ paths on Windows.
114
- * @param path the Windows-based path to convert
115
- * @returns the converted path
116
- */
117
- const normalizePath = (path) => {
118
- if (typeof path !== 'string') {
119
- throw new Error(`invalid path to normalize`);
120
- }
121
- path = normalizeSlashes(path.trim());
122
- const components = pathComponents(path, getRootLength(path));
123
- const reducedComponents = reducePathComponents(components);
124
- const rootPart = reducedComponents[0];
125
- const secondPart = reducedComponents[1];
126
- const normalized = rootPart + reducedComponents.slice(1).join('/');
127
- if (normalized === '') {
128
- return '.';
129
- }
130
- if (rootPart === '' &&
131
- secondPart &&
132
- path.includes('/') &&
133
- !secondPart.startsWith('.') &&
134
- !secondPart.startsWith('@')) {
135
- return './' + normalized;
136
- }
137
- return normalized;
138
- };
139
- const normalizeSlashes = (path) => path.replace(backslashRegExp, '/');
140
- const altDirectorySeparator = '\\';
141
- const urlSchemeSeparator = '://';
142
- const backslashRegExp = /\\/g;
143
- const reducePathComponents = (components) => {
144
- if (!Array.isArray(components) || components.length === 0) {
145
- return [];
146
- }
147
- const reduced = [components[0]];
148
- for (let i = 1; i < components.length; i++) {
149
- const component = components[i];
150
- if (!component)
151
- continue;
152
- if (component === '.')
153
- continue;
154
- if (component === '..') {
155
- if (reduced.length > 1) {
156
- if (reduced[reduced.length - 1] !== '..') {
157
- reduced.pop();
158
- continue;
159
- }
160
- }
161
- else if (reduced[0])
162
- continue;
163
- }
164
- reduced.push(component);
165
- }
166
- return reduced;
167
- };
168
- const getRootLength = (path) => {
169
- const rootLength = getEncodedRootLength(path);
170
- return rootLength < 0 ? ~rootLength : rootLength;
171
- };
172
- const getEncodedRootLength = (path) => {
173
- if (!path)
174
- return 0;
175
- const ch0 = path.charCodeAt(0);
176
- // POSIX or UNC
177
- if (ch0 === 47 /* CharacterCodes.slash */ || ch0 === 92 /* CharacterCodes.backslash */) {
178
- if (path.charCodeAt(1) !== ch0)
179
- return 1; // POSIX: "/" (or non-normalized "\")
180
- const p1 = path.indexOf(ch0 === 47 /* CharacterCodes.slash */ ? '/' : altDirectorySeparator, 2);
181
- if (p1 < 0)
182
- return path.length; // UNC: "//server" or "\\server"
183
- return p1 + 1; // UNC: "//server/" or "\\server\"
184
- }
185
- // DOS
186
- if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* CharacterCodes.colon */) {
187
- const ch2 = path.charCodeAt(2);
188
- if (ch2 === 47 /* CharacterCodes.slash */ || ch2 === 92 /* CharacterCodes.backslash */)
189
- return 3; // DOS: "c:/" or "c:\"
190
- if (path.length === 2)
191
- return 2; // DOS: "c:" (but not "c:d")
192
- }
193
- // URL
194
- const schemeEnd = path.indexOf(urlSchemeSeparator);
195
- if (schemeEnd !== -1) {
196
- const authorityStart = schemeEnd + urlSchemeSeparator.length;
197
- const authorityEnd = path.indexOf('/', authorityStart);
198
- if (authorityEnd !== -1) {
199
- // URL: "file:///", "file://server/", "file://server/path"
200
- // For local "file" URLs, include the leading DOS volume (if present).
201
- // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a
202
- // special case interpreted as "the machine from which the URL is being interpreted".
203
- const scheme = path.slice(0, schemeEnd);
204
- const authority = path.slice(authorityStart, authorityEnd);
205
- if (scheme === 'file' &&
206
- (authority === '' || authority === 'localhost') &&
207
- isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
208
- const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
209
- if (volumeSeparatorEnd !== -1) {
210
- if (path.charCodeAt(volumeSeparatorEnd) === 47 /* CharacterCodes.slash */) {
211
- // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/"
212
- return ~(volumeSeparatorEnd + 1);
213
- }
214
- if (volumeSeparatorEnd === path.length) {
215
- // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a"
216
- // but not "file:///c:d" or "file:///c%3ad"
217
- return ~volumeSeparatorEnd;
218
- }
219
- }
220
- }
221
- return ~(authorityEnd + 1); // URL: "file://server/", "http://server/"
222
- }
223
- return ~path.length; // URL: "file://server", "http://server"
224
- }
225
- // relative
226
- return 0;
227
- };
228
- const isVolumeCharacter = (charCode) => (charCode >= 97 /* CharacterCodes.a */ && charCode <= 122 /* CharacterCodes.z */) ||
229
- (charCode >= 65 /* CharacterCodes.A */ && charCode <= 90 /* CharacterCodes.Z */);
230
- const getFileUrlVolumeSeparatorEnd = (url, start) => {
231
- const ch0 = url.charCodeAt(start);
232
- if (ch0 === 58 /* CharacterCodes.colon */)
233
- return start + 1;
234
- if (ch0 === 37 /* CharacterCodes.percent */ && url.charCodeAt(start + 1) === 51 /* CharacterCodes._3 */) {
235
- const ch2 = url.charCodeAt(start + 2);
236
- if (ch2 === 97 /* CharacterCodes.a */ || ch2 === 65 /* CharacterCodes.A */)
237
- return start + 3;
238
- }
239
- return -1;
240
- };
241
- const pathComponents = (path, rootLength) => {
242
- const root = path.substring(0, rootLength);
243
- const rest = path.substring(rootLength).split('/');
244
- const restLen = rest.length;
245
- if (restLen > 0 && !rest[restLen - 1]) {
246
- rest.pop();
247
- }
248
- return [root, ...rest];
249
- };
250
-
251
- /**
252
- * Check whether a string is a member of a ReadonlyArray<string>
253
- *
254
- * We need a little helper for this because unfortunately `includes` is typed
255
- * on `ReadonlyArray<T>` as `(el: T): boolean` so a `string` cannot be passed
256
- * to `includes` on a `ReadonlyArray` 😢 thus we have a little helper function
257
- * where we do the type coercion just once.
258
- *
259
- * see microsoft/TypeScript#31018 for some discussion of this
260
- *
261
- * @param readOnlyArray the array we're checking
262
- * @param maybeMember a value which is possibly a member of the array
263
- * @returns whether the array contains the member or not
264
- */
265
- const readOnlyArrayHasStringMember = (readOnlyArray, maybeMember) => readOnlyArray.includes(maybeMember);
266
-
267
- /**
268
- * Validates that a component tag meets required naming conventions to be used for a web component
269
- * @param tag the tag to validate
270
- * @returns an error message if the tag has an invalid name, undefined if the tag name passes all checks
271
- */
272
- const validateComponentTag = (tag) => {
273
- // we want to check this first since we call some String.prototype methods below
274
- if (typeof tag !== 'string') {
275
- return `Tag "${tag}" must be a string type`;
276
- }
277
- if (tag !== tag.trim()) {
278
- return `Tag can not contain white spaces`;
279
- }
280
- if (tag !== tag.toLowerCase()) {
281
- return `Tag can not contain upper case characters`;
282
- }
283
- if (tag.length === 0) {
284
- return `Received empty tag value`;
285
- }
286
- if (tag.indexOf(' ') > -1) {
287
- return `"${tag}" tag cannot contain a space`;
288
- }
289
- if (tag.indexOf(',') > -1) {
290
- return `"${tag}" tag cannot be used for multiple tags`;
291
- }
292
- const invalidChars = tag.replace(/\w|-/g, '');
293
- if (invalidChars !== '') {
294
- return `"${tag}" tag contains invalid characters: ${invalidChars}`;
295
- }
296
- if (tag.indexOf('-') === -1) {
297
- return `"${tag}" tag must contain a dash (-) to work as a valid web component`;
298
- }
299
- if (tag.indexOf('--') > -1) {
300
- return `"${tag}" tag cannot contain multiple dashes (--) next to each other`;
301
- }
302
- if (tag.indexOf('-') === 0) {
303
- return `"${tag}" tag cannot start with a dash (-)`;
304
- }
305
- if (tag.lastIndexOf('-') === tag.length - 1) {
306
- return `"${tag}" tag cannot end with a dash (-)`;
307
- }
308
- return undefined;
309
- };
310
-
311
- /**
312
- * This sets the log level hierarchy for our terminal logger, ranging from
313
- * most to least verbose.
314
- *
315
- * Ordering the levels like this lets us easily check whether we should log a
316
- * message at a given time. For instance, if the log level is set to `'warn'`,
317
- * then anything passed to the logger with level `'warn'` or `'error'` should
318
- * be logged, but we should _not_ log anything with level `'info'` or `'debug'`.
319
- *
320
- * If we have a current log level `currentLevel` and a message with level
321
- * `msgLevel` is passed to the logger, we can determine whether or not we should
322
- * log it by checking if the log level on the message is further up or at the
323
- * same level in the hierarchy than `currentLevel`, like so:
324
- *
325
- * ```ts
326
- * LOG_LEVELS.indexOf(msgLevel) >= LOG_LEVELS.indexOf(currentLevel)
327
- * ```
328
- *
329
- * NOTE: for the reasons described above, do not change the order of the entries
330
- * in this array without good reason!
331
- */
332
- const LOG_LEVELS = ['debug', 'info', 'warn', 'error'];
333
-
334
- /**
335
- * All the Boolean options supported by the Stencil CLI
336
- */
337
- const BOOLEAN_CLI_FLAGS = [
338
- 'build',
339
- 'cache',
340
- 'checkVersion',
341
- 'ci',
342
- 'compare',
343
- 'debug',
344
- 'dev',
345
- 'devtools',
346
- 'docs',
347
- 'e2e',
348
- 'es5',
349
- 'esm',
350
- 'headless',
351
- 'help',
352
- 'log',
353
- 'open',
354
- 'prerender',
355
- 'prerenderExternal',
356
- 'prod',
357
- 'profile',
358
- 'serviceWorker',
359
- 'screenshot',
360
- 'serve',
361
- 'skipNodeCheck',
362
- 'spec',
363
- 'ssr',
364
- 'stats',
365
- 'updateScreenshot',
366
- 'verbose',
367
- 'version',
368
- 'watch',
369
- // JEST CLI OPTIONS
370
- 'all',
371
- 'automock',
372
- 'bail',
373
- // 'cache', Stencil already supports this argument
374
- 'changedFilesWithAncestor',
375
- // 'ci', Stencil already supports this argument
376
- 'clearCache',
377
- 'clearMocks',
378
- 'collectCoverage',
379
- 'color',
380
- 'colors',
381
- 'coverage',
382
- // 'debug', Stencil already supports this argument
383
- 'detectLeaks',
384
- 'detectOpenHandles',
385
- 'errorOnDeprecated',
386
- 'expand',
387
- 'findRelatedTests',
388
- 'forceExit',
389
- 'init',
390
- 'injectGlobals',
391
- 'json',
392
- 'lastCommit',
393
- 'listTests',
394
- 'logHeapUsage',
395
- 'noStackTrace',
396
- 'notify',
397
- 'onlyChanged',
398
- 'onlyFailures',
399
- 'passWithNoTests',
400
- 'resetMocks',
401
- 'resetModules',
402
- 'restoreMocks',
403
- 'runInBand',
404
- 'runTestsByPath',
405
- 'showConfig',
406
- 'silent',
407
- 'skipFilter',
408
- 'testLocationInResults',
409
- 'updateSnapshot',
410
- 'useStderr',
411
- // 'verbose', Stencil already supports this argument
412
- // 'version', Stencil already supports this argument
413
- // 'watch', Stencil already supports this argument
414
- 'watchAll',
415
- 'watchman',
416
- ];
417
- /**
418
- * All the Number options supported by the Stencil CLI
419
- */
420
- const NUMBER_CLI_FLAGS = [
421
- 'port',
422
- // JEST CLI ARGS
423
- 'maxConcurrency',
424
- 'testTimeout',
425
- ];
426
- /**
427
- * All the String options supported by the Stencil CLI
428
- */
429
- const STRING_CLI_FLAGS = [
430
- 'address',
431
- 'config',
432
- 'docsApi',
433
- 'docsJson',
434
- 'emulate',
435
- 'root',
436
- 'screenshotConnector',
437
- // JEST CLI ARGS
438
- 'cacheDirectory',
439
- 'changedSince',
440
- 'collectCoverageFrom',
441
- // 'config', Stencil already supports this argument
442
- 'coverageDirectory',
443
- 'coverageThreshold',
444
- 'env',
445
- 'filter',
446
- 'globalSetup',
447
- 'globalTeardown',
448
- 'globals',
449
- 'haste',
450
- 'moduleNameMapper',
451
- 'notifyMode',
452
- 'outputFile',
453
- 'preset',
454
- 'prettierPath',
455
- 'resolver',
456
- 'rootDir',
457
- 'runner',
458
- 'testEnvironment',
459
- 'testEnvironmentOptions',
460
- 'testFailureExitCode',
461
- 'testNamePattern',
462
- 'testResultsProcessor',
463
- 'testRunner',
464
- 'testSequencer',
465
- 'testURL',
466
- 'timers',
467
- 'transform',
468
- ];
469
- const STRING_ARRAY_CLI_FLAGS = [
470
- 'collectCoverageOnlyFrom',
471
- 'coveragePathIgnorePatterns',
472
- 'coverageReporters',
473
- 'moduleDirectories',
474
- 'moduleFileExtensions',
475
- 'modulePathIgnorePatterns',
476
- 'modulePaths',
477
- 'projects',
478
- 'reporters',
479
- 'roots',
480
- 'selectProjects',
481
- 'setupFiles',
482
- 'setupFilesAfterEnv',
483
- 'snapshotSerializers',
484
- 'testMatch',
485
- 'testPathIgnorePatterns',
486
- 'testPathPattern',
487
- 'testRegex',
488
- 'transformIgnorePatterns',
489
- 'unmockedModulePathPatterns',
490
- 'watchPathIgnorePatterns',
491
- ];
492
- /**
493
- * All the CLI arguments which may have string or number values
494
- *
495
- * `maxWorkers` is an argument which is used both by Stencil _and_ by Jest,
496
- * which means that we need to support parsing both string and number values.
497
- */
498
- const STRING_NUMBER_CLI_FLAGS = ['maxWorkers'];
499
- /**
500
- * All the LogLevel-type options supported by the Stencil CLI
501
- *
502
- * This is a bit silly since there's only one such argument atm,
503
- * but this approach lets us make sure that we're handling all
504
- * our arguments in a type-safe way.
505
- */
506
- const LOG_LEVEL_CLI_FLAGS = ['logLevel'];
507
- /**
508
- * For a small subset of CLI options we support a short alias e.g. `'h'` for `'help'`
509
- */
510
- const CLI_FLAG_ALIASES = {
511
- c: 'config',
512
- h: 'help',
513
- p: 'port',
514
- v: 'version',
515
- };
516
- /**
517
- * A regular expression which can be used to match a CLI flag for one of our
518
- * short aliases.
519
- */
520
- const CLI_FLAG_REGEX = new RegExp(`^-[chpv]{1}$`);
521
- /**
522
- * Helper function for initializing a `ConfigFlags` object. Provide any overrides
523
- * for default values and off you go!
524
- *
525
- * @param init an object with any overrides for default values
526
- * @returns a complete CLI flag object
527
- */
528
- const createConfigFlags = (init = {}) => {
529
- const flags = {
530
- task: null,
531
- args: [],
532
- knownArgs: [],
533
- unknownArgs: [],
534
- ...init,
535
- };
536
- return flags;
537
- };
538
-
539
- /**
540
- * Parse command line arguments into a structured `ConfigFlags` object
541
- *
542
- * @param args an array of CLI flags
543
- * @param _sys an optional compiler system
544
- * @returns a structured ConfigFlags object
545
- */
546
- const parseFlags = (args, _sys) => {
547
- // TODO(STENCIL-509): remove the _sys parameter here ^^ (for v3)
548
- const flags = createConfigFlags();
549
- // cmd line has more priority over npm scripts cmd
550
- flags.args = Array.isArray(args) ? args.slice() : [];
551
- if (flags.args.length > 0 && flags.args[0] && !flags.args[0].startsWith('-')) {
552
- flags.task = flags.args[0];
553
- // if the first argument was a "task" (like `build`, `test`, etc) then
554
- // we go on to parse the _rest_ of the CLI args
555
- parseArgs(flags, args.slice(1));
556
- }
557
- else {
558
- // we didn't find a leading flag, so we should just parse them all
559
- parseArgs(flags, flags.args);
560
- }
561
- if (flags.task != null) {
562
- const i = flags.args.indexOf(flags.task);
563
- if (i > -1) {
564
- flags.args.splice(i, 1);
565
- }
566
- }
567
- // to find unknown / unrecognized arguments we filter `args`, including only
568
- // arguments whose normalized form is not found in `knownArgs`. `knownArgs`
569
- // is populated during the call to `parseArgs` above. For arguments like
570
- // `--foobar` the string `"--foobar"` will be added, while for more
571
- // complicated arguments like `--bizBoz=bop` or `--bizBoz bop` just the
572
- // string `"--bizBoz"` will be added.
573
- flags.unknownArgs = flags.args.filter((arg) => !flags.knownArgs.includes(parseEqualsArg(arg)[0]));
574
- return flags;
575
- };
576
- /**
577
- * Parse the supported command line flags which are enumerated in the
578
- * `config-flags` module. Handles leading dashes on arguments, aliases that are
579
- * defined for a small number of arguments, and parsing values for non-boolean
580
- * arguments (e.g. port number for the dev server).
581
- *
582
- * This parses the following grammar:
583
- *
584
- * CLIArguments → ""
585
- * | CLITerm ( " " CLITerm )* ;
586
- * CLITerm → EqualsArg
587
- * | AliasEqualsArg
588
- * | AliasArg
589
- * | NegativeDashArg
590
- * | NegativeArg
591
- * | SimpleArg ;
592
- * EqualsArg → "--" ArgName "=" CLIValue ;
593
- * AliasEqualsArg → "-" AliasName "=" CLIValue ;
594
- * AliasArg → "-" AliasName ( " " CLIValue )? ;
595
- * NegativeDashArg → "--no-" ArgName ;
596
- * NegativeArg → "--no" ArgName ;
597
- * SimpleArg → "--" ArgName ( " " CLIValue )? ;
598
- * ArgName → /^[a-zA-Z-]+$/ ;
599
- * AliasName → /^[a-z]{1}$/ ;
600
- * CLIValue → '"' /^[a-zA-Z0-9]+$/ '"'
601
- * | /^[a-zA-Z0-9]+$/ ;
602
- *
603
- * There are additional constraints (not shown in the grammar for brevity's sake)
604
- * on the type of `CLIValue` which will be associated with a particular argument.
605
- * We enforce this by declaring lists of boolean, string, etc arguments and
606
- * checking the types of values before setting them.
607
- *
608
- * We don't need to turn the list of CLI arg tokens into any kind of
609
- * intermediate representation since we aren't concerned with doing anything
610
- * other than setting the correct values on our ConfigFlags object. So we just
611
- * parse the array of string arguments using a recursive-descent approach
612
- * (which is not very deep since our grammar is pretty simple) and make the
613
- * modifications we need to make to the {@link ConfigFlags} object as we go.
614
- *
615
- * @param flags a ConfigFlags object to which parsed arguments will be added
616
- * @param args an array of command-line arguments to parse
617
- */
618
- const parseArgs = (flags, args) => {
619
- const argsCopy = args.concat();
620
- while (argsCopy.length > 0) {
621
- // there are still unprocessed args to deal with
622
- parseCLITerm(flags, argsCopy);
623
- }
624
- };
625
- /**
626
- * Given an array of CLI arguments, parse it and perform a series of side
627
- * effects (setting values on the provided `ConfigFlags` object).
628
- *
629
- * @param flags a {@link ConfigFlags} object which is updated as we parse the CLI
630
- * arguments
631
- * @param args a list of args to work through. This function (and some functions
632
- * it calls) calls `Array.prototype.shift` to get the next argument to look at,
633
- * so this parameter will be modified.
634
- */
635
- const parseCLITerm = (flags, args) => {
636
- // pull off the first arg from the argument array
637
- const arg = args.shift();
638
- // array is empty, we're done!
639
- if (arg === undefined)
640
- return;
641
- // EqualsArg → "--" ArgName "=" CLIValue ;
642
- if (arg.startsWith('--') && arg.includes('=')) {
643
- // we're dealing with an EqualsArg, we have a special helper for that
644
- const [originalArg, value] = parseEqualsArg(arg);
645
- setCLIArg(flags, arg.split('=')[0], normalizeFlagName(originalArg), value);
646
- }
647
- // AliasEqualsArg → "-" AliasName "=" CLIValue ;
648
- else if (arg.startsWith('-') && arg.includes('=')) {
649
- // we're dealing with an AliasEqualsArg, we have a special helper for that
650
- const [originalArg, value] = parseEqualsArg(arg);
651
- setCLIArg(flags, arg.split('=')[0], normalizeFlagName(originalArg), value);
652
- }
653
- // AliasArg → "-" AliasName ( " " CLIValue )? ;
654
- else if (CLI_FLAG_REGEX.test(arg)) {
655
- // this is a short alias, like `-c` for Config
656
- setCLIArg(flags, arg, normalizeFlagName(arg), parseCLIValue(args));
657
- }
658
- // NegativeDashArg → "--no-" ArgName ;
659
- else if (arg.startsWith('--no-') && arg.length > '--no-'.length) {
660
- // this is a `NegativeDashArg` term, so we need to normalize the negative
661
- // flag name and then set an appropriate value
662
- const normalized = normalizeNegativeFlagName(arg);
663
- setCLIArg(flags, arg, normalized, '');
664
- }
665
- // NegativeArg → "--no" ArgName ;
666
- else if (arg.startsWith('--no') &&
667
- !readOnlyArrayHasStringMember(BOOLEAN_CLI_FLAGS, normalizeFlagName(arg)) &&
668
- readOnlyArrayHasStringMember(BOOLEAN_CLI_FLAGS, normalizeNegativeFlagName(arg))) {
669
- // possibly dealing with a `NegativeArg` here. There is a little ambiguity
670
- // here because we have arguments that already begin with `no` like
671
- // `notify`, so we need to test if a normalized form of the raw argument is
672
- // a valid and supported boolean flag.
673
- setCLIArg(flags, arg, normalizeNegativeFlagName(arg), '');
674
- }
675
- // SimpleArg → "--" ArgName ( " " CLIValue )? ;
676
- else if (arg.startsWith('--') && arg.length > '--'.length) {
677
- setCLIArg(flags, arg, normalizeFlagName(arg), parseCLIValue(args));
678
- }
679
- // if we get here it is not an argument in our list of supported arguments.
680
- // This doesn't necessarily mean we want to report an error or anything
681
- // though! Instead, with unknown / unrecognized arguments we stick them into
682
- // the `unknownArgs` array, which is used when we pass CLI args to Jest, for
683
- // instance. So we just return void here.
684
- };
685
- /**
686
- * Normalize a 'negative' flag name, just to do a little pre-processing before
687
- * we pass it to `setCLIArg`.
688
- *
689
- * @param flagName the flag name to normalize
690
- * @returns a normalized flag name
691
- */
692
- const normalizeNegativeFlagName = (flagName) => {
693
- const trimmed = flagName.replace(/^--no[-]?/, '');
694
- return normalizeFlagName(trimmed.charAt(0).toLowerCase() + trimmed.slice(1));
695
- };
696
- /**
697
- * Normalize a flag name by:
698
- *
699
- * - replacing any leading dashes (`--foo` -> `foo`)
700
- * - converting `dash-case` to camelCase (if necessary)
701
- *
702
- * Normalizing in this context basically means converting the various
703
- * supported flag spelling variants to the variant defined in our lists of
704
- * supported arguments (e.g. BOOLEAN_CLI_FLAGS, etc). So, for instance,
705
- * `--log-level` should be converted to `logLevel`.
706
- *
707
- * @param flagName the flag name to normalize
708
- * @returns a normalized flag name
709
- *
710
- */
711
- const normalizeFlagName = (flagName) => {
712
- const trimmed = flagName.replace(/^-+/, '');
713
- return trimmed.includes('-') ? toCamelCase(trimmed) : trimmed;
714
- };
715
- /**
716
- * Set a value on a provided {@link ConfigFlags} object, given an argument
717
- * name and a raw string value. This function dispatches to other functions
718
- * which make sure that the string value can be properly parsed into a JS
719
- * runtime value of the right type (e.g. number, string, etc).
720
- *
721
- * @throws if a value cannot be parsed to the right type for a given flag
722
- * @param flags a {@link ConfigFlags} object
723
- * @param rawArg the raw argument name matched by the parser
724
- * @param normalizedArg an argument with leading control characters (`--`,
725
- * `--no-`, etc) removed
726
- * @param value the raw value to be set onto the config flags object
727
- */
728
- const setCLIArg = (flags, rawArg, normalizedArg, value) => {
729
- normalizedArg = dereferenceAlias(normalizedArg);
730
- // We're setting a boolean!
731
- if (readOnlyArrayHasStringMember(BOOLEAN_CLI_FLAGS, normalizedArg)) {
732
- flags[normalizedArg] =
733
- typeof value === 'string'
734
- ? Boolean(value)
735
- : // no value was supplied, default to true
736
- true;
737
- flags.knownArgs.push(rawArg);
738
- }
739
- // We're setting a string!
740
- else if (readOnlyArrayHasStringMember(STRING_CLI_FLAGS, normalizedArg)) {
741
- if (typeof value === 'string') {
742
- flags[normalizedArg] = value;
743
- flags.knownArgs.push(rawArg);
744
- flags.knownArgs.push(value);
745
- }
746
- else {
747
- throwCLIParsingError(rawArg, 'expected a string argument but received nothing');
748
- }
749
- }
750
- // We're setting a string, but it's one where the user can pass multiple values,
751
- // like `--reporters="default" --reporters="jest-junit"`
752
- else if (readOnlyArrayHasStringMember(STRING_ARRAY_CLI_FLAGS, normalizedArg)) {
753
- if (typeof value === 'string') {
754
- if (!Array.isArray(flags[normalizedArg])) {
755
- flags[normalizedArg] = [];
756
- }
757
- const targetArray = flags[normalizedArg];
758
- // this is irritating, but TS doesn't know that the `!Array.isArray`
759
- // check above guarantees we have an array to work with here, and it
760
- // doesn't want to narrow the type of `flags[normalizedArg]`, so we need
761
- // to grab a reference to that array and then `Array.isArray` that. Bah!
762
- if (Array.isArray(targetArray)) {
763
- targetArray.push(value);
764
- flags.knownArgs.push(rawArg);
765
- flags.knownArgs.push(value);
766
- }
767
- }
768
- else {
769
- throwCLIParsingError(rawArg, 'expected a string argument but received nothing');
770
- }
771
- }
772
- // We're setting a number!
773
- else if (readOnlyArrayHasStringMember(NUMBER_CLI_FLAGS, normalizedArg)) {
774
- if (typeof value === 'string') {
775
- const parsed = parseInt(value, 10);
776
- if (isNaN(parsed)) {
777
- throwNumberParsingError(rawArg, value);
778
- }
779
- else {
780
- flags[normalizedArg] = parsed;
781
- flags.knownArgs.push(rawArg);
782
- flags.knownArgs.push(value);
783
- }
784
- }
785
- else {
786
- throwCLIParsingError(rawArg, 'expected a number argument but received nothing');
787
- }
788
- }
789
- // We're setting a value which could be either a string _or_ a number
790
- else if (readOnlyArrayHasStringMember(STRING_NUMBER_CLI_FLAGS, normalizedArg)) {
791
- if (typeof value === 'string') {
792
- if (CLI_ARG_STRING_REGEX.test(value)) {
793
- // if it matches the regex we treat it like a string
794
- flags[normalizedArg] = value;
795
- }
796
- else {
797
- const parsed = Number(value);
798
- if (isNaN(parsed)) {
799
- // parsing didn't go so well, we gotta get out of here
800
- // this is unlikely given our regex guard above
801
- // but hey, this is ultimately JS so let's be safe
802
- throwNumberParsingError(rawArg, value);
803
- }
804
- else {
805
- flags[normalizedArg] = parsed;
806
- }
807
- }
808
- flags.knownArgs.push(rawArg);
809
- flags.knownArgs.push(value);
810
- }
811
- else {
812
- throwCLIParsingError(rawArg, 'expected a string or a number but received nothing');
813
- }
814
- }
815
- // We're setting the log level, which can only be a set of specific string values
816
- else if (readOnlyArrayHasStringMember(LOG_LEVEL_CLI_FLAGS, normalizedArg)) {
817
- if (typeof value === 'string') {
818
- if (isLogLevel(value)) {
819
- flags[normalizedArg] = value;
820
- flags.knownArgs.push(rawArg);
821
- flags.knownArgs.push(value);
822
- }
823
- else {
824
- throwCLIParsingError(rawArg, `expected to receive a valid log level but received "${String(value)}"`);
825
- }
826
- }
827
- else {
828
- throwCLIParsingError(rawArg, 'expected to receive a valid log level but received nothing');
829
- }
830
- }
831
- };
832
- /**
833
- * We use this regular expression to detect CLI parameters which
834
- * should be parsed as string values (as opposed to numbers) for
835
- * the argument types for which we support both a string and a
836
- * number value.
837
- *
838
- * The regex tests for the presence of at least one character which is
839
- * _not_ a digit (`\d`), a period (`\.`), or one of the characters `"e"`,
840
- * `"E"`, `"+"`, or `"-"` (the latter four characters are necessary to
841
- * support the admittedly unlikely use of scientific notation, like `"4e+0"`
842
- * for `4`).
843
- *
844
- * Thus we'll match a string like `"50%"`, but not a string like `"50"` or
845
- * `"5.0"`. If it matches a given string we conclude that the string should
846
- * be parsed as a string literal, rather than using `Number` to convert it
847
- * to a number.
848
- */
849
- const CLI_ARG_STRING_REGEX = /[^\d\.Ee\+\-]+/g;
850
- const Empty = Symbol('Empty');
851
- /**
852
- * A little helper which tries to parse a CLI value (as opposed to a flag) off
853
- * of the argument array.
854
- *
855
- * We support a variety of different argument formats, but all of them start
856
- * with `-`, so we can check the first character to test whether the next token
857
- * in our array of CLI arguments is a flag name or a value.
858
- *
859
- * @param args an array of CLI args
860
- * @returns either a string result or an Empty sentinel
861
- */
862
- const parseCLIValue = (args) => {
863
- // it's possible the arguments array is empty, if so, return empty
864
- if (args[0] === undefined) {
865
- return Empty;
866
- }
867
- // all we're concerned with here is that it does not start with `"-"`,
868
- // which would indicate it should be parsed as a CLI flag and not a value.
869
- if (!args[0].startsWith('-')) {
870
- // It's not a flag, so we return the value and defer any specific parsing
871
- // until later on.
872
- const value = args.shift();
873
- if (typeof value === 'string') {
874
- return value;
875
- }
876
- }
877
- return Empty;
878
- };
879
- /**
880
- * Parse an 'equals' argument, which is a CLI argument-value pair in the
881
- * format `--foobar=12` (as opposed to a space-separated format like
882
- * `--foobar 12`).
883
- *
884
- * To parse this we split on the `=`, returning the first part as the argument
885
- * name and the second part as the value. We join the value on `"="` in case
886
- * there is another `"="` in the argument.
887
- *
888
- * This function is safe to call with any arg, and can therefore be used as
889
- * an argument 'normalizer'. If CLI argument is not an 'equals' argument then
890
- * the return value will be a tuple of the original argument and an empty
891
- * string `""` for the value.
892
- *
893
- * In code terms, if you do:
894
- *
895
- * ```ts
896
- * const [arg, value] = parseEqualsArg("--myArgument")
897
- * ```
898
- *
899
- * Then `arg` will be `"--myArgument"` and `value` will be `""`, whereas if
900
- * you do:
901
- *
902
- *
903
- * ```ts
904
- * const [arg, value] = parseEqualsArg("--myArgument=myValue")
905
- * ```
906
- *
907
- * Then `arg` will be `"--myArgument"` and `value` will be `"myValue"`.
908
- *
909
- * @param arg the arg in question
910
- * @returns a tuple containing the arg name and the value (if present)
911
- */
912
- const parseEqualsArg = (arg) => {
913
- const [originalArg, ...splitSections] = arg.split('=');
914
- const value = splitSections.join('=');
915
- return [originalArg, value === '' ? Empty : value];
916
- };
917
- /**
918
- * Small helper for getting type-system-level assurance that a `string` can be
919
- * narrowed to a `LogLevel`
920
- *
921
- * @param maybeLogLevel the string to check
922
- * @returns whether this is a `LogLevel`
923
- */
924
- const isLogLevel = (maybeLogLevel) => readOnlyArrayHasStringMember(LOG_LEVELS, maybeLogLevel);
925
- /**
926
- * A little helper for constructing and throwing an error message with info
927
- * about what went wrong
928
- *
929
- * @param flag the flag which encountered the error
930
- * @param message a message specific to the error which was encountered
931
- */
932
- const throwCLIParsingError = (flag, message) => {
933
- throw new Error(`when parsing CLI flag "${flag}": ${message}`);
934
- };
935
- /**
936
- * Throw a specific error for the situation where we ran into an issue parsing
937
- * a number.
938
- *
939
- * @param flag the flag for which we encountered the issue
940
- * @param value what we were trying to parse
941
- */
942
- const throwNumberParsingError = (flag, value) => {
943
- throwCLIParsingError(flag, `expected a number but received "${value}"`);
944
- };
945
- /**
946
- * A little helper to 'dereference' a flag alias, which if you squint a little
947
- * you can think of like a pointer to a full flag name. Thus 'c' is like a
948
- * pointer to 'config', so here we're doing something like `*c`. Of course, this
949
- * being JS, this is just a metaphor!
950
- *
951
- * If no 'dereference' is found for the possible alias we just return the
952
- * passed string unmodified.
953
- *
954
- * @param maybeAlias a string which _could_ be an alias to a full flag name
955
- * @returns the full aliased flag name, if found, or the passed string if not
956
- */
957
- const dereferenceAlias = (maybeAlias) => {
958
- const possibleDereference = CLI_FLAG_ALIASES[maybeAlias];
959
- if (typeof possibleDereference === 'string') {
960
- return possibleDereference;
961
- }
962
- return maybeAlias;
963
- };
964
-
965
- const dependencies = [
966
- {
967
- name: "@stencil/core",
968
- version: "2.22.2",
969
- main: "compiler/stencil.js",
970
- resources: [
971
- "package.json",
972
- "compiler/lib.d.ts",
973
- "compiler/lib.dom.d.ts",
974
- "compiler/lib.dom.iterable.d.ts",
975
- "compiler/lib.es2015.collection.d.ts",
976
- "compiler/lib.es2015.core.d.ts",
977
- "compiler/lib.es2015.d.ts",
978
- "compiler/lib.es2015.generator.d.ts",
979
- "compiler/lib.es2015.iterable.d.ts",
980
- "compiler/lib.es2015.promise.d.ts",
981
- "compiler/lib.es2015.proxy.d.ts",
982
- "compiler/lib.es2015.reflect.d.ts",
983
- "compiler/lib.es2015.symbol.d.ts",
984
- "compiler/lib.es2015.symbol.wellknown.d.ts",
985
- "compiler/lib.es2016.array.include.d.ts",
986
- "compiler/lib.es2016.d.ts",
987
- "compiler/lib.es2016.full.d.ts",
988
- "compiler/lib.es2017.d.ts",
989
- "compiler/lib.es2017.full.d.ts",
990
- "compiler/lib.es2017.intl.d.ts",
991
- "compiler/lib.es2017.object.d.ts",
992
- "compiler/lib.es2017.sharedmemory.d.ts",
993
- "compiler/lib.es2017.string.d.ts",
994
- "compiler/lib.es2017.typedarrays.d.ts",
995
- "compiler/lib.es2018.asyncgenerator.d.ts",
996
- "compiler/lib.es2018.asynciterable.d.ts",
997
- "compiler/lib.es2018.d.ts",
998
- "compiler/lib.es2018.full.d.ts",
999
- "compiler/lib.es2018.intl.d.ts",
1000
- "compiler/lib.es2018.promise.d.ts",
1001
- "compiler/lib.es2018.regexp.d.ts",
1002
- "compiler/lib.es2019.array.d.ts",
1003
- "compiler/lib.es2019.d.ts",
1004
- "compiler/lib.es2019.full.d.ts",
1005
- "compiler/lib.es2019.intl.d.ts",
1006
- "compiler/lib.es2019.object.d.ts",
1007
- "compiler/lib.es2019.string.d.ts",
1008
- "compiler/lib.es2019.symbol.d.ts",
1009
- "compiler/lib.es2020.bigint.d.ts",
1010
- "compiler/lib.es2020.d.ts",
1011
- "compiler/lib.es2020.date.d.ts",
1012
- "compiler/lib.es2020.full.d.ts",
1013
- "compiler/lib.es2020.intl.d.ts",
1014
- "compiler/lib.es2020.number.d.ts",
1015
- "compiler/lib.es2020.promise.d.ts",
1016
- "compiler/lib.es2020.sharedmemory.d.ts",
1017
- "compiler/lib.es2020.string.d.ts",
1018
- "compiler/lib.es2020.symbol.wellknown.d.ts",
1019
- "compiler/lib.es2021.d.ts",
1020
- "compiler/lib.es2021.full.d.ts",
1021
- "compiler/lib.es2021.intl.d.ts",
1022
- "compiler/lib.es2021.promise.d.ts",
1023
- "compiler/lib.es2021.string.d.ts",
1024
- "compiler/lib.es2021.weakref.d.ts",
1025
- "compiler/lib.es2022.array.d.ts",
1026
- "compiler/lib.es2022.d.ts",
1027
- "compiler/lib.es2022.error.d.ts",
1028
- "compiler/lib.es2022.full.d.ts",
1029
- "compiler/lib.es2022.intl.d.ts",
1030
- "compiler/lib.es2022.object.d.ts",
1031
- "compiler/lib.es2022.sharedmemory.d.ts",
1032
- "compiler/lib.es2022.string.d.ts",
1033
- "compiler/lib.es5.d.ts",
1034
- "compiler/lib.es6.d.ts",
1035
- "compiler/lib.esnext.d.ts",
1036
- "compiler/lib.esnext.full.d.ts",
1037
- "compiler/lib.esnext.intl.d.ts",
1038
- "compiler/lib.esnext.promise.d.ts",
1039
- "compiler/lib.esnext.string.d.ts",
1040
- "compiler/lib.esnext.weakref.d.ts",
1041
- "compiler/lib.scripthost.d.ts",
1042
- "compiler/lib.webworker.d.ts",
1043
- "compiler/lib.webworker.importscripts.d.ts",
1044
- "compiler/lib.webworker.iterable.d.ts",
1045
- "internal/index.d.ts",
1046
- "internal/index.js",
1047
- "internal/package.json",
1048
- "internal/stencil-ext-modules.d.ts",
1049
- "internal/stencil-private.d.ts",
1050
- "internal/stencil-public-compiler.d.ts",
1051
- "internal/stencil-public-docs.d.ts",
1052
- "internal/stencil-public-runtime.d.ts",
1053
- "mock-doc/index.js",
1054
- "mock-doc/package.json",
1055
- "internal/client/css-shim.js",
1056
- "internal/client/dom.js",
1057
- "internal/client/index.js",
1058
- "internal/client/package.json",
1059
- "internal/client/patch-browser.js",
1060
- "internal/client/patch-esm.js",
1061
- "internal/client/shadow-css.js",
1062
- "internal/hydrate/index.js",
1063
- "internal/hydrate/package.json",
1064
- "internal/hydrate/runner.js",
1065
- "internal/hydrate/shadow-css.js",
1066
- "internal/stencil-core/index.d.ts",
1067
- "internal/stencil-core/index.js"
1068
- ]
1069
- },
1070
- {
1071
- name: "rollup",
1072
- version: "2.42.3",
1073
- main: "dist/es/rollup.browser.js"
1074
- },
1075
- {
1076
- name: "terser",
1077
- version: "5.16.1",
1078
- main: "dist/bundle.min.js"
1079
- },
1080
- {
1081
- name: "typescript",
1082
- version: "4.9.4",
1083
- main: "lib/typescript.js"
1084
- }
1085
- ];
1086
-
1087
- const IS_NODE_ENV = typeof global !== 'undefined' &&
1088
- typeof require === 'function' &&
1089
- !!global.process &&
1090
- typeof __filename === 'string' &&
1091
- (!global.origin || typeof global.origin !== 'string');
1092
- const IS_BROWSER_ENV = typeof location !== 'undefined' && typeof navigator !== 'undefined' && typeof XMLHttpRequest !== 'undefined';
1093
-
1094
- /**
1095
- * Creates an instance of a logger
1096
- * @returns the new logger instance
1097
- */
1098
- const createLogger = () => {
1099
- let useColors = IS_BROWSER_ENV;
1100
- let level = 'info';
1101
- return {
1102
- enableColors: (uc) => (useColors = uc),
1103
- getLevel: () => level,
1104
- setLevel: (l) => (level = l),
1105
- emoji: (e) => e,
1106
- info: console.log.bind(console),
1107
- warn: console.warn.bind(console),
1108
- error: console.error.bind(console),
1109
- debug: console.debug.bind(console),
1110
- red: (msg) => msg,
1111
- green: (msg) => msg,
1112
- yellow: (msg) => msg,
1113
- blue: (msg) => msg,
1114
- magenta: (msg) => msg,
1115
- cyan: (msg) => msg,
1116
- gray: (msg) => msg,
1117
- bold: (msg) => msg,
1118
- dim: (msg) => msg,
1119
- bgRed: (msg) => msg,
1120
- createTimeSpan: (_startMsg, _debug = false) => ({
1121
- duration: () => 0,
1122
- finish: () => 0,
1123
- }),
1124
- printDiagnostics(diagnostics) {
1125
- diagnostics.forEach((diagnostic) => logDiagnostic(diagnostic, useColors));
1126
- },
1127
- };
1128
- };
1129
- const logDiagnostic = (diagnostic, useColors) => {
1130
- let color = BLUE;
1131
- let prefix = 'Build';
1132
- let msg = '';
1133
- if (diagnostic.level === 'error') {
1134
- color = RED;
1135
- prefix = 'Error';
1136
- }
1137
- else if (diagnostic.level === 'warn') {
1138
- color = YELLOW;
1139
- prefix = 'Warning';
1140
- }
1141
- if (diagnostic.header) {
1142
- prefix = diagnostic.header;
1143
- }
1144
- const filePath = diagnostic.relFilePath || diagnostic.absFilePath;
1145
- if (filePath) {
1146
- msg += filePath;
1147
- if (typeof diagnostic.lineNumber === 'number' && diagnostic.lineNumber > 0) {
1148
- msg += ', line ' + diagnostic.lineNumber;
1149
- if (typeof diagnostic.columnNumber === 'number' && diagnostic.columnNumber > 0) {
1150
- msg += ', column ' + diagnostic.columnNumber;
1151
- }
1152
- }
1153
- msg += '\n';
1154
- }
1155
- msg += diagnostic.messageText;
1156
- if (diagnostic.lines && diagnostic.lines.length > 0) {
1157
- diagnostic.lines.forEach((l) => {
1158
- msg += '\n' + l.lineNumber + ': ' + l.text;
1159
- });
1160
- msg += '\n';
1161
- }
1162
- if (useColors) {
1163
- const styledPrefix = [
1164
- '%c' + prefix,
1165
- `background: ${color}; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;`,
1166
- ];
1167
- console.log(...styledPrefix, msg);
1168
- }
1169
- else if (diagnostic.level === 'error') {
1170
- console.error(msg);
1171
- }
1172
- else if (diagnostic.level === 'warn') {
1173
- console.warn(msg);
1174
- }
1175
- else {
1176
- console.log(msg);
1177
- }
1178
- };
1179
- const YELLOW = `#f39c12`;
1180
- const RED = `#c0392b`;
1181
- const BLUE = `#3498db`;
1182
-
1183
- /**
1184
- * Attempt to find a Stencil configuration file on the file system
1185
- * @param opts the options needed to find the configuration file
1186
- * @returns the results of attempting to find a configuration file on disk
1187
- */
1188
- const findConfig = async (opts) => {
1189
- const sys = opts.sys;
1190
- const cwd = sys.getCurrentDirectory();
1191
- const rootDir = normalizePath(cwd);
1192
- let configPath = opts.configPath;
1193
- if (isString(configPath)) {
1194
- if (!sys.platformPath.isAbsolute(configPath)) {
1195
- // passed in a custom stencil config location,
1196
- // but it's relative, so prefix the cwd
1197
- configPath = normalizePath(sys.platformPath.join(cwd, configPath));
1198
- }
1199
- else {
1200
- // config path already an absolute path, we're good here
1201
- configPath = normalizePath(opts.configPath);
1202
- }
1203
- }
1204
- else {
1205
- // nothing was passed in, use the current working directory
1206
- configPath = rootDir;
1207
- }
1208
- const results = {
1209
- configPath,
1210
- rootDir: normalizePath(cwd),
1211
- diagnostics: [],
1212
- };
1213
- const stat = await sys.stat(configPath);
1214
- if (stat.error) {
1215
- const diagnostic = buildError(results.diagnostics);
1216
- diagnostic.absFilePath = configPath;
1217
- diagnostic.header = `Invalid config path`;
1218
- diagnostic.messageText = `Config path "${configPath}" not found`;
1219
- return results;
1220
- }
1221
- if (stat.isFile) {
1222
- results.configPath = configPath;
1223
- results.rootDir = sys.platformPath.dirname(configPath);
1224
- }
1225
- else if (stat.isDirectory) {
1226
- // this is only a directory, so let's make some assumptions
1227
- for (const configName of ['stencil.config.ts', 'stencil.config.js']) {
1228
- const testConfigFilePath = sys.platformPath.join(configPath, configName);
1229
- const stat = await sys.stat(testConfigFilePath);
1230
- if (stat.isFile) {
1231
- results.configPath = testConfigFilePath;
1232
- results.rootDir = sys.platformPath.dirname(testConfigFilePath);
1233
- break;
1234
- }
1235
- }
1236
- }
1237
- return results;
1238
- };
1239
-
1240
- const loadCoreCompiler = async (sys) => {
1241
- await sys.dynamicImport(sys.getCompilerExecutingPath());
1242
- return globalThis.stencil;
1243
- };
1244
-
1245
- /**
1246
- * Log the name of this package (`@stencil/core`) to an output stream
1247
- *
1248
- * The output stream is determined by the {@link Logger} instance that is provided as an argument to this function
1249
- *
1250
- * The name of the package may not be logged, by design, for certain `task` types and logging levels
1251
- *
1252
- * @param logger the logging entity to use to output the name of the package
1253
- * @param task the current task
1254
- */
1255
- const startupLog = (logger, task) => {
1256
- if (task === 'info' || task === 'serve' || task === 'version') {
1257
- return;
1258
- }
1259
- logger.info(logger.cyan(`@stencil/core`));
1260
- };
1261
- /**
1262
- * Log this package's version to an output stream
1263
- *
1264
- * The output stream is determined by the {@link Logger} instance that is provided as an argument to this function
1265
- *
1266
- * The package version may not be logged, by design, for certain `task` types and logging levels
1267
- *
1268
- * @param logger the logging entity to use for output
1269
- * @param task the current task
1270
- * @param coreCompiler the compiler instance to derive version information from
1271
- */
1272
- const startupLogVersion = (logger, task, coreCompiler) => {
1273
- if (task === 'info' || task === 'serve' || task === 'version') {
1274
- return;
1275
- }
1276
- const isDevBuild = coreCompiler.version.includes('-dev.');
1277
- let startupMsg;
1278
- if (isDevBuild) {
1279
- startupMsg = logger.yellow('[LOCAL DEV]');
1280
- }
1281
- else {
1282
- startupMsg = logger.cyan(`v${coreCompiler.version}`);
1283
- }
1284
- startupMsg += logger.emoji(' ' + coreCompiler.vermoji);
1285
- logger.info(startupMsg);
1286
- };
1287
- /**
1288
- * Log details from a {@link CompilerSystem} used by Stencil to an output stream
1289
- *
1290
- * The output stream is determined by the {@link Logger} instance that is provided as an argument to this function
1291
- *
1292
- * @param sys the `CompilerSystem` to report details on
1293
- * @param logger the logging entity to use for output
1294
- * @param flags user set flags for the current invocation of Stencil
1295
- * @param coreCompiler the compiler instance being used for this invocation of Stencil
1296
- */
1297
- const loadedCompilerLog = (sys, logger, flags, coreCompiler) => {
1298
- const sysDetails = sys.details;
1299
- const runtimeInfo = `${sys.name} ${sys.version}`;
1300
- const platformInfo = sysDetails
1301
- ? `${sysDetails.platform}, ${sysDetails.cpuModel}`
1302
- : `Unknown Platform, Unknown CPU Model`;
1303
- const statsInfo = sysDetails
1304
- ? `cpus: ${sys.hardwareConcurrency}, freemem: ${Math.round(sysDetails.freemem() / 1000000)}MB, totalmem: ${Math.round(sysDetails.totalmem / 1000000)}MB`
1305
- : 'Unknown CPU Core Count, Unknown Memory';
1306
- if (logger.getLevel() === 'debug') {
1307
- logger.debug(runtimeInfo);
1308
- logger.debug(platformInfo);
1309
- logger.debug(statsInfo);
1310
- logger.debug(`compiler: ${sys.getCompilerExecutingPath()}`);
1311
- logger.debug(`build: ${coreCompiler.buildId}`);
1312
- }
1313
- else if (flags.ci) {
1314
- logger.info(runtimeInfo);
1315
- logger.info(platformInfo);
1316
- logger.info(statsInfo);
1317
- }
1318
- };
1319
- /**
1320
- * Log various warnings to an output stream
1321
- *
1322
- * The output stream is determined by the {@link Logger} instance attached to the `config` argument to this function
1323
- *
1324
- * @param coreCompiler the compiler instance being used for this invocation of Stencil
1325
- * @param config a validated configuration object to be used for this run of Stencil
1326
- */
1327
- const startupCompilerLog = (coreCompiler, config) => {
1328
- if (config.suppressLogs === true) {
1329
- return;
1330
- }
1331
- const { logger } = config;
1332
- const isDebug = logger.getLevel() === 'debug';
1333
- const isPrerelease = coreCompiler.version.includes('-');
1334
- const isDevBuild = coreCompiler.version.includes('-dev.');
1335
- if (isPrerelease && !isDevBuild) {
1336
- logger.warn(logger.yellow(`This is a prerelease build, undocumented changes might happen at any time. Technical support is not available for prereleases, but any assistance testing is appreciated.`));
1337
- }
1338
- if (config.devMode && !isDebug) {
1339
- if (config.buildEs5) {
1340
- logger.warn(`Generating ES5 during development is a very task expensive, initial and incremental builds will be much slower. Drop the '--es5' flag and use a modern browser for development.`);
1341
- }
1342
- if (!config.enableCache) {
1343
- logger.warn(`Disabling cache during development will slow down incremental builds.`);
1344
- }
1345
- }
1346
- };
1347
-
1348
- const startCheckVersion = async (config, currentVersion) => {
1349
- if (config.devMode && !config.flags.ci && !currentVersion.includes('-dev.') && isFunction(config.sys.checkVersion)) {
1350
- return config.sys.checkVersion(config.logger, currentVersion);
1351
- }
1352
- return null;
1353
- };
1354
- const printCheckVersionResults = async (versionChecker) => {
1355
- if (versionChecker) {
1356
- const checkVersionResults = await versionChecker;
1357
- if (isFunction(checkVersionResults)) {
1358
- checkVersionResults();
1359
- }
1360
- }
1361
- };
1362
-
1363
- const taskPrerender = async (coreCompiler, config) => {
1364
- startupCompilerLog(coreCompiler, config);
1365
- const hydrateAppFilePath = config.flags.unknownArgs[0];
1366
- if (typeof hydrateAppFilePath !== 'string') {
1367
- config.logger.error(`Missing hydrate app script path`);
1368
- return config.sys.exit(1);
1369
- }
1370
- const srcIndexHtmlPath = config.srcIndexHtml;
1371
- const diagnostics = await runPrerenderTask(coreCompiler, config, hydrateAppFilePath, null, srcIndexHtmlPath);
1372
- config.logger.printDiagnostics(diagnostics);
1373
- if (diagnostics.some((d) => d.level === 'error')) {
1374
- return config.sys.exit(1);
1375
- }
1376
- };
1377
- const runPrerenderTask = async (coreCompiler, config, hydrateAppFilePath, componentGraph, srcIndexHtmlPath) => {
1378
- const diagnostics = [];
1379
- try {
1380
- const prerenderer = await coreCompiler.createPrerenderer(config);
1381
- const results = await prerenderer.start({
1382
- hydrateAppFilePath,
1383
- componentGraph,
1384
- srcIndexHtmlPath,
1385
- });
1386
- diagnostics.push(...results.diagnostics);
1387
- }
1388
- catch (e) {
1389
- catchError(diagnostics, e);
1390
- }
1391
- return diagnostics;
1392
- };
1393
-
1394
- const taskWatch = async (coreCompiler, config) => {
1395
- let devServer = null;
1396
- let exitCode = 0;
1397
- try {
1398
- startupCompilerLog(coreCompiler, config);
1399
- const versionChecker = startCheckVersion(config, coreCompiler.version);
1400
- const compiler = await coreCompiler.createCompiler(config);
1401
- const watcher = await compiler.createWatcher();
1402
- if (config.flags.serve) {
1403
- const devServerPath = config.sys.getDevServerExecutingPath();
1404
- const { start } = await config.sys.dynamicImport(devServerPath);
1405
- devServer = await start(config.devServer, config.logger, watcher);
1406
- }
1407
- config.sys.onProcessInterrupt(() => {
1408
- config.logger.debug(`close watch`);
1409
- compiler && compiler.destroy();
1410
- });
1411
- const rmVersionCheckerLog = watcher.on('buildFinish', async () => {
1412
- // log the version check one time
1413
- rmVersionCheckerLog();
1414
- printCheckVersionResults(versionChecker);
1415
- });
1416
- if (devServer) {
1417
- const rmDevServerLog = watcher.on('buildFinish', () => {
1418
- // log the dev server url one time
1419
- rmDevServerLog();
1420
- config.logger.info(`${config.logger.cyan(devServer.browserUrl)}\n`);
1421
- });
1422
- }
1423
- const closeResults = await watcher.start();
1424
- if (closeResults.exitCode > 0) {
1425
- exitCode = closeResults.exitCode;
1426
- }
1427
- }
1428
- catch (e) {
1429
- exitCode = 1;
1430
- config.logger.error(e);
1431
- }
1432
- if (devServer) {
1433
- await devServer.close();
1434
- }
1435
- if (exitCode > 0) {
1436
- return config.sys.exit(exitCode);
1437
- }
1438
- };
1439
-
1440
- const isOutputTargetHydrate = (o) => o.type === DIST_HYDRATE_SCRIPT;
1441
- const isOutputTargetDocs = (o) => o.type === DOCS_README || o.type === DOCS_JSON || o.type === DOCS_CUSTOM || o.type === DOCS_VSCODE;
1442
- const DIST_HYDRATE_SCRIPT = 'dist-hydrate-script';
1443
- const DOCS_CUSTOM = 'docs-custom';
1444
- const DOCS_JSON = 'docs-json';
1445
- const DOCS_README = 'docs-readme';
1446
- const DOCS_VSCODE = 'docs-vscode';
1447
- const WWW = 'www';
1448
-
1449
- const tryFn = async (fn, ...args) => {
1450
- try {
1451
- return await fn(...args);
1452
- }
1453
- catch (_a) {
1454
- // ignore
1455
- }
1456
- return null;
1457
- };
1458
- const isInteractive = (sys, flags, object) => {
1459
- const terminalInfo = object ||
1460
- Object.freeze({
1461
- tty: sys.isTTY() ? true : false,
1462
- ci: ['CI', 'BUILD_ID', 'BUILD_NUMBER', 'BITBUCKET_COMMIT', 'CODEBUILD_BUILD_ARN'].filter((v) => { var _a; return !!((_a = sys.getEnvironmentVar) === null || _a === void 0 ? void 0 : _a.call(sys, v)); }).length > 0 || !!flags.ci,
1463
- });
1464
- return terminalInfo.tty && !terminalInfo.ci;
1465
- };
1466
- const UUID_REGEX = new RegExp(/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i);
1467
- // Plucked from https://github.com/ionic-team/capacitor/blob/b893a57aaaf3a16e13db9c33037a12f1a5ac92e0/cli/src/util/uuid.ts
1468
- function uuidv4() {
1469
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
1470
- const r = (Math.random() * 16) | 0;
1471
- const v = c == 'x' ? r : (r & 0x3) | 0x8;
1472
- return v.toString(16);
1473
- });
1474
- }
1475
- /**
1476
- * Reads and parses a JSON file from the given `path`
1477
- * @param sys The system where the command is invoked
1478
- * @param path the path on the file system to read and parse
1479
- * @returns the parsed JSON
1480
- */
1481
- async function readJson(sys, path) {
1482
- const file = await sys.readFile(path);
1483
- return !!file && JSON.parse(file);
1484
- }
1485
- /**
1486
- * Does the command have the debug flag?
1487
- * @param flags The configuration flags passed into the Stencil command
1488
- * @returns true if --debug has been passed, otherwise false
1489
- */
1490
- function hasDebug(flags) {
1491
- return !!flags.debug;
1492
- }
1493
- /**
1494
- * Does the command have the verbose and debug flags?
1495
- * @param flags The configuration flags passed into the Stencil command
1496
- * @returns true if both --debug and --verbose have been passed, otherwise false
1497
- */
1498
- function hasVerbose(flags) {
1499
- return !!flags.verbose && hasDebug(flags);
1500
- }
1501
-
1502
- const isTest$1 = () => process.env.JEST_WORKER_ID !== undefined;
1503
- const defaultConfig = (sys) => sys.resolvePath(`${sys.homeDir()}/.ionic/${isTest$1() ? 'tmp-config.json' : 'config.json'}`);
1504
- const defaultConfigDirectory = (sys) => sys.resolvePath(`${sys.homeDir()}/.ionic`);
1505
- /**
1506
- * Reads an Ionic configuration file from disk, parses it, and performs any necessary corrections to it if certain
1507
- * values are deemed to be malformed
1508
- * @param sys The system where the command is invoked
1509
- * @returns the config read from disk that has been potentially been updated
1510
- */
1511
- async function readConfig(sys) {
1512
- let config = await readJson(sys, defaultConfig(sys));
1513
- if (!config) {
1514
- config = {
1515
- 'tokens.telemetry': uuidv4(),
1516
- 'telemetry.stencil': true,
1517
- };
1518
- await writeConfig(sys, config);
1519
- }
1520
- else if (!config['tokens.telemetry'] || !UUID_REGEX.test(config['tokens.telemetry'])) {
1521
- const newUuid = uuidv4();
1522
- await writeConfig(sys, { ...config, 'tokens.telemetry': newUuid });
1523
- config['tokens.telemetry'] = newUuid;
1524
- }
1525
- return config;
1526
- }
1527
- /**
1528
- * Writes an Ionic configuration file to disk.
1529
- * @param sys The system where the command is invoked
1530
- * @param config The config passed into the Stencil command
1531
- * @returns boolean If the command was successful
1532
- */
1533
- async function writeConfig(sys, config) {
1534
- let result = false;
1535
- try {
1536
- await sys.createDir(defaultConfigDirectory(sys), { recursive: true });
1537
- await sys.writeFile(defaultConfig(sys), JSON.stringify(config, null, 2));
1538
- result = true;
1539
- }
1540
- catch (error) {
1541
- console.error(`Stencil Telemetry: couldn't write configuration file to ${defaultConfig(sys)} - ${error}.`);
1542
- }
1543
- return result;
1544
- }
1545
- /**
1546
- * Update a subset of the Ionic config.
1547
- * @param sys The system where the command is invoked
1548
- * @param newOptions The new options to save
1549
- * @returns boolean If the command was successful
1550
- */
1551
- async function updateConfig(sys, newOptions) {
1552
- const config = await readConfig(sys);
1553
- return await writeConfig(sys, Object.assign(config, newOptions));
1554
- }
1555
-
1556
- /**
1557
- * Used to determine if tracking should occur.
1558
- * @param config The config passed into the Stencil command
1559
- * @param sys The system where the command is invoked
1560
- * @param ci whether or not the process is running in a Continuous Integration (CI) environment
1561
- * @returns true if telemetry should be sent, false otherwise
1562
- */
1563
- async function shouldTrack(config, sys, ci) {
1564
- return !ci && isInteractive(sys, config.flags) && (await checkTelemetry(sys));
1565
- }
1566
-
1567
- /**
1568
- * Used to within taskBuild to provide the component_count property.
1569
- *
1570
- * @param sys The system where the command is invoked
1571
- * @param config The config passed into the Stencil command
1572
- * @param coreCompiler The compiler used to do builds
1573
- * @param result The results of a compiler build.
1574
- */
1575
- async function telemetryBuildFinishedAction(sys, config, coreCompiler, result) {
1576
- const tracking = await shouldTrack(config, sys, !!config.flags.ci);
1577
- if (!tracking) {
1578
- return;
1579
- }
1580
- const component_count = result.componentGraph ? Object.keys(result.componentGraph).length : undefined;
1581
- const data = await prepareData(coreCompiler, config, sys, result.duration, component_count);
1582
- await sendMetric(sys, config, 'stencil_cli_command', data);
1583
- config.logger.debug(`${config.logger.blue('Telemetry')}: ${config.logger.gray(JSON.stringify(data))}`);
1584
- }
1585
- /**
1586
- * A function to wrap a compiler task function around. Will send telemetry if, and only if, the machine allows.
1587
- *
1588
- * @param sys The system where the command is invoked
1589
- * @param config The config passed into the Stencil command
1590
- * @param coreCompiler The compiler used to do builds
1591
- * @param action A Promise-based function to call in order to get the duration of any given command.
1592
- * @returns void
1593
- */
1594
- async function telemetryAction(sys, config, coreCompiler, action) {
1595
- const tracking = await shouldTrack(config, sys, !!config.flags.ci);
1596
- let duration = undefined;
1597
- let error;
1598
- if (action) {
1599
- const start = new Date();
1600
- try {
1601
- await action();
1602
- }
1603
- catch (e) {
1604
- error = e;
1605
- }
1606
- const end = new Date();
1607
- duration = end.getTime() - start.getTime();
1608
- }
1609
- // We'll get componentCount details inside the taskBuild, so let's not send two messages.
1610
- if (!tracking || (config.flags.task == 'build' && !config.flags.args.includes('--watch'))) {
1611
- return;
1612
- }
1613
- const data = await prepareData(coreCompiler, config, sys, duration);
1614
- await sendMetric(sys, config, 'stencil_cli_command', data);
1615
- config.logger.debug(`${config.logger.blue('Telemetry')}: ${config.logger.gray(JSON.stringify(data))}`);
1616
- if (error) {
1617
- throw error;
1618
- }
1619
- }
1620
- /**
1621
- * Helper function to determine if a Stencil configuration builds an application.
1622
- *
1623
- * This function is a rough approximation whether an application is generated as a part of a Stencil build, based on
1624
- * contents of the project's `stencil.config.ts` file.
1625
- *
1626
- * @param config the configuration used by the Stencil project
1627
- * @returns true if we believe the project generates an application, false otherwise
1628
- */
1629
- function hasAppTarget(config) {
1630
- return config.outputTargets.some((target) => target.type === WWW && (!!target.serviceWorker || (!!target.baseUrl && target.baseUrl !== '/')));
1631
- }
1632
- function isUsingYarn(sys) {
1633
- var _a;
1634
- return ((_a = sys.getEnvironmentVar('npm_execpath')) === null || _a === void 0 ? void 0 : _a.includes('yarn')) || false;
1635
- }
1636
- /**
1637
- * Build a list of the different types of output targets used in a Stencil configuration.
1638
- *
1639
- * Duplicate entries will not be returned from the list
1640
- *
1641
- * @param config the configuration used by the Stencil project
1642
- * @returns a unique list of output target types found in the Stencil configuration
1643
- */
1644
- function getActiveTargets(config) {
1645
- const result = config.outputTargets.map((t) => t.type);
1646
- return Array.from(new Set(result));
1647
- }
1648
- /**
1649
- * Prepare data for telemetry
1650
- *
1651
- * @param coreCompiler the core compiler
1652
- * @param config the current Stencil config
1653
- * @param sys the compiler system instance in use
1654
- * @param duration_ms the duration of the action being tracked
1655
- * @param component_count the number of components being built (optional)
1656
- * @returns a Promise wrapping data for the telemetry endpoint
1657
- */
1658
- const prepareData = async (coreCompiler, config, sys, duration_ms, component_count = undefined) => {
1659
- var _a, _b, _c;
1660
- const { typescript, rollup } = coreCompiler.versions || { typescript: 'unknown', rollup: 'unknown' };
1661
- const { packages, packagesNoVersions } = await getInstalledPackages(sys, config);
1662
- const targets = getActiveTargets(config);
1663
- const yarn = isUsingYarn(sys);
1664
- const stencil = coreCompiler.version || 'unknown';
1665
- const system = `${sys.name} ${sys.version}`;
1666
- const os_name = (_a = sys.details) === null || _a === void 0 ? void 0 : _a.platform;
1667
- const os_version = (_b = sys.details) === null || _b === void 0 ? void 0 : _b.release;
1668
- const cpu_model = (_c = sys.details) === null || _c === void 0 ? void 0 : _c.cpuModel;
1669
- const build = coreCompiler.buildId || 'unknown';
1670
- const has_app_pwa_config = hasAppTarget(config);
1671
- const anonymizedConfig = anonymizeConfigForTelemetry(config);
1672
- const is_browser_env = IS_BROWSER_ENV;
1673
- return {
1674
- arguments: config.flags.args,
1675
- build,
1676
- component_count,
1677
- config: anonymizedConfig,
1678
- cpu_model,
1679
- duration_ms,
1680
- has_app_pwa_config,
1681
- is_browser_env,
1682
- os_name,
1683
- os_version,
1684
- packages,
1685
- packages_no_versions: packagesNoVersions,
1686
- rollup,
1687
- stencil,
1688
- system,
1689
- system_major: getMajorVersion(system),
1690
- targets,
1691
- task: config.flags.task,
1692
- typescript,
1693
- yarn,
1694
- };
1695
- };
1696
- // props in output targets for which we retain their original values when
1697
- // preparing a config for telemetry
1698
- //
1699
- // we omit the values of all other fields on output targets.
1700
- const OUTPUT_TARGET_KEYS_TO_KEEP = ['type'];
1701
- // top-level config props that we anonymize for telemetry
1702
- const CONFIG_PROPS_TO_ANONYMIZE = [
1703
- 'rootDir',
1704
- 'fsNamespace',
1705
- 'packageJsonFilePath',
1706
- 'namespace',
1707
- 'srcDir',
1708
- 'srcIndexHtml',
1709
- 'buildLogFilePath',
1710
- 'cacheDir',
1711
- 'configPath',
1712
- 'tsconfig',
1713
- ];
1714
- // Props we delete entirely from the config for telemetry
1715
- //
1716
- // TODO(STENCIL-469): Investigate improving anonymization for tsCompilerOptions and devServer
1717
- const CONFIG_PROPS_TO_DELETE = [
1718
- 'commonjs',
1719
- 'devServer',
1720
- 'env',
1721
- 'logger',
1722
- 'rollupConfig',
1723
- 'sys',
1724
- 'testing',
1725
- 'tsCompilerOptions',
1726
- ];
1727
- /**
1728
- * Anonymize the config for telemetry, replacing potentially revealing config props
1729
- * with a placeholder string if they are present (this lets us still track how frequently
1730
- * these config options are being used)
1731
- *
1732
- * @param config the config to anonymize
1733
- * @returns an anonymized copy of the same config
1734
- */
1735
- const anonymizeConfigForTelemetry = (config) => {
1736
- const anonymizedConfig = { ...config };
1737
- for (const prop of CONFIG_PROPS_TO_ANONYMIZE) {
1738
- if (anonymizedConfig[prop] !== undefined) {
1739
- anonymizedConfig[prop] = 'omitted';
1740
- }
1741
- }
1742
- anonymizedConfig.outputTargets = config.outputTargets.map((target) => {
1743
- // Anonymize the outputTargets on our configuration, taking advantage of the
1744
- // optional 2nd argument to `JSON.stringify`. If anything is not a string
1745
- // we retain it so that any nested properties are handled, else we check
1746
- // whether it's in our 'keep' list to decide whether to keep it or replace it
1747
- // with `"omitted"`.
1748
- const anonymizedOT = JSON.parse(JSON.stringify(target, (key, value) => {
1749
- if (!(typeof value === 'string')) {
1750
- return value;
1751
- }
1752
- if (OUTPUT_TARGET_KEYS_TO_KEEP.includes(key)) {
1753
- return value;
1754
- }
1755
- return 'omitted';
1756
- }));
1757
- // this prop has to be handled separately because it is an array
1758
- // so the replace function above will be called with all of its
1759
- // members, giving us `["omitted", "omitted", ...]`.
1760
- //
1761
- // Instead, we check for its presence and manually copy over.
1762
- if (isOutputTargetHydrate(target) && target.external) {
1763
- anonymizedOT['external'] = target.external.concat();
1764
- }
1765
- return anonymizedOT;
1766
- });
1767
- // TODO(STENCIL-469): Investigate improving anonymization for tsCompilerOptions and devServer
1768
- for (const prop of CONFIG_PROPS_TO_DELETE) {
1769
- delete anonymizedConfig[prop];
1770
- }
1771
- return anonymizedConfig;
1772
- };
1773
- /**
1774
- * Reads package-lock.json, yarn.lock, and package.json files in order to cross-reference
1775
- * the dependencies and devDependencies properties. Pulls up the current installed version
1776
- * of each package under the @stencil, @ionic, and @capacitor scopes.
1777
- *
1778
- * @param sys the system instance where telemetry is invoked
1779
- * @param config the Stencil configuration associated with the current task that triggered telemetry
1780
- * @returns an object listing all dev and production dependencies under the aforementioned scopes
1781
- */
1782
- async function getInstalledPackages(sys, config) {
1783
- let packages = [];
1784
- let packagesNoVersions = [];
1785
- const yarn = isUsingYarn(sys);
1786
- try {
1787
- // Read package.json and package-lock.json
1788
- const appRootDir = sys.getCurrentDirectory();
1789
- const packageJson = await tryFn(readJson, sys, sys.resolvePath(appRootDir + '/package.json'));
1790
- // They don't have a package.json for some reason? Eject button.
1791
- if (!packageJson) {
1792
- return { packages, packagesNoVersions };
1793
- }
1794
- const rawPackages = Object.entries({
1795
- ...packageJson.devDependencies,
1796
- ...packageJson.dependencies,
1797
- });
1798
- // Collect packages only in the stencil, ionic, or capacitor org's:
1799
- // https://www.npmjs.com/org/stencil
1800
- const ionicPackages = rawPackages.filter(([k]) => k.startsWith('@stencil/') || k.startsWith('@ionic/') || k.startsWith('@capacitor/'));
1801
- try {
1802
- packages = yarn ? await yarnPackages(sys, ionicPackages) : await npmPackages(sys, ionicPackages);
1803
- }
1804
- catch (e) {
1805
- packages = ionicPackages.map(([k, v]) => `${k}@${v.replace('^', '')}`);
1806
- }
1807
- packagesNoVersions = ionicPackages.map(([k]) => `${k}`);
1808
- return { packages, packagesNoVersions };
1809
- }
1810
- catch (err) {
1811
- hasDebug(config.flags) && console.error(err);
1812
- return { packages, packagesNoVersions };
1813
- }
1814
- }
1815
- /**
1816
- * Visits the npm lock file to find the exact versions that are installed
1817
- * @param sys The system where the command is invoked
1818
- * @param ionicPackages a list of the found packages matching `@stencil`, `@capacitor`, or `@ionic` from the package.json file.
1819
- * @returns an array of strings of all the packages and their versions.
1820
- */
1821
- async function npmPackages(sys, ionicPackages) {
1822
- const appRootDir = sys.getCurrentDirectory();
1823
- const packageLockJson = await tryFn(readJson, sys, sys.resolvePath(appRootDir + '/package-lock.json'));
1824
- return ionicPackages.map(([k, v]) => {
1825
- var _a, _b, _c, _d;
1826
- let version = (_d = (_b = (_a = packageLockJson === null || packageLockJson === void 0 ? void 0 : packageLockJson.dependencies[k]) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : (_c = packageLockJson === null || packageLockJson === void 0 ? void 0 : packageLockJson.devDependencies[k]) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : v;
1827
- version = version.includes('file:') ? sanitizeDeclaredVersion(v) : version;
1828
- return `${k}@${version}`;
1829
- });
1830
- }
1831
- /**
1832
- * Visits the yarn lock file to find the exact versions that are installed
1833
- * @param sys The system where the command is invoked
1834
- * @param ionicPackages a list of the found packages matching `@stencil`, `@capacitor`, or `@ionic` from the package.json file.
1835
- * @returns an array of strings of all the packages and their versions.
1836
- */
1837
- async function yarnPackages(sys, ionicPackages) {
1838
- const appRootDir = sys.getCurrentDirectory();
1839
- const yarnLock = sys.readFileSync(sys.resolvePath(appRootDir + '/yarn.lock'));
1840
- const yarnLockYml = sys.parseYarnLockFile(yarnLock);
1841
- return ionicPackages.map(([k, v]) => {
1842
- var _a;
1843
- const identifiedVersion = `${k}@${v}`;
1844
- let version = (_a = yarnLockYml.object[identifiedVersion]) === null || _a === void 0 ? void 0 : _a.version;
1845
- version = version.includes('undefined') ? sanitizeDeclaredVersion(identifiedVersion) : version;
1846
- return `${k}@${version}`;
1847
- });
1848
- }
1849
- /**
1850
- * This function is used for fallback purposes, where an npm or yarn lock file doesn't exist in the consumers directory.
1851
- * This will strip away '*', '^' and '~' from the declared package versions in a package.json.
1852
- * @param version the raw semver pattern identifier version string
1853
- * @returns a cleaned up representation without any qualifiers
1854
- */
1855
- function sanitizeDeclaredVersion(version) {
1856
- return version.replace(/[*^~]/g, '');
1857
- }
1858
- /**
1859
- * If telemetry is enabled, send a metric to an external data store
1860
- *
1861
- * @param sys the system instance where telemetry is invoked
1862
- * @param config the Stencil configuration associated with the current task that triggered telemetry
1863
- * @param name the name of a trackable metric. Note this name is not necessarily a scalar value to track, like
1864
- * "Stencil Version". For example, "stencil_cli_command" is a name that is used to track all CLI command information.
1865
- * @param value the data to send to the external data store under the provided name argument
1866
- */
1867
- async function sendMetric(sys, config, name, value) {
1868
- const session_id = await getTelemetryToken(sys);
1869
- const message = {
1870
- name,
1871
- timestamp: new Date().toISOString(),
1872
- source: 'stencil_cli',
1873
- value,
1874
- session_id,
1875
- };
1876
- await sendTelemetry(sys, config, message);
1877
- }
1878
- /**
1879
- * Used to read the config file's tokens.telemetry property.
1880
- *
1881
- * @param sys The system where the command is invoked
1882
- * @returns string
1883
- */
1884
- async function getTelemetryToken(sys) {
1885
- const config = await readConfig(sys);
1886
- if (config['tokens.telemetry'] === undefined) {
1887
- config['tokens.telemetry'] = uuidv4();
1888
- await writeConfig(sys, config);
1889
- }
1890
- return config['tokens.telemetry'];
1891
- }
1892
- /**
1893
- * Issues a request to the telemetry server.
1894
- * @param sys The system where the command is invoked
1895
- * @param config The config passed into the Stencil command
1896
- * @param data Data to be tracked
1897
- */
1898
- async function sendTelemetry(sys, config, data) {
1899
- try {
1900
- const now = new Date().toISOString();
1901
- const body = {
1902
- metrics: [data],
1903
- sent_at: now,
1904
- };
1905
- // This request is only made if telemetry is on.
1906
- const response = await sys.fetch('https://api.ionicjs.com/events/metrics', {
1907
- method: 'POST',
1908
- headers: {
1909
- 'Content-Type': 'application/json',
1910
- },
1911
- body: JSON.stringify(body),
1912
- });
1913
- hasVerbose(config.flags) &&
1914
- console.debug('\nSent %O metric to events service (status: %O)', data.name, response.status, '\n');
1915
- if (response.status !== 204) {
1916
- hasVerbose(config.flags) &&
1917
- console.debug('\nBad response from events service. Request body: %O', response.body.toString(), '\n');
1918
- }
1919
- }
1920
- catch (e) {
1921
- hasVerbose(config.flags) && console.debug('Telemetry request failed:', e);
1922
- }
1923
- }
1924
- /**
1925
- * Checks if telemetry is enabled on this machine
1926
- * @param sys The system where the command is invoked
1927
- * @returns true if telemetry is enabled, false otherwise
1928
- */
1929
- async function checkTelemetry(sys) {
1930
- const config = await readConfig(sys);
1931
- if (config['telemetry.stencil'] === undefined) {
1932
- config['telemetry.stencil'] = true;
1933
- await writeConfig(sys, config);
1934
- }
1935
- return config['telemetry.stencil'];
1936
- }
1937
- /**
1938
- * Writes to the config file, enabling telemetry for this machine.
1939
- * @param sys The system where the command is invoked
1940
- * @returns true if writing the file was successful, false otherwise
1941
- */
1942
- async function enableTelemetry(sys) {
1943
- return await updateConfig(sys, { 'telemetry.stencil': true });
1944
- }
1945
- /**
1946
- * Writes to the config file, disabling telemetry for this machine.
1947
- * @param sys The system where the command is invoked
1948
- * @returns true if writing the file was successful, false otherwise
1949
- */
1950
- async function disableTelemetry(sys) {
1951
- return await updateConfig(sys, { 'telemetry.stencil': false });
1952
- }
1953
- /**
1954
- * Takes in a semver string in order to return the major version.
1955
- * @param version The fully qualified semver version
1956
- * @returns a string of the major version
1957
- */
1958
- function getMajorVersion(version) {
1959
- const parts = version.split('.');
1960
- return parts[0];
1961
- }
1962
-
1963
- const taskBuild = async (coreCompiler, config) => {
1964
- if (config.flags.watch) {
1965
- // watch build
1966
- await taskWatch(coreCompiler, config);
1967
- return;
1968
- }
1969
- // one-time build
1970
- let exitCode = 0;
1971
- try {
1972
- startupCompilerLog(coreCompiler, config);
1973
- const versionChecker = startCheckVersion(config, coreCompiler.version);
1974
- const compiler = await coreCompiler.createCompiler(config);
1975
- const results = await compiler.build();
1976
- await telemetryBuildFinishedAction(config.sys, config, coreCompiler, results);
1977
- await compiler.destroy();
1978
- if (results.hasError) {
1979
- exitCode = 1;
1980
- }
1981
- else if (config.flags.prerender) {
1982
- const prerenderDiagnostics = await runPrerenderTask(coreCompiler, config, results.hydrateAppFilePath, results.componentGraph, null);
1983
- config.logger.printDiagnostics(prerenderDiagnostics);
1984
- if (prerenderDiagnostics.some((d) => d.level === 'error')) {
1985
- exitCode = 1;
1986
- }
1987
- }
1988
- await printCheckVersionResults(versionChecker);
1989
- }
1990
- catch (e) {
1991
- exitCode = 1;
1992
- config.logger.error(e);
1993
- }
1994
- if (exitCode > 0) {
1995
- return config.sys.exit(exitCode);
1996
- }
1997
- };
1998
-
1999
- const taskDocs = async (coreCompiler, config) => {
2000
- config.devServer = null;
2001
- config.outputTargets = config.outputTargets.filter(isOutputTargetDocs);
2002
- config.devMode = true;
2003
- startupCompilerLog(coreCompiler, config);
2004
- const compiler = await coreCompiler.createCompiler(config);
2005
- await compiler.build();
2006
- await compiler.destroy();
2007
- };
2008
-
2009
- /**
2010
- * Task to generate component boilerplate and write it to disk. This task can
2011
- * cause the program to exit with an error under various circumstances, such as
2012
- * being called in an inappropriate place, being asked to overwrite files that
2013
- * already exist, etc.
2014
- *
2015
- * @param coreCompiler the CoreCompiler we're using currently, here we're
2016
- * mainly accessing the `path` module
2017
- * @param config the user-supplied config, which we need here to access `.sys`.
2018
- */
2019
- const taskGenerate = async (coreCompiler, config) => {
2020
- if (!IS_NODE_ENV) {
2021
- config.logger.error(`"generate" command is currently only implemented for a NodeJS environment`);
2022
- return config.sys.exit(1);
2023
- }
2024
- const path = coreCompiler.path;
2025
- if (!config.configPath) {
2026
- config.logger.error('Please run this command in your root directory (i. e. the one containing stencil.config.ts).');
2027
- return config.sys.exit(1);
2028
- }
2029
- const absoluteSrcDir = config.srcDir;
2030
- if (!absoluteSrcDir) {
2031
- config.logger.error(`Stencil's srcDir was not specified.`);
2032
- return config.sys.exit(1);
2033
- }
2034
- const { prompt } = await import('../sys/node/prompts.js');
2035
- const input = config.flags.unknownArgs.find((arg) => !arg.startsWith('-')) ||
2036
- (await prompt({ name: 'tagName', type: 'text', message: 'Component tag name (dash-case):' })).tagName;
2037
- if (undefined === input) {
2038
- // in some shells (e.g. Windows PowerShell), hitting Ctrl+C results in a TypeError printed to the console.
2039
- // explicitly return here to avoid printing the error message.
2040
- return;
2041
- }
2042
- const { dir, base: componentName } = path.parse(input);
2043
- const tagError = validateComponentTag(componentName);
2044
- if (tagError) {
2045
- config.logger.error(tagError);
2046
- return config.sys.exit(1);
2047
- }
2048
- const filesToGenerateExt = await chooseFilesToGenerate();
2049
- if (undefined === filesToGenerateExt) {
2050
- // in some shells (e.g. Windows PowerShell), hitting Ctrl+C results in a TypeError printed to the console.
2051
- // explicitly return here to avoid printing the error message.
2052
- return;
2053
- }
2054
- const extensionsToGenerate = ['tsx', ...filesToGenerateExt];
2055
- const testFolder = extensionsToGenerate.some(isTest) ? 'test' : '';
2056
- const outDir = path.join(absoluteSrcDir, 'components', dir, componentName);
2057
- await config.sys.createDir(path.join(outDir, testFolder), { recursive: true });
2058
- const filesToGenerate = extensionsToGenerate.map((extension) => ({
2059
- extension,
2060
- path: getFilepathForFile(coreCompiler, outDir, componentName, extension),
2061
- }));
2062
- await checkForOverwrite(filesToGenerate, config);
2063
- const writtenFiles = await Promise.all(filesToGenerate.map((file) => getBoilerplateAndWriteFile(config, componentName, extensionsToGenerate.includes('css'), file))).catch((error) => config.logger.error(error));
2064
- if (!writtenFiles) {
2065
- return config.sys.exit(1);
2066
- }
2067
- // We use `console.log` here rather than our `config.logger` because we don't want
2068
- // our TUI messages to be prefixed with timestamps and so on.
2069
- //
2070
- // See STENCIL-424 for details.
2071
- console.log();
2072
- console.log(`${config.logger.gray('$')} stencil generate ${input}`);
2073
- console.log();
2074
- console.log(config.logger.bold('The following files have been generated:'));
2075
- const absoluteRootDir = config.rootDir;
2076
- writtenFiles.map((file) => console.log(` - ${path.relative(absoluteRootDir, file)}`));
2077
- };
2078
- /**
2079
- * Show a checkbox prompt to select the files to be generated.
2080
- *
2081
- * @returns a read-only array of `GenerableExtension`, the extensions that the user has decided
2082
- * to generate
2083
- */
2084
- const chooseFilesToGenerate = async () => {
2085
- const { prompt } = await import('../sys/node/prompts.js');
2086
- return (await prompt({
2087
- name: 'filesToGenerate',
2088
- type: 'multiselect',
2089
- message: 'Which additional files do you want to generate?',
2090
- choices: [
2091
- { value: 'css', title: 'Stylesheet (.css)', selected: true },
2092
- { value: 'spec.tsx', title: 'Spec Test (.spec.tsx)', selected: true },
2093
- { value: 'e2e.ts', title: 'E2E Test (.e2e.ts)', selected: true },
2094
- ],
2095
- })).filesToGenerate;
2096
- };
2097
- /**
2098
- * Get a filepath for a file we want to generate!
2099
- *
2100
- * The filepath for a given file depends on the path, the user-supplied
2101
- * component name, the extension, and whether we're inside of a test directory.
2102
- *
2103
- * @param coreCompiler the compiler we're using, here to acces the `.path` module
2104
- * @param path path to where we're going to generate the component
2105
- * @param componentName the user-supplied name for the generated component
2106
- * @param extension the file extension
2107
- * @returns the full filepath to the component (with a possible `test` directory
2108
- * added)
2109
- */
2110
- const getFilepathForFile = (coreCompiler, path, componentName, extension) => isTest(extension)
2111
- ? coreCompiler.path.join(path, 'test', `${componentName}.${extension}`)
2112
- : coreCompiler.path.join(path, `${componentName}.${extension}`);
2113
- /**
2114
- * Get the boilerplate for a file and write it to disk
2115
- *
2116
- * @param config the current config, needed for file operations
2117
- * @param componentName the component name (user-supplied)
2118
- * @param withCss are we generating CSS?
2119
- * @param file the file we want to write
2120
- * @returns a `Promise<string>` which holds the full filepath we've written to,
2121
- * used to print out a little summary of our activity to the user.
2122
- */
2123
- const getBoilerplateAndWriteFile = async (config, componentName, withCss, file) => {
2124
- const boilerplate = getBoilerplateByExtension(componentName, file.extension, withCss);
2125
- await config.sys.writeFile(file.path, boilerplate);
2126
- return file.path;
2127
- };
2128
- /**
2129
- * Check to see if any of the files we plan to write already exist and would
2130
- * therefore be overwritten if we proceed, because we'd like to not overwrite
2131
- * people's code!
2132
- *
2133
- * This function will check all the filepaths and if it finds any files log an
2134
- * error and exit with an error code. If it doesn't find anything it will just
2135
- * peacefully return `Promise<void>`.
2136
- *
2137
- * @param files the files we want to check
2138
- * @param config the Config object, used here to get access to `sys.readFile`
2139
- */
2140
- const checkForOverwrite = async (files, config) => {
2141
- const alreadyPresent = [];
2142
- await Promise.all(files.map(async ({ path }) => {
2143
- if ((await config.sys.readFile(path)) !== undefined) {
2144
- alreadyPresent.push(path);
2145
- }
2146
- }));
2147
- if (alreadyPresent.length > 0) {
2148
- config.logger.error('Generating code would overwrite the following files:', ...alreadyPresent.map((path) => '\t' + path));
2149
- await config.sys.exit(1);
2150
- }
2151
- };
2152
- /**
2153
- * Check if an extension is for a test
2154
- *
2155
- * @param extension the extension we want to check
2156
- * @returns a boolean indicating whether or not its a test
2157
- */
2158
- const isTest = (extension) => {
2159
- return extension === 'e2e.ts' || extension === 'spec.tsx';
2160
- };
2161
- /**
2162
- * Get the boilerplate for a file by its extension.
2163
- *
2164
- * @param tagName the name of the component we're generating
2165
- * @param extension the file extension we want boilerplate for (.css, tsx, etc)
2166
- * @param withCss a boolean indicating whether we're generating a CSS file
2167
- * @returns a string container the file boilerplate for the supplied extension
2168
- */
2169
- const getBoilerplateByExtension = (tagName, extension, withCss) => {
2170
- switch (extension) {
2171
- case 'tsx':
2172
- return getComponentBoilerplate(tagName, withCss);
2173
- case 'css':
2174
- return getStyleUrlBoilerplate();
2175
- case 'spec.tsx':
2176
- return getSpecTestBoilerplate(tagName);
2177
- case 'e2e.ts':
2178
- return getE2eTestBoilerplate(tagName);
2179
- default:
2180
- throw new Error(`Unkown extension "${extension}".`);
2181
- }
2182
- };
2183
- /**
2184
- * Get the boilerplate for a file containing the definition of a component
2185
- * @param tagName the name of the tag to give the component
2186
- * @param hasStyle designates if the component has an external stylesheet or not
2187
- * @returns the contents of a file that defines a component
2188
- */
2189
- const getComponentBoilerplate = (tagName, hasStyle) => {
2190
- const decorator = [`{`];
2191
- decorator.push(` tag: '${tagName}',`);
2192
- if (hasStyle) {
2193
- decorator.push(` styleUrl: '${tagName}.css',`);
2194
- }
2195
- decorator.push(` shadow: true,`);
2196
- decorator.push(`}`);
2197
- return `import { Component, Host, h } from '@stencil/core';
2198
-
2199
- @Component(${decorator.join('\n')})
2200
- export class ${toPascalCase(tagName)} {
2201
-
2202
- render() {
2203
- return (
2204
- <Host>
2205
- <slot></slot>
2206
- </Host>
2207
- );
2208
- }
2209
-
2210
- }
2211
- `;
2212
- };
2213
- /**
2214
- * Get the boilerplate for style for a generated component
2215
- * @returns a boilerplate CSS block
2216
- */
2217
- const getStyleUrlBoilerplate = () => `:host {
2218
- display: block;
2219
- }
2220
- `;
2221
- /**
2222
- * Get the boilerplate for a file containing a spec (unit) test for a component
2223
- * @param tagName the name of the tag associated with the component under test
2224
- * @returns the contents of a file that unit tests a component
2225
- */
2226
- const getSpecTestBoilerplate = (tagName) => `import { newSpecPage } from '@stencil/core/testing';
2227
- import { ${toPascalCase(tagName)} } from '../${tagName}';
2228
-
2229
- describe('${tagName}', () => {
2230
- it('renders', async () => {
2231
- const page = await newSpecPage({
2232
- components: [${toPascalCase(tagName)}],
2233
- html: \`<${tagName}></${tagName}>\`,
2234
- });
2235
- expect(page.root).toEqualHtml(\`
2236
- <${tagName}>
2237
- <mock:shadow-root>
2238
- <slot></slot>
2239
- </mock:shadow-root>
2240
- </${tagName}>
2241
- \`);
2242
- });
2243
- });
2244
- `;
2245
- /**
2246
- * Get the boilerplate for a file containing an end-to-end (E2E) test for a component
2247
- * @param tagName the name of the tag associated with the component under test
2248
- * @returns the contents of a file that E2E tests a component
2249
- */
2250
- const getE2eTestBoilerplate = (tagName) => `import { newE2EPage } from '@stencil/core/testing';
2251
-
2252
- describe('${tagName}', () => {
2253
- it('renders', async () => {
2254
- const page = await newE2EPage();
2255
- await page.setContent('<${tagName}></${tagName}>');
2256
-
2257
- const element = await page.find('${tagName}');
2258
- expect(element).toHaveClass('hydrated');
2259
- });
2260
- });
2261
- `;
2262
- /**
2263
- * Convert a dash case string to pascal case.
2264
- * @param str the string to convert
2265
- * @returns the converted input as pascal case
2266
- */
2267
- const toPascalCase = (str) => str.split('-').reduce((res, part) => res + part[0].toUpperCase() + part.slice(1), '');
2268
-
2269
- /**
2270
- * Entrypoint for the Telemetry task
2271
- * @param flags configuration flags provided to Stencil when a task was called (either this task or a task that invokes
2272
- * telemetry)
2273
- * @param sys the abstraction for interfacing with the operating system
2274
- * @param logger a logging implementation to log the results out to the user
2275
- */
2276
- const taskTelemetry = async (flags, sys, logger) => {
2277
- const prompt = logger.dim(sys.details.platform === 'windows' ? '>' : '$');
2278
- const isEnabling = flags.args.includes('on');
2279
- const isDisabling = flags.args.includes('off');
2280
- const INFORMATION = `Opt in or out of telemetry. Information about the data we collect is available on our website: ${logger.bold('https://stenciljs.com/telemetry')}`;
2281
- const THANK_YOU = `Thank you for helping to make Stencil better! 💖`;
2282
- const ENABLED_MESSAGE = `${logger.green('Enabled')}. ${THANK_YOU}\n\n`;
2283
- const DISABLED_MESSAGE = `${logger.red('Disabled')}\n\n`;
2284
- const hasTelemetry = await checkTelemetry(sys);
2285
- if (isEnabling) {
2286
- const result = await enableTelemetry(sys);
2287
- result
2288
- ? console.log(`\n ${logger.bold('Telemetry is now ') + ENABLED_MESSAGE}`)
2289
- : console.log(`Something went wrong when enabling Telemetry.`);
2290
- return;
2291
- }
2292
- if (isDisabling) {
2293
- const result = await disableTelemetry(sys);
2294
- result
2295
- ? console.log(`\n ${logger.bold('Telemetry is now ') + DISABLED_MESSAGE}`)
2296
- : console.log(`Something went wrong when disabling Telemetry.`);
2297
- return;
2298
- }
2299
- console.log(` ${logger.bold('Telemetry:')} ${logger.dim(INFORMATION)}`);
2300
- console.log(`\n ${logger.bold('Status')}: ${hasTelemetry ? ENABLED_MESSAGE : DISABLED_MESSAGE}`);
2301
- console.log(` ${prompt} ${logger.green('stencil telemetry [off|on]')}
2302
-
2303
- ${logger.cyan('off')} ${logger.dim('.............')} Disable sharing anonymous usage data
2304
- ${logger.cyan('on')} ${logger.dim('..............')} Enable sharing anonymous usage data
2305
- `);
2306
- };
2307
-
2308
- /**
2309
- * Entrypoint for the Help task, providing Stencil usage context to the user
2310
- * @param flags configuration flags provided to Stencil when a task was call (either this task or a task that invokes
2311
- * telemetry)
2312
- * @param logger a logging implementation to log the results out to the user
2313
- * @param sys the abstraction for interfacing with the operating system
2314
- */
2315
- const taskHelp = async (flags, logger, sys) => {
2316
- const prompt = logger.dim(sys.details.platform === 'windows' ? '>' : '$');
2317
- console.log(`
2318
- ${logger.bold('Build:')} ${logger.dim('Build components for development or production.')}
2319
-
2320
- ${prompt} ${logger.green('stencil build [--dev] [--watch] [--prerender] [--debug]')}
2321
-
2322
- ${logger.cyan('--dev')} ${logger.dim('.............')} Development build
2323
- ${logger.cyan('--watch')} ${logger.dim('...........')} Rebuild when files update
2324
- ${logger.cyan('--serve')} ${logger.dim('...........')} Start the dev-server
2325
- ${logger.cyan('--prerender')} ${logger.dim('.......')} Prerender the application
2326
- ${logger.cyan('--docs')} ${logger.dim('............')} Generate component readme.md docs
2327
- ${logger.cyan('--config')} ${logger.dim('..........')} Set stencil config file
2328
- ${logger.cyan('--stats')} ${logger.dim('...........')} Write stencil-stats.json file
2329
- ${logger.cyan('--log')} ${logger.dim('.............')} Write stencil-build.log file
2330
- ${logger.cyan('--debug')} ${logger.dim('...........')} Set the log level to debug
2331
-
2332
-
2333
- ${logger.bold('Test:')} ${logger.dim('Run unit and end-to-end tests.')}
2334
-
2335
- ${prompt} ${logger.green('stencil test [--spec] [--e2e]')}
2336
-
2337
- ${logger.cyan('--spec')} ${logger.dim('............')} Run unit tests with Jest
2338
- ${logger.cyan('--e2e')} ${logger.dim('.............')} Run e2e tests with Puppeteer
2339
-
2340
-
2341
- ${logger.bold('Generate:')} ${logger.dim('Bootstrap components.')}
2342
-
2343
- ${prompt} ${logger.green('stencil generate')} or ${logger.green('stencil g')}
2344
-
2345
- `);
2346
- await taskTelemetry(flags, sys, logger);
2347
- console.log(`
2348
- ${logger.bold('Examples:')}
2349
-
2350
- ${prompt} ${logger.green('stencil build --dev --watch --serve')}
2351
- ${prompt} ${logger.green('stencil build --prerender')}
2352
- ${prompt} ${logger.green('stencil test --spec --e2e')}
2353
- ${prompt} ${logger.green('stencil telemetry on')}
2354
- ${prompt} ${logger.green('stencil generate')}
2355
- ${prompt} ${logger.green('stencil g my-component')}
2356
- `);
2357
- };
2358
-
2359
- const taskInfo = (coreCompiler, sys, logger) => {
2360
- const details = sys.details;
2361
- const versions = coreCompiler.versions;
2362
- console.log(``);
2363
- console.log(`${logger.cyan(' System:')} ${sys.name} ${sys.version}`);
2364
- console.log(`${logger.cyan(' Plaform:')} ${details.platform} (${details.release})`);
2365
- console.log(`${logger.cyan(' CPU Model:')} ${details.cpuModel} (${sys.hardwareConcurrency} cpu${sys.hardwareConcurrency !== 1 ? 's' : ''})`);
2366
- console.log(`${logger.cyan(' Compiler:')} ${sys.getCompilerExecutingPath()}`);
2367
- console.log(`${logger.cyan(' Build:')} ${coreCompiler.buildId}`);
2368
- console.log(`${logger.cyan(' Stencil:')} ${coreCompiler.version}${logger.emoji(' ' + coreCompiler.vermoji)}`);
2369
- console.log(`${logger.cyan(' TypeScript:')} ${versions.typescript}`);
2370
- console.log(`${logger.cyan(' Rollup:')} ${versions.rollup}`);
2371
- console.log(`${logger.cyan(' Parse5:')} ${versions.parse5}`);
2372
- console.log(`${logger.cyan(' Sizzle:')} ${versions.sizzle}`);
2373
- console.log(`${logger.cyan(' Terser:')} ${versions.terser}`);
2374
- console.log(``);
2375
- };
2376
-
2377
- const taskServe = async (config) => {
2378
- config.suppressLogs = true;
2379
- config.flags.serve = true;
2380
- config.devServer.openBrowser = config.flags.open;
2381
- config.devServer.reloadStrategy = null;
2382
- config.devServer.initialLoadUrl = '/';
2383
- config.devServer.websocket = false;
2384
- config.maxConcurrentWorkers = 1;
2385
- config.devServer.root = isString(config.flags.root) ? config.flags.root : config.sys.getCurrentDirectory();
2386
- const devServerPath = config.sys.getDevServerExecutingPath();
2387
- const { start } = await config.sys.dynamicImport(devServerPath);
2388
- const devServer = await start(config.devServer, config.logger);
2389
- console.log(`${config.logger.cyan(' Root:')} ${devServer.root}`);
2390
- console.log(`${config.logger.cyan(' Address:')} ${devServer.address}`);
2391
- console.log(`${config.logger.cyan(' Port:')} ${devServer.port}`);
2392
- console.log(`${config.logger.cyan(' Server:')} ${devServer.browserUrl}`);
2393
- console.log(``);
2394
- config.sys.onProcessInterrupt(() => {
2395
- if (devServer) {
2396
- config.logger.debug(`dev server close: ${devServer.browserUrl}`);
2397
- devServer.close();
2398
- }
2399
- });
2400
- };
2401
-
2402
- /**
2403
- * Entrypoint for any Stencil tests
2404
- * @param config a validated Stencil configuration entity
2405
- */
2406
- const taskTest = async (config) => {
2407
- if (!IS_NODE_ENV) {
2408
- config.logger.error(`"test" command is currently only implemented for a NodeJS environment`);
2409
- return config.sys.exit(1);
2410
- }
2411
- config.buildDocs = false;
2412
- const testingRunOpts = {
2413
- e2e: !!config.flags.e2e,
2414
- screenshot: !!config.flags.screenshot,
2415
- spec: !!config.flags.spec,
2416
- updateScreenshot: !!config.flags.updateScreenshot,
2417
- };
2418
- // always ensure we have jest modules installed
2419
- const ensureModuleIds = ['@types/jest', 'jest', 'jest-cli'];
2420
- if (testingRunOpts.e2e) {
2421
- // if it's an e2e test, also make sure we're got
2422
- // puppeteer modules installed and if browserExecutablePath is provided don't download Chromium use only puppeteer-core instead
2423
- const puppeteer = config.testing.browserExecutablePath ? 'puppeteer-core' : 'puppeteer';
2424
- ensureModuleIds.push(puppeteer);
2425
- if (testingRunOpts.screenshot) {
2426
- // ensure we've got pixelmatch for screenshots
2427
- config.logger.warn(config.logger.yellow(`EXPERIMENTAL: screenshot visual diff testing is currently under heavy development and has not reached a stable status. However, any assistance testing would be appreciated.`));
2428
- }
2429
- }
2430
- // ensure we've got the required modules installed
2431
- const diagnostics = await config.sys.lazyRequire.ensure(config.rootDir, ensureModuleIds);
2432
- if (diagnostics.length > 0) {
2433
- config.logger.printDiagnostics(diagnostics);
2434
- return config.sys.exit(1);
2435
- }
2436
- try {
2437
- // let's test!
2438
- const { createTesting } = await import('../testing/index.js');
2439
- const testing = await createTesting(config);
2440
- const passed = await testing.run(testingRunOpts);
2441
- await testing.destroy();
2442
- if (!passed) {
2443
- return config.sys.exit(1);
2444
- }
2445
- }
2446
- catch (e) {
2447
- config.logger.error(e);
2448
- return config.sys.exit(1);
2449
- }
2450
- };
2451
-
2452
- const run = async (init) => {
2453
- const { args, logger, sys } = init;
2454
- try {
2455
- const flags = parseFlags(args);
2456
- const task = flags.task;
2457
- if (flags.debug || flags.verbose) {
2458
- logger.setLevel('debug');
2459
- }
2460
- if (flags.ci) {
2461
- logger.enableColors(false);
2462
- }
2463
- if (isFunction(sys.applyGlobalPatch)) {
2464
- sys.applyGlobalPatch(sys.getCurrentDirectory());
2465
- }
2466
- if (!task || task === 'help' || flags.help) {
2467
- await taskHelp(createConfigFlags({ task: 'help', args }), logger, sys);
2468
- return;
2469
- }
2470
- startupLog(logger, task);
2471
- const findConfigResults = await findConfig({ sys, configPath: flags.config });
2472
- if (hasError(findConfigResults.diagnostics)) {
2473
- logger.printDiagnostics(findConfigResults.diagnostics);
2474
- return sys.exit(1);
2475
- }
2476
- const ensureDepsResults = await sys.ensureDependencies({
2477
- rootDir: findConfigResults.rootDir,
2478
- logger,
2479
- dependencies: dependencies,
2480
- });
2481
- if (hasError(ensureDepsResults.diagnostics)) {
2482
- logger.printDiagnostics(ensureDepsResults.diagnostics);
2483
- return sys.exit(1);
2484
- }
2485
- const coreCompiler = await loadCoreCompiler(sys);
2486
- if (task === 'version' || flags.version) {
2487
- console.log(coreCompiler.version);
2488
- return;
2489
- }
2490
- startupLogVersion(logger, task, coreCompiler);
2491
- loadedCompilerLog(sys, logger, flags, coreCompiler);
2492
- if (task === 'info') {
2493
- taskInfo(coreCompiler, sys, logger);
2494
- return;
2495
- }
2496
- const validated = await coreCompiler.loadConfig({
2497
- config: {
2498
- flags,
2499
- },
2500
- configPath: findConfigResults.configPath,
2501
- logger,
2502
- sys,
2503
- });
2504
- if (validated.diagnostics.length > 0) {
2505
- logger.printDiagnostics(validated.diagnostics);
2506
- if (hasError(validated.diagnostics)) {
2507
- return sys.exit(1);
2508
- }
2509
- }
2510
- if (isFunction(sys.applyGlobalPatch)) {
2511
- sys.applyGlobalPatch(validated.config.rootDir);
2512
- }
2513
- await sys.ensureResources({ rootDir: validated.config.rootDir, logger, dependencies: dependencies });
2514
- await telemetryAction(sys, validated.config, coreCompiler, async () => {
2515
- await runTask(coreCompiler, validated.config, task, sys);
2516
- });
2517
- }
2518
- catch (e) {
2519
- if (!shouldIgnoreError(e)) {
2520
- const details = `${logger.getLevel() === 'debug' && e instanceof Error ? e.stack : ''}`;
2521
- logger.error(`uncaught cli error: ${e}${details}`);
2522
- return sys.exit(1);
2523
- }
2524
- }
2525
- };
2526
- /**
2527
- * Run a specified task
2528
- * @param coreCompiler an instance of a minimal, bootstrap compiler for running the specified task
2529
- * @param config a configuration for the Stencil project to apply to the task run
2530
- * @param task the task to run
2531
- * @param sys the {@link CompilerSystem} for interacting with the operating system
2532
- * @public
2533
- */
2534
- const runTask = async (coreCompiler, config, task, sys) => {
2535
- var _a, _b, _c, _d, _e, _f;
2536
- const logger = (_a = config.logger) !== null && _a !== void 0 ? _a : createLogger();
2537
- const strictConfig = {
2538
- ...config,
2539
- flags: createConfigFlags((_b = config.flags) !== null && _b !== void 0 ? _b : { task }),
2540
- logger,
2541
- outputTargets: (_c = config.outputTargets) !== null && _c !== void 0 ? _c : [],
2542
- rootDir: (_d = config.rootDir) !== null && _d !== void 0 ? _d : '/',
2543
- sys: (_e = sys !== null && sys !== void 0 ? sys : config.sys) !== null && _e !== void 0 ? _e : coreCompiler.createSystem({ logger }),
2544
- testing: (_f = config.testing) !== null && _f !== void 0 ? _f : {},
2545
- };
2546
- switch (task) {
2547
- case 'build':
2548
- await taskBuild(coreCompiler, strictConfig);
2549
- break;
2550
- case 'docs':
2551
- await taskDocs(coreCompiler, strictConfig);
2552
- break;
2553
- case 'generate':
2554
- case 'g':
2555
- await taskGenerate(coreCompiler, strictConfig);
2556
- break;
2557
- case 'help':
2558
- await taskHelp(strictConfig.flags, strictConfig.logger, sys);
2559
- break;
2560
- case 'prerender':
2561
- await taskPrerender(coreCompiler, strictConfig);
2562
- break;
2563
- case 'serve':
2564
- await taskServe(strictConfig);
2565
- break;
2566
- case 'telemetry':
2567
- await taskTelemetry(strictConfig.flags, sys, strictConfig.logger);
2568
- break;
2569
- case 'test':
2570
- await taskTest(strictConfig);
2571
- break;
2572
- case 'version':
2573
- console.log(coreCompiler.version);
2574
- break;
2575
- default:
2576
- strictConfig.logger.error(`${strictConfig.logger.emoji('❌ ')}Invalid stencil command, please see the options below:`);
2577
- await taskHelp(strictConfig.flags, strictConfig.logger, sys);
2578
- return config.sys.exit(1);
2579
- }
2580
- };
2581
-
2582
- export { parseFlags, run, runTask };
2583
- //# sourceMappingURL=index.js.map