@postnord/pn-marketweb-components 1.0.49-beta3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/cjs/{index-9027dc96.js → index-28bbc937.js} +1 -1
  2. package/cjs/{index-0a6b1eef.js → index-e3e27c79.js} +6 -0
  3. package/cjs/loader.cjs.js +2 -2
  4. package/cjs/pn-bonus-progressbar-level.cjs.entry.js +1 -1
  5. package/cjs/pn-bonus-progressbar.cjs.entry.js +1 -1
  6. package/cjs/pn-choice-button.cjs.entry.js +1 -1
  7. package/cjs/pn-filter-checkbox.cjs.entry.js +1 -1
  8. package/cjs/pn-find-price-result.cjs.entry.js +3 -3
  9. package/cjs/{pn-find-price-store-346abc1a.js → pn-find-price-store-c6cb51c1.js} +4 -2
  10. package/cjs/pn-find-price.cjs.entry.js +19 -11
  11. package/cjs/pn-find-service-and-price-result.cjs.entry.js +3 -3
  12. package/cjs/{pn-find-service-and-price-store-914d170b.js → pn-find-service-and-price-store-16a7936c.js} +1 -1
  13. package/cjs/pn-find-service-and-price.cjs.entry.js +3 -3
  14. package/cjs/pn-language-selector_9.cjs.entry.js +65 -5
  15. package/cjs/pn-mainnav-link.cjs.entry.js +3 -3
  16. package/cjs/{pn-mainnav-store-f8bacb50.js → pn-mainnav-store-61a75ea0.js} +1 -1
  17. package/cjs/pn-market-web-components.cjs.js +2 -2
  18. package/cjs/pn-marketweb-search.cjs.entry.js +103 -0
  19. package/cjs/pn-marketweb-sitefooter.cjs.entry.js +1 -1
  20. package/cjs/pn-marketweb-siteheader.cjs.entry.js +6 -4
  21. package/cjs/pn-pex-pricefinder.cjs.entry.js +1 -1
  22. package/cjs/pn-product-card_3.cjs.entry.js +3 -3
  23. package/cjs/pn-product-pricelist-result.cjs.entry.js +3 -3
  24. package/cjs/{pn-product-pricelist-store-d101b50e.js → pn-product-pricelist-store-86310b5a.js} +1 -1
  25. package/cjs/pn-product-pricelist.cjs.entry.js +3 -3
  26. package/cjs/pn-product-tile_3.cjs.entry.js +1 -1
  27. package/cjs/pn-profile-selector-option.cjs.entry.js +1 -1
  28. package/cjs/pn-profile-selector.cjs.entry.js +1 -1
  29. package/cjs/pn-sidenav-level.cjs.entry.js +3 -3
  30. package/cjs/pn-sidenav-link.cjs.entry.js +3 -3
  31. package/cjs/{pn-sidenav-store-eed02285.js → pn-sidenav-store-d9bd9e00.js} +1 -1
  32. package/cjs/pn-sidenav.cjs.entry.js +3 -3
  33. package/cjs/pn-site-footer_2.cjs.entry.js +1 -1
  34. package/collection/collection-manifest.json +1 -1
  35. package/collection/components/input/{pn-filter-search/search-field.stories.js → pn-marketweb-search/marketweb-search-field.stories.js} +15 -3
  36. package/collection/components/input/{pn-filter-search/pn-filter-search.css → pn-marketweb-search/pn-marketweb-search.css} +4 -2
  37. package/collection/components/input/{pn-filter-search/pn-filter-search.js → pn-marketweb-search/pn-marketweb-search.js} +65 -7
  38. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search-store.js +9 -0
  39. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js +79 -3
  40. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +23 -3
  41. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +3 -3
  42. package/collection/components/widgets/pn-find-price/data.js +3 -1
  43. package/collection/components/widgets/pn-find-price/pn-find-price-store.js +3 -1
  44. package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +6 -2
  45. package/collection/components/widgets/pn-find-price/pn-find-price.css +23 -6
  46. package/collection/components/widgets/pn-find-price/pn-find-price.js +38 -31
  47. package/collection/components/widgets/pn-product-card/pn-product-card-info.js +2 -2
  48. package/custom-elements/index.d.ts +6 -6
  49. package/custom-elements/index.js +221 -115
  50. package/esm/{index-70b099b5.js → index-5397620b.js} +7 -1
  51. package/esm/{index-d3007e8f.js → index-7b21ecff.js} +1 -1
  52. package/esm/loader.js +2 -2
  53. package/esm/pn-bonus-progressbar-level.entry.js +1 -1
  54. package/esm/pn-bonus-progressbar.entry.js +1 -1
  55. package/esm/pn-choice-button.entry.js +1 -1
  56. package/esm/pn-filter-checkbox.entry.js +1 -1
  57. package/esm/pn-find-price-result.entry.js +3 -3
  58. package/esm/{pn-find-price-store-24d31717.js → pn-find-price-store-c857dbc4.js} +4 -2
  59. package/esm/pn-find-price.entry.js +19 -11
  60. package/esm/pn-find-service-and-price-result.entry.js +3 -3
  61. package/esm/{pn-find-service-and-price-store-012f2e49.js → pn-find-service-and-price-store-65df46a0.js} +1 -1
  62. package/esm/pn-find-service-and-price.entry.js +3 -3
  63. package/esm/pn-language-selector_9.entry.js +79 -19
  64. package/esm/pn-mainnav-link.entry.js +3 -3
  65. package/esm/{pn-mainnav-store-395ee066.js → pn-mainnav-store-28571e54.js} +1 -1
  66. package/esm/pn-market-web-components.js +2 -2
  67. package/esm/pn-marketweb-search.entry.js +99 -0
  68. package/esm/pn-marketweb-sitefooter.entry.js +1 -1
  69. package/esm/pn-marketweb-siteheader.entry.js +6 -4
  70. package/esm/pn-pex-pricefinder.entry.js +1 -1
  71. package/esm/pn-product-card_3.entry.js +3 -3
  72. package/esm/pn-product-pricelist-result.entry.js +3 -3
  73. package/esm/{pn-product-pricelist-store-909c5238.js → pn-product-pricelist-store-2c336043.js} +1 -1
  74. package/esm/pn-product-pricelist.entry.js +3 -3
  75. package/esm/pn-product-tile_3.entry.js +1 -1
  76. package/esm/pn-profile-selector-option.entry.js +1 -1
  77. package/esm/pn-profile-selector.entry.js +1 -1
  78. package/esm/pn-sidenav-level.entry.js +3 -3
  79. package/esm/pn-sidenav-link.entry.js +3 -3
  80. package/esm/{pn-sidenav-store-f0db4a1f.js → pn-sidenav-store-50b186d6.js} +1 -1
  81. package/esm/pn-sidenav.entry.js +3 -3
  82. package/esm/pn-site-footer_2.entry.js +1 -1
  83. package/esm-es5/{index-70b099b5.js → index-5397620b.js} +1 -1
  84. package/esm-es5/{index-d3007e8f.js → index-7b21ecff.js} +1 -1
  85. package/esm-es5/loader.js +1 -1
  86. package/esm-es5/pn-bonus-progressbar-level.entry.js +1 -1
  87. package/esm-es5/pn-bonus-progressbar.entry.js +1 -1
  88. package/esm-es5/pn-choice-button.entry.js +1 -1
  89. package/esm-es5/pn-filter-checkbox.entry.js +1 -1
  90. package/esm-es5/pn-find-price-result.entry.js +1 -1
  91. package/esm-es5/pn-find-price-store-c857dbc4.js +1 -0
  92. package/esm-es5/pn-find-price.entry.js +1 -1
  93. package/esm-es5/pn-find-service-and-price-result.entry.js +1 -1
  94. package/esm-es5/{pn-find-service-and-price-store-012f2e49.js → pn-find-service-and-price-store-65df46a0.js} +1 -1
  95. package/esm-es5/pn-find-service-and-price.entry.js +1 -1
  96. package/esm-es5/pn-language-selector_9.entry.js +1 -1
  97. package/esm-es5/pn-mainnav-link.entry.js +1 -1
  98. package/esm-es5/{pn-mainnav-store-395ee066.js → pn-mainnav-store-28571e54.js} +1 -1
  99. package/esm-es5/pn-market-web-components.js +1 -1
  100. package/esm-es5/pn-marketweb-search.entry.js +1 -0
  101. package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
  102. package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
  103. package/esm-es5/pn-pex-pricefinder.entry.js +1 -1
  104. package/esm-es5/pn-product-card_3.entry.js +1 -1
  105. package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
  106. package/esm-es5/{pn-product-pricelist-store-909c5238.js → pn-product-pricelist-store-2c336043.js} +1 -1
  107. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  108. package/esm-es5/pn-product-tile_3.entry.js +1 -1
  109. package/esm-es5/pn-profile-selector-option.entry.js +1 -1
  110. package/esm-es5/pn-profile-selector.entry.js +1 -1
  111. package/esm-es5/pn-sidenav-level.entry.js +1 -1
  112. package/esm-es5/pn-sidenav-link.entry.js +1 -1
  113. package/esm-es5/{pn-sidenav-store-f0db4a1f.js → pn-sidenav-store-50b186d6.js} +1 -1
  114. package/esm-es5/pn-sidenav.entry.js +1 -1
  115. package/esm-es5/pn-site-footer_2.entry.js +1 -1
  116. package/package.json +1 -1
  117. package/pn-market-web-components/{p-b49c9d34.system.entry.js → p-01fbbbbc.system.entry.js} +1 -1
  118. package/pn-market-web-components/{p-7ce21cb3.system.js → p-02ea55ad.system.js} +1 -1
  119. package/pn-market-web-components/{p-24df62a2.js → p-0cacf9fb.js} +1 -1
  120. package/pn-market-web-components/{p-b2fb1162.entry.js → p-0cff4955.entry.js} +1 -1
  121. package/pn-market-web-components/{p-1ccd3831.entry.js → p-0fe71e75.entry.js} +1 -1
  122. package/pn-market-web-components/{p-d26967cb.entry.js → p-10b95894.entry.js} +1 -1
  123. package/pn-market-web-components/p-13eb4c66.system.entry.js +1 -0
  124. package/pn-market-web-components/{p-9aac6bd5.entry.js → p-15112837.entry.js} +1 -1
  125. package/pn-market-web-components/{p-69b751a8.system.entry.js → p-1ce871c5.system.entry.js} +1 -1
  126. package/pn-market-web-components/p-2239befa.system.entry.js +1 -0
  127. package/pn-market-web-components/{p-d546d0c3.entry.js → p-227e1d46.entry.js} +1 -1
  128. package/pn-market-web-components/{p-39760c45.system.entry.js → p-2718b89a.system.entry.js} +1 -1
  129. package/pn-market-web-components/{p-702f06b7.system.entry.js → p-2870b0c5.system.entry.js} +1 -1
  130. package/pn-market-web-components/p-36654f2a.system.js +1 -0
  131. package/pn-market-web-components/{p-b4596c84.system.entry.js → p-38c4be82.system.entry.js} +1 -1
  132. package/pn-market-web-components/p-3ddbc14c.entry.js +1 -0
  133. package/pn-market-web-components/{p-5d34bb8f.system.entry.js → p-401b57b1.system.entry.js} +1 -1
  134. package/pn-market-web-components/{p-7598c3ac.entry.js → p-40264b65.entry.js} +1 -1
  135. package/pn-market-web-components/{p-aea09ac6.entry.js → p-51df9292.entry.js} +1 -1
  136. package/pn-market-web-components/{p-a439468a.system.entry.js → p-57cc0679.system.entry.js} +1 -1
  137. package/pn-market-web-components/p-58e8d7d5.js +1 -0
  138. package/pn-market-web-components/{p-3ba257c5.entry.js → p-5c41acb2.entry.js} +1 -1
  139. package/pn-market-web-components/{p-42da096a.system.entry.js → p-625fb7fb.system.entry.js} +1 -1
  140. package/pn-market-web-components/p-67887512.system.js +1 -0
  141. package/pn-market-web-components/p-6b505c69.entry.js +1 -0
  142. package/pn-market-web-components/{p-31ecebd2.system.js → p-6fab218d.system.js} +1 -1
  143. package/pn-market-web-components/{p-544f8fb9.entry.js → p-715d1ef7.entry.js} +1 -1
  144. package/pn-market-web-components/{p-4d5aa13e.entry.js → p-774b7a9f.entry.js} +1 -1
  145. package/pn-market-web-components/{p-802afa1f.system.entry.js → p-7b93d570.system.entry.js} +1 -1
  146. package/pn-market-web-components/{p-56ba3951.entry.js → p-7d75ea68.entry.js} +1 -1
  147. package/pn-market-web-components/{p-acd9d186.system.entry.js → p-8144bcbc.system.entry.js} +1 -1
  148. package/pn-market-web-components/{p-ac5a749b.entry.js → p-81d764a0.entry.js} +1 -1
  149. package/pn-market-web-components/p-825b8fb8.system.js +1 -0
  150. package/pn-market-web-components/{p-99e471b8.js → p-84699999.js} +1 -1
  151. package/pn-market-web-components/{p-ab699e09.entry.js → p-86b271f4.entry.js} +1 -1
  152. package/pn-market-web-components/p-86f06e26.js +1 -0
  153. package/pn-market-web-components/{p-38e0dc75.system.entry.js → p-885bc8d7.system.entry.js} +1 -1
  154. package/pn-market-web-components/p-89ef9dad.system.entry.js +1 -0
  155. package/pn-market-web-components/p-a5bc1695.system.js +1 -0
  156. package/pn-market-web-components/{p-b4f843da.system.js → p-a5f75560.system.js} +1 -1
  157. package/pn-market-web-components/{p-8897e421.entry.js → p-adc639c8.entry.js} +1 -1
  158. package/pn-market-web-components/{p-6fea1ae6.system.js → p-add7d76c.system.js} +1 -1
  159. package/pn-market-web-components/{p-9ae8e043.js → p-ae2bd55f.js} +1 -1
  160. package/pn-market-web-components/{p-2c361d9e.system.entry.js → p-aeb26d10.system.entry.js} +1 -1
  161. package/pn-market-web-components/{p-3552ae09.entry.js → p-b4f0228c.entry.js} +1 -1
  162. package/pn-market-web-components/{p-801709a3.system.entry.js → p-b82f45b9.system.entry.js} +1 -1
  163. package/pn-market-web-components/p-bb626ab4.js +1 -0
  164. package/pn-market-web-components/p-c0c52dc6.entry.js +1 -0
  165. package/pn-market-web-components/{p-8325d608.entry.js → p-c240b614.entry.js} +1 -1
  166. package/pn-market-web-components/{p-da2fa398.system.entry.js → p-c418bb48.system.entry.js} +1 -1
  167. package/pn-market-web-components/{p-71a31b15.entry.js → p-c7c3361a.entry.js} +1 -1
  168. package/pn-market-web-components/{p-3f8b459a.system.entry.js → p-d46d9b6e.system.entry.js} +1 -1
  169. package/pn-market-web-components/{p-0b796318.system.entry.js → p-d7776336.system.entry.js} +1 -1
  170. package/pn-market-web-components/{p-7fca7510.entry.js → p-e056d2c6.entry.js} +1 -1
  171. package/pn-market-web-components/p-e474b831.entry.js +1 -0
  172. package/pn-market-web-components/{p-d8e0e2e5.entry.js → p-f0a468ef.entry.js} +1 -1
  173. package/pn-market-web-components/p-f20380fb.js +1 -0
  174. package/pn-market-web-components/p-f4cb2104.system.entry.js +1 -0
  175. package/pn-market-web-components/{p-87a4810e.system.entry.js → p-f5f1287a.system.entry.js} +1 -1
  176. package/pn-market-web-components/{p-00d6033e.entry.js → p-f774e2cc.entry.js} +1 -1
  177. package/pn-market-web-components/{p-4f0f8e9f.system.entry.js → p-f7b013a7.system.entry.js} +1 -1
  178. package/pn-market-web-components/{p-2b120338.system.entry.js → p-fc1083d2.system.entry.js} +1 -1
  179. package/pn-market-web-components/{p-b4a0e5fd.system.entry.js → p-fc41fcf6.system.entry.js} +1 -1
  180. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  181. package/pn-market-web-components/pn-market-web-components.js +1 -1
  182. package/types/components/input/{pn-filter-search/pn-filter-search.d.ts → pn-marketweb-search/pn-marketweb-search.d.ts} +9 -1
  183. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search-store.d.ts +11 -0
  184. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.d.ts +6 -0
  185. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts +1 -0
  186. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.d.ts +2 -0
  187. package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +4 -0
  188. package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +4 -0
  189. package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +2 -0
  190. package/types/components.d.ts +77 -65
  191. package/cjs/pn-filter-search.cjs.entry.js +0 -69
  192. package/esm/pn-filter-search.entry.js +0 -65
  193. package/esm-es5/pn-filter-search.entry.js +0 -1
  194. package/esm-es5/pn-find-price-store-24d31717.js +0 -1
  195. package/pn-market-web-components/p-15836764.js +0 -1
  196. package/pn-market-web-components/p-208a0a7b.entry.js +0 -1
  197. package/pn-market-web-components/p-31f9d513.system.entry.js +0 -1
  198. package/pn-market-web-components/p-478705d2.entry.js +0 -1
  199. package/pn-market-web-components/p-4c9b1ae9.system.js +0 -1
  200. package/pn-market-web-components/p-5cfed9ad.js +0 -1
  201. package/pn-market-web-components/p-66fb0f57.entry.js +0 -1
  202. package/pn-market-web-components/p-7a7f380b.system.js +0 -1
  203. package/pn-market-web-components/p-ad5b20ce.js +0 -1
  204. package/pn-market-web-components/p-b4b6ab95.system.js +0 -1
  205. package/pn-market-web-components/p-cf516409.js +0 -1
  206. package/pn-market-web-components/p-cfa3be4a.entry.js +0 -1
  207. package/pn-market-web-components/p-dc48d8f8.system.entry.js +0 -1
  208. package/pn-market-web-components/p-e732c60a.system.entry.js +0 -1
  209. package/pn-market-web-components/p-fbdc9ea5.system.entry.js +0 -1
  210. package/pn-market-web-components/p-ff678bef.system.js +0 -1
