hemfixarna-web-components 1.5.7 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/dist/{collection/utils/api.js → hemfixarna-components/api-36f73d0d.js} +6 -4
  2. package/dist/hemfixarna-components/api-36f73d0d.js.map +1 -0
  3. package/dist/hemfixarna-components/app-globals-0f993ce5.js +5 -0
  4. package/dist/hemfixarna-components/app-globals-0f993ce5.js.map +1 -0
  5. package/dist/{collection/utils/calc.js → hemfixarna-components/calc-4c79b798.js} +6 -3
  6. package/dist/hemfixarna-components/calc-4c79b798.js.map +1 -0
  7. package/dist/hemfixarna-components/css-shim-62d2171c.js +6 -0
  8. package/dist/hemfixarna-components/css-shim-62d2171c.js.map +1 -0
  9. package/dist/hemfixarna-components/dom-46a68c9b.js +75 -0
  10. package/dist/hemfixarna-components/dom-46a68c9b.js.map +1 -0
  11. package/dist/{collection/utils/form.js → hemfixarna-components/form-c53dca29.js} +4 -2
  12. package/dist/hemfixarna-components/form-c53dca29.js.map +1 -0
  13. package/dist/{collection/components/hemfixarna-address/hemfixarna-address.js → hemfixarna-components/hemfixarna-address.entry.js} +14 -20
  14. package/dist/hemfixarna-components/hemfixarna-address.entry.js.map +1 -0
  15. package/dist/hemfixarna-components/hemfixarna-box.entry.js +49 -0
  16. package/dist/hemfixarna-components/hemfixarna-box.entry.js.map +1 -0
  17. package/dist/{collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js → hemfixarna-components/hemfixarna-breadcrumbs.entry.js} +13 -84
  18. package/dist/hemfixarna-components/hemfixarna-breadcrumbs.entry.js.map +1 -0
  19. package/dist/hemfixarna-components/hemfixarna-byggmax.entry.js +27 -0
  20. package/dist/hemfixarna-components/hemfixarna-byggmax.entry.js.map +1 -0
  21. package/dist/{collection/components/hemfixarna-cart/hemfixarna-cart.js → hemfixarna-components/hemfixarna-cart.entry.js} +11 -31
  22. package/dist/hemfixarna-components/hemfixarna-cart.entry.js.map +1 -0
  23. package/dist/{collection/components/hemfixarna-category.tsx/hemfixarna-category.js → hemfixarna-components/hemfixarna-category.entry.js} +12 -6
  24. package/dist/hemfixarna-components/hemfixarna-category.entry.js.map +1 -0
  25. package/dist/{collection/components/hemfixarna-checkout/hemfixarna-checkout.js → hemfixarna-components/hemfixarna-checkout.entry.js} +48 -44
  26. package/dist/hemfixarna-components/hemfixarna-checkout.entry.js.map +1 -0
  27. package/dist/hemfixarna-components/hemfixarna-component.entry.js +248 -0
  28. package/dist/hemfixarna-components/hemfixarna-component.entry.js.map +1 -0
  29. package/dist/hemfixarna-components/hemfixarna-components.esm.js +162 -1
  30. package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
  31. package/dist/{collection/components/hemfixarna-contact/hemfixarna-contact.js → hemfixarna-components/hemfixarna-contact.entry.js} +10 -28
  32. package/dist/hemfixarna-components/hemfixarna-contact.entry.js.map +1 -0
  33. package/dist/hemfixarna-components/hemfixarna-demo.entry.js +138 -0
  34. package/dist/hemfixarna-components/hemfixarna-demo.entry.js.map +1 -0
  35. package/dist/hemfixarna-components/hemfixarna-doro.entry.js +23 -0
  36. package/dist/hemfixarna-components/hemfixarna-doro.entry.js.map +1 -0
  37. package/dist/hemfixarna-components/hemfixarna-elfa.entry.js +24 -0
  38. package/dist/hemfixarna-components/hemfixarna-elfa.entry.js.map +1 -0
  39. package/dist/hemfixarna-components/hemfixarna-fargvaruhuset.entry.js +21 -0
  40. package/dist/hemfixarna-components/hemfixarna-fargvaruhuset.entry.js.map +1 -0
  41. package/dist/hemfixarna-components/hemfixarna-flyttsmart.entry.js +21 -0
  42. package/dist/hemfixarna-components/hemfixarna-flyttsmart.entry.js.map +1 -0
  43. package/dist/hemfixarna-components/hemfixarna-forebygg.entry.js +23 -0
  44. package/dist/hemfixarna-components/hemfixarna-forebygg.entry.js.map +1 -0
  45. package/dist/hemfixarna-components/hemfixarna-getuser.entry.js +770 -0
  46. package/dist/hemfixarna-components/hemfixarna-getuser.entry.js.map +1 -0
  47. package/dist/hemfixarna-components/hemfixarna-hornbach.entry.js +24 -0
  48. package/dist/hemfixarna-components/hemfixarna-hornbach.entry.js.map +1 -0
  49. package/dist/{collection/components/hemfixarna-info/hemfixarna-info.js → hemfixarna-components/hemfixarna-info.entry.js} +11 -7
  50. package/dist/hemfixarna-components/hemfixarna-info.entry.js.map +1 -0
  51. package/dist/{collection/components/hemfixarna-invoice/hemfixarna-invoice.js → hemfixarna-components/hemfixarna-invoice.entry.js} +16 -27
  52. package/dist/hemfixarna-components/hemfixarna-invoice.entry.js.map +1 -0
  53. package/dist/hemfixarna-components/hemfixarna-kbygg.entry.js +21 -0
  54. package/dist/hemfixarna-components/hemfixarna-kbygg.entry.js.map +1 -0
  55. package/dist/hemfixarna-components/hemfixarna-klint.entry.js +20 -0
  56. package/dist/hemfixarna-components/hemfixarna-klint.entry.js.map +1 -0
  57. package/dist/hemfixarna-components/hemfixarna-kund.entry.js +20 -0
  58. package/dist/hemfixarna-components/hemfixarna-kund.entry.js.map +1 -0
  59. package/dist/hemfixarna-components/hemfixarna-norrgavel.entry.js +21 -0
  60. package/dist/hemfixarna-components/hemfixarna-norrgavel.entry.js.map +1 -0
  61. package/dist/{collection/components/hemfixarna-order/hemfixarna-order.js → hemfixarna-components/hemfixarna-order.entry.js} +11 -31
  62. package/dist/hemfixarna-components/hemfixarna-order.entry.js.map +1 -0
  63. package/dist/{collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js → hemfixarna-components/hemfixarna-orderrows.entry.js} +12 -50
  64. package/dist/hemfixarna-components/hemfixarna-orderrows.entry.js.map +1 -0
  65. package/dist/hemfixarna-components/hemfixarna-power.entry.js +21 -0
  66. package/dist/hemfixarna-components/hemfixarna-power.entry.js.map +1 -0
  67. package/dist/{collection/components/hemfixarna-product/hemfixarna-product.js → hemfixarna-components/hemfixarna-product.entry.js} +18 -27
  68. package/dist/hemfixarna-components/hemfixarna-product.entry.js.map +1 -0
  69. package/dist/{collection/components/hemfixarna-service/hemfixarna-service.js → hemfixarna-components/hemfixarna-service.entry.js} +12 -6
  70. package/dist/hemfixarna-components/hemfixarna-service.entry.js.map +1 -0
  71. package/dist/hemfixarna-components/hemfixarna-skanska.entry.js +24 -0
  72. package/dist/hemfixarna-components/hemfixarna-skanska.entry.js.map +1 -0
  73. package/dist/hemfixarna-components/hemfixarna-sparfonster.entry.js +21 -0
  74. package/dist/hemfixarna-components/hemfixarna-sparfonster.entry.js.map +1 -0
  75. package/dist/{collection/components/hemfixarna-start/hemfixarna-start.js → hemfixarna-components/hemfixarna-start.entry.js} +11 -48
  76. package/dist/hemfixarna-components/hemfixarna-start.entry.js.map +1 -0
  77. package/dist/hemfixarna-components/hemfixarna-string-furniture.entry.js +23 -0
  78. package/dist/hemfixarna-components/hemfixarna-string-furniture.entry.js.map +1 -0
  79. package/dist/hemfixarna-components/hemfixarna-superfront.entry.js +20 -0
  80. package/dist/hemfixarna-components/hemfixarna-superfront.entry.js.map +1 -0
  81. package/dist/hemfixarna-components/hemfixarna-tesla.entry.js +21 -0
  82. package/dist/hemfixarna-components/hemfixarna-tesla.entry.js.map +1 -0
  83. package/dist/hemfixarna-components/hemfixarna-traningspartner.entry.js +20 -0
  84. package/dist/hemfixarna-components/hemfixarna-traningspartner.entry.js.map +1 -0
  85. package/dist/hemfixarna-components/hemfixarna-zaptec.entry.js +21 -0
  86. package/dist/hemfixarna-components/hemfixarna-zaptec.entry.js.map +1 -0
  87. package/dist/hemfixarna-components/index-b6a6e994.js +256 -0
  88. package/dist/hemfixarna-components/index-b6a6e994.js.map +1 -0
  89. package/dist/{collection/types/index.js → hemfixarna-components/index-d90ad11b.js} +8 -4
  90. package/dist/hemfixarna-components/index-d90ad11b.js.map +1 -0
  91. package/dist/hemfixarna-components/index-f1a87cf1.js +3397 -0
  92. package/dist/{cjs/hemfixarna-address_35.cjs.entry.js.map → hemfixarna-components/index-f1a87cf1.js.map} +1 -1
  93. package/dist/hemfixarna-components/index.esm.js +1 -0
  94. package/dist/hemfixarna-components/index.esm.js.map +1 -1
  95. package/dist/{collection/utils/scroll.js → hemfixarna-components/scroll-6c26b5da.js} +4 -2
  96. package/dist/hemfixarna-components/scroll-6c26b5da.js.map +1 -0
  97. package/dist/hemfixarna-components/shadow-css-05e0c1f4.js +389 -0
  98. package/dist/hemfixarna-components/shadow-css-05e0c1f4.js.map +1 -0
  99. package/dist/{collection/utils/types.js → hemfixarna-components/types-641c9a1c.js} +6 -3
  100. package/dist/hemfixarna-components/types-641c9a1c.js.map +1 -0
  101. package/dist/types/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.d.ts +9 -0
  102. package/dist/types/components.d.ts +23 -0
  103. package/dist/types/types/index.d.ts +2 -1
  104. package/package.json +1 -1
  105. package/dist/cjs/hemfixarna-address_35.cjs.entry.js +0 -2748
  106. package/dist/cjs/hemfixarna-components.cjs.js +0 -28
  107. package/dist/cjs/hemfixarna-components.cjs.js.map +0 -1
  108. package/dist/cjs/index-b83343b9.js +0 -1687
  109. package/dist/cjs/index-b83343b9.js.map +0 -1
  110. package/dist/cjs/index.cjs.js +0 -4
  111. package/dist/cjs/index.cjs.js.map +0 -1
  112. package/dist/cjs/loader.cjs.js +0 -24
  113. package/dist/cjs/loader.cjs.js.map +0 -1
  114. package/dist/collection/assets/back.svg +0 -3
  115. package/dist/collection/assets/cart.svg +0 -10
  116. package/dist/collection/assets/checked.svg +0 -10
  117. package/dist/collection/assets/close.svg +0 -5
  118. package/dist/collection/assets/copy.png +0 -0
  119. package/dist/collection/assets/date.svg +0 -6
  120. package/dist/collection/assets/down.svg +0 -3
  121. package/dist/collection/assets/drag-drop.svg +0 -3
  122. package/dist/collection/assets/elfa.png +0 -0
  123. package/dist/collection/assets/gubbe-pensel.svg +0 -1
  124. package/dist/collection/assets/hemfixarna.svg +0 -11
  125. package/dist/collection/assets/hornbach/logo.svg +0 -42
  126. package/dist/collection/assets/hornbach/nav.jpg +0 -0
  127. package/dist/collection/assets/info.svg +0 -5
  128. package/dist/collection/assets/kbygg.svg +0 -29
  129. package/dist/collection/assets/minus.svg +0 -4
  130. package/dist/collection/assets/montering.svg +0 -15
  131. package/dist/collection/assets/norrgavel.svg +0 -1
  132. package/dist/collection/assets/pensel.svg +0 -1
  133. package/dist/collection/assets/plus.svg +0 -5
  134. package/dist/collection/assets/spinner.gif +0 -0
  135. package/dist/collection/assets/tesla.svg +0 -1
  136. package/dist/collection/assets/zaptec.svg +0 -1
  137. package/dist/collection/collection-manifest.json +0 -46
  138. package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.css +0 -0
  139. package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js +0 -184
  140. package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js.map +0 -1
  141. package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.css +0 -0
  142. package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js +0 -123
  143. package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js.map +0 -1
  144. package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.css +0 -0
  145. package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js +0 -142
  146. package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js.map +0 -1
  147. package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js +0 -132
  148. package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js.map +0 -1
  149. package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js +0 -132
  150. package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js.map +0 -1
  151. package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.css +0 -0
  152. package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js +0 -123
  153. package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js.map +0 -1
  154. package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.css +0 -0
  155. package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js +0 -142
  156. package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js.map +0 -1
  157. package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js +0 -132
  158. package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js.map +0 -1
  159. package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js +0 -113
  160. package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js.map +0 -1
  161. package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js +0 -113
  162. package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js.map +0 -1
  163. package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js +0 -132
  164. package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js.map +0 -1
  165. package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js +0 -131
  166. package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js.map +0 -1
  167. package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.css +0 -0
  168. package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js +0 -141
  169. package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js.map +0 -1
  170. package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js +0 -131
  171. package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js.map +0 -1
  172. package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js +0 -123
  173. package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js.map +0 -1
  174. package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string.css +0 -0
  175. package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js +0 -132
  176. package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js.map +0 -1
  177. package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js +0 -113
  178. package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js.map +0 -1
  179. package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js +0 -132
  180. package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js.map +0 -1
  181. package/dist/collection/components/hemfixarna-address/hemfixarna-address.js.map +0 -1
  182. package/dist/collection/components/hemfixarna-box/hemfixarna-box.js +0 -138
  183. package/dist/collection/components/hemfixarna-box/hemfixarna-box.js.map +0 -1
  184. package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js.map +0 -1
  185. package/dist/collection/components/hemfixarna-cart/hemfixarna-cart.js.map +0 -1
  186. package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js.map +0 -1
  187. package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js.map +0 -1
  188. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +0 -483
  189. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +0 -1
  190. package/dist/collection/components/hemfixarna-component/hemfixarna.css +0 -1031
  191. package/dist/collection/components/hemfixarna-contact/hemfixarna-contact.js.map +0 -1
  192. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.css +0 -135
  193. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js +0 -161
  194. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +0 -1
  195. package/dist/collection/components/hemfixarna-getuser/hemfixarna-getuser.js +0 -91
  196. package/dist/collection/components/hemfixarna-getuser/hemfixarna-getuser.js.map +0 -1
  197. package/dist/collection/components/hemfixarna-info/hemfixarna-info.js.map +0 -1
  198. package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.css +0 -76
  199. package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +0 -1
  200. package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +0 -1
  201. package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js.map +0 -1
  202. package/dist/collection/components/hemfixarna-product/hemfixarna-product.css +0 -0
  203. package/dist/collection/components/hemfixarna-product/hemfixarna-product.js.map +0 -1
  204. package/dist/collection/components/hemfixarna-service/hemfixarna-service.js.map +0 -1
  205. package/dist/collection/components/hemfixarna-start/hemfixarna-start.js.map +0 -1
  206. package/dist/collection/index.js +0 -2
  207. package/dist/collection/index.js.map +0 -1
  208. package/dist/collection/store/index.js +0 -62
  209. package/dist/collection/store/index.js.map +0 -1
  210. package/dist/collection/types/felixtypes.js +0 -3
  211. package/dist/collection/types/felixtypes.js.map +0 -1
  212. package/dist/collection/types/index.js.map +0 -1
  213. package/dist/collection/utils/api.js.map +0 -1
  214. package/dist/collection/utils/calc.js.map +0 -1
  215. package/dist/collection/utils/creditSafe.js +0 -18
  216. package/dist/collection/utils/creditSafe.js.map +0 -1
  217. package/dist/collection/utils/felixApi.js +0 -18
  218. package/dist/collection/utils/felixApi.js.map +0 -1
  219. package/dist/collection/utils/felixFunctions.js +0 -189
  220. package/dist/collection/utils/felixFunctions.js.map +0 -1
  221. package/dist/collection/utils/form.js.map +0 -1
  222. package/dist/collection/utils/scroll.js.map +0 -1
  223. package/dist/collection/utils/types.js.map +0 -1
  224. package/dist/esm/hemfixarna-address_35.entry.js +0 -2710
  225. package/dist/esm/hemfixarna-address_35.entry.js.map +0 -1
  226. package/dist/esm/hemfixarna-components.js +0 -23
  227. package/dist/esm/hemfixarna-components.js.map +0 -1
  228. package/dist/esm/index-8c417125.js +0 -1656
  229. package/dist/esm/index-8c417125.js.map +0 -1
  230. package/dist/esm/index.js +0 -3
  231. package/dist/esm/index.js.map +0 -1
  232. package/dist/esm/loader.js +0 -20
  233. package/dist/esm/loader.js.map +0 -1
  234. package/dist/esm/polyfills/core-js.js +0 -11
  235. package/dist/esm/polyfills/css-shim.js +0 -1
  236. package/dist/esm/polyfills/dom.js +0 -79
  237. package/dist/esm/polyfills/es5-html-element.js +0 -1
  238. package/dist/esm/polyfills/index.js +0 -34
  239. package/dist/esm/polyfills/system.js +0 -6
  240. package/dist/hemfixarna-components/p-852e7173.js +0 -3
  241. package/dist/hemfixarna-components/p-852e7173.js.map +0 -1
  242. package/dist/hemfixarna-components/p-960effdc.entry.js +0 -2
  243. package/dist/hemfixarna-components/p-960effdc.entry.js.map +0 -1
  244. package/dist/index.cjs.js +0 -1
  245. package/dist/index.js +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"hemfixarna-contact.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-contact/hemfixarna-contact.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAMnD,MAAM,OAAO,cAAc;;oBACI,KAAK;;EAElC,MAAM;IACJ,OAAO,CACL,WAAK,KAAK,EAAE,sBAAsB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,gCAAgC,EAAE;MACnH,SAAG,IAAI,EAAC,kBAAkB;QACxB,WAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;UAC5F,YACE,CAAC,EAAC,+PAA+P,EACjQ,IAAI,EAAC,SAAS,GACd,CACE;QACN,+BAAyB,CACvB;MACJ,SAAG,IAAI,EAAC,oCAAoC,EAAC,MAAM,EAAC,QAAQ;QAC1D,WAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;UAC5F,sBAAa,sBAAsB;YACjC,YACE,CAAC,EAAC,sQAAsQ,EACxQ,IAAI,EAAC,SAAS,GACd;YACF,YAAM,CAAC,EAAC,mHAAmH,EAAC,IAAI,EAAC,SAAS,GAAG;YAC7I,YAAM,CAAC,EAAC,yHAAyH,EAAC,IAAI,EAAC,SAAS,GAAG;YACnJ,YACE,CAAC,EAAC,6IAA6I,EAC/I,IAAI,EAAC,SAAS,GACd,CACA;UACJ;YACE,gBAAU,EAAE,EAAC,gBAAgB;cAC3B,YAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,GAAG,CACnC,CACN,CACH;QACN,8BAAwB,CACtB,CACA,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'hemfixarna-contact',\n shadow: false,\n})\nexport class HemfixarnaInfo {\n @Prop() vertical?: boolean = false;\n\n render() {\n return (\n <div class={`hemfixarna_contact ${this.vertical ? 'hemfixarna_contact--vertical' : 'hemfixarna_contact--horizontal'}`}>\n <a href=\"tel:0770-220 720\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7 4V20H17V4H7ZM6 2H18C18.5523 2 19 2.44772 19 3V21C19 21.5523 18.5523 22 18 22H6C5.44772 22 5 21.5523 5 21V3C5 2.44772 5.44772 2 6 2ZM12 17C12.5523 17 13 17.4477 13 18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18C11 17.4477 11.4477 17 12 17Z\"\n fill=\"#C84E18\"\n />\n </svg>\n <span>0770-220 720</span>\n </a>\n <a href=\"https://hemfixarna.se/kundservice/\" target=\"_blank\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_1001_894)\">\n <path\n d=\"M21 12.22C21 6.73 16.74 3 12 3C7.31 3 3 6.65 3 12.28C2.4 12.62 2 13.26 2 14V16C2 17.1 2.9 18 4 18H5V11.9C5 8.03 8.13 4.9 12 4.9C15.87 4.9 19 8.03 19 11.9V19H11V21H19C20.1 21 21 20.1 21 19V17.78C21.59 17.47 22 16.86 22 16.14V13.84C22 13.14 21.59 12.53 21 12.22Z\"\n fill=\"#C84E18\"\n />\n <path d=\"M9 14C9.55228 14 10 13.5523 10 13C10 12.4477 9.55228 12 9 12C8.44772 12 8 12.4477 8 13C8 13.5523 8.44772 14 9 14Z\" fill=\"#C84E18\" />\n <path d=\"M15 14C15.5523 14 16 13.5523 16 13C16 12.4477 15.5523 12 15 12C14.4477 12 14 12.4477 14 13C14 13.5523 14.4477 14 15 14Z\" fill=\"#C84E18\" />\n <path\n d=\"M18 11.03C17.52 8.18 15.04 6 12.05 6C9.01997 6 5.75997 8.51 6.01997 12.45C8.48997 11.44 10.35 9.24 10.88 6.56C12.19 9.19 14.88 11 18 11.03Z\"\n fill=\"#C84E18\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_1001_894\">\n <rect width=\"24\" height=\"24\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n <span>Kundservice</span>\n </a>\n </div>\n );\n }\n}\n"]}
