hemfixarna-web-components 1.8.3 → 1.8.5

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 (366) hide show
  1. package/dist/{collection/utils/api.js → hemfixarna-components/api-e3c51cb3.js} +7 -4
  2. package/dist/hemfixarna-components/api-e3c51cb3.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-b3b6593c.js} +7 -13
  6. package/dist/hemfixarna-components/calc-b3b6593c.js.map +1 -0
  7. package/dist/hemfixarna-components/css-shim-4fde41f0.js +6 -0
  8. package/dist/hemfixarna-components/css-shim-4fde41f0.js.map +1 -0
  9. package/dist/hemfixarna-components/dom-8de30773.js +75 -0
  10. package/dist/hemfixarna-components/dom-8de30773.js.map +1 -0
  11. package/dist/{collection/utils/enviroment.js → hemfixarna-components/enviroment-fd0a763a.js} +8 -6
  12. package/dist/hemfixarna-components/enviroment-fd0a763a.js.map +1 -0
  13. package/dist/{collection/utils/form.js → hemfixarna-components/form-c53dca29.js} +4 -2
  14. package/dist/hemfixarna-components/form-c53dca29.js.map +1 -0
  15. package/dist/{collection/components/hemfixarna-address/hemfixarna-address.js → hemfixarna-components/hemfixarna-address.entry.js} +14 -20
  16. package/dist/hemfixarna-components/hemfixarna-address.entry.js.map +1 -0
  17. package/dist/hemfixarna-components/hemfixarna-box.entry.js +49 -0
  18. package/dist/hemfixarna-components/hemfixarna-box.entry.js.map +1 -0
  19. package/dist/{collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js → hemfixarna-components/hemfixarna-breadcrumbs.entry.js} +13 -28
  20. package/dist/hemfixarna-components/hemfixarna-breadcrumbs.entry.js.map +1 -0
  21. package/dist/{esm → hemfixarna-components}/hemfixarna-byggmax.entry.js +2 -2
  22. package/dist/hemfixarna-components/hemfixarna-byggmax.entry.js.map +1 -0
  23. package/dist/{collection/components/hemfixarna-cart/hemfixarna-cart.js → hemfixarna-components/hemfixarna-cart.entry.js} +12 -6
  24. package/dist/hemfixarna-components/hemfixarna-cart.entry.js.map +1 -0
  25. package/dist/{esm → hemfixarna-components}/hemfixarna-category.entry.js +2 -2
  26. package/dist/hemfixarna-components/hemfixarna-category.entry.js.map +1 -0
  27. package/dist/{collection/components/hemfixarna-checkout/hemfixarna-checkout.js → hemfixarna-components/hemfixarna-checkout.entry.js} +33 -26
  28. package/dist/hemfixarna-components/hemfixarna-checkout.entry.js.map +1 -0
  29. package/dist/hemfixarna-components/hemfixarna-component.entry.js +189 -0
  30. package/dist/hemfixarna-components/hemfixarna-component.entry.js.map +1 -0
  31. package/dist/hemfixarna-components/hemfixarna-components.esm.js +162 -1
  32. package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
  33. package/dist/{collection/components/hemfixarna-contact/hemfixarna-contact.js → hemfixarna-components/hemfixarna-contact.entry.js} +11 -29
  34. package/dist/hemfixarna-components/hemfixarna-contact.entry.js.map +1 -0
  35. package/dist/{collection/components/hemfixarna-demo/hemfixarna-demo.js → hemfixarna-components/hemfixarna-demo.entry.js} +21 -46
  36. package/dist/hemfixarna-components/hemfixarna-demo.entry.js.map +1 -0
  37. package/dist/{esm → hemfixarna-components}/hemfixarna-doro.entry.js +2 -2
  38. package/dist/hemfixarna-components/hemfixarna-doro.entry.js.map +1 -0
  39. package/dist/{esm → hemfixarna-components}/hemfixarna-elfa.entry.js +2 -2
  40. package/dist/hemfixarna-components/hemfixarna-elfa.entry.js.map +1 -0
  41. package/dist/{esm → hemfixarna-components}/hemfixarna-fargvaruhuset.entry.js +2 -2
  42. package/dist/hemfixarna-components/hemfixarna-fargvaruhuset.entry.js.map +1 -0
  43. package/dist/{esm → hemfixarna-components}/hemfixarna-flyttsmart.entry.js +2 -2
  44. package/dist/hemfixarna-components/hemfixarna-flyttsmart.entry.js.map +1 -0
  45. package/dist/{esm → hemfixarna-components}/hemfixarna-forebygg.entry.js +2 -2
  46. package/dist/hemfixarna-components/hemfixarna-forebygg.entry.js.map +1 -0
  47. package/dist/hemfixarna-components/hemfixarna-getuser.entry.js +770 -0
  48. package/dist/hemfixarna-components/hemfixarna-getuser.entry.js.map +1 -0
  49. package/dist/{esm → hemfixarna-components}/hemfixarna-hornbach.entry.js +2 -2
  50. package/dist/hemfixarna-components/hemfixarna-hornbach.entry.js.map +1 -0
  51. package/dist/{collection/components/hemfixarna-info/hemfixarna-info.js → hemfixarna-components/hemfixarna-info.entry.js} +11 -7
  52. package/dist/hemfixarna-components/hemfixarna-info.entry.js.map +1 -0
  53. package/dist/{collection/components/hemfixarna-invoice/hemfixarna-invoice.js → hemfixarna-components/hemfixarna-invoice.entry.js} +16 -27
  54. package/dist/hemfixarna-components/hemfixarna-invoice.entry.js.map +1 -0
  55. package/dist/{esm → hemfixarna-components}/hemfixarna-kbygg.entry.js +2 -2
  56. package/dist/hemfixarna-components/hemfixarna-kbygg.entry.js.map +1 -0
  57. package/dist/{esm → hemfixarna-components}/hemfixarna-klint.entry.js +2 -2
  58. package/dist/hemfixarna-components/hemfixarna-klint.entry.js.map +1 -0
  59. package/dist/{esm → hemfixarna-components}/hemfixarna-kund.entry.js +2 -2
  60. package/dist/hemfixarna-components/hemfixarna-kund.entry.js.map +1 -0
  61. package/dist/{esm → hemfixarna-components}/hemfixarna-norrgavel.entry.js +2 -2
  62. package/dist/hemfixarna-components/hemfixarna-norrgavel.entry.js.map +1 -0
  63. package/dist/{collection/components/hemfixarna-order/hemfixarna-order.js → hemfixarna-components/hemfixarna-order.entry.js} +11 -7
  64. package/dist/hemfixarna-components/hemfixarna-order.entry.js.map +1 -0
  65. package/dist/{collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js → hemfixarna-components/hemfixarna-orderrows.entry.js} +12 -30
  66. package/dist/hemfixarna-components/hemfixarna-orderrows.entry.js.map +1 -0
  67. package/dist/{esm → hemfixarna-components}/hemfixarna-power.entry.js +2 -2
  68. package/dist/hemfixarna-components/hemfixarna-power.entry.js.map +1 -0
  69. package/dist/{collection/components/hemfixarna-product/hemfixarna-product.js → hemfixarna-components/hemfixarna-product.entry.js} +18 -27
  70. package/dist/hemfixarna-components/hemfixarna-product.entry.js.map +1 -0
  71. package/dist/{esm → hemfixarna-components}/hemfixarna-service.entry.js +2 -2
  72. package/dist/hemfixarna-components/hemfixarna-service.entry.js.map +1 -0
  73. package/dist/{esm → hemfixarna-components}/hemfixarna-skanska.entry.js +2 -2
  74. package/dist/hemfixarna-components/hemfixarna-skanska.entry.js.map +1 -0
  75. package/dist/{esm → hemfixarna-components}/hemfixarna-sparfonster.entry.js +2 -2
  76. package/dist/hemfixarna-components/hemfixarna-sparfonster.entry.js.map +1 -0
  77. package/dist/{collection/components/hemfixarna-start/hemfixarna-start.js → hemfixarna-components/hemfixarna-start.entry.js} +11 -48
  78. package/dist/hemfixarna-components/hemfixarna-start.entry.js.map +1 -0
  79. package/dist/{esm → hemfixarna-components}/hemfixarna-string-furniture.entry.js +2 -2
  80. package/dist/hemfixarna-components/hemfixarna-string-furniture.entry.js.map +1 -0
  81. package/dist/{esm → hemfixarna-components}/hemfixarna-superfront.entry.js +2 -2
  82. package/dist/hemfixarna-components/hemfixarna-superfront.entry.js.map +1 -0
  83. package/dist/{esm → hemfixarna-components}/hemfixarna-tesla.entry.js +2 -2
  84. package/dist/hemfixarna-components/hemfixarna-tesla.entry.js.map +1 -0
  85. package/dist/{esm → hemfixarna-components}/hemfixarna-traningspartner.entry.js +2 -2
  86. package/dist/hemfixarna-components/hemfixarna-traningspartner.entry.js.map +1 -0
  87. package/dist/{esm → hemfixarna-components}/hemfixarna-zaptec.entry.js +2 -2
  88. package/dist/hemfixarna-components/hemfixarna-zaptec.entry.js.map +1 -0
  89. package/dist/{esm/index-8282f88e.js → hemfixarna-components/index-21ba2b05.js} +2 -2
  90. package/dist/{esm/index-8282f88e.js.map → hemfixarna-components/index-21ba2b05.js.map} +1 -1
  91. package/dist/hemfixarna-components/index-2ce8b901.js +3461 -0
  92. package/dist/hemfixarna-components/index-2ce8b901.js.map +1 -0
  93. package/dist/{esm/index-c8aebf0d.js → hemfixarna-components/index-c8ce6f4b.js} +6 -1
  94. package/dist/hemfixarna-components/index-c8ce6f4b.js.map +1 -0
  95. package/dist/hemfixarna-components/index.esm.js +1 -0
  96. package/dist/hemfixarna-components/index.esm.js.map +1 -1
  97. package/dist/{collection/utils/scroll.js → hemfixarna-components/scroll-6c26b5da.js} +4 -2
  98. package/dist/hemfixarna-components/scroll-6c26b5da.js.map +1 -0
  99. package/dist/hemfixarna-components/shadow-css-af2290df.js +389 -0
  100. package/dist/hemfixarna-components/shadow-css-af2290df.js.map +1 -0
  101. package/dist/{collection/utils/types.js → hemfixarna-components/types-6da209ae.js} +6 -3
  102. package/dist/hemfixarna-components/types-6da209ae.js.map +1 -0
  103. package/dist/types/stencil-public-runtime.d.ts +3 -0
  104. package/dist/types/types/index.d.ts +6 -1
  105. package/package.json +1 -1
  106. package/dist/cjs/hemfixarna-address_15.cjs.entry.js +0 -2180
  107. package/dist/cjs/hemfixarna-address_15.cjs.entry.js.map +0 -1
  108. package/dist/cjs/hemfixarna-byggmax.cjs.entry.js +0 -27
  109. package/dist/cjs/hemfixarna-byggmax.cjs.entry.js.map +0 -1
  110. package/dist/cjs/hemfixarna-category.cjs.entry.js +0 -28
  111. package/dist/cjs/hemfixarna-category.cjs.entry.js.map +0 -1
  112. package/dist/cjs/hemfixarna-components.cjs.js +0 -28
  113. package/dist/cjs/hemfixarna-components.cjs.js.map +0 -1
  114. package/dist/cjs/hemfixarna-doro.cjs.entry.js +0 -26
  115. package/dist/cjs/hemfixarna-doro.cjs.entry.js.map +0 -1
  116. package/dist/cjs/hemfixarna-elfa.cjs.entry.js +0 -26
  117. package/dist/cjs/hemfixarna-elfa.cjs.entry.js.map +0 -1
  118. package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js +0 -23
  119. package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js.map +0 -1
  120. package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js +0 -23
  121. package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js.map +0 -1
  122. package/dist/cjs/hemfixarna-forebygg.cjs.entry.js +0 -26
  123. package/dist/cjs/hemfixarna-forebygg.cjs.entry.js.map +0 -1
  124. package/dist/cjs/hemfixarna-hornbach.cjs.entry.js +0 -26
  125. package/dist/cjs/hemfixarna-hornbach.cjs.entry.js.map +0 -1
  126. package/dist/cjs/hemfixarna-kbygg.cjs.entry.js +0 -23
  127. package/dist/cjs/hemfixarna-kbygg.cjs.entry.js.map +0 -1
  128. package/dist/cjs/hemfixarna-klint.cjs.entry.js +0 -23
  129. package/dist/cjs/hemfixarna-klint.cjs.entry.js.map +0 -1
  130. package/dist/cjs/hemfixarna-kund.cjs.entry.js +0 -23
  131. package/dist/cjs/hemfixarna-kund.cjs.entry.js.map +0 -1
  132. package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js +0 -23
  133. package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js.map +0 -1
  134. package/dist/cjs/hemfixarna-power.cjs.entry.js +0 -23
  135. package/dist/cjs/hemfixarna-power.cjs.entry.js.map +0 -1
  136. package/dist/cjs/hemfixarna-service.cjs.entry.js +0 -24
  137. package/dist/cjs/hemfixarna-service.cjs.entry.js.map +0 -1
  138. package/dist/cjs/hemfixarna-skanska.cjs.entry.js +0 -26
  139. package/dist/cjs/hemfixarna-skanska.cjs.entry.js.map +0 -1
  140. package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js +0 -23
  141. package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js.map +0 -1
  142. package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js +0 -26
  143. package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js.map +0 -1
  144. package/dist/cjs/hemfixarna-superfront.cjs.entry.js +0 -24
  145. package/dist/cjs/hemfixarna-superfront.cjs.entry.js.map +0 -1
  146. package/dist/cjs/hemfixarna-tesla.cjs.entry.js +0 -23
  147. package/dist/cjs/hemfixarna-tesla.cjs.entry.js.map +0 -1
  148. package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js +0 -23
  149. package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js.map +0 -1
  150. package/dist/cjs/hemfixarna-zaptec.cjs.entry.js +0 -23
  151. package/dist/cjs/hemfixarna-zaptec.cjs.entry.js.map +0 -1
  152. package/dist/cjs/index-6af772cf.js +0 -265
  153. package/dist/cjs/index-6af772cf.js.map +0 -1
  154. package/dist/cjs/index-739bf321.js +0 -44
  155. package/dist/cjs/index-739bf321.js.map +0 -1
  156. package/dist/cjs/index-b83343b9.js +0 -1687
  157. package/dist/cjs/index-b83343b9.js.map +0 -1
  158. package/dist/cjs/index.cjs.js +0 -4
  159. package/dist/cjs/index.cjs.js.map +0 -1
  160. package/dist/cjs/loader.cjs.js +0 -24
  161. package/dist/cjs/loader.cjs.js.map +0 -1
  162. package/dist/collection/assets/back.svg +0 -3
  163. package/dist/collection/assets/cart.svg +0 -10
  164. package/dist/collection/assets/checked.svg +0 -10
  165. package/dist/collection/assets/close.svg +0 -5
  166. package/dist/collection/assets/copy.png +0 -0
  167. package/dist/collection/assets/date.svg +0 -6
  168. package/dist/collection/assets/down.svg +0 -3
  169. package/dist/collection/assets/drag-drop.svg +0 -3
  170. package/dist/collection/assets/elfa.png +0 -0
  171. package/dist/collection/assets/gubbe-pensel.svg +0 -1
  172. package/dist/collection/assets/hemfixarna.svg +0 -11
  173. package/dist/collection/assets/hornbach/logo.svg +0 -42
  174. package/dist/collection/assets/hornbach/nav.jpg +0 -0
  175. package/dist/collection/assets/info.svg +0 -5
  176. package/dist/collection/assets/kbygg.svg +0 -29
  177. package/dist/collection/assets/minus.svg +0 -4
  178. package/dist/collection/assets/montering.svg +0 -15
  179. package/dist/collection/assets/norrgavel.svg +0 -1
  180. package/dist/collection/assets/pensel.svg +0 -1
  181. package/dist/collection/assets/plus.svg +0 -5
  182. package/dist/collection/assets/spinner.gif +0 -0
  183. package/dist/collection/assets/tesla.svg +0 -1
  184. package/dist/collection/assets/zaptec.svg +0 -1
  185. package/dist/collection/collection-manifest.json +0 -47
  186. package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.css +0 -0
  187. package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js +0 -122
  188. package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js.map +0 -1
  189. package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.css +0 -0
  190. package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js +0 -104
  191. package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js.map +0 -1
  192. package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.css +0 -0
  193. package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js +0 -104
  194. package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js.map +0 -1
  195. package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js +0 -94
  196. package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js.map +0 -1
  197. package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js +0 -94
  198. package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js.map +0 -1
  199. package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.css +0 -0
  200. package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js +0 -104
  201. package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js.map +0 -1
  202. package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.css +0 -0
  203. package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js +0 -104
  204. package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js.map +0 -1
  205. package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js +0 -94
  206. package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js.map +0 -1
  207. package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js +0 -94
  208. package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js.map +0 -1
  209. package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js +0 -94
  210. package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js.map +0 -1
  211. package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js +0 -94
  212. package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js.map +0 -1
  213. package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js +0 -94
  214. package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js.map +0 -1
  215. package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.css +0 -0
  216. package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js +0 -104
  217. package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js.map +0 -1
  218. package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js +0 -94
  219. package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js.map +0 -1
  220. package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js +0 -104
  221. package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js.map +0 -1
  222. package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string.css +0 -0
  223. package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js +0 -113
  224. package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js.map +0 -1
  225. package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js +0 -94
  226. package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js.map +0 -1
  227. package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js +0 -94
  228. package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js.map +0 -1
  229. package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js +0 -94
  230. package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js.map +0 -1
  231. package/dist/collection/components/hemfixarna-address/hemfixarna-address.js.map +0 -1
  232. package/dist/collection/components/hemfixarna-box/hemfixarna-box.js +0 -138
  233. package/dist/collection/components/hemfixarna-box/hemfixarna-box.js.map +0 -1
  234. package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js.map +0 -1
  235. package/dist/collection/components/hemfixarna-cart/hemfixarna-cart.js.map +0 -1
  236. package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js +0 -18
  237. package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js.map +0 -1
  238. package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js.map +0 -1
  239. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +0 -330
  240. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +0 -1
  241. package/dist/collection/components/hemfixarna-component/hemfixarna.css +0 -1061
  242. package/dist/collection/components/hemfixarna-contact/hemfixarna-contact.js.map +0 -1
  243. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.css +0 -135
  244. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +0 -1
  245. package/dist/collection/components/hemfixarna-getuser/hemfixarna-getuser.js +0 -91
  246. package/dist/collection/components/hemfixarna-getuser/hemfixarna-getuser.js.map +0 -1
  247. package/dist/collection/components/hemfixarna-info/hemfixarna-info.js.map +0 -1
  248. package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.css +0 -76
  249. package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +0 -1
  250. package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +0 -1
  251. package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js.map +0 -1
  252. package/dist/collection/components/hemfixarna-product/hemfixarna-product.css +0 -0
  253. package/dist/collection/components/hemfixarna-product/hemfixarna-product.js.map +0 -1
  254. package/dist/collection/components/hemfixarna-service/hemfixarna-service.js +0 -14
  255. package/dist/collection/components/hemfixarna-service/hemfixarna-service.js.map +0 -1
  256. package/dist/collection/components/hemfixarna-start/hemfixarna-start.js.map +0 -1
  257. package/dist/collection/index.js +0 -2
  258. package/dist/collection/index.js.map +0 -1
  259. package/dist/collection/store/index.js +0 -69
  260. package/dist/collection/store/index.js.map +0 -1
  261. package/dist/collection/types/felixtypes.js +0 -3
  262. package/dist/collection/types/felixtypes.js.map +0 -1
  263. package/dist/collection/types/index.js +0 -41
  264. package/dist/collection/types/index.js.map +0 -1
  265. package/dist/collection/utils/api.js.map +0 -1
  266. package/dist/collection/utils/calc.js.map +0 -1
  267. package/dist/collection/utils/creditSafe.js +0 -18
  268. package/dist/collection/utils/creditSafe.js.map +0 -1
  269. package/dist/collection/utils/enviroment.js.map +0 -1
  270. package/dist/collection/utils/felixApi.js +0 -19
  271. package/dist/collection/utils/felixApi.js.map +0 -1
  272. package/dist/collection/utils/felixFunctions.js +0 -188
  273. package/dist/collection/utils/felixFunctions.js.map +0 -1
  274. package/dist/collection/utils/form.js.map +0 -1
  275. package/dist/collection/utils/scroll.js.map +0 -1
  276. package/dist/collection/utils/types.js.map +0 -1
  277. package/dist/esm/hemfixarna-address_15.entry.js +0 -2162
  278. package/dist/esm/hemfixarna-address_15.entry.js.map +0 -1
  279. package/dist/esm/hemfixarna-byggmax.entry.js.map +0 -1
  280. package/dist/esm/hemfixarna-category.entry.js.map +0 -1
  281. package/dist/esm/hemfixarna-components.js +0 -23
  282. package/dist/esm/hemfixarna-components.js.map +0 -1
  283. package/dist/esm/hemfixarna-doro.entry.js.map +0 -1
  284. package/dist/esm/hemfixarna-elfa.entry.js.map +0 -1
  285. package/dist/esm/hemfixarna-fargvaruhuset.entry.js.map +0 -1
  286. package/dist/esm/hemfixarna-flyttsmart.entry.js.map +0 -1
  287. package/dist/esm/hemfixarna-forebygg.entry.js.map +0 -1
  288. package/dist/esm/hemfixarna-hornbach.entry.js.map +0 -1
  289. package/dist/esm/hemfixarna-kbygg.entry.js.map +0 -1
  290. package/dist/esm/hemfixarna-klint.entry.js.map +0 -1
  291. package/dist/esm/hemfixarna-kund.entry.js.map +0 -1
  292. package/dist/esm/hemfixarna-norrgavel.entry.js.map +0 -1
  293. package/dist/esm/hemfixarna-power.entry.js.map +0 -1
  294. package/dist/esm/hemfixarna-service.entry.js.map +0 -1
  295. package/dist/esm/hemfixarna-skanska.entry.js.map +0 -1
  296. package/dist/esm/hemfixarna-sparfonster.entry.js.map +0 -1
  297. package/dist/esm/hemfixarna-string-furniture.entry.js.map +0 -1
  298. package/dist/esm/hemfixarna-superfront.entry.js.map +0 -1
  299. package/dist/esm/hemfixarna-tesla.entry.js.map +0 -1
  300. package/dist/esm/hemfixarna-traningspartner.entry.js.map +0 -1
  301. package/dist/esm/hemfixarna-zaptec.entry.js.map +0 -1
  302. package/dist/esm/index-04bcf90e.js +0 -1656
  303. package/dist/esm/index-04bcf90e.js.map +0 -1
  304. package/dist/esm/index-c8aebf0d.js.map +0 -1
  305. package/dist/esm/index.js +0 -3
  306. package/dist/esm/index.js.map +0 -1
  307. package/dist/esm/loader.js +0 -20
  308. package/dist/esm/loader.js.map +0 -1
  309. package/dist/esm/polyfills/core-js.js +0 -11
  310. package/dist/esm/polyfills/css-shim.js +0 -1
  311. package/dist/esm/polyfills/dom.js +0 -79
  312. package/dist/esm/polyfills/es5-html-element.js +0 -1
  313. package/dist/esm/polyfills/index.js +0 -34
  314. package/dist/esm/polyfills/system.js +0 -6
  315. package/dist/hemfixarna-components/p-075a13b6.entry.js +0 -2
  316. package/dist/hemfixarna-components/p-075a13b6.entry.js.map +0 -1
  317. package/dist/hemfixarna-components/p-0aa722e7.entry.js +0 -2
  318. package/dist/hemfixarna-components/p-0aa722e7.entry.js.map +0 -1
  319. package/dist/hemfixarna-components/p-1cbfbf5a.entry.js +0 -2
  320. package/dist/hemfixarna-components/p-1cbfbf5a.entry.js.map +0 -1
  321. package/dist/hemfixarna-components/p-226a06bb.entry.js +0 -2
  322. package/dist/hemfixarna-components/p-226a06bb.entry.js.map +0 -1
  323. package/dist/hemfixarna-components/p-24b53f91.entry.js +0 -2
  324. package/dist/hemfixarna-components/p-24b53f91.entry.js.map +0 -1
  325. package/dist/hemfixarna-components/p-32a8152b.js +0 -3
  326. package/dist/hemfixarna-components/p-32a8152b.js.map +0 -1
  327. package/dist/hemfixarna-components/p-49c372d6.entry.js +0 -2
  328. package/dist/hemfixarna-components/p-49c372d6.entry.js.map +0 -1
  329. package/dist/hemfixarna-components/p-506c766c.entry.js +0 -2
  330. package/dist/hemfixarna-components/p-506c766c.entry.js.map +0 -1
  331. package/dist/hemfixarna-components/p-53edf50e.entry.js +0 -2
  332. package/dist/hemfixarna-components/p-53edf50e.entry.js.map +0 -1
  333. package/dist/hemfixarna-components/p-66515865.entry.js +0 -2
  334. package/dist/hemfixarna-components/p-66515865.entry.js.map +0 -1
  335. package/dist/hemfixarna-components/p-6c0e0f95.entry.js +0 -2
  336. package/dist/hemfixarna-components/p-6c0e0f95.entry.js.map +0 -1
  337. package/dist/hemfixarna-components/p-8cc96dd9.entry.js +0 -2
  338. package/dist/hemfixarna-components/p-8cc96dd9.entry.js.map +0 -1
  339. package/dist/hemfixarna-components/p-9b409902.entry.js +0 -2
  340. package/dist/hemfixarna-components/p-9b409902.entry.js.map +0 -1
  341. package/dist/hemfixarna-components/p-a09f4a5d.entry.js +0 -2
  342. package/dist/hemfixarna-components/p-a09f4a5d.entry.js.map +0 -1
  343. package/dist/hemfixarna-components/p-b397b966.js +0 -2
  344. package/dist/hemfixarna-components/p-b397b966.js.map +0 -1
  345. package/dist/hemfixarna-components/p-bf515028.entry.js +0 -2
  346. package/dist/hemfixarna-components/p-bf515028.entry.js.map +0 -1
  347. package/dist/hemfixarna-components/p-d013eeee.entry.js +0 -2
  348. package/dist/hemfixarna-components/p-d013eeee.entry.js.map +0 -1
  349. package/dist/hemfixarna-components/p-d281e9e3.entry.js +0 -2
  350. package/dist/hemfixarna-components/p-d281e9e3.entry.js.map +0 -1
  351. package/dist/hemfixarna-components/p-d297cb30.js +0 -2
  352. package/dist/hemfixarna-components/p-d297cb30.js.map +0 -1
  353. package/dist/hemfixarna-components/p-d6af83de.entry.js +0 -2
  354. package/dist/hemfixarna-components/p-d6af83de.entry.js.map +0 -1
  355. package/dist/hemfixarna-components/p-e8800c3b.entry.js +0 -2
  356. package/dist/hemfixarna-components/p-e8800c3b.entry.js.map +0 -1
  357. package/dist/hemfixarna-components/p-eaa3e1c0.entry.js +0 -2
  358. package/dist/hemfixarna-components/p-eaa3e1c0.entry.js.map +0 -1
  359. package/dist/hemfixarna-components/p-ee6d1a35.entry.js +0 -2
  360. package/dist/hemfixarna-components/p-ee6d1a35.entry.js.map +0 -1
  361. package/dist/hemfixarna-components/p-f6de66c8.entry.js +0 -2
  362. package/dist/hemfixarna-components/p-f6de66c8.entry.js.map +0 -1
  363. package/dist/hemfixarna-components/p-facaf951.entry.js +0 -2
  364. package/dist/hemfixarna-components/p-facaf951.entry.js.map +0 -1
  365. package/dist/index.cjs.js +0 -1
  366. package/dist/index.js +0 -1