@@ -0,0 +1,103 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-e3e27c79.js');
6
+
7
+ const pnMarketwebSearchCss = ":host{display:-ms-inline-flexbox;display:inline-flex}:host>pn-button{margin-left:0.35em}:host>pn-button button .pn-button-bg{-webkit-transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, left 0.2s, -webkit-box-shadow 0.1s, -webkit-transform 0.2s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, left 0.2s, -webkit-box-shadow 0.1s, -webkit-transform 0.2s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, box-shadow 0.1s, left 0.2s, transform 0.2s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, box-shadow 0.1s, left 0.2s, transform 0.2s, -webkit-box-shadow 0.1s, -webkit-transform 0.2s}:host>pn-button[data-loading=true] .pn-button-bg{left:0;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, -webkit-box-shadow 0.1s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, -webkit-box-shadow 0.1s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, box-shadow 0.1s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, box-shadow 0.1s, -webkit-box-shadow 0.1s}:host>pn-button[data-loading=true] pn-spinner{left:0.75em}:host input{padding:0.75em;min-height:3em;font-size:1em;height:100%;font-weight:500;-webkit-font-smoothing:antialiased;outline:none;border-radius:3em;border:0.1rem solid #5E554A;-webkit-transition:border 0.15s, -webkit-box-shadow 0.15s;transition:border 0.15s, -webkit-box-shadow 0.15s;transition:box-shadow 0.15s, border 0.15s;transition:box-shadow 0.15s, border 0.15s, -webkit-box-shadow 0.15s;color:#000000;width:100%}:host input::-webkit-search-cancel-button{display:none}:host input::-webkit-input-placeholder{color:#969087;font-weight:normal}:host input::-moz-placeholder{color:#969087;font-weight:normal}:host input:-ms-input-placeholder{color:#969087;font-weight:normal}:host input::-ms-input-placeholder{color:#969087;font-weight:normal}:host input::placeholder{color:#969087;font-weight:normal}:host input:focus{border:0.1rem solid #005D92;-webkit-box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92}:host input:hover{border:0.1rem solid #00A0D6}:host input:disabled{background:#F3F2F2;border:none}:host>.input-container{width:100%;position:relative}:host>.input-container .button-container{position:absolute;top:0;right:0;background:transparent;width:3em;height:100%;overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host>.input-container button{position:absolute;left:50%;top:50%;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%);background:none;border:none;color:#005D92;padding:0.3rem;margin:0;font-size:0.875em;border-radius:50%;outline:none;-webkit-transition:border 0.1s, background 0.2s, opacity 0.2s, -webkit-box-shadow 0.1s, -webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:border 0.1s, background 0.2s, opacity 0.2s, -webkit-box-shadow 0.1s, -webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:border 0.1s, background 0.2s, box-shadow 0.1s, transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s, opacity 0.2s;transition:border 0.1s, background 0.2s, box-shadow 0.1s, transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s, opacity 0.2s, -webkit-box-shadow 0.1s, -webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;border:0.1rem solid transparent;-webkit-tap-highlight-color:transparent}:host>.input-container button.clear,:host>.input-container button.search{cursor:pointer}:host>.input-container button:focus{-webkit-box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92}:host>.input-container button:hover,:host>.input-container button:focus{background:#E0F8FF}:host>.input-container button:active{background:#005D92}:host>.input-container button:active pn-icon svg,:host>.input-container button:active pn-icon svg path{fill:white}:host.searching button.search{-webkit-transform:translate(150%, -50%);transform:translate(150%, -50%)}:host.searching button.clear{-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}:host.button-none input,:host.button-icon-inline input{padding-right:3.3em}:host.button-none pn-spinner,:host.button-icon-inline pn-spinner{position:absolute;left:50%;top:50%;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%);-webkit-transition:-webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:-webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s, -webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s}:host.button-none button.search,:host.button-icon-inline button.search{-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}:host.button-none.loading button,:host.button-icon-inline.loading button{-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host.button-none.loading pn-spinner,:host.button-icon-inline.loading pn-spinner{-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}:host.button-none.searching button.search{-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host.button-icon>pn-button[data-loading=true] .pn-button-bg{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}";
8
+
9
+ let PnMarketwebSearch = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.search = index.createEvent(this, "search", 7);
13
+ this.update = index.createEvent(this, "update", 7);
14
+ this.disabled = false;
15
+ this.placeholder = null;
16
+ this.inputid = null;
17
+ this.name = null;
18
+ this.autocomplete = null;
19
+ this.list = null;
20
+ this.value = null;
21
+ /** Label for the button */
22
+ this.label = null;
23
+ /** Loading animation */
24
+ this.loading = false;
25
+ /** Button type, options are 'none' for no button, 'icon' for a labelless button with just a search icon and 'icon-inline' for a search button inside of the search field (this last option disables the clear field button) */
26
+ this.button = '';
27
+ /** Light instead of dark search button */
28
+ this.light = false;
29
+ this.suggestionObserver = null;
30
+ this.hasClonedInput = false;
31
+ this.listSuggestion = [];
32
+ }
33
+ inputHandler() {
34
+ this.update.emit(this.value);
35
+ }
36
+ emitSearch(e) {
37
+ if (e.type === 'click' ||
38
+ (e.type === 'keydown' && e.key === 'Enter')) {
39
+ // We prevent the native search event since it's not supported in IE and FF, then we emit our own instead
40
+ e.preventDefault();
41
+ this.search.emit(this.value);
42
+ }
43
+ }
44
+ setVal(e) {
45
+ this.value = e.target.value;
46
+ }
47
+ clearInput() {
48
+ this.value = '';
49
+ this.update.emit(this.value);
50
+ this.hostElement.querySelector('input').focus();
51
+ }
52
+ getClassNames() {
53
+ let classNames = '';
54
+ const buttonTypes = ['none', 'icon', 'icon-inline'];
55
+ if (this.value)
56
+ classNames += 'searching ';
57
+ if (this.loading)
58
+ classNames += 'loading ';
59
+ if (buttonTypes.includes(this.button))
60
+ classNames += `button-${this.button} `;
61
+ return classNames;
62
+ }
63
+ componentWillRender() {
64
+ this.cloneListContent();
65
+ this.autocompleteEventBinding();
66
+ }
67
+ onSuggestionUpdate() {
68
+ this.cloneListContent();
69
+ }
70
+ autocompleteEventBinding() {
71
+ if (this.suggestionObserver !== null || !this.list || (!this.hostElement) || !document.getElementById(this.list)) {
72
+ return;
73
+ }
74
+ const targetNode = document.getElementById(this.list);
75
+ this.suggestionObserver = new MutationObserver(this.onSuggestionUpdate.bind(this));
76
+ this.suggestionObserver.observe(targetNode, { attributes: true, childList: true, subtree: true });
77
+ }
78
+ cloneListContent() {
79
+ if (!this.list || (!this.hostElement) || !document.getElementById(this.list)) {
80
+ return;
81
+ }
82
+ const options = [...document.getElementById(this.list).querySelectorAll('option')];
83
+ this.listSuggestion = options.map((item) => {
84
+ if (item.hasAttribute('value')) {
85
+ return item.getAttribute('value');
86
+ }
87
+ return item.innerText;
88
+ });
89
+ }
90
+ render() {
91
+ return (index.h(index.Host, { class: this.getClassNames() }, index.h("div", { class: "input-container" }, index.h("input", { type: "search", value: this.value, id: this.inputid, name: this.name, placeholder: this.placeholder, disabled: this.disabled, autocomplete: this.autocomplete, list: this.list, onKeyDown: (e) => this.emitSearch(e), onInput: (e) => this.setVal(e) }), index.h("div", { class: "button-container" }, (this.button === 'none' || this.button === 'icon-inline') &&
92
+ index.h("button", { class: "search", tabindex: this.button === 'icon-inline' ? '0' : '-1', onClick: (e) => this.emitSearch(e), "aria-label": "search", title: "search" }, index.h("pn-icon", { symbol: "search", color: "blue700" })), (this.button !== 'icon-inline') &&
93
+ index.h("button", { class: "clear", "aria-label": "clear", title: "clear search field", tabindex: this.value && (!this.loading || this.button !== 'none') ? '0' : '-1', onClick: () => this.clearInput() }, index.h("pn-icon", { symbol: "close-small", color: "blue700" })), this.button === 'none' || this.button === 'icon-inline' && index.h("pn-spinner", null))), (this.button !== 'none' && this.button !== 'icon-inline') &&
94
+ index.h("pn-button", { onClick: (e) => this.emitSearch(e), loading: this.loading, icon: "search", appearance: this.light ? 'light' : 'dark', "icon-only": this.button === 'icon' }, this.label), (this.list) &&
95
+ index.h("datalist", { id: this.list }, this.listSuggestion.map((item) => {
96
+ return (index.h("option", null, item));
97
+ }))));
98
+ }
99
+ get hostElement() { return index.getElement(this); }
100
+ };
101
+ PnMarketwebSearch.style = pnMarketwebSearchCss;
102
+
103
+ exports.pn_marketweb_search = PnMarketwebSearch;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
5
+ const index = require('./index-e3e27c79.js');
6
6
  const FetchHelper = require('./FetchHelper-33d3c535.js');