@@ -1,135 +0,0 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap");
2
- :host {
3
- font-family: "Inter", sans-serif;
4
- }
5
- :host .hemfixarna_widgetstyles label {
6
- cursor: pointer;
7
- }
8
- :host .hemfixarna_widgetstyles > div {
9
- display: flex;
10
- gap: 1rem;
11
- }
12
- :host .hemfixarna_widgetstyles h5 {
13
- margin: 1rem 0;
14
- }
15
- :host .hemfixarna_example {
16
- margin-bottom: 16px;
17
- background: #000;
18
- padding: 16px;
19
- color: #fff;
20
- display: flex;
21
- justify-content: space-between;
22
- cursor: pointer;
23
- max-width: 500px;
24
- box-sizing: border-box;
25
- position: relative;
26
- }
27
- :host .hemfixarna_example--tooltip {
28
- background: #000;
29
- top: -48px;
30
- font-size: 16px;
31
- left: 40%;
32
- color: white;
33
- padding: 8px;
34
- position: absolute;
35
- opacity: 0;
36
- }
37
- :host .hemfixarna_example--tooltip::after {
38
- content: "";
39
- position: absolute;
40
- top: 100%;
41
- left: 50%;
42
- margin-left: -5px;
43
- border-width: 5px;
44
- border-style: solid;
45
- border-color: #000 transparent transparent transparent;
46
- }
47
- :host .hemfixarna_example:hover .hemfixarna_example--tooltip {
48
- opacity: 1;
49
- }
50
- :host .hemfixarna_example p {
51
- font-size: 14px;
52
- }
53
- :host .hemfixarna_example img {
54
- filter: invert(1);
55
- }
56
- :host .hemfixarna_install {
57
- display: grid;
58
- gap: 8px;
59
- margin-top: 16px;
60
- }
61
- :host .hemfixarna_product--label {
62
- background: #e1e0f5;
63
- }
64
- :host .hemfixarna_categories {
65
- max-height: 100%;
66
- overflow: auto;
67
- position: relative;
68
- }
69
- :host .hemfixarna_categories--label {
70
- display: flex;
71
- align-items: center;
72
- justify-content: space-between;
73
- padding: 8px;
74
- }
75
- :host .hemfixarna_categories--label button {
76
- background: #3f3a92;
77
- border: none;
78
- font-weight: 600;
79
- padding: 3.2px 9.6px;
80
- border-radius: 10px;
81
- margin-right: 8px;
82
- color: #ece8e8;
83
- }
84
- :host .hemfixarna_categories--label button:active {
85
- transform: scale(0.95);
86
- }
87
- :host .hemfixarna_categories--label--big {
88
- font-weight: 600;
89
- border-bottom: 1px solid black;
90
- }
91
- :host p {
92
- margin: 0;
93
- }
94
- :host span {
95
- color: darkolivegreen;
96
- font-size: 10px;
97
- }
98
- :host button {
99
- cursor: pointer;
100
- }
101
- :host > div:not(.hemfixarna_hosted) {
102
- grid-template-columns: 1fr 1fr;
103
- }
104
- :host .hemfixarna_hosted .hemfixarna_scripts {
105
- display: none;
106
- }
107
- :host > div {
108
- display: grid;
109
- gap: 32px;
110
- width: 100%;
111
- height: 100vh;
112
- place-items: center;
113
- overflow: hidden;
114
- padding: 16px 32px;
115
- box-sizing: border-box;
116
- }
117
- :host > div > * {
118
- width: 100%;
119
- }
120
- :host > div > div {
121
- max-width: 500px;
122
- }
123
- :host > div ul {
124
- margin: 0;
125
- padding: 0;
126
- list-style: none;
127
- }
128
- :host > div ul ul {
129
- gap: 1px;
130
- display: grid;
131
- }
132
- :host > div ul li {
133
- padding-left: 16px;
134
- background: #fff;
135
- }
@@ -1,161 +0,0 @@
1
- import { getAssetPath, h } from '@stencil/core';
2
- import { Business, TopCategory, WidgetStyle } from '../../types';
3
- import { getCustomer, getTaxonomy } from '../../utils/api';
4
- import { isBusiness } from '../../utils/types';
5
- export class MyComponent {
6
- constructor() {
7
- this.debounce = null;
8
- this.cdnLink = '<script type="module" src="https://cdn.jsdelivr.net/npm//hemfixarna-web-components@latest/dist/hemfixarna-components/hemfixarna-components.esm.js"></script>';
9
- this.selectedSlug = undefined;
10
- this.selectedID = undefined;
11
- this.tooltipText = 'Kopiera till urklipp';
12
- this.tree = null;
13
- this.customer = null;
14
- this.widgetStyle = WidgetStyle.standard;
15
- this.buttonBg = '';
16
- this.buttonColor = '';
17
- this.partner = undefined;
18
- this.colorAccessibility = undefined;
19
- }
20
- debouncedFunction() {
21
- if (this.debounce !== null) {
22
- clearTimeout(this.debounce);
23
- this.debounce = null;
24
- }
25
- this.debounce = window.setTimeout(() => {
26
- this.checkColorAccessibility();
27
- this.debounce = null;
28
- }, 1500);
29
- }
30
- async checkColorAccessibility() {
31
- const defaultTextColor = '#fff';
32
- const defaultBgColor = '#c84e18';
33
- const firstColor = this.buttonBg.length ? (this.buttonBg.startsWith('#') ? this.buttonBg : `#${this.buttonBg}`) : defaultBgColor;
34
- const secondColor = this.buttonColor.length ? (this.buttonColor.startsWith('#') ? this.buttonColor : `#${this.buttonColor}`) : defaultTextColor;
35
- fetch('https://www.aremycolorsaccessible.com/api/are-they', {
36
- mode: 'cors',
37
- method: 'POST',
38
- body: JSON.stringify({ colors: [firstColor, secondColor] }),
39
- })
40
- .then(response => response.json())
41
- .then(json => {
42
- if (json && (json)) {
43
- this.colorAccessibility = json;
44
- }
45
- });
46
- // Your color accessibility logic here
47
- }
48
- getTopLevelCategory() {
49
- switch (process.env.BUSINESS) {
50
- case Business.byggmax:
51
- return TopCategory.byggmax;
52
- default:
53
- return '';
54
- }
55
- }
56
- getColor(rating) {
57
- switch (rating) {
58
- case 'AAA':
59
- return 'green';
60
- case 'AA':
61
- return 'orange';
62
- case 'A':
63
- return 'yellow';
64
- case 'Fail':
65
- return 'red';
66
- default:
67
- return 'black';
68
- }
69
- }
70
- async componentWillLoad() {
71
- var _a;
72
- if (process.env.FORCE_OLD_TREE) {
73
- const tree = await getTaxonomy(this.getTopLevelCategory());
74
- if ((tree === null || tree === void 0 ? void 0 : tree.code) === 'not_found') {
75
- // console.warn('tree not found');
76
- }
77
- else if (tree) {
78
- this.tree = tree;
79
- }
80
- }
81
- else {
82
- const partner = window.location.pathname.replace('/', '');
83
- this.partner = isBusiness(partner) ? partner : (_a = process.env.BUSINESS) !== null && _a !== void 0 ? _a : Business.kund;
84
- const customer = await getCustomer(this.partner);
85
- if (customer.code !== 'not_found' && customer) {
86
- this.customer = customer;
87
- }
88
- }
89
- }
90
- getExample() {
91
- return `<hemfixarna-${this.partner}${this.selectedSlug ? ` slug="${this.selectedSlug}" ` : ''}${this.selectedID ? ` id="${this.selectedID}" ` : ''} ${this.widgetStyle === WidgetStyle.standard ? '' : `widget-style="${this.widgetStyle}"`} ${this.buttonColor.length ? `button-color="${this.buttonColor}"` : ''} ${this.buttonBg.length ? `button-bg="${this.buttonBg}"` : ''}></hemfixarna-${this.partner}>`;
92
- }
93
- copyExample() {
94
- navigator.clipboard.writeText(this.getExample());
95
- this.tooltipText = 'Snippet kopierad';
96
- setTimeout(() => {
97
- this.tooltipText = 'Kopiera till urklipp';
98
- }, 2000);
99
- }
100
- copyCdn() {
101
- navigator.clipboard.writeText(this.cdnLink);
102
- this.tooltipText = 'Text kopierad';
103
- setTimeout(() => {
104
- this.tooltipText = 'Kopiera till urklipp';
105
- }, 2000);
106
- }
107
- copyNpmInstall() {
108
- navigator.clipboard.writeText('npm i hemfixarna-web-components');
109
- this.tooltipText = 'Text kopierad';
110
- setTimeout(() => {
111
- this.tooltipText = 'Kopiera till urklipp';
112
- }, 2000);
113
- }
114
- showMaleri() {
115
- var _a;
116
- const allCategories = (_a = this.customer) === null || _a === void 0 ? void 0 : _a.categories.map(c => (c.sub_categories ? c.sub_categories : c)).flat();
117
- return allCategories === null || allCategories === void 0 ? void 0 : allCategories.some(c => c.add_painting);
118
- }
119
- render() {
120
- var _a;
121
- const copy = getAssetPath(`./assets/copy.png`);
122
- return (h("div", { class: ((_a = this.customer) === null || _a === void 0 ? void 0 : _a.at_hemfixarna) ? 'hemfixarna_hosted' : '' }, h("div", { class: "hemfixarna_scripts" }, h("div", { onClick: () => this.copyExample(), class: "hemfixarna_example" }, h("p", null, this.getExample()), h("img", { src: copy, height: 20 }), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText)), this.partner === Business.byggmax && (h("hemfixarna-byggmax", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, forceOldTree: Boolean(process.env.FORCE_OLD_TREE), slug: this.selectedSlug, id: this.selectedID })), this.partner === Business.skanska && h("hemfixarna-skanska", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), this.partner === Business.sparfonster && (h("hemfixarna-sparfonster", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.string && (h("hemfixarna-string-furniture", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.hornbach && (h("hemfixarna-hornbach", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.traningspartner && (h("hemfixarna-traningspartner", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.zaptec && (h("hemfixarna-zaptec", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.tesla && (h("hemfixarna-tesla", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.forebygg && (h("hemfixarna-forebygg", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.doro && h("hemfixarna-doro", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), this.partner === Business.elfa && h("hemfixarna-elfa", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), this.partner === Business.kbygg && (h("hemfixarna-kbygg", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.fargvaruhuset && (h("hemfixarna-fargvaruhuset", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.norrgavel && (h("hemfixarna-norrgavel", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.klint && h("hemfixarna-klint", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), this.partner === Business.flyttsmart && (h("hemfixarna-flyttsmart", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.power && h("hemfixarna-power", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), this.partner === Business.kund && h("hemfixarna-kund", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), h("div", { class: "hemfixarna_install" }, h("div", { onClick: () => this.copyCdn(), class: "hemfixarna_example" }, h("p", null, this.cdnLink), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText), h("img", { src: copy, height: 20 }))), h("div", { class: "hemfixarna_widgetstyles" }, h("h5", null, "Widget styles"), h("div", null, Object.values(WidgetStyle).map(style => (h("label", { key: style }, h("input", { type: "radio", value: style, checked: this.widgetStyle === style, onChange: () => (this.widgetStyle = style) }), style)))), h("div", null, h("div", null, h("h5", null, "Button background color"), h("input", { type: "text", value: this.buttonBg, onInput: e => (this.buttonBg = e.target.value) })), h("div", null, h("h5", null, "Button text color"), h("input", { type: "text", value: this.buttonColor, onInput: e => (this.buttonColor = e.target.value) })))), h("span", null, "Write an hexa code no # needed"), this.colorAccessibility ? (h("div", null, h("h5", null, "Tillg\u00E4nglighetsrapport"), h("div", null, h("strong", null, "Liten text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.small) } }, this.colorAccessibility.small), h("br", null), h("strong", null, "Fet text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.bold) } }, this.colorAccessibility.bold), h("br", null), h("strong", null, "Stor text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.large) } }, this.colorAccessibility.large), h("br", null), h("strong", null, "Kontrastf\u00F6rh\u00E5llande:"), " ", this.colorAccessibility.contrast))) : null), h("ul", { class: "hemfixarna_categories" }, this.customer ? (h("div", null, this.customer.logo ? (h("div", { style: { width: '100%', display: 'flex', justifyContent: 'center' } }, h("img", { style: { maxWidth: '250px', height: 'auto', margin: '0 auto 2rem' }, src: this.customer.logo.url, alt: this.customer.post_title }))) : null, this.showMaleri() ? (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, "M\u00E5leriverktyget"), h("span", null, "maleri")), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText('maleri') }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => { var _a; return navigator.clipboard.writeText(`${(_a = process.env.API_URL) !== null && _a !== void 0 ? _a : 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=maleri`); } }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = 'maleri') }, "Ladda m\u00E5leri")))))) : null, this.customer.categories.map(c => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, c.name), h("span", null, `c-${c.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${c.id}`) }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => { var _a; return navigator.clipboard.writeText(`${(_a = process.env.API_URL) !== null && _a !== void 0 ? _a : 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=c-${c.id}`); } }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = `c-${c.id}`) }, "Ladda kategori")))), c.show_products && c.products ? (h("ul", null, c.products.map(p => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, h("div", null, h("p", null, p.fields.title), h("span", null, p.fields.ID)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => { var _a; return navigator.clipboard.writeText(`${(_a = process.env.API_URL) !== null && _a !== void 0 ? _a : 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=${p.fields.ID}`); } }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt"))))))))) : (h("ul", null, c.sub_categories &&
123
- c.sub_categories.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.name), h("span", null, `c-${sc.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${sc.id}`) }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => { var _a; return navigator.clipboard.writeText(`${(_a = process.env.API_URL) !== null && _a !== void 0 ? _a : 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=c-${c.id}`); } }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = `c-${sc.id}`) }, "Ladda kategori")))), h("ul", null, sc.products.map(p => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, h("div", null, h("p", null, p.fields.title), h("span", null, p.fields.ID)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => { var _a; return navigator.clipboard.writeText(`${(_a = process.env.API_URL) !== null && _a !== void 0 ? _a : 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=${p.fields.ID}`); } }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt")))))))))))))))))) : this.tree ? (h("div", null, this.tree.sub_cats.map(c => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, c.name), h("span", null, `category/${c.slug}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`category/${c.slug}`) }, "Kopiera slug"), h("button", { onClick: () => (this.selectedSlug = `category/${c.slug}`) }, "Ladda kategori"))), h("ul", null, c.services.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.post_title), h("span", null, `service/${sc.post_name}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`service/${sc.post_name}`) }, "Kopiera slug"), h("button", { onClick: () => (this.selectedSlug = `service/${sc.post_name}`) }, "Ladda kategori"))), h("ul", null, sc.products.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.post_title), h("span", null, `product/${sc.post_name}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`product/${sc.post_name}`) }, "Kopiera slug"), h("button", { onClick: () => (this.selectedSlug = `product/${sc.post_name}`) }, "Ladda produkt")))))))))))))))) : null)));
124
- }
125
- static get is() { return "hemfixarna-demo"; }
126
- static get encapsulation() { return "shadow"; }
127
- static get originalStyleUrls() {
128
- return {
129
- "$": ["hemfixarna-demo.scss"]
130
- };
131
- }
132
- static get styleUrls() {
133
- return {
134
- "$": ["hemfixarna-demo.css"]
135
- };
136
- }
137
- static get states() {
138
- return {
139
- "selectedSlug": {},
140
- "selectedID": {},
141
- "tooltipText": {},
142
- "tree": {},
143
- "customer": {},
144
- "widgetStyle": {},
145
- "buttonBg": {},
146
- "buttonColor": {},
147
- "partner": {},
148
- "colorAccessibility": {}
149
- };
150
- }
151
- static get watchers() {
152
- return [{
153
- "propName": "buttonBg",
154
- "methodName": "debouncedFunction"
155
- }, {
156
- "propName": "buttonColor",
157
- "methodName": "debouncedFunction"
158
- }];
159
- }
160
- }
161
- //# sourceMappingURL=hemfixarna-demo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hemfixarna-demo.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-demo/hemfixarna-demo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAsB,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAe/C,MAAM,OAAO,WAAW;;IAWd,aAAQ,GAAY,IAAI,CAAC;IA2FjC,YAAO,GAAG,8JAA8J,CAAC;;;uBAnG1I,sBAAsB;gBACpB,IAAI;oBACA,IAAI;uBACL,WAAW,CAAC,QAAQ;oBAC5B,EAAE;uBACC,EAAE;mBACQ,SAAS;8BACC,SAAS;;EAK5D,iBAAiB;IACf,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE;MAC1B,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;MAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI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AAE,CAAC,UAAU,CAAK;cACtB,gBAAO,WAAW,EAAE,CAAC,SAAS,EAAE,CAAQ,CACpC;YACN;cACE,cAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC,mBAAuB;cACtG,cAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC,qBAAyB,CAC3F,CACF;UACN,cACG,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CACrB;YACE,WAAK,KAAK,EAAC,8BAA8B;cACvC;gBACE,aAAI,EAAE,CAAC,UAAU,CAAK;gBACtB,gBAAO,WAAW,EAAE,CAAC,SAAS,EAAE,CAAQ,CACpC;cACN;gBACE,cAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC,mBAAuB;gBACtG,cAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC,oBAAwB,CAC1F,CACF,CACH,CACN,CAAC,CACC,CACF,CACN,CAAC,CACC,CACF,CACN,CAAC,CACE,CACP,CAAC,CAAC,CAAC,IAAI,CACL,CACD,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, State, Watch, getAssetPath, h } from '@stencil/core';\nimport { Business, Category, Customer, TopCategory, WidgetStyle } from '../../types';\nimport { getCustomer, getTaxonomy } from '../../utils/api';\nimport { isBusiness } from '../../utils/types';\n\ninterface ColorAccessibility {\n small: string;\n bold: string;\n large: string;\n overall: string;\n contrast: string;\n}\n\n@Component({\n tag: 'hemfixarna-demo',\n styleUrl: 'hemfixarna-demo.scss',\n shadow: true,\n})\nexport class MyComponent {\n @State() selectedSlug: string;\n @State() selectedID: string;\n @State() tooltipText: string = 'Kopiera till urklipp';\n @State() tree: Category | null = null;\n @State() customer: Customer | null = null;\n @State() widgetStyle: WidgetStyle = WidgetStyle.standard;\n @State() buttonBg: string = '';\n @State() buttonColor: string = '';\n @State() partner: Business | undefined = undefined;\n @State() colorAccessibility?: ColorAccessibility = undefined;\n private debounce?: number = null;\n\n @Watch('buttonBg')\n @Watch('buttonColor')\n debouncedFunction() {\n if (this.debounce !== null) {\n clearTimeout(this.debounce);\n this.debounce = null;\n }\n\n this.debounce = window.setTimeout(() => {\n this.checkColorAccessibility();\n this.debounce = null;\n }, 1500);\n }\n\n async checkColorAccessibility() {\n const defaultTextColor = '#fff';\n const defaultBgColor = '#c84e18';\n const firstColor = this.buttonBg.length ? (this.buttonBg.startsWith('#') ? this.buttonBg : `#${this.buttonBg}`) : defaultBgColor;\n const secondColor = this.buttonColor.length ? (this.buttonColor.startsWith('#') ? this.buttonColor : `#${this.buttonColor}`) : defaultTextColor;\n fetch('https://www.aremycolorsaccessible.com/api/are-they', {\n mode: 'cors',\n method: 'POST',\n body: JSON.stringify({ colors: [firstColor, secondColor] }),\n })\n .then(response => response.json())\n .then(json => {\n if (json && (json satisfies ColorAccessibility)) {\n this.colorAccessibility = json;\n }\n });\n // Your color accessibility logic here\n }\n\n getTopLevelCategory() {\n switch (process.env.BUSINESS as Business) {\n case Business.byggmax:\n return TopCategory.byggmax;\n default:\n return '';\n }\n }\n\n getColor(rating: string) {\n switch (rating) {\n case 'AAA':\n return 'green';\n case 'AA':\n return 'orange';\n case 'A':\n return 'yellow';\n case 'Fail':\n return 'red';\n default:\n return 'black';\n }\n }\n\n async componentWillLoad() {\n if (process.env.FORCE_OLD_TREE) {\n const tree = await getTaxonomy(this.getTopLevelCategory());\n if ((tree as any)?.code === 'not_found') {\n // console.warn('tree not found');\n } else if (tree) {\n this.tree = tree as Category;\n }\n } else {\n const partner = window.location.pathname.replace('/', '');\n this.partner = isBusiness(partner) ? partner : (process.env.BUSINESS as Business) ?? Business.kund;\n const customer = await getCustomer(this.partner);\n if (customer.code !== 'not_found' && customer) {\n this.customer = customer;\n }\n }\n }\n\n getExample() {\n return `<hemfixarna-${this.partner}${this.selectedSlug ? ` slug=\"${this.selectedSlug}\" ` : ''}${this.selectedID ? ` id=\"${this.selectedID}\" ` : ''} ${\n this.widgetStyle === WidgetStyle.standard ? '' : `widget-style=\"${this.widgetStyle}\"`\n } ${this.buttonColor.length ? `button-color=\"${this.buttonColor}\"` : ''} ${this.buttonBg.length ? `button-bg=\"${this.buttonBg}\"` : ''}></hemfixarna-${this.partner}>`;\n }\n\n copyExample() {\n navigator.clipboard.writeText(this.getExample());\n this.tooltipText = 'Snippet kopierad';\n setTimeout(() => {\n this.tooltipText = 'Kopiera till urklipp';\n }, 2000);\n }\n\n cdnLink = '<script type=\"module\" src=\"https://cdn.jsdelivr.net/npm//hemfixarna-web-components@latest/dist/hemfixarna-components/hemfixarna-components.esm.js\"></script>';\n\n copyCdn() {\n navigator.clipboard.writeText(this.cdnLink);\n this.tooltipText = 'Text kopierad';\n setTimeout(() => {\n this.tooltipText = 'Kopiera till urklipp';\n }, 2000);\n }\n\n copyNpmInstall() {\n navigator.clipboard.writeText('npm i hemfixarna-web-components');\n this.tooltipText = 'Text kopierad';\n setTimeout(() => {\n this.tooltipText = 'Kopiera till urklipp';\n }, 2000);\n }\n\n showMaleri() {\n const allCategories = this.customer?.categories.map(c => (c.sub_categories ? c.sub_categories : c)).flat();\n return allCategories?.some(c => c.add_painting);\n }\n\n render() {\n const copy = getAssetPath(`./assets/copy.png`);\n\n return (\n <div class={this.customer?.at_hemfixarna ? 'hemfixarna_hosted' : ''}>\n <div class=\"hemfixarna_scripts\">\n <div onClick={() => this.copyExample()} class=\"hemfixarna_example\">\n <p>{this.getExample()}</p>\n <img src={copy} height={20} />\n <span class=\"hemfixarna_example--tooltip\">{this.tooltipText}</span>\n </div>\n {(this.partner as Business) === Business.byggmax && (\n <hemfixarna-byggmax\n buttonColor={this.buttonColor}\n buttonBg={this.buttonBg}\n widgetStyle={this.widgetStyle}\n forceOldTree={Boolean(process.env.FORCE_OLD_TREE)}\n slug={this.selectedSlug}\n id={this.selectedID}\n />\n )}\n {this.partner === Business.skanska && <hemfixarna-skanska buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.sparfonster && (\n <hemfixarna-sparfonster buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.string && (\n <hemfixarna-string-furniture buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.hornbach && (\n <hemfixarna-hornbach isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.traningspartner && (\n <hemfixarna-traningspartner buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.zaptec && (\n <hemfixarna-zaptec isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.tesla && (\n <hemfixarna-tesla isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.forebygg && (\n <hemfixarna-forebygg buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.doro && <hemfixarna-doro buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.elfa && <hemfixarna-elfa isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.kbygg && (\n <hemfixarna-kbygg isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.fargvaruhuset && (\n <hemfixarna-fargvaruhuset isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.norrgavel && (\n <hemfixarna-norrgavel isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.klint && <hemfixarna-klint buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.flyttsmart && (\n <hemfixarna-flyttsmart buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.power && <hemfixarna-power buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.kund && <hemfixarna-kund buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n <div class=\"hemfixarna_install\">\n <div onClick={() => this.copyCdn()} class=\"hemfixarna_example\">\n <p>{this.cdnLink}</p>\n <span class=\"hemfixarna_example--tooltip\">{this.tooltipText}</span>\n <img src={copy} height={20} />\n </div>\n </div>\n <div class=\"hemfixarna_widgetstyles\">\n <h5>Widget styles</h5>\n <div>\n {Object.values(WidgetStyle).map(style => (\n <label key={style}>\n <input type=\"radio\" value={style} checked={this.widgetStyle === style} onChange={() => (this.widgetStyle = style)} />\n {style}\n </label>\n ))}\n </div>\n <div>\n <div>\n <h5>Button background color</h5>\n <input type=\"text\" value={this.buttonBg} onInput={e => (this.buttonBg = (e.target as HTMLInputElement).value)} />\n </div>\n <div>\n <h5>Button text color</h5>\n <input type=\"text\" value={this.buttonColor} onInput={e => (this.buttonColor = (e.target as HTMLInputElement).value)} />\n </div>\n </div>\n </div>\n <span>Write an hexa code no # needed</span>\n {this.colorAccessibility ? (\n <div>\n <h5>Tillgänglighetsrapport</h5>\n <div>\n <strong>Liten text:</strong>\n <span style={{ color: this.getColor(this.colorAccessibility.small) }}>{this.colorAccessibility.small}</span>\n <br />\n <strong>Fet text:</strong>\n <span style={{ color: this.getColor(this.colorAccessibility.bold) }}>{this.colorAccessibility.bold}</span>\n <br />\n <strong>Stor text:</strong>\n <span style={{ color: this.getColor(this.colorAccessibility.large) }}>{this.colorAccessibility.large}</span>\n <br />\n <strong>Kontrastförhållande:</strong> {this.colorAccessibility.contrast}\n </div>\n </div>\n ) : null}\n </div>\n <ul class=\"hemfixarna_categories\">\n {this.customer ? (\n <div>\n {this.customer.logo ? (\n <div style={{ width: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ maxWidth: '250px', height: 'auto', margin: '0 auto 2rem' }} src={this.customer.logo.url} alt={this.customer.post_title} />\n </div>\n ) : null}\n {this.showMaleri() ? (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_categories--label--big\">\n <div>\n <p>Måleriverktyget</p>\n <span>maleri</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText('maleri')}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button onClick={() => navigator.clipboard.writeText(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=maleri`)}>\n Kopiera URL\n </button>\n ) : (\n <button onClick={() => (this.selectedID = 'maleri')}>Ladda måleri</button>\n )}\n </div>\n </div>\n </li>\n ) : null}\n {this.customer.categories.map(c => (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_categories--label--big\">\n <div>\n <p>{c.name}</p>\n <span>{`c-${c.id}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`c-${c.id}`)}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button onClick={() => navigator.clipboard.writeText(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=c-${c.id}`)}>\n Kopiera URL\n </button>\n ) : (\n <button onClick={() => (this.selectedID = `c-${c.id}`)}>Ladda kategori</button>\n )}\n </div>\n </div>\n {c.show_products && c.products ? (\n <ul>\n {c.products.map(p => (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_product--label\">\n <div>\n <p>{p.fields.title}</p>\n <span>{p.fields.ID}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(String(p.fields.ID))}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button\n onClick={() =>\n navigator.clipboard.writeText(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=${p.fields.ID}`)\n }\n >\n Kopiera URL\n </button>\n ) : (\n <button onClick={() => (this.selectedID = String(p.fields.ID))}>Ladda produkt</button>\n )}\n </div>\n </div>\n </li>\n ))}\n </ul>\n ) : (\n <ul>\n {c.sub_categories &&\n c.sub_categories.map(sc => (\n <li>\n <div class=\"hemfixarna_categories--label\">\n <div>\n <p>{sc.name}</p>\n <span>{`c-${sc.id}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`c-${sc.id}`)}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button\n onClick={() =>\n navigator.clipboard.writeText(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=c-${c.id}`)\n }\n >\n Kopiera URL\n </button>\n ) : (\n <button onClick={() => (this.selectedID = `c-${sc.id}`)}>Ladda kategori</button>\n )}\n </div>\n </div>\n <ul>\n {sc.products.map(p => (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_product--label\">\n <div>\n <p>{p.fields.title}</p>\n <span>{p.fields.ID}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(String(p.fields.ID))}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button\n onClick={() =>\n navigator.clipboard.writeText(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=${p.fields.ID}`)\n }\n >\n Kopiera URL\n </button>\n ) : (\n <button onClick={() => (this.selectedID = String(p.fields.ID))}>Ladda produkt</button>\n )}\n </div>\n </div>\n </li>\n ))}\n </ul>\n </li>\n ))}\n </ul>\n )}\n </li>\n ))}\n </div>\n ) : this.tree ? (\n <div>\n {this.tree.sub_cats.map(c => (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_categories--label--big\">\n <div>\n <p>{c.name}</p>\n <span>{`category/${c.slug}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`category/${c.slug}`)}>Kopiera slug</button>\n <button onClick={() => (this.selectedSlug = `category/${c.slug}`)}>Ladda kategori</button>\n </div>\n </div>\n <ul>\n {c.services.map(sc => (\n <li>\n <div class=\"hemfixarna_categories--label\">\n <div>\n <p>{sc.post_title}</p>\n <span>{`service/${sc.post_name}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`service/${sc.post_name}`)}>Kopiera slug</button>\n <button onClick={() => (this.selectedSlug = `service/${sc.post_name}`)}>Ladda kategori</button>\n </div>\n </div>\n <ul>\n {sc.products.map(sc => (\n <li>\n <div class=\"hemfixarna_categories--label\">\n <div>\n <p>{sc.post_title}</p>\n <span>{`product/${sc.post_name}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`product/${sc.post_name}`)}>Kopiera slug</button>\n <button onClick={() => (this.selectedSlug = `product/${sc.post_name}`)}>Ladda produkt</button>\n </div>\n </div>\n </li>\n ))}\n </ul>\n </li>\n ))}\n </ul>\n </li>\n ))}\n </div>\n ) : null}\n </ul>\n </div>\n );\n }\n}\n"]}
@@ -1,91 +0,0 @@
1
- import { h } from '@stencil/core';
2
- import Personnummer from 'personnummer';
3
- import state from '../../store';
4
- import apiSearch from '../../utils/creditSafe';
5
- import { scrollToTop } from '../../utils/scroll';
6
- export class HemfixarnaGetuser {
7
- constructor() {
8
- this.handleChangeEmail = (e) => {
9
- this.emailError = null;
10
- this.email = e.target.value;
11
- };
12
- this.handleChangePhone = (e) => {
13
- this.phoneError = null;
14
- this.phone = e.target.value;
15
- };
16
- this.handleChangessn = (e) => {
17
- this.ssnError = null;
18
- this.ssn = e.target.value;
19
- };
20
- this.handleSubmit = async (e) => {
21
- e.preventDefault();
22
- const emailRegex = new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
23
- const validEmail = emailRegex.test(this.email);
24
- if (!validEmail) {
25
- this.emailError = 'Ange en giltig e-postadress';
26
- }
27
- const validPhone = /^[\d\s()+-]{6,}$/.test(this.phone);
28
- if (!validPhone) {
29
- this.phoneError = 'Ange ett giltigt telefonnummer';
30
- }
31
- const validssn = Personnummer.valid(this.ssn);
32
- if (!validssn) {
33
- this.ssnError = 'Ange ett giltigt personnummer';
34
- }
35
- else if (validssn) {
36
- const pn = Personnummer.parse(this.ssn).format(true);
37
- this.ssn = [pn.slice(0, 8), '-', pn.slice(8)].join('');
38
- }
39
- if (validEmail && validPhone && validssn) {
40
- try {
41
- const creditSafeData = await apiSearch(this.ssn);
42
- if (creditSafeData) {
43
- state.creditSafeUser = creditSafeData;
44
- state.checkoutStep = 2;
45
- state.user = Object.assign(Object.assign({}, creditSafeData), { email: this.email, phone: this.phone, ssn: this.ssn });
46
- }
47
- else {
48
- this.ssnError = 'Vi kunde tyvärr inte hitta en address med ditt angivna personnummer';
49
- }
50
- }
51
- catch (e) {
52
- this.ssnError = 'Vi kunde tyvärr inte hitta en address med ditt angivna personnummer';
53
- console.log(e);
54
- }
55
- finally {
56
- const el = this.el.closest('.hemfixarna_content');
57
- scrollToTop(el);
58
- }
59
- }
60
- };
61
- this.render = () => {
62
- return (h("form", { class: "mb-2", onSubmit: e => this.handleSubmit(e) }, h("div", null, h("input", { class: `${this.email.length ? 'input_active' : ''}`, onChange: e => this.handleChangeEmail(e), type: "email", name: "email", value: this.email }), h("label", { htmlFor: "email" }, "E-post ")), this.emailError && h("span", null, this.emailError), h("div", null, h("input", { class: `${this.phone.length ? 'input_active' : ''}`, onChange: e => this.handleChangePhone(e), type: "tel", name: "phone", value: this.phone }), h("label", { htmlFor: "phone" }, "Mobiltelefon ")), this.phoneError && h("span", null, this.phoneError), h("div", null, h("input", { class: `${this.ssn.length ? 'input_active' : ''}`, onChange: e => this.handleChangessn(e), type: "tel", name: "ssn", value: this.ssn }), h("label", { htmlFor: "phone" }, "Personnummer*")), this.ssnError && h("span", null, this.ssnError), h("input", { type: "submit", value: "Forts\u00E4tt*" }), h("p", null, "*Vi h\u00E4mtar din adress")));
63
- };
64
- this.email = '';
65
- this.emailError = null;
66
- this.phone = '';
67
- this.phoneError = null;
68
- this.ssn = '';
69
- this.ssnError = null;
70
- }
71
- componentWillLoad() {
72
- if (state.user) {
73
- this.email = state.user.email;
74
- this.phone = state.user.phone;
75
- this.ssn = state.user.ssn;
76
- }
77
- }
78
- static get is() { return "hemfixarna-getuser"; }
79
- static get states() {
80
- return {
81
- "email": {},
82
- "emailError": {},
83
- "phone": {},
84
- "phoneError": {},
85
- "ssn": {},
86
- "ssnError": {}
87
- };
88
- }
89
- static get elementRef() { return "el"; }
90
- }
91
- //# sourceMappingURL=hemfixarna-getuser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hemfixarna-getuser.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-getuser/hemfixarna-getuser.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,YAAY,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO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A4B,CACvB,CACR,CAAC;IACJ,CAAC,CAAC;iBAlGuB,EAAE;sBACU,IAAI;iBAChB,EAAE;sBACU,IAAI;eAClB,EAAE;oBACU,IAAI;;EAGvC,iBAAiB;IACf,IAAI,KAAK,CAAC,IAAI,EAAE;MACd,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;MAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;MAC9B,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;KAC3B;EACH,CAAC;;;;;;;;;;;CAqFF","sourcesContent":["import { Component, Element, State, h } from '@stencil/core';\nimport Personnummer from 'personnummer';\nimport state from '../../store';\nimport apiSearch from '../../utils/creditSafe';\nimport { scrollToTop } from '../../utils/scroll';\n\n@Component({\n tag: 'hemfixarna-getuser',\n shadow: false,\n})\nexport class HemfixarnaGetuser {\n @State() email: string = '';\n @State() emailError: string | null = null;\n @State() phone: string = '';\n @State() phoneError: string | null = null;\n @State() ssn: string = '';\n @State() ssnError: string | null = null;\n @Element() private el: HTMLElement;\n\n componentWillLoad() {\n if (state.user) {\n this.email = state.user.email;\n this.phone = state.user.phone;\n this.ssn = state.user.ssn;\n }\n }\n\n handleChangeEmail = (e: Event) => {\n this.emailError = null;\n this.email = (e.target as HTMLInputElement).value;\n };\n\n handleChangePhone = (e: Event) => {\n this.phoneError = null;\n this.phone = (e.target as HTMLInputElement).value;\n };\n\n handleChangessn = (e: Event) => {\n this.ssnError = null;\n this.ssn = (e.target as HTMLInputElement).value;\n };\n\n handleSubmit = async (e: Event) => {\n e.preventDefault();\n const emailRegex = new RegExp(\n /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n );\n const validEmail = emailRegex.test(this.email);\n if (!validEmail) {\n this.emailError = 'Ange en giltig e-postadress';\n }\n const validPhone = /^[\\d\\s()+-]{6,}$/.test(this.phone);\n if (!validPhone) {\n this.phoneError = 'Ange ett giltigt telefonnummer';\n }\n const validssn = Personnummer.valid(this.ssn);\n if (!validssn) {\n this.ssnError = 'Ange ett giltigt personnummer';\n } else if (validssn) {\n const pn = Personnummer.parse(this.ssn).format(true);\n this.ssn = [pn.slice(0, 8), '-', pn.slice(8)].join('');\n }\n if (validEmail && validPhone && validssn) {\n try {\n const creditSafeData = await apiSearch(this.ssn);\n if (creditSafeData) {\n state.creditSafeUser = creditSafeData;\n state.checkoutStep = 2;\n state.user = {\n ...creditSafeData,\n email: this.email,\n phone: this.phone,\n ssn: this.ssn,\n };\n } else {\n this.ssnError = 'Vi kunde tyvärr inte hitta en address med ditt angivna personnummer';\n }\n } catch (e) {\n this.ssnError = 'Vi kunde tyvärr inte hitta en address med ditt angivna personnummer';\n console.log(e);\n } finally {\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n }\n }\n };\n\n render = () => {\n return (\n <form class=\"mb-2\" onSubmit={e => this.handleSubmit(e)}>\n <div>\n <input class={`${this.email.length ? 'input_active' : ''}`} onChange={e => this.handleChangeEmail(e)} type=\"email\" name=\"email\" value={this.email} />\n <label htmlFor=\"email\">E-post </label>\n </div>\n {this.emailError && <span>{this.emailError}</span>}\n <div>\n <input class={`${this.phone.length ? 'input_active' : ''}`} onChange={e => this.handleChangePhone(e)} type=\"tel\" name=\"phone\" value={this.phone} />\n <label htmlFor=\"phone\">Mobiltelefon </label>\n </div>\n {this.phoneError && <span>{this.phoneError}</span>}\n <div>\n <input class={`${this.ssn.length ? 'input_active' : ''}`} onChange={e => this.handleChangessn(e)} type=\"tel\" name=\"ssn\" value={this.ssn} />\n <label htmlFor=\"phone\">Personnummer*</label>\n </div>\n {this.ssnError && <span>{this.ssnError}</span>}\n <input type=\"submit\" value=\"Fortsätt*\" />\n <p>*Vi hämtar din adress</p>\n </form>\n );\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hemfixarna-info.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-info/hemfixarna-info.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,MAAM,aAAa,CAAC;AAMhC,MAAM,OAAO,cAAc;EAJ3B;IAKE,SAAI,GAAG,YAAY,CAAC,yBAAyB,CAAC,CAAC;GAuDhD;EArDC,MAAM;;IACJ,MAAM,OAAO,GAAG,YAAY,CAAC,sBAAsB,CAAC,CAAC;IACrD,OAAO,CACL,WAAK,KAAK,EAAC,iBAAiB;MACzB,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAChB,EAAC,QAAQ;QACP,cAAK,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAM;QACpC,aAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAK,CACxB,CACZ,CAAC,CAAC,CAAC,CACF,cAAK,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAM,CACzC;MACD,UAAI,KAAK,EAAC,qBAAqB,IAC5B,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAChB,EAAC,QAAQ,QACN,CAAA,MAAA,KAAK,CAAC,QAAQ,CAAC,YAAY,0CAAE,MAAM,EAAC,CAAC,CAAC,CACrC,EAAC,QAAQ,QACN,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CACpC,UAAI,GAAG,EAAE,CAAC,CAAC,IAAI;QACb,WAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,SAAS,GAAG;QACnC,aAAI,CAAC,CAAC,IAAI,CAAK,CACZ,CACN,CAAC,CACO,CACZ,CAAC,CAAC,CAAC,CACF,EAAC,QAAQ,QACN,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAC5B,UAAI,GAAG,EAAE,CAAC,CAAC,WAAW;QACpB,WAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,SAAS,GAAG;QACnC,aAAI,CAAC,CAAC,WAAW,CAAK,CACnB,CACN,CAAC,CACO,CACZ,CACQ,CACZ,CAAC,CAAC,CAAC,CACF,EAAC,QAAQ,QACN,KAAK,CAAC,QAAQ,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAC7C,UAAI,GAAG,EAAE,CAAC,CAAC,IAAI;QACb,WAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,SAAS,GAAG;QACnC,aAAI,CAAC,CAAC,IAAI,CAAK,CACZ,CACN,CAAC,CACO,CACZ,CACE;MACL,WAAK,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAC,YAAY,GAAG;MACpD,SAAG,KAAK,EAAC,0BAA0B,EAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAC7E,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CACvB,CACA,CACP,CAAC;EACJ,CAAC;;CACF","sourcesContent":["import { Component, Fragment, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\n\n@Component({\n tag: 'hemfixarna-info',\n shadow: false,\n})\nexport class HemfixarnaInfo {\n logo = getAssetPath(`./assets/hemfixarna.svg`);\n\n render() {\n const checked = getAssetPath(`./assets/checked.svg`);\n return (\n <div class=\"hemfixarna_info\">\n {state.step < 5 ? (\n <Fragment>\n <h2>{state.customer.info_title}</h2>\n <p>{state.customer.info_text}</p>\n </Fragment>\n ) : (\n <h2>{state.customer.checkout_title}</h2>\n )}\n <ul class=\"hemfixarna_features\">\n {state.step < 5 ? (\n <Fragment>\n {state.customer.trust_badges?.length ? (\n <Fragment>\n {state.customer.trust_badges.map(l => (\n <li key={l.text}>\n <img src={checked} alt=\"checked\" />\n <p>{l.text}</p>\n </li>\n ))}\n </Fragment>\n ) : (\n <Fragment>\n {state.options.trust.map(l => (\n <li key={l.trust_badge}>\n <img src={checked} alt=\"checked\" />\n <p>{l.trust_badge}</p>\n </li>\n ))}\n </Fragment>\n )}\n </Fragment>\n ) : (\n <Fragment>\n {state.customer.checkout_trust_badges.map(l => (\n <li key={l.text}>\n <img src={checked} alt=\"checked\" />\n <p>{l.text}</p>\n </li>\n ))}\n </Fragment>\n )}\n </ul>\n <img src={this.logo} width={200} alt=\"hemfixarna\" />\n <a class=\"hemfixarna_product--link\" target=\"_blank\" href={state.options.link.url}>\n {state.options.link.title}\n </a>\n </div>\n );\n }\n}\n"]}
@@ -1,76 +0,0 @@
1
- :host .invoice {
2
- gap: 16px;
3
- display: grid;
4
- }
5
- :host .invoice form > span {
6
- text-align: center;
7
- padding: 16px 0;
8
- }
9
- :host .invoice img {
10
- right: unset;
11
- left: unset;
12
- position: initial;
13
- transform: none;
14
- }
15
- :host .invoice label {
16
- cursor: pointer;
17
- font-size: 14px;
18
- display: flex;
19
- align-items: flex-start;
20
- padding: 16px 0;
21
- }
22
- :host .invoice label input {
23
- margin: 0 5px 0 0;
24
- accent-color: #ea662c;
25
- }
26
- :host .invoice-preview {
27
- display: flex;
28
- gap: 4px;
29
- }
30
- :host .invoice-preview div {
31
- position: relative;
32
- }
33
- :host .invoice-preview div button {
34
- position: absolute;
35
- top: 0;
36
- right: 0;
37
- padding: 0;
38
- }
39
- :host .invoice-preview div button img {
40
- width: 24px;
41
- height: 24px;
42
- }
43
- :host .invoice-preview div > img {
44
- width: 100px;
45
- height: 80px;
46
- object-fit: cover;
47
- }
48
- :host .invoice input[type=email],
49
- :host .invoice input[type=tel],
50
- :host .invoice textarea {
51
- padding: 16px;
52
- border: 1px solid #fcd9c9;
53
- font-size: 16px;
54
- }
55
- :host .invoice textarea {
56
- resize: none;
57
- height: 200px;
58
- font-family: "Inter", sans-serif;
59
- }
60
- :host .invoice div:has(> input[type=file]) {
61
- display: flex;
62
- align-items: center;
63
- justify-content: center;
64
- cursor: pointer;
65
- background: #fff;
66
- border: 1px solid #fcd9c9;
67
- padding: 32px 16px;
68
- gap: 16px;
69
- }
70
- :host .invoice div:has(> input[type=file]) span {
71
- color: #000;
72
- font-size: 12px;
73
- }
74
- :host .invoice input[type=file] {
75
- display: none;
76
- }