@@ -1,24 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-b83343b9.js');
6
- const index$1 = require('./index-739bf321.js');
7
-
8
- const MyComponent = class {
9
- constructor(hostRef) {
10
- index.registerInstance(this, hostRef);
11
- this.id = undefined;
12
- this.loadFromQuery = undefined;
13
- this.widgetStyle = index$1.WidgetStyle.standard;
14
- this.buttonColor = undefined;
15
- this.buttonBg = undefined;
16
- }
17
- render() {
18
- return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, id: this.id, business: index$1.Business.superfront }));
19
- }
20
- };
21
-
22
- exports.hemfixarna_superfront = MyComponent;
23
-
24
- //# sourceMappingURL=hemfixarna-superfront.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"hemfixarna-superfront.entry.cjs.js","mappings":";;;;;;;MAOa,WAAW;;;;yBAEW,SAAS;uBACNA,mBAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACEC,kCACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAEC,gBAAQ,CAAC,UAAU,GACP,EACxB;GACH;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-superfront',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() loadFromQuery?: string = undefined;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n id={this.id}\n business={Business.superfront}\n ></hemfixarna-component>\n );\n }\n}\n"],"version":3}
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-b83343b9.js');
6
- const index$1 = require('./index-739bf321.js');
7
-
8
- const MyComponent = class {
9
- constructor(hostRef) {
10
- index.registerInstance(this, hostRef);
11
- this.id = undefined;
12
- this.widgetStyle = index$1.WidgetStyle.standard;
13
- this.buttonColor = undefined;
14
- this.buttonBg = undefined;
15
- }
16
- render() {
17
- return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, id: this.id, business: index$1.Business.tesla }));
18
- }
19
- };
20
-
21
- exports.hemfixarna_tesla = MyComponent;
22
-
23
- //# sourceMappingURL=hemfixarna-tesla.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"hemfixarna-tesla.entry.cjs.js","mappings":";;;;;;;MAOa,WAAW;;;;uBAEcA,mBAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACEC,kCAAsB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAEC,gBAAQ,CAAC,KAAK,GAAyB,EAC3K;GACH;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-tesla/hemfixarna-tesla.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-tesla',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component widgetStyle={this.widgetStyle} buttonBg={this.buttonBg} buttonColor={this.buttonColor} id={this.id} business={Business.tesla}></hemfixarna-component>\n );\n }\n}\n"],"version":3}
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-b83343b9.js');
6
- const index$1 = require('./index-739bf321.js');
7
-
8
- const MyComponent = class {
9
- constructor(hostRef) {
10
- index.registerInstance(this, hostRef);
11
- this.id = undefined;
12
- this.widgetStyle = index$1.WidgetStyle.standard;
13
- this.buttonColor = undefined;
14
- this.buttonBg = undefined;
15
- }
16
- render() {
17
- return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, id: this.id, business: index$1.Business.traningspartner }));
18
- }
19
- };
20
-
21
- exports.hemfixarna_traningspartner = MyComponent;
22
-
23
- //# sourceMappingURL=hemfixarna-traningspartner.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"hemfixarna-traningspartner.entry.cjs.js","mappings":";;;;;;;MAOa,WAAW;;;;uBAEcA,mBAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACEC,kCACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAEC,gBAAQ,CAAC,eAAe,GACZ,EACxB;GACH;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-traningspartner',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n id={this.id}\n business={Business.traningspartner}\n ></hemfixarna-component>\n );\n }\n}\n"],"version":3}
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-b83343b9.js');
6
- const index$1 = require('./index-739bf321.js');
7
-
8
- const MyComponent = class {
9
- constructor(hostRef) {
10
- index.registerInstance(this, hostRef);
11
- this.id = undefined;
12
- this.widgetStyle = index$1.WidgetStyle.standard;
13
- this.buttonColor = undefined;
14
- this.buttonBg = undefined;
15
- }
16
- render() {
17
- return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, id: this.id, business: index$1.Business.zaptec }));
18
- }
19
- };
20
-
21
- exports.hemfixarna_zaptec = MyComponent;
22
-
23
- //# sourceMappingURL=hemfixarna-zaptec.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"hemfixarna-zaptec.entry.cjs.js","mappings":";;;;;;;MAOa,WAAW;;;;uBAEcA,mBAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACEC,kCAAsB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAEC,gBAAQ,CAAC,MAAM,GAAyB,EAC5K;GACH;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-zaptec',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component widgetStyle={this.widgetStyle} buttonBg={this.buttonBg} buttonColor={this.buttonColor} id={this.id} business={Business.zaptec}></hemfixarna-component>\n );\n }\n}\n"],"version":3}
@@ -1,265 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-b83343b9.js');
4
-
5
- const appendToMap = (map, propName, value) => {
6
- const items = map.get(propName);
7
- if (!items) {
8
- map.set(propName, [value]);
9
- }
10
- else if (!items.includes(value)) {
11
- items.push(value);
12
- }
13
- };
14
- const debounce = (fn, ms) => {
15
- let timeoutId;
16
- return (...args) => {
17
- if (timeoutId) {
18
- clearTimeout(timeoutId);
19
- }
20
- timeoutId = setTimeout(() => {
21
- timeoutId = 0;
22
- fn(...args);
23
- }, ms);
24
- };
25
- };
26
-
27
- /**
28
- * Check if a possible element isConnected.
29
- * The property might not be there, so we check for it.
30
- *
31
- * We want it to return true if isConnected is not a property,
32
- * otherwise we would remove these elements and would not update.
33
- *
34
- * Better leak in Edge than to be useless.
35
- */
36
- const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
37
- const cleanupElements = debounce((map) => {
38
- for (let key of map.keys()) {
39
- map.set(key, map.get(key).filter(isConnected));
40
- }
41
- }, 2000);
42
- const stencilSubscription = () => {
43
- if (typeof index.getRenderingRef !== 'function') {
44
- // If we are not in a stencil project, we do nothing.
45
- // This function is not really exported by @stencil/core.
46
- return {};
47
- }
48
- const elmsToUpdate = new Map();
49
- return {
50
- dispose: () => elmsToUpdate.clear(),
51
- get: (propName) => {
52
- const elm = index.getRenderingRef();
53
- if (elm) {
54
- appendToMap(elmsToUpdate, propName, elm);
55
- }
56
- },
57
- set: (propName) => {
58
- const elements = elmsToUpdate.get(propName);
59
- if (elements) {
60
- elmsToUpdate.set(propName, elements.filter(index.forceUpdate));
61
- }
62
- cleanupElements(elmsToUpdate);
63
- },
64
- reset: () => {
65
- elmsToUpdate.forEach((elms) => elms.forEach(index.forceUpdate));
66
- cleanupElements(elmsToUpdate);
67
- },
68
- };
69
- };
70
-
71
- const unwrap = (val) => (typeof val === 'function' ? val() : val);
72
- const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
73
- const unwrappedState = unwrap(defaultState);
74
- let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
75
- const handlers = {
76
- dispose: [],
77
- get: [],
78
- set: [],
79
- reset: [],
80
- };
81
- const reset = () => {
82
- var _a;
83
- // When resetting the state, the default state may be a function - unwrap it to invoke it.
84
- // otherwise, the state won't be properly reset
85
- states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
86
- handlers.reset.forEach((cb) => cb());
87
- };
88
- const dispose = () => {
89
- // Call first dispose as resetting the state would
90
- // cause less updates ;)
91
- handlers.dispose.forEach((cb) => cb());
92
- reset();
93
- };
94
- const get = (propName) => {
95
- handlers.get.forEach((cb) => cb(propName));
96
- return states.get(propName);
97
- };
98
- const set = (propName, value) => {
99
- const oldValue = states.get(propName);
100
- if (shouldUpdate(value, oldValue, propName)) {
101
- states.set(propName, value);
102
- handlers.set.forEach((cb) => cb(propName, value, oldValue));
103
- }
104
- };
105
- const state = (typeof Proxy === 'undefined'
106
- ? {}
107
- : new Proxy(unwrappedState, {
108
- get(_, propName) {
109
- return get(propName);
110
- },
111
- ownKeys(_) {
112
- return Array.from(states.keys());
113
- },
114
- getOwnPropertyDescriptor() {
115
- return {
116
- enumerable: true,
117
- configurable: true,
118
- };
119
- },
120
- has(_, propName) {
121
- return states.has(propName);
122
- },
123
- set(_, propName, value) {
124
- set(propName, value);
125
- return true;
126
- },
127
- }));
128
- const on = (eventName, callback) => {
129
- handlers[eventName].push(callback);
130
- return () => {
131
- removeFromArray(handlers[eventName], callback);
132
- };
133
- };
134
- const onChange = (propName, cb) => {
135
- const unSet = on('set', (key, newValue) => {
136
- if (key === propName) {
137
- cb(newValue);
138
- }
139
- });
140
- // We need to unwrap the defaultState because it might be a function.
141
- // Otherwise we might not be sending the right reset value.
142
- const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
143
- return () => {
144
- unSet();
145
- unReset();
146
- };
147
- };
148
- const use = (...subscriptions) => {
149
- const unsubs = subscriptions.reduce((unsubs, subscription) => {
150
- if (subscription.set) {
151
- unsubs.push(on('set', subscription.set));
152
- }
153
- if (subscription.get) {
154
- unsubs.push(on('get', subscription.get));
155
- }
156
- if (subscription.reset) {
157
- unsubs.push(on('reset', subscription.reset));
158
- }
159
- if (subscription.dispose) {
160
- unsubs.push(on('dispose', subscription.dispose));
161
- }
162
- return unsubs;
163
- }, []);
164
- return () => unsubs.forEach((unsub) => unsub());
165
- };
166
- const forceUpdate = (key) => {
167
- const oldValue = states.get(key);
168
- handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
169
- };
170
- return {
171
- state,
172
- get,
173
- set,
174
- on,
175
- onChange,
176
- use,
177
- dispose,
178
- reset,
179
- forceUpdate,
180
- };
181
- };
182
- const removeFromArray = (array, item) => {
183
- const index = array.indexOf(item);
184
- if (index >= 0) {
185
- array[index] = array[array.length - 1];
186
- array.length--;
187
- }
188
- };
189
-
190
- const createStore = (defaultState, shouldUpdate) => {
191
- const map = createObservableMap(defaultState, shouldUpdate);
192
- map.use(stencilSubscription());
193
- return map;
194
- };
195
-
196
- const { state, onChange, } = createStore({
197
- step: 1,
198
- checkoutStep: 1,
199
- checkoutEdit: false,
200
- selectedCategory: null,
201
- selectedService: null,
202
- selectedProduct: null,
203
- cart: [],
204
- business: 'undefined',
205
- options: null,
206
- rut: true,
207
- rot: true,
208
- green: true,
209
- token: null,
210
- user: null,
211
- modal: null,
212
- rutOptions: null,
213
- rotOptions: null,
214
- greenOptions: null,
215
- customer: null,
216
- selectedCustomerCategory: null,
217
- parentCategory: null,
218
- creditSafeUser: null,
219
- checkoutInvoice: false,
220
- maleri: false,
221
- sources: null,
222
- selectSource: false,
223
- showSourcePasswordPrompt: false,
224
- });
225
- onChange('cart', cart => {
226
- window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));
227
- });
228
- onChange('user', user => {
229
- window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));
230
- });
231
- onChange('creditSafeUser', user => {
232
- window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));
233
- });
234
- onChange('selectSource', selectSource => {
235
- if (selectSource) {
236
- localStorage.setItem('select_source', 'true');
237
- }
238
- });
239
- onChange('selectedProduct', product => {
240
- if (!state.customer || !product)
241
- return;
242
- const categories = [...state.customer.categories, ...state.customer.categories.map(c => { var _a; return (_a = c.sub_categories) !== null && _a !== void 0 ? _a : []; })].flat();
243
- const category = categories.find(c => c && c.id === product.category);
244
- if (category) {
245
- state.parentCategory = category;
246
- return;
247
- }
248
- state.parentCategory = null;
249
- });
250
- onChange('selectedCustomerCategory', category => {
251
- if (!state.customer || !category)
252
- return;
253
- if (category.parent) {
254
- const parent = state.customer.categories.find(c => c.id === category.parent);
255
- if (parent) {
256
- state.parentCategory = parent;
257
- return;
258
- }
259
- }
260
- state.parentCategory = null;
261
- });
262
-
263
- exports.state = state;
264
-
265
- //# sourceMappingURL=index-6af772cf.js.map
@@ -1 +0,0 @@
1
- {"file":"index-6af772cf.js","mappings":";;;;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,KAAK;AACL,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,KAAK;AACL,CAAC,CAAC;AACF,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS,CAAC;AAClB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY,CAAC,SAAS,CAAC,CAAC;AACpC,SAAS;AACT,QAAQ,SAAS,GAAG,UAAU,CAAC,MAAM;AACrC,YAAY,SAAS,GAAG,CAAC,CAAC;AAC1B,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AACxB,SAAS,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AAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,cAAI,OAAA,MAAA,CAAC,CAAC,cAAc,mCAAI,EAAE,CAAA,EAAA,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EACxH,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;EACtE,IAAI,QAAQ,EAAE;IACZ,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC;IAChC,OAAO;GACR;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE,QAAQ;EAC3C,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,QAAQ;IAAE,OAAO;EACzC,IAAK,QAAgC,CAAC,MAAM,EAAE;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAM,QAAgC,CAAC,MAAM,CAAC,CAAC;IACtG,IAAI,MAAM,EAAE;MACV,KAAK,CAAC,cAAc,GAAG,MAAM,CAAC;MAC9B,OAAO;KACR;GACF;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC;;;;","names":["getRenderingRef","forceUpdate"],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/index.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { OnChangeHandler } from '@stencil/store/dist/types';\nimport { Business, CartItem, Category, Customer, CustomerCategory, CustomerSubCategory, GreenOptions, Product, RotOptions, RutOptions, Service, User, WpOptions } from '../types';\nimport { CreditSafeUser } from '../types/felixtypes';\n\ntype StateType = {\n step: number;\n selectedCategory: Category | null;\n selectedService: Service | null;\n selectedProduct: Product | null;\n cart: Array<CartItem>;\n business: Business | 'undefined';\n options: WpOptions | null;\n rut: boolean;\n rot: boolean;\n green: boolean;\n token: string | null;\n checkoutStep: number;\n checkoutEdit: boolean;\n user: User | null;\n creditSafeUser: CreditSafeUser | null;\n modal: {\n title?: string;\n text: string;\n } | null;\n rutOptions: RutOptions | null;\n rotOptions: RotOptions | null;\n greenOptions: GreenOptions | null;\n customer: Customer | null;\n selectedCustomerCategory: CustomerCategory | CustomerSubCategory | null;\n parentCategory: CustomerCategory | CustomerSubCategory;\n checkoutInvoice: boolean;\n maleri: boolean;\n selectSource: boolean;\n showSourcePasswordPrompt: boolean;\n};\n\nconst {\n state,\n onChange,\n}: {\n state: StateType;\n onChange: OnChangeHandler<StateType>;\n} = createStore({\n step: 1,\n checkoutStep: 1,\n checkoutEdit: false,\n selectedCategory: null,\n selectedService: null,\n selectedProduct: null,\n cart: [],\n business: 'undefined',\n options: null,\n rut: true,\n rot: true,\n green: true,\n token: null,\n user: null,\n modal: null,\n rutOptions: null,\n rotOptions: null,\n greenOptions: null,\n customer: null,\n selectedCustomerCategory: null,\n parentCategory: null,\n creditSafeUser: null,\n checkoutInvoice: false,\n maleri: false,\n sources: null,\n selectSource: false,\n showSourcePasswordPrompt: false,\n});\n\nonChange('cart', cart => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));\n});\n\nonChange('user', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));\n});\n\nonChange('creditSafeUser', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));\n});\n\nonChange('selectSource', selectSource => {\n if (selectSource) {\n localStorage.setItem('select_source', 'true');\n }\n});\n\nonChange('selectedProduct', product => {\n if (!state.customer || !product) return;\n const categories = [...state.customer.categories, ...state.customer.categories.map(c => c.sub_categories ?? [])].flat();\n const category = categories.find(c => c && c.id === product.category);\n if (category) {\n state.parentCategory = category;\n return;\n }\n state.parentCategory = null;\n});\n\nonChange('selectedCustomerCategory', category => {\n if (!state.customer || !category) return;\n if ((category as CustomerSubCategory).parent) {\n const parent = state.customer.categories.find(c => c.id === (category as CustomerSubCategory).parent);\n if (parent) {\n state.parentCategory = parent;\n return;\n }\n }\n state.parentCategory = null;\n});\n\nexport default state;\n"],"version":3}
@@ -1,44 +0,0 @@
1
- 'use strict';
2
-
3
- // Match slug with partner slug in wp admin
4
- // Dont forget to add the partners url to cors for creditsafe
5
- // https://bitbucket.org/afonso-sweden/creditsafe-lookup/src/main/api/index.ts
6
- exports.Business = void 0;
7
- (function (Business) {
8
- Business["kund"] = "kund";
9
- Business["byggmax"] = "byggmax";
10
- Business["skanska"] = "skanska";
11
- Business["string"] = "string-furniture";
12
- Business["hornbach"] = "hornbach";
13
- Business["forebygg"] = "forebygg";
14
- Business["doro"] = "doro";
15
- Business["elfa"] = "elfa";
16
- Business["kbygg"] = "k-bygg";
17
- Business["norrgavel"] = "norrgavel";
18
- Business["fargvaruhuset"] = "fargvaruhuset";
19
- Business["zaptec"] = "zaptec";
20
- Business["tesla"] = "tesla";
21
- Business["klint"] = "klint";
22
- Business["flyttsmart"] = "flyttsmart";
23
- Business["lg"] = "lg";
24
- Business["sparfonster"] = "sparfonster";
25
- Business["power"] = "power";
26
- Business["traningspartner"] = "traningspartner";
27
- Business["superfront"] = "superfront";
28
- Business["inet"] = "inet";
29
- Business["design24"] = "design24";
30
- Business["netatonce"] = "netatonce";
31
- })(exports.Business || (exports.Business = {}));
32
- exports.WidgetStyle = void 0;
33
- (function (WidgetStyle) {
34
- WidgetStyle["standard"] = "standard";
35
- WidgetStyle["alternative"] = "alternative";
36
- WidgetStyle["alternative_2"] = "alternative_2";
37
- WidgetStyle["alternative_3"] = "alternative_3";
38
- })(exports.WidgetStyle || (exports.WidgetStyle = {}));
39
- var TopCategory;
40
- (function (TopCategory) {
41
- TopCategory["byggmax"] = "category/bygg";
42
- })(TopCategory || (TopCategory = {}));
43
-
44
- //# sourceMappingURL=index-739bf321.js.map
@@ -1 +0,0 @@
1
- {"file":"index-739bf321.js","mappings":";;AAAA;AACA;AACA;AAEYA;AAAZ,WAAY,QAAQ;EAClB,yBAAa,CAAA;EACb,+BAAmB,CAAA;EACnB,+BAAmB,CAAA;EACnB,uCAA2B,CAAA;EAC3B,iCAAqB,CAAA;EACrB,iCAAqB,CAAA;EACrB,yBAAa,CAAA;EACb,yBAAa,CAAA;EACb,4BAAgB,CAAA;EAChB,mCAAuB,CAAA;EACvB,2CAA+B,CAAA;EAC/B,6BAAiB,CAAA;EACjB,2BAAe,CAAA;EACf,2BAAe,CAAA;EACf,qCAAyB,CAAA;EACzB,qBAAS,CAAA;EACT,uCAA2B,CAAA;EAC3B,2BAAe,CAAA;EACf,+CAAmC,CAAA;EACnC,qCAAyB,CAAA;EACzB,yBAAa,CAAA;EACb,iCAAqB,CAAA;EACrB,mCAAuB,CAAA;AACzB,CAAC,EAxBWA,gBAAQ,KAARA,gBAAQ,QAwBnB;AAqMWC;AAAZ,WAAY,WAAW;EACrB,oCAAqB,CAAA;EACrB,0CAA2B,CAAA;EAC3B,8CAA+B,CAAA;EAC/B,8CAA+B,CAAA;AACjC,CAAC,EALWA,mBAAW,KAAXA,mBAAW,QAKtB;AAED,IAAY,WAEX;AAFD,WAAY,WAAW;EACrB,wCAAyB,CAAA;AAC3B,CAAC,EAFW,WAAW,KAAX,WAAW;;","names":["Business","WidgetStyle"],"sources":["./src/types/index.ts"],"sourcesContent":["// Match slug with partner slug in wp admin\n// Dont forget to add the partners url to cors for creditsafe\n// https://bitbucket.org/afonso-sweden/creditsafe-lookup/src/main/api/index.ts\n\nexport enum Business {\n kund = 'kund',\n byggmax = 'byggmax',\n skanska = 'skanska',\n string = 'string-furniture',\n hornbach = 'hornbach',\n forebygg = 'forebygg',\n doro = 'doro',\n elfa = 'elfa',\n kbygg = 'k-bygg',\n norrgavel = 'norrgavel',\n fargvaruhuset = 'fargvaruhuset',\n zaptec = 'zaptec',\n tesla = 'tesla',\n klint = 'klint',\n flyttsmart = 'flyttsmart',\n lg = 'lg',\n sparfonster = 'sparfonster',\n power = 'power',\n traningspartner = 'traningspartner',\n superfront = 'superfront',\n inet = 'inet',\n design24 = 'design24',\n netatonce = 'netatonce',\n}\n\ntype Icon = {\n url: string;\n};\n\ninterface Customer {\n ID: number;\n post_title: string;\n post_name: string;\n post_type: string;\n filter: string;\n categories: CustomerCategory[];\n logo?: Icon;\n partner_url?: string;\n at_hemfixarna: boolean;\n info_title: string;\n widget_title?: string;\n info_text: string;\n checkout_title: string;\n checkout_trust_badges: { text: string }[];\n trust_badges: { text: string }[];\n source?: Source;\n password_protected: boolean;\n}\n\ninterface CustomerCategory {\n id: string;\n name: string;\n widget_title?: string;\n icon: string;\n show_products: boolean;\n products: { fields: Product }[] | false;\n sub_categories: CustomerSubCategory[] | false;\n add_painting: boolean;\n}\n\ninterface CustomerSubCategory {\n id: string;\n name: string;\n widget_title?: string;\n icon: string;\n products: { fields: Product }[];\n parent: string;\n add_painting: boolean;\n}\n\ninterface Part {\n ID: number;\n post_author: number;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0 | 1;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: number;\n filter: string;\n price: number;\n title: string;\n}\n\ninterface Product {\n ID: number;\n post_author: string;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n price: number;\n icon?: Icon | string;\n parts?: Array<Part>;\n list: Array<{ bullet: string }>;\n terms: string;\n terms_checkout: string;\n terms_show_checkbox: boolean;\n rut: boolean;\n rot: boolean;\n green: boolean;\n hide_start_fee: boolean;\n description: string;\n category: string;\n title: string;\n invoice: string;\n invoice_price: string;\n invoice_description?: string;\n start_fee_obj: StartFee | null;\n}\n\ninterface Service {\n ID: 41857;\n icon?: Icon | string;\n post_author: 34419;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: 'service';\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n products: Array<Product>;\n}\n\ninterface Category {\n count: number;\n description: string;\n name: string;\n icon?: Icon | string;\n parent: 0 | 1;\n slug: string;\n taxonomy: 'service_cat';\n term_group: 0 | 1;\n term_id: number;\n term_order: string;\n term_taxonomy_id: number;\n sub_cats?: Array<Category>;\n services?: Array<Service>;\n}\n\ninterface WpOptions {\n link: { title: string; url: string };\n trust: { trust_badge: string }[];\n thank_you_image: string;\n start_fee: number;\n terms: string;\n maleri_title: string;\n maleri_text: string;\n}\ninterface CartPart {\n id: number;\n amount: number;\n price: number;\n name: string;\n}\n\ninterface CartItem {\n id: number;\n price: number;\n name: string;\n amount: number;\n parts: CartPart[];\n rut: boolean;\n rot: boolean;\n green: boolean;\n start_fee: boolean;\n terms_checkout: string;\n icon?: Icon | string;\n start_fee_obj: StartFee | null;\n}\n\nexport enum WidgetStyle {\n standard = 'standard',\n alternative = 'alternative',\n alternative_2 = 'alternative_2',\n alternative_3 = 'alternative_3',\n}\n\nexport enum TopCategory {\n byggmax = 'category/bygg',\n}\n\ninterface User {\n email: string;\n phone: string;\n ssn: string;\n firstName: string;\n lastName: string;\n street: string;\n zip: string;\n town: string;\n}\n\ninterface RutOptions {\n rut_start_fee_heading: string;\n rut_start_fee_text: string;\n rut_start_fee_text_secondary: string;\n}\n\ninterface RotOptions {\n rot_start_fee_heading: string;\n rot_start_fee_text: string;\n rot_start_fee_text_secondary: string;\n}\n\ninterface GreenOptions {\n green_start_fee_heading: string;\n green_start_fee_text: string;\n green_start_fee_text_secondary: string;\n}\n\ninterface SubSource {\n 'recordId': string;\n 'So_SubSource::Sus01_Name': string;\n 'So_SubSource::_id': string;\n 'So_SubSource::_id_Source': string;\n 'modId': string;\n}\n\ninterface FieldData {\n _id: string;\n So01_Name: string;\n So457_Aktiv_ac: number;\n So40_WebSubSource: string | number;\n So39_WebSource: number;\n rec_id: number;\n}\n\ninterface Source {\n fieldData: FieldData;\n sub_sources: SubSource[];\n}\n\ninterface SourcesRespone {\n dataInfo: {\n database: string;\n layout: string;\n table: string;\n totalRecordCount: number;\n foundCount: number;\n returnedCount: number;\n };\n data: Source[];\n}\n\ninterface StartFee {\n ID: number;\n title: string;\n price: number;\n pop_up: string | null;\n discount_type: string | null;\n description: string;\n}\n\nexport type {\n CartItem,\n CartPart,\n Category,\n Customer,\n CustomerCategory,\n CustomerSubCategory,\n GreenOptions,\n Icon,\n Part,\n Product,\n RotOptions,\n RutOptions,\n Service,\n Source,\n SourcesRespone,\n StartFee,\n User,\n WpOptions,\n};\n"],"version":3}