7
7
 
8
8
  const translations = {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
5
+ const index = require('./index-e3e27c79.js');
6
6
  const FetchHelper = require('./FetchHelper-33d3c535.js');
7
7
  const MarketWebLoginManager = require('./MarketWebLoginManager-3c2f4423.js');
8
8
 
@@ -82,6 +82,8 @@ let PnMarketwebSiteheader = class {
82
82
  this.hideSearch = false;
83
83
  /** Hides the login if set to true*/
84
84
  this.hideLogin = false;
85
+ /** Autocomplete endpoint */
86
+ this.AutocompleteEndpoint = "";
85
87
  /** Forward session to backend */
86
88
  this.sessionForward = false;
87
89
  /** If the component should use cached requests */
@@ -94,7 +96,7 @@ let PnMarketwebSiteheader = class {
94
96
  // Menu state
95
97
  this.menuItems = [];
96
98
  // Search
97
- this.search = {};
99
+ this.search = { AutocompleteEndpoint: this.AutocompleteEndpoint };
98
100
  // Site selector
99
101
  this.siteSelector = null;
100
102
  // Language Selector
@@ -208,7 +210,7 @@ let PnMarketwebSiteheader = class {
208
210
  });
209
211
  }
210
212
  // Set search
211
- this.search = data.search;
213
+ this.search = Object.assign(Object.assign({}, data.search), { AutocompleteEndpoint: this.AutocompleteEndpoint });
212
214
  // Set site selector
213
215
  this.siteSelector = data.siteSelectorViewModel;
214
216
  // Set language selector
@@ -312,7 +314,7 @@ let PnMarketwebSiteheader = class {
312
314
  })), index.h("div", { slot: "footer", class: "siteheader-menu-footer" }, (this.gotData && this.loginDialog && !this.hideLogin) && (index.h("pn-marketweb-siteheader-login", { emitEvents: false, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
313
315
  index.h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => index.h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))), !this.hideSiteSelector &&
314
316
  index.h("pn-site-selector", { language: this.language }, (this.gotData && ((_e = this.siteSelector) === null || _e === void 0 ? void 0 : _e.currentSiteTitle)) &&
315
- index.h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle, description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_f = this.siteSelector) === null || _f === void 0 ? void 0 : _f.siteSelections)) && this.siteSelector.siteSelections.map((site) => index.h("pn-site-selector-item", { heading: site.linkText, description: site.linkDescription, url: site.pageLink, newwindow: site.openInNewWindow })))), index.h("div", { slot: "top", class: "siteheader-menu-top" }, index.h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, i18n: this.i18n })))))), index.h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, "show-only-link": this.minimizeSearch, i18n: this.i18n })))));
317
+ index.h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle, description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_f = this.siteSelector) === null || _f === void 0 ? void 0 : _f.siteSelections)) && this.siteSelector.siteSelections.map((site) => index.h("pn-site-selector-item", { heading: site.linkText, description: site.linkDescription, url: site.pageLink, newwindow: site.openInNewWindow })))), index.h("div", { slot: "top", class: "siteheader-menu-top" }, index.h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, i18n: this.i18n })))))), index.h("pn-marketweb-siteheader-search", { primary: true, search: this.search, "hide-search": this.hideSearch, "show-only-link": this.minimizeSearch, i18n: this.i18n })))));
316
318
  }
317
319
  get hostElement() { return index.getElement(this); }
318
320
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
5
+ const index = require('./index-e3e27c79.js');
6
6
 
7
7
  const translations = {
8
8
  'sv': {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
5
+ const index = require('./index-e3e27c79.js');
6
6
 
7
7
  const pnProductCardCss = "pn-product-card{margin-bottom:1em;border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;padding:1.5em;word-break:break-word;text-decoration:none;border-radius:0.8rem}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.5em}pn-product-card [slot=title]>[slot=Biligast]{color:#005E41;background:#DCF6E7;border-radius:0.37em;width:6.3em;height:2em;margin-left:1.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding-top:0.25em}pn-product-card [slot=title]>[slot=Biligast] pn-icon{vertical-align:middle;margin-left:0.6em}pn-product-card [slot=title]>[slot=Snabbast]{background:#E0F8FF;color:#005D92;border-radius:0.37em;width:7em;height:2em;margin-left:1.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding-top:0.25em}pn-product-card [slot=title]>[slot=Snabbast] pn-icon{vertical-align:middle;margin-left:0.6em}pn-product-card [slot=note]{margin-top:1em;margin-bottom:1em}pn-product-card [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-card .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-card [slot=cardprice]{display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card .info>*{min-width:6em;margin:0.5em 2em 0.5em 0}";
8
8
 
@@ -23,10 +23,10 @@ let PnProductCardInfo = class {
23
23
  index.registerInstance(this, hostRef);
24
24
  }
25
25
  render() {
26
- return (this.label) ? (index.h(index.Host, null, index.h("div", { class: "cardinfocontent" }, (this.text) ? (index.h("pre", { slot: "formatPre" }, this.text)) : null))) : (index.h(index.Host, null, index.h("div", { class: "cardinfocontent" }, index.h("div", null, index.h("h4", null, "Paket:"), this.paket.split("/").map((item) => ((item.split(":").length > 0) ?
26
+ return (this.label) ? (index.h(index.Host, null, index.h("div", { class: "cardinfocontent" }, (this.text) ? (index.h("pre", { slot: "formatPre" }, this.text)) : null))) : (index.h(index.Host, null, index.h("div", { class: "cardinfocontent" }, index.h("div", null, index.h("strong", null, "Paket:"), this.paket.split("/").map((item) => ((item.split(":").length > 0) ?
27
27
  index.h("p", null, index.h("strong", null, item.split(":")[0] + ": "), " ", item.split(":")[1]) :
28
28
  index.h("p", null, item)))), index.h("div", { id: "sp" }), (this.rulle) ?
29
- (index.h("div", null, index.h("h4", null, "Rulle:"), this.rulle.split("/").map((item) => ((item.split(":").length > 0) ?
29
+ (index.h("div", null, index.h("strong", null, "Rulle:"), this.rulle.split("/").map((item) => ((item.split(":").length > 0) ?
30
30
  index.h("p", null, index.h("strong", null, item.split(":")[0] + ": "), " ", item.split(":")[1]) :
31
31
  index.h("p", null, item))))) : null)));
32
32
  }
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
6
- const pnProductPricelistStore = require('./pn-product-pricelist-store-d101b50e.js');
7
- require('./index-9027dc96.js');
5
+ const index = require('./index-e3e27c79.js');
6
+ const pnProductPricelistStore = require('./pn-product-pricelist-store-86310b5a.js');
7
+ require('./index-28bbc937.js');
8
8
 
9
9
  const pnProductPricelistResultCss = "";
10
10
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-9027dc96.js');
3
+ const index = require('./index-28bbc937.js');
4
4
 
5
5
  // Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
6
6
  const { state, onChange } = index.createStore({
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
5
+ const index = require('./index-e3e27c79.js');
6
6
  const convert = require('./convert-362ef5e6.js');
7
- const pnProductPricelistStore = require('./pn-product-pricelist-store-d101b50e.js');
8
- require('./index-9027dc96.js');
7
+ const pnProductPricelistStore = require('./pn-product-pricelist-store-86310b5a.js');
8
+ require('./index-28bbc937.js');
9
9
 
10
10
  const translations = {
11
11
  'sv': {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
5
+ const index = require('./index-e3e27c79.js');
6
6
 
7
7
  const pnProductTileCss = "pn-product-tile{margin-bottom:1em;border:0.1rem solid #D3CECB;outline:none;background:white;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;padding:1.5em;word-break:break-word;text-decoration:none;border-radius:0.8rem}pn-product-tile [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:0.5em}pn-product-tile>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-tile .tilecontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-tile .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-tile .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;max-width:66.6666666667%;-ms-flex-flow:wrap;flex-flow:wrap}pn-product-tile .info>*{min-width:6em;margin:0.2em 1em 0.2em 0}";
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
5
+ const index = require('./index-e3e27c79.js');
6
6
 
7
7
  const pnProfileSelectorOptionCss = "pn-profile-selector-option{display:-ms-flexbox;display:flex;width:100%;border-bottom:1px solid #D3CECB;padding:1.2rem 0}pn-profile-selector-option:first-of-type{margin-top:2.4rem}pn-profile-selector-option:last-of-type{border-bottom:0;padding-bottom:0}pn-profile-selector-option:last-of-type .profileselectoroption{padding-bottom:0}.profileselectoroption{display:-ms-flexbox;display:flex;width:100%;padding:1.2rem 0;text-decoration:none}.profileselectoroption pn-icon{-ms-flex-item-align:center;align-self:center;position:relative;-webkit-transform:translateX(-1rem);transform:translateX(-1rem);-webkit-transition:-webkit-transform 0.25s linear;transition:-webkit-transform 0.25s linear;transition:transform 0.25s linear;transition:transform 0.25s linear, -webkit-transform 0.25s linear}.profileselectoroption:hover .profileselectoroption-name,.profileselectoroption:focus .profileselectoroption-name,.profileselectoroption:active .profileselectoroption-name{text-decoration:underline}.profileselectoroption:hover pn-icon,.profileselectoroption:focus pn-icon,.profileselectoroption:active pn-icon{-webkit-transform:none;transform:none;-webkit-transition-timing-function:ease;transition-timing-function:ease}.profileselectoroption-text{-ms-flex-positive:1;flex-grow:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.profileselectoroption-name{font-size:1em;color:#005D92;font-weight:700}.profileselectoroption-identifier{color:#5E554A;font-size:0.75em}";
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
5
+ const index = require('./index-e3e27c79.js');
6
6
 
7
7
  const translations = {
8
8
  'sv': {
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
6
- const pnSidenavStore = require('./pn-sidenav-store-eed02285.js');
7
- require('./index-9027dc96.js');
5
+ const index = require('./index-e3e27c79.js');
6
+ const pnSidenavStore = require('./pn-sidenav-store-d9bd9e00.js');
7
+ require('./index-28bbc937.js');
8
8
 
9
9
  const pnSidenavLevelCss = "pn-sidenav-level{display:block;-ms-flex-preferred-size:100%;flex-basis:100%}pn-sidenav-level[data-level=\"2\"]{padding-left:2.5em;overflow:hidden;-webkit-transition:max-height ease 0.2s;transition:max-height ease 0.2s;max-height:40em}pn-sidenav-level[data-level=\"2\"][aria-hidden=true]{max-height:0}";
10
10
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
6
- const pnSidenavStore = require('./pn-sidenav-store-eed02285.js');
7
- require('./index-9027dc96.js');
5
+ const index = require('./index-e3e27c79.js');
6
+ const pnSidenavStore = require('./pn-sidenav-store-d9bd9e00.js');
7
+ require('./index-28bbc937.js');
8
8
 
9
9
  const pnSidenavLinkCss = "pn-sidenav-link{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.pn-sidenav-link{font-weight:normal;position:relative;border:0 none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:transparent;color:#005D92;font-size:1em;padding:1.1rem 1.5rem 1.1rem;overflow:hidden;text-decoration:none;cursor:pointer;-ms-flex-positive:1;flex-grow:1}.pn-sidenav-link::before{content:\"\";display:block;width:0.4rem;border-top-right-radius:0.3rem;border-bottom-right-radius:0.3rem;height:100%;position:absolute;left:0;top:0;bottom:0;-webkit-transform:translateX(-0.4rem);transform:translateX(-0.4rem);background:#005D92;-webkit-transition:-webkit-transform linear 0.35s;transition:-webkit-transform linear 0.35s;transition:transform linear 0.35s;transition:transform linear 0.35s, -webkit-transform linear 0.35s}.pn-sidenav-link:hover,.pn-sidenav-link:focus,[current=true]>.pn-sidenav-link{background-color:#E0F8FF;color:#005D92;outline:0;-webkit-box-shadow:none;box-shadow:none}.pn-sidenav-link:hover::before,.pn-sidenav-link:focus::before,[current=true]>.pn-sidenav-link::before{-webkit-transform:none;transform:none}.pn-sidenav-link:active{background-color:#F3F2F2;color:#00A0D6;-webkit-box-shadow:none;box-shadow:none}.pn-sidenav-link>pn-icon{padding-right:1em}.pn-sidenav-link-expand{margin-left:auto;border:0;font-size:1em;background:transparent;outline:0;padding:0 1em 0 0.5em;cursor:pointer}.pn-sidenav-link-expand:hover,.pn-sidenav-link-expand:focus,[current=true]>.pn-sidenav-link-expand{background-color:#E0F8FF;color:#005D92;outline:0;-webkit-box-shadow:none;box-shadow:none}.pn-sidenav-link-expand:hover::before,.pn-sidenav-link-expand:focus::before,[current=true]>.pn-sidenav-link-expand::before{-webkit-transform:none;transform:none}button>.pn-sidenav-link-expand{padding-right:0}.pn-sidenav-link-expand pn-icon{width:14px}";
10
10
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-9027dc96.js');
3
+ const index = require('./index-28bbc937.js');
4
4
 
5
5
  // Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
6
6
  const { state, onChange } = index.createStore({
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
6
- const pnSidenavStore = require('./pn-sidenav-store-eed02285.js');
7
- require('./index-9027dc96.js');
5
+ const index = require('./index-e3e27c79.js');
6
+ const pnSidenavStore = require('./pn-sidenav-store-d9bd9e00.js');
7
+ require('./index-28bbc937.js');
8
8
 
9
9
  const translations = {
10
10
  'sv': {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a6b1eef.js');
5
+ const index = require('./index-e3e27c79.js');
6
6
 
7
7
  const pnSiteFooterCss = "pn-site-footer{display:block;line-height:1.5}pn-site-footer a{color:#005D92}pn-site-footer a:hover{color:#0D234B;text-decoration:underline}pn-site-footer h3{font-size:2.4rem;margin-bottom:0.5rem;line-height:1.2}pn-site-footer p{font-size:1.6rem}pn-site-footer ul.social-media{display:-ms-flexbox;display:flex;-ms-flex-flow:row;flex-flow:row}pn-site-footer ul.social-media li{margin-right:1.6rem}pn-site-footer>svg{display:block}pn-site-footer>div{background:#F3F2F2}.pn-sitefooter-top{display:-ms-flexbox;display:flex}.pn-sitefooter-cols{-ms-flex-item-align:center;align-self:center;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;margin:0 auto;max-width:90em}.pn-sitefooter-bottom [slot=bottom]{max-width:90em;margin:0 auto;padding:1.6rem 0;display:-ms-flexbox;display:flex;-ms-flex-flow:row;flex-flow:row;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;border-top:1px solid #D3CECB;border-bottom:1px solid #D3CECB}.pn-sitefooter-bottom [slot=bottom] span,.pn-sitefooter-bottom [slot=bottom] a{line-height:2;margin:0 1.6rem;text-decoration:none}.pn-sitefooter-bottom [slot=bottom] li{line-height:2em;margin:0 1.6rem}.pn-sitefooter-logo{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;padding:3rem}.pn-sitefooter-logo svg{display:block;width:13.3rem;height:2.6rem}";
8
8
 
@@ -4,7 +4,7 @@
4
4
  "./components/input/pn-bonus-progressbar/pn-bonus-progressbar.js",
5
5
  "./components/input/pn-choice-button/pn-choice-button.js",
6
6
  "./components/input/pn-filter-checkbox/pn-filter-checkbox.js",
7
- "./components/input/pn-filter-search/pn-filter-search.js",
7
+ "./components/input/pn-marketweb-search/pn-marketweb-search.js",
8
8
  "./components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js",
9
9
  "./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js",
10
10
  "./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js",
@@ -1,7 +1,7 @@
1
1
  import readme from "./readme.md";
2
2
 
3
3
  export default {
4
- title: "input/Filter search field",
4
+ title: "input/Market web search field",
5
5
  parameters: {
6
6
  notes: readme,
7
7
  layout: 'centered'
@@ -10,7 +10,7 @@ export default {
10
10
 
11
11
  const Template = ({ ...args }) => {
12
12
  return `
13
- <pn-filter-search
13
+ <pn-marketweb-search
14
14
  label="${args.label}"
15
15
  name="${args.name}"
16
16
  inputid="${args.inputid}"
@@ -20,7 +20,19 @@ const Template = ({ ...args }) => {
20
20
  disabled=${args.disabled}
21
21
  loading=${args.loading}
22
22
  light="${args.light}"
23
- ></pn-filter-search>
23
+ list="listexample"
24
+ ></pn-marketweb-search>
25
+ <datalist id="listexample">
26
+ <option>Autocomplete example</option>
27
+ <option>More autocomplete examples</option>
28
+ </datalist>
29
+ <script>
30
+ // window.setTimeout(function() {
31
+ // const newOpt = document.createElement("option");
32
+ // newOpt.innerHTML = "new item";
33
+ // document.getElementById("listexample").appendChild(newOpt);
34
+ // }, 500);
35
+ </script>
24
36
  `;
25
37
  };
26
38
  export const Primary = Template.bind({});
@@ -75,19 +75,21 @@
75
75
  border: none;
76
76
  color: #005D92;
77
77
  padding: 0.3rem;
78
+ margin: 0;
79
+ font-size: 0.875em;
78
80
  border-radius: 50%;
79
81
  outline: none;
80
82
  transition: border 0.1s, background 0.2s, box-shadow 0.1s, transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s, opacity 0.2s;
81
83
  border: 0.1rem solid transparent;
84
+ -webkit-tap-highlight-color: transparent;
82
85
  }
83
86
  :host > .input-container button.clear, :host > .input-container button.search {
84
87
  cursor: pointer;
85
88
  }
86
89
  :host > .input-container button:focus {
87
90
  box-shadow: 0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92;
88
- background: #8EDDF9;
89
91
  }
90
- :host > .input-container button:hover {
92
+ :host > .input-container button:hover, :host > .input-container button:focus {
91
93
  background: #E0F8FF;
92
94
  }
93
95
  :host > .input-container button:active {
@@ -1,11 +1,12 @@
1
- import { Component, Prop, h, Host, Event, Element, Listen } from "@stencil/core";
2
- export class PnFilterSearch {
1
+ import { Component, Prop, h, Host, Event, Element, Listen, State } from "@stencil/core";
2
+ export class PnMarketwebSearch {
3
3
  constructor() {
4
4
  this.disabled = false;
5
5
  this.placeholder = null;
6
6
  this.inputid = null;
7
7
  this.name = null;
8
8
  this.autocomplete = null;
9
+ this.list = null;
9
10
  this.value = null;
10
11
  /** Label for the button */
11
12
  this.label = null;
@@ -15,6 +16,9 @@ export class PnFilterSearch {
15
16
  this.button = '';
16
17
  /** Light instead of dark search button */
17
18
  this.light = false;
19
+ this.suggestionObserver = null;
20
+ this.hasClonedInput = false;
21
+ this.listSuggestion = [];
18
22
  }
19
23
  inputHandler() {
20
24
  this.update.emit(this.value);
@@ -46,10 +50,37 @@ export class PnFilterSearch {
46
50
  classNames += `button-${this.button} `;
47
51
  return classNames;
48
52
  }
53
+ componentWillRender() {
54
+ this.cloneListContent();
55
+ this.autocompleteEventBinding();
56
+ }
57
+ onSuggestionUpdate() {
58
+ this.cloneListContent();
59
+ }
60
+ autocompleteEventBinding() {
61
+ if (this.suggestionObserver !== null || !this.list || (!this.hostElement) || !document.getElementById(this.list)) {
62
+ return;
63
+ }
64
+ const targetNode = document.getElementById(this.list);
65
+ this.suggestionObserver = new MutationObserver(this.onSuggestionUpdate.bind(this));
66
+ this.suggestionObserver.observe(targetNode, { attributes: true, childList: true, subtree: true });
67
+ }
68
+ cloneListContent() {
69
+ if (!this.list || (!this.hostElement) || !document.getElementById(this.list)) {
70
+ return;
71
+ }
72
+ const options = [...document.getElementById(this.list).querySelectorAll('option')];
73
+ this.listSuggestion = options.map((item) => {
74
+ if (item.hasAttribute('value')) {
75
+ return item.getAttribute('value');
76
+ }
77
+ return item.innerText;
78
+ });
79
+ }
49
80
  render() {
50
81
  return (h(Host, { class: this.getClassNames() },
51
82
  h("div", { class: "input-container" },
52
- h("input", { type: "search", value: this.value, id: this.inputid, name: this.name, placeholder: this.placeholder, disabled: this.disabled, autocomplete: this.autocomplete, onKeyDown: (e) => this.emitSearch(e), onInput: (e) => this.setVal(e) }),
83
+ h("input", { type: "search", value: this.value, id: this.inputid, name: this.name, placeholder: this.placeholder, disabled: this.disabled, autocomplete: this.autocomplete, list: this.list, onKeyDown: (e) => this.emitSearch(e), onInput: (e) => this.setVal(e) }),
53
84
  h("div", { class: "button-container" },
54
85
  (this.button === 'none' || this.button === 'icon-inline') &&
55
86
  h("button", { class: "search", tabindex: this.button === 'icon-inline' ? '0' : '-1', onClick: (e) => this.emitSearch(e), "aria-label": "search", title: "search" },
@@ -59,15 +90,19 @@ export class PnFilterSearch {
59
90
  h("pn-icon", { symbol: "close-small", color: "blue700" })),
60
91
  this.button === 'none' || this.button === 'icon-inline' && h("pn-spinner", null))),
61
92
  (this.button !== 'none' && this.button !== 'icon-inline') &&
62
- h("pn-button", { onClick: (e) => this.emitSearch(e), loading: this.loading, icon: "search", appearance: this.light ? 'light' : 'dark', "icon-only": this.button === 'icon' }, this.label)));
93
+ h("pn-button", { onClick: (e) => this.emitSearch(e), loading: this.loading, icon: "search", appearance: this.light ? 'light' : 'dark', "icon-only": this.button === 'icon' }, this.label),
94
+ (this.list) &&
95
+ h("datalist", { id: this.list }, this.listSuggestion.map((item) => {
96
+ return (h("option", null, item));
97
+ }))));
63
98
  }
64
- static get is() { return "pn-filter-search"; }
99
+ static get is() { return "pn-marketweb-search"; }
65
100
  static get encapsulation() { return "shadow"; }
66
101
  static get originalStyleUrls() { return {
67
- "$": ["pn-filter-search.scss"]
102
+ "$": ["pn-marketweb-search.scss"]
68
103
  }; }
69
104
  static get styleUrls() { return {
70
- "$": ["pn-filter-search.css"]
105
+ "$": ["pn-marketweb-search.css"]
71
106
  }; }
72
107
  static get properties() { return {
73
108
  "disabled": {
@@ -160,6 +195,24 @@ export class PnFilterSearch {
160
195
  "reflect": false,
161
196
  "defaultValue": "null"
162
197
  },
198
+ "list": {
199
+ "type": "string",
200
+ "mutable": false,
201
+ "complexType": {
202
+ "original": "string",
203
+ "resolved": "string",
204
+ "references": {}
205
+ },
206
+ "required": false,
207
+ "optional": false,
208
+ "docs": {
209
+ "tags": [],
210
+ "text": ""
211
+ },
212
+ "attribute": "list",
213
+ "reflect": false,
214
+ "defaultValue": "null"
215
+ },
163
216
  "value": {
164
217
  "type": "string",
165
218
  "mutable": false,
@@ -251,6 +304,11 @@ export class PnFilterSearch {
251
304
  "defaultValue": "false"
252
305
  }
253
306
  }; }
307
+ static get states() { return {
308
+ "suggestionObserver": {},
309
+ "hasClonedInput": {},
310
+ "listSuggestion": {}
311
+ }; }
254
312
  static get events() { return [{
255
313
  "method": "search",
256
314
  "name": "search",
@@ -0,0 +1,9 @@
1
+ import { createStore } from "@stencil/store";
2
+ // Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
3
+ const { state, onChange } = createStore({
4
+ searchValue: '',
5
+ autocompleteSuggestions: {},
6
+ requestAbortController: new AbortController()
7
+ });
8
+ export { state, onChange };
9
+ export default state;