hemfixarna-web-components 1.4.6 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/cjs/{hemfixarna-address_32.cjs.entry.js → hemfixarna-address_34.cjs.entry.js} +148 -62
  2. package/dist/cjs/{hemfixarna-address_32.cjs.entry.js.map → hemfixarna-address_34.cjs.entry.js.map} +1 -1
  3. package/dist/cjs/hemfixarna-components.cjs.js +2 -2
  4. package/dist/cjs/{index-83c1daf2.js → index-b83343b9.js} +33 -2
  5. package/dist/{esm/index-1fd61928.js.map → cjs/index-b83343b9.js.map} +1 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +2 -0
  8. package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js +131 -0
  9. package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js.map +1 -0
  10. package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js +7 -2
  11. package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js.map +1 -1
  12. package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js +1 -1
  13. package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js.map +1 -1
  14. package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js +60 -5
  15. package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js.map +1 -1
  16. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +2 -2
  17. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
  18. package/dist/collection/components/hemfixarna-component/hemfixarna.css +46 -2
  19. package/dist/collection/components/hemfixarna-contact/hemfixarna-contact.js +33 -0
  20. package/dist/collection/components/hemfixarna-contact/hemfixarna-contact.js.map +1 -0
  21. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.css +6 -1
  22. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js +4 -2
  23. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +1 -1
  24. package/dist/collection/components/hemfixarna-info/hemfixarna-info.js +2 -29
  25. package/dist/collection/components/hemfixarna-info/hemfixarna-info.js.map +1 -1
  26. package/dist/collection/components/hemfixarna-order/hemfixarna-order.js +1 -4
  27. package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +1 -1
  28. package/dist/collection/components/hemfixarna-product/hemfixarna-product.js +1 -1
  29. package/dist/collection/components/hemfixarna-product/hemfixarna-product.js.map +1 -1
  30. package/dist/collection/components/hemfixarna-service/hemfixarna-service.js +1 -1
  31. package/dist/collection/components/hemfixarna-service/hemfixarna-service.js.map +1 -1
  32. package/dist/collection/components/hemfixarna-start/hemfixarna-start.js +2 -2
  33. package/dist/collection/components/hemfixarna-start/hemfixarna-start.js.map +1 -1
  34. package/dist/collection/store/index.js +1 -0
  35. package/dist/collection/store/index.js.map +1 -1
  36. package/dist/collection/types/index.js +1 -0
  37. package/dist/collection/types/index.js.map +1 -1
  38. package/dist/collection/utils/api.js +11 -1
  39. package/dist/collection/utils/api.js.map +1 -1
  40. package/dist/esm/{hemfixarna-address_32.entry.js → hemfixarna-address_34.entry.js} +135 -51
  41. package/dist/esm/{hemfixarna-address_32.entry.js.map → hemfixarna-address_34.entry.js.map} +1 -1
  42. package/dist/esm/hemfixarna-components.js +3 -3
  43. package/dist/esm/{index-1fd61928.js → index-8c417125.js} +33 -2
  44. package/dist/{cjs/index-83c1daf2.js.map → esm/index-8c417125.js.map} +1 -1
  45. package/dist/esm/loader.js +3 -3
  46. package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
  47. package/dist/hemfixarna-components/p-852e7173.js +3 -0
  48. package/dist/hemfixarna-components/p-9a7694f6.entry.js +2 -0
  49. package/dist/types/components/customers/hemfixarna-power/hemfixarna-power.d.ts +10 -0
  50. package/dist/types/components/hemfixarna-checkout/hemfixarna-checkout.d.ts +10 -0
  51. package/dist/types/components/hemfixarna-contact/hemfixarna-contact.d.ts +4 -0
  52. package/dist/types/components/hemfixarna-info/hemfixarna-info.d.ts +0 -9
  53. package/dist/types/components.d.ts +40 -2
  54. package/dist/types/store/index.d.ts +2 -1
  55. package/dist/types/types/index.d.ts +59 -2
  56. package/dist/types/utils/api.d.ts +2 -1
  57. package/package.json +1 -1
  58. package/dist/hemfixarna-components/p-33d37833.js +0 -3
  59. package/dist/hemfixarna-components/p-3b2da615.entry.js +0 -2
  60. /package/dist/hemfixarna-components/{p-33d37833.js.map → p-852e7173.js.map} +0 -0
  61. /package/dist/hemfixarna-components/{p-3b2da615.entry.js.map → p-9a7694f6.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"hemfixarna-address.hemfixarna-box.hemfixarna-breadcrumbs.hemfixarna-byggmax.hemfixarna-cart.hemfixarna-category.hemfixarna-checkout.hemfixarna-component.hemfixarna-demo.hemfixarna-doro.hemfixarna-elfa.hemfixarna-fargvaruhuset.hemfixarna-flyttsmart.hemfixarna-forebygg.hemfixarna-getuser.hemfixarna-hornbach.hemfixarna-info.hemfixarna-invoice.hemfixarna-kbygg.hemfixarna-klint.hemfixarna-kund.hemfixarna-norrgavel.hemfixarna-order.hemfixarna-orderrows.hemfixarna-product.hemfixarna-service.hemfixarna-skanska.hemfixarna-sparfonster.hemfixarna-start.hemfixarna-string-furniture.hemfixarna-tesla.hemfixarna-zaptec.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
1
+ {"file":"hemfixarna-address.hemfixarna-box.hemfixarna-breadcrumbs.hemfixarna-byggmax.hemfixarna-cart.hemfixarna-category.hemfixarna-checkout.hemfixarna-component.hemfixarna-contact.hemfixarna-demo.hemfixarna-doro.hemfixarna-elfa.hemfixarna-fargvaruhuset.hemfixarna-flyttsmart.hemfixarna-forebygg.hemfixarna-getuser.hemfixarna-hornbach.hemfixarna-info.hemfixarna-invoice.hemfixarna-kbygg.hemfixarna-klint.hemfixarna-kund.hemfixarna-norrgavel.hemfixarna-order.hemfixarna-orderrows.hemfixarna-power.hemfixarna-product.hemfixarna-service.hemfixarna-skanska.hemfixarna-sparfonster.hemfixarna-start.hemfixarna-string-furniture.hemfixarna-tesla.hemfixarna-zaptec.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-83c1daf2.js');
5
+ const index = require('./index-b83343b9.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Browser v3.2.1 | MIT Licensed | https://stenciljs.com
@@ -20,7 +20,7 @@ const patchBrowser = () => {
20
20
  };
21
21
 
22
22
  patchBrowser().then(options => {
23
- return index.bootstrapLazy([["hemfixarna-address_32.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[1,"load-from-query"],"customer":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"tree":[32]}],[1,"hemfixarna-doro",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-elfa",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-fargvaruhuset",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-flyttsmart",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-forebygg",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kbygg",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-klint",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-norrgavel",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-sparfonster",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-tesla",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-zaptec",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-component",{"slug":[1],"id":[1],"business":[1],"topCategory":[1,"top-category"],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"nav":[16],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"tree":[32],"product":[32],"proppedProduct":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart",{"tree":[16]}],[0,"hemfixarna-category"],[0,"hemfixarna-order",{"tree":[16]}],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-service"],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"tree":[16],"closeModal":[16],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32]}],[0,"hemfixarna-invoice",{"formError":[32],"displayImages":[32],"formImages":[32],"formState":[32]}],[0,"hemfixarna-address",{"street":[32],"streetError":[32],"zip":[32],"zipError":[32],"town":[32],"townError":[32]}],[0,"hemfixarna-getuser",{"email":[32],"emailError":[32],"phone":[32],"phoneError":[32],"ssn":[32],"ssnError":[32]}],[0,"hemfixarna-orderrows",{"cart":[4],"tree":[16]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info",{"list":[16]}]]]], options);
23
+ return index.bootstrapLazy([["hemfixarna-address_34.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[1,"load-from-query"],"customer":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"tree":[32]}],[1,"hemfixarna-doro",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-elfa",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-fargvaruhuset",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-flyttsmart",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-forebygg",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kbygg",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-klint",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-norrgavel",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-power",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-sparfonster",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-tesla",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-zaptec",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-component",{"slug":[1],"id":[1],"business":[1],"topCategory":[1,"top-category"],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"nav":[16],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"tree":[32],"product":[32],"proppedProduct":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart",{"tree":[16]}],[0,"hemfixarna-category"],[0,"hemfixarna-order",{"tree":[16]}],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-service"],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"tree":[16],"closeModal":[16],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSource":[32],"selectedSubSource":[32],"sellerId":[32],"partnerOrderId":[32]}],[0,"hemfixarna-contact",{"vertical":[4]}],[0,"hemfixarna-invoice",{"formError":[32],"displayImages":[32],"formImages":[32],"formState":[32]}],[0,"hemfixarna-address",{"street":[32],"streetError":[32],"zip":[32],"zipError":[32],"town":[32],"townError":[32]}],[0,"hemfixarna-getuser",{"email":[32],"emailError":[32],"phone":[32],"phoneError":[32],"ssn":[32],"ssnError":[32]}],[0,"hemfixarna-orderrows",{"cart":[4],"tree":[16]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info"]]]], options);
24
24
  });
25
25
 
26
26
  exports.setNonce = index.setNonce;
@@ -62,6 +62,11 @@ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
62
62
  * Don't add values to these!!
63
63
  */
64
64
  const EMPTY_OBJ = {};
65
+ /**
66
+ * Namespaces
67
+ */
68
+ const SVG_NS = 'http://www.w3.org/2000/svg';
69
+ const HTML_NS = 'http://www.w3.org/1999/xhtml';
65
70
  const isDef = (v) => v != null;
66
71
  /**
67
72
  * Check whether a value is a 'complex type', defined here as an object or a
@@ -543,8 +548,15 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
543
548
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
544
549
  }
545
550
  else {
551
+ if (!isSvgMode) {
552
+ isSvgMode = newVNode.$tag$ === 'svg';
553
+ }
546
554
  // create element
547
- elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
555
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
556
+ );
557
+ if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
558
+ isSvgMode = false;
559
+ }
548
560
  // add css classes, attrs, props, listeners, etc.
549
561
  {
550
562
  updateElement(null, newVNode, isSvgMode);
@@ -565,6 +577,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
565
577
  }
566
578
  }
567
579
  }
580
+ {
581
+ if (newVNode.$tag$ === 'svg') {
582
+ // Only reset the SVG context when we're exiting <svg> element
583
+ isSvgMode = false;
584
+ }
585
+ else if (elm.tagName === 'foreignObject') {
586
+ // Reenter SVG context when we're exiting <foreignObject> element
587
+ isSvgMode = true;
588
+ }
589
+ }
568
590
  }
569
591
  return elm;
570
592
  };
@@ -870,8 +892,14 @@ const patch = (oldVNode, newVNode) => {
870
892
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
871
893
  const oldChildren = oldVNode.$children$;
872
894
  const newChildren = newVNode.$children$;
895
+ const tag = newVNode.$tag$;
873
896
  const text = newVNode.$text$;
874
897
  if (text === null) {
898
+ {
899
+ // test if we're rendering an svg element, or still rendering nodes inside of one
900
+ // only add this to the when the compiler sees we're using an svg somewhere
901
+ isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
902
+ }
875
903
  {
876
904
  {
877
905
  // either this is the first render of an element OR it's an update
@@ -898,6 +926,9 @@ const patch = (oldVNode, newVNode) => {
898
926
  // no new child vnodes, but there are old child vnodes to remove
899
927
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
900
928
  }
929
+ if (isSvgMode && tag === 'svg') {
930
+ isSvgMode = false;
931
+ }
901
932
  }
902
933
  else if (oldVNode.$text$ !== text) {
903
934
  // update the text content for the text only vnode
@@ -1653,4 +1684,4 @@ exports.promiseResolve = promiseResolve;
1653
1684
  exports.registerInstance = registerInstance;
1654
1685
  exports.setNonce = setNonce;
1655
1686
 
1656
- //# sourceMappingURL=index-83c1daf2.js.map
1687
+ //# sourceMappingURL=index-b83343b9.js.map
@@ -1 +1 @@
1
- {"file":"index-1fd61928.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-83c1daf2.js');
5
+ const index = require('./index-b83343b9.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v3.2.1 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["hemfixarna-address_32.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[1,"load-from-query"],"customer":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"tree":[32]}],[1,"hemfixarna-doro",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-elfa",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-fargvaruhuset",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-flyttsmart",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-forebygg",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kbygg",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-klint",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-norrgavel",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-sparfonster",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-tesla",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-zaptec",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-component",{"slug":[1],"id":[1],"business":[1],"topCategory":[1,"top-category"],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"nav":[16],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"tree":[32],"product":[32],"proppedProduct":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart",{"tree":[16]}],[0,"hemfixarna-category"],[0,"hemfixarna-order",{"tree":[16]}],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-service"],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"tree":[16],"closeModal":[16],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32]}],[0,"hemfixarna-invoice",{"formError":[32],"displayImages":[32],"formImages":[32],"formState":[32]}],[0,"hemfixarna-address",{"street":[32],"streetError":[32],"zip":[32],"zipError":[32],"town":[32],"townError":[32]}],[0,"hemfixarna-getuser",{"email":[32],"emailError":[32],"phone":[32],"phoneError":[32],"ssn":[32],"ssnError":[32]}],[0,"hemfixarna-orderrows",{"cart":[4],"tree":[16]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info",{"list":[16]}]]]], options);
17
+ return index.bootstrapLazy([["hemfixarna-address_34.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[1,"load-from-query"],"customer":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"tree":[32]}],[1,"hemfixarna-doro",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-elfa",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-fargvaruhuset",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-flyttsmart",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-forebygg",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kbygg",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-klint",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-norrgavel",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-power",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-sparfonster",{"id":[1],"customer":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-tesla",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-zaptec",{"id":[1],"loadFromQuery":[1,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-component",{"slug":[1],"id":[1],"business":[1],"topCategory":[1,"top-category"],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"nav":[16],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"tree":[32],"product":[32],"proppedProduct":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart",{"tree":[16]}],[0,"hemfixarna-category"],[0,"hemfixarna-order",{"tree":[16]}],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-service"],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"tree":[16],"closeModal":[16],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSource":[32],"selectedSubSource":[32],"sellerId":[32],"partnerOrderId":[32]}],[0,"hemfixarna-contact",{"vertical":[4]}],[0,"hemfixarna-invoice",{"formError":[32],"displayImages":[32],"formImages":[32],"formState":[32]}],[0,"hemfixarna-address",{"street":[32],"streetError":[32],"zip":[32],"zipError":[32],"town":[32],"townError":[32]}],[0,"hemfixarna-getuser",{"email":[32],"emailError":[32],"phone":[32],"phoneError":[32],"ssn":[32],"ssnError":[32]}],[0,"hemfixarna-orderrows",{"cart":[4],"tree":[16]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info"]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -11,6 +11,7 @@
11
11
  "./components/customers/hemfixarna-klint/hemfixarna-klint.js",
12
12
  "./components/customers/hemfixarna-kund/hemfixarna-kund.js",
13
13
  "./components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js",
14
+ "./components/customers/hemfixarna-power/hemfixarna-power.js",
14
15
  "./components/customers/hemfixarna-skanska/hemfixarna-skanska.js",
15
16
  "./components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js",
16
17
  "./components/customers/hemfixarna-string/hemfixarna-string-furniture.js",
@@ -23,6 +24,7 @@
23
24
  "./components/hemfixarna-category.tsx/hemfixarna-category.js",
24
25
  "./components/hemfixarna-checkout/hemfixarna-checkout.js",
25
26
  "./components/hemfixarna-component/hemfixarna-component.js",
27
+ "./components/hemfixarna-contact/hemfixarna-contact.js",
26
28
  "./components/hemfixarna-demo/hemfixarna-demo.js",
27
29
  "./components/hemfixarna-getuser/hemfixarna-getuser.js",
28
30
  "./components/hemfixarna-info/hemfixarna-info.js",
@@ -0,0 +1,131 @@
1
+ import { h } from '@stencil/core';
2
+ import { Business, WidgetStyle } from '../../../types';
3
+ export class MyComponent {
4
+ constructor() {
5
+ this.id = undefined;
6
+ this.customer = undefined;
7
+ this.loadFromQuery = undefined;
8
+ this.widgetStyle = WidgetStyle.standard;
9
+ this.buttonColor = undefined;
10
+ this.buttonBg = undefined;
11
+ }
12
+ render() {
13
+ return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.power }));
14
+ }
15
+ static get is() { return "hemfixarna-power"; }
16
+ static get encapsulation() { return "shadow"; }
17
+ static get properties() {
18
+ return {
19
+ "id": {
20
+ "type": "string",
21
+ "mutable": false,
22
+ "complexType": {
23
+ "original": "string",
24
+ "resolved": "string",
25
+ "references": {}
26
+ },
27
+ "required": false,
28
+ "optional": true,
29
+ "docs": {
30
+ "tags": [],
31
+ "text": ""
32
+ },
33
+ "attribute": "id",
34
+ "reflect": false
35
+ },
36
+ "customer": {
37
+ "type": "string",
38
+ "mutable": false,
39
+ "complexType": {
40
+ "original": "string",
41
+ "resolved": "string",
42
+ "references": {}
43
+ },
44
+ "required": false,
45
+ "optional": true,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": ""
49
+ },
50
+ "attribute": "customer",
51
+ "reflect": false
52
+ },
53
+ "loadFromQuery": {
54
+ "type": "string",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "string",
58
+ "resolved": "string",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": true,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": ""
66
+ },
67
+ "attribute": "load-from-query",
68
+ "reflect": false,
69
+ "defaultValue": "undefined"
70
+ },
71
+ "widgetStyle": {
72
+ "type": "string",
73
+ "mutable": false,
74
+ "complexType": {
75
+ "original": "WidgetStyle",
76
+ "resolved": "WidgetStyle.alternative | WidgetStyle.alternative_2 | WidgetStyle.alternative_3 | WidgetStyle.standard",
77
+ "references": {
78
+ "WidgetStyle": {
79
+ "location": "import",
80
+ "path": "../../../types"
81
+ }
82
+ }
83
+ },
84
+ "required": false,
85
+ "optional": true,
86
+ "docs": {
87
+ "tags": [],
88
+ "text": ""
89
+ },
90
+ "attribute": "widget-style",
91
+ "reflect": false,
92
+ "defaultValue": "WidgetStyle.standard"
93
+ },
94
+ "buttonColor": {
95
+ "type": "string",
96
+ "mutable": false,
97
+ "complexType": {
98
+ "original": "string",
99
+ "resolved": "string",
100
+ "references": {}
101
+ },
102
+ "required": false,
103
+ "optional": true,
104
+ "docs": {
105
+ "tags": [],
106
+ "text": ""
107
+ },
108
+ "attribute": "button-color",
109
+ "reflect": false
110
+ },
111
+ "buttonBg": {
112
+ "type": "string",
113
+ "mutable": false,
114
+ "complexType": {
115
+ "original": "string",
116
+ "resolved": "string",
117
+ "references": {}
118
+ },
119
+ "required": false,
120
+ "optional": true,
121
+ "docs": {
122
+ "tags": [],
123
+ "text": ""
124
+ },
125
+ "attribute": "button-bg",
126
+ "reflect": false
127
+ }
128
+ };
129
+ }
130
+ }
131
+ //# sourceMappingURL=hemfixarna-power.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-power.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-power/hemfixarna-power.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMvD,MAAM,OAAO,WAAW;;;;yBAGW,SAAS;uBACN,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,OAAO,CACL,4BACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAC1C,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,KAAK,GACF,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-power',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() customer?: 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 loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.power}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -39,9 +39,14 @@ export class HemfixarnaBreadcrumbs {
39
39
  const close = getAssetPath(`./assets/close.svg`);
40
40
  const cart = getAssetPath(`./assets/cart.svg`);
41
41
  const back = getAssetPath(`./assets/back.svg`);
42
- return (h("div", null, h("div", { class: "hemfixarna_crumbs" }, h("div", { class: "hemfixarna_crumbs--links" }, h("img", { onClick: () => this.handleHomePageClick(), src: logo, width: 110 }), !this.loadFromQuery || this.isDemo ? h("img", { onClick: () => this.closeModal(), class: "close", src: close, width: 32 }) : null, h("div", null, h("button", { onClick: () => this.handleHomePageClick() }, "Alla tj\u00E4nster"))), h("div", { onClick: () => this.handleCartClick(), class: `cart ${this.getCartLength() > 0 ? 'cart_active' : ''}` }, h("img", { src: cart, width: 24 }), h("span", null, this.getCartLength()))), [3, 4].includes(state.step) && !state.customer && (h("button", { class: "hemfixarna_crumbs--back", onClick: () => {
42
+ return (h("div", null, h("div", { class: "hemfixarna_crumbs" }, h("div", { class: "hemfixarna_crumbs--links" }, h("img", { onClick: () => this.handleHomePageClick(), src: logo, width: 110 }), !this.loadFromQuery || this.isDemo ? h("img", { onClick: () => this.closeModal(), class: "close", src: close, width: 32 }) : null, h("div", null, h("button", { onClick: () => this.handleHomePageClick() }, "Alla tj\u00E4nster"))), h("div", { class: "hemfixarna_crumbs--right" }, h("hemfixarna-contact", null), h("div", { onClick: () => this.handleCartClick(), class: `cart ${this.getCartLength() > 0 ? 'cart_active' : ''}` }, h("img", { src: cart, width: 24 }), h("span", null, this.getCartLength())))), [3, 4].includes(state.step) && !state.customer && (h("button", { class: "hemfixarna_crumbs--back", onClick: () => {
43
43
  state.step = state.step === 4 ? 3 : 2;
44
- } }, h("img", { width: 24, src: back, alt: "back arrow" }), h("span", null, "Se allt ", state.step === 4 ? state.selectedService.post_title : state.selectedCategory.name))), state.parentCategory && state.step < 5 && (h("button", { class: "hemfixarna_crumbs--back", onClick: () => {
44
+ } }, h("img", { width: 24, src: back, alt: "back arrow" }), h("span", null, "Se allt ", state.step === 4 ? state.selectedService.post_title : state.selectedCategory.name))), !state.parentCategory && state.step && state.selectedCustomerCategory && (h("button", { class: "hemfixarna_crumbs--back", onClick: () => {
45
+ state.step = 1;
46
+ state.selectedCustomerCategory = null;
47
+ state.selectedProduct = null;
48
+ state.maleri = null;
49
+ } }, h("img", { width: 24, src: back, alt: "back arrow" }), h("span", null, "Se alla tj\u00E4nster"))), state.parentCategory && state.step < 5 && (h("button", { class: "hemfixarna_crumbs--back", onClick: () => {
45
50
  state.step = 1;
46
51
  state.selectedCustomerCategory = state.parentCategory;
47
52
  state.selectedProduct = null;
@@ -1 +1 @@
1
- {"version":3,"file":"hemfixarna-breadcrumbs.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMjD,MAAM,OAAO,qBAAqB;;IAWhC,uBAAkB,G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eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAQ,CACjG,CACV;MACA,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,CACzC,cACE,KAAK,EAAC,yBAAyB,EAC/B,OAAO,EAAE,GAAG,EAAE;UACZ,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;UACf,KAAK,CAAC,wBAAwB,GAAG,KAAK,CAAC,cAAc,CAAC;UACtD,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC;UAC7B,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;QACtB,CAAC;QAED,WAAK,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAC,YAAY,GAAG;QAC9C;;UAAe,KAAK,CAAC,cAAc,CAAC,IAAI,CAAQ,CACzC,CACV,CACG,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Prop, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { Category } from '../../types';\nimport { scrollToTop } from '../../utils/scroll';\n\n@Component({\n tag: 'hemfixarna-breadcrumbs',\n shadow: false,\n})\nexport class HemfixarnaBreadcrumbs {\n @Prop() tree: Category;\n @Prop() closeModal: () => void;\n @Prop() loadFromQuery: boolean = false;\n @Prop() isDemo: boolean = false;\n @Element() private el: HTMLElement;\n\n getCartLength() {\n return state.cart.reduce((acc, curr) => acc + curr.amount, 0);\n }\n\n triggerScrollTotop = () => {\n const el = this.el.nextSibling as HTMLElement;\n scrollToTop(el);\n };\n\n handleCartClick() {\n if (state.cart?.length) {\n state.step = 5;\n this.triggerScrollTotop();\n }\n }\n\n handleHomePageClick() {\n state.step = 1;\n state.parentCategory = null;\n state.selectedCustomerCategory = null;\n this.triggerScrollTotop();\n setTimeout(() => {\n state.selectedCategory = null;\n state.selectedProduct = null;\n state.maleri = null;\n state.selectedService = null;\n }, 200);\n }\n\n render() {\n const logo = getAssetPath(`./assets/hemfixarna.svg`);\n const close = getAssetPath(`./assets/close.svg`);\n const cart = getAssetPath(`./assets/cart.svg`);\n const back = getAssetPath(`./assets/back.svg`);\n\n return (\n <div>\n <div class=\"hemfixarna_crumbs\">\n <div class=\"hemfixarna_crumbs--links\">\n <img onClick={() => this.handleHomePageClick()} src={logo} width={110} />\n {!this.loadFromQuery || this.isDemo ? <img onClick={() => this.closeModal()} class=\"close\" src={close} width={32} /> : null}\n <div>\n <button onClick={() => this.handleHomePageClick()}>Alla tjänster</button>\n </div>\n </div>\n <div onClick={() => this.handleCartClick()} class={`cart ${this.getCartLength() > 0 ? 'cart_active' : ''}`}>\n <img src={cart} width={24} />\n <span>{this.getCartLength()}</span>\n </div>\n </div>\n {[3, 4].includes(state.step) && !state.customer && (\n <button\n class=\"hemfixarna_crumbs--back\"\n onClick={() => {\n state.step = state.step === 4 ? 3 : 2;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n <span>Se allt {state.step === 4 ? state.selectedService.post_title : state.selectedCategory.name}</span>\n </button>\n )}\n {state.parentCategory && state.step < 5 && (\n <button\n class=\"hemfixarna_crumbs--back\"\n onClick={() => {\n state.step = 1;\n state.selectedCustomerCategory = state.parentCategory;\n state.selectedProduct = null;\n state.maleri = null;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n <span>Se allt {state.parentCategory.name}</span>\n </button>\n )}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"hemfixarna-breadcrumbs.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,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;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Prop, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { Category } from '../../types';\nimport { scrollToTop } from '../../utils/scroll';\n\n@Component({\n tag: 'hemfixarna-breadcrumbs',\n shadow: false,\n})\nexport class HemfixarnaBreadcrumbs {\n @Prop() tree: Category;\n @Prop() closeModal: () => void;\n @Prop() loadFromQuery: boolean = false;\n @Prop() isDemo: boolean = false;\n @Element() private el: HTMLElement;\n\n getCartLength() {\n return state.cart.reduce((acc, curr) => acc + curr.amount, 0);\n }\n\n triggerScrollTotop = () => {\n const el = this.el.nextSibling as HTMLElement;\n scrollToTop(el);\n };\n\n handleCartClick() {\n if (state.cart?.length) {\n state.step = 5;\n this.triggerScrollTotop();\n }\n }\n\n handleHomePageClick() {\n state.step = 1;\n state.parentCategory = null;\n state.selectedCustomerCategory = null;\n this.triggerScrollTotop();\n setTimeout(() => {\n state.selectedCategory = null;\n state.selectedProduct = null;\n state.maleri = null;\n state.selectedService = null;\n }, 200);\n }\n\n render() {\n const logo = getAssetPath(`./assets/hemfixarna.svg`);\n const close = getAssetPath(`./assets/close.svg`);\n const cart = getAssetPath(`./assets/cart.svg`);\n const back = getAssetPath(`./assets/back.svg`);\n\n return (\n <div>\n <div class=\"hemfixarna_crumbs\">\n <div class=\"hemfixarna_crumbs--links\">\n <img onClick={() => this.handleHomePageClick()} src={logo} width={110} />\n {!this.loadFromQuery || this.isDemo ? <img onClick={() => this.closeModal()} class=\"close\" src={close} width={32} /> : null}\n <div>\n <button onClick={() => this.handleHomePageClick()}>Alla tjänster</button>\n </div>\n </div>\n <div class=\"hemfixarna_crumbs--right\">\n <hemfixarna-contact></hemfixarna-contact>\n <div onClick={() => this.handleCartClick()} class={`cart ${this.getCartLength() > 0 ? 'cart_active' : ''}`}>\n <img src={cart} width={24} />\n <span>{this.getCartLength()}</span>\n </div>\n </div>\n </div>\n {[3, 4].includes(state.step) && !state.customer && (\n <button\n class=\"hemfixarna_crumbs--back\"\n onClick={() => {\n state.step = state.step === 4 ? 3 : 2;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n <span>Se allt {state.step === 4 ? state.selectedService.post_title : state.selectedCategory.name}</span>\n </button>\n )}\n {!state.parentCategory && state.step && state.selectedCustomerCategory && (\n <button\n class=\"hemfixarna_crumbs--back\"\n onClick={() => {\n state.step = 1;\n state.selectedCustomerCategory = null;\n state.selectedProduct = null;\n state.maleri = null;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n <span>Se alla tjänster</span>\n </button>\n )}\n {state.parentCategory && state.step < 5 && (\n <button\n class=\"hemfixarna_crumbs--back\"\n onClick={() => {\n state.step = 1;\n state.selectedCustomerCategory = state.parentCategory;\n state.selectedProduct = null;\n state.maleri = null;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n <span>Se allt {state.parentCategory.name}</span>\n </button>\n )}\n </div>\n );\n }\n}\n"]}
@@ -11,7 +11,7 @@ export class HemfixarnaCategory {
11
11
  .map(s => {
12
12
  var _a;
13
13
  return (h("hemfixarna-box", { post: s, icon: (_a = s.icon.url) !== null && _a !== void 0 ? _a : s.icon, postTitle: s.post_title }));
14
- }))), h("hemfixarna-info", { list: state.options.trust }))));
14
+ }))), h("hemfixarna-info", null))));
15
15
  }
16
16
  static get is() { return "hemfixarna-category"; }
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hemfixarna-category.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-category.tsx/hemfixarna-category.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,aAAa,CAAC;AAOhC,MAAM,OAAO,kBAAkB;EAC7B,kBAAkB,CAAC,OAAgB;IACjC,KAAK,CAAC,eAAe,GAAG,OAAO,CAAC;IAChC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;EACjB,CAAC;EAED,MAAM;IACJ,OAAO,CACL;MACE,cAAK,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAM;MACtC,WAAK,KAAK,EAAC,gCAAgC;QACzC;UACE,UAAI,KAAK,EAAC,uBAAuB,IAC9B,KAAK,CAAC,gBAAgB,CAAC,QAAQ;aAC7B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACtD,GAAG,CAAC,CAAC,CAAC,EAAE;;YAAC,OAAA,CACR,sBAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAC,CAAC,CAAC,IAAa,CAAC,GAAG,mCAAK,CAAC,CAAC,IAAe,EAAE,SAAS,EAAE,CAAC,CAAC,UAAU,GAAmB,CACtH,CAAA;WAAA,CAAC,CACD,CACD;QACN,uBAAiB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,GAAI,CAC1C,CACF,CACP,CAAC;EACJ,CAAC;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\nimport state from '../../store';\nimport { Icon, Service } from '../../types';\n\n@Component({\n tag: 'hemfixarna-category',\n shadow: false,\n})\nexport class HemfixarnaCategory {\n setSelectedService(service: Service) {\n state.selectedService = service;\n state.step = 3;\n }\n\n render() {\n return (\n <div>\n <h2>{state.selectedCategory.name}</h2>\n <div class=\"hemfixarna_categories--wrapper\">\n <div>\n <ul class=\"hemfixarna_categories\">\n {state.selectedCategory.services\n .sort((a, b) => (a.post_title < b.post_title ? -1 : 1))\n .map(s => (\n <hemfixarna-box post={s} icon={(s.icon as Icon).url ?? (s.icon as string)} postTitle={s.post_title}></hemfixarna-box>\n ))}\n </ul>\n </div>\n <hemfixarna-info list={state.options.trust} />\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"hemfixarna-category.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-category.tsx/hemfixarna-category.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,aAAa,CAAC;AAOhC,MAAM,OAAO,kBAAkB;EAC7B,kBAAkB,CAAC,OAAgB;IACjC,KAAK,CAAC,eAAe,GAAG,OAAO,CAAC;IAChC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;EACjB,CAAC;EAED,MAAM;IACJ,OAAO,CACL;MACE,cAAK,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAM;MACtC,WAAK,KAAK,EAAC,gCAAgC;QACzC;UACE,UAAI,KAAK,EAAC,uBAAuB,IAC9B,KAAK,CAAC,gBAAgB,CAAC,QAAQ;aAC7B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACtD,GAAG,CAAC,CAAC,CAAC,EAAE;;YAAC,OAAA,CACR,sBAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAC,CAAC,CAAC,IAAa,CAAC,GAAG,mCAAK,CAAC,CAAC,IAAe,EAAE,SAAS,EAAE,CAAC,CAAC,UAAU,GAAmB,CACtH,CAAA;WAAA,CAAC,CACD,CACD;QACN,0BAAmB,CACf,CACF,CACP,CAAC;EACJ,CAAC;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\nimport state from '../../store';\nimport { Icon, Service } from '../../types';\n\n@Component({\n tag: 'hemfixarna-category',\n shadow: false,\n})\nexport class HemfixarnaCategory {\n setSelectedService(service: Service) {\n state.selectedService = service;\n state.step = 3;\n }\n\n render() {\n return (\n <div>\n <h2>{state.selectedCategory.name}</h2>\n <div class=\"hemfixarna_categories--wrapper\">\n <div>\n <ul class=\"hemfixarna_categories\">\n {state.selectedCategory.services\n .sort((a, b) => (a.post_title < b.post_title ? -1 : 1))\n .map(s => (\n <hemfixarna-box post={s} icon={(s.icon as Icon).url ?? (s.icon as string)} postTitle={s.post_title}></hemfixarna-box>\n ))}\n </ul>\n </div>\n <hemfixarna-info />\n </div>\n </div>\n );\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { Fragment, getAssetPath, h } from '@stencil/core';
2
2
  import state from '../../store';
3
3
  import { Business } from '../../types';
4
- import { postOrder } from '../../utils/api';
4
+ import { getSources, postOrder } from '../../utils/api';
5
5
  import { postPerson } from '../../utils/felixApi';
6
6
  import { hideField } from '../../utils/form';
7
7
  import { scrollToTop } from '../../utils/scroll';
@@ -15,7 +15,7 @@ export class HemfixarnaCheckout {
15
15
  this.generalError = null;
16
16
  };
17
17
  this.sendOrder = async () => {
18
- var _a, _b;
18
+ var _a, _b, _c, _d, _e;
19
19
  if (this.loading)
20
20
  return;
21
21
  this.loading = true;
@@ -53,9 +53,11 @@ export class HemfixarnaCheckout {
53
53
  ].flat(),
54
54
  creditSafe: state.creditSafeUser,
55
55
  customer: state.business,
56
+ id_source: (_b = (_a = this.selectedSource) === null || _a === void 0 ? void 0 : _a.fieldData._id) !== null && _b !== void 0 ? _b : '',
57
+ id_sub_source: (_c = this.selectedSubSource) !== null && _c !== void 0 ? _c : '',
56
58
  };
57
59
  const felixOrder = await postPerson(order);
58
- if (!felixOrder || !((_b = (_a = felixOrder.response) === null || _a === void 0 ? void 0 : _a.scriptResult) === null || _b === void 0 ? void 0 : _b.includes('OK'))) {
60
+ if (!felixOrder || !((_e = (_d = felixOrder.response) === null || _d === void 0 ? void 0 : _d.scriptResult) === null || _e === void 0 ? void 0 : _e.includes('OK'))) {
59
61
  order = Object.assign(Object.assign({}, order), { felixStatus: 'error' });
60
62
  }
61
63
  else {
@@ -78,6 +80,7 @@ export class HemfixarnaCheckout {
78
80
  this.loading = false;
79
81
  };
80
82
  this.handleSubmit = (e) => {
83
+ var _a, _b;
81
84
  e.preventDefault();
82
85
  this.generalError = null;
83
86
  const validDate = this.date.length > 0;
@@ -89,11 +92,39 @@ export class HemfixarnaCheckout {
89
92
  if (notValidTerms) {
90
93
  this.generalError = 'Du måste godkänna villkoren';
91
94
  }
95
+ if (state.sources) {
96
+ if (!this.sellerId) {
97
+ this.generalError = 'Ange säljar id';
98
+ return;
99
+ }
100
+ if (!this.selectedSource) {
101
+ this.generalError = 'Välj källa';
102
+ return;
103
+ }
104
+ if (this.selectedSource && ((_b = (_a = this.selectedSource.portalData) === null || _a === void 0 ? void 0 : _a.So_SubSource) === null || _b === void 0 ? void 0 : _b.length) && !this.selectedSubSource) {
105
+ this.generalError = 'Välj underkälla';
106
+ return;
107
+ }
108
+ }
92
109
  if (validDate && !notValidTerms) {
93
110
  this.sendOrder();
94
111
  }
95
112
  };
113
+ this.handleKeyDown = (event) => {
114
+ this.enteredPin += event.key;
115
+ const correctPin = '+0000frfrfr';
116
+ if (this.enteredPin.length === correctPin.length) {
117
+ if (this.enteredPin === correctPin) {
118
+ this.handleSources();
119
+ window.removeEventListener('keydown', this.handleKeyDown);
120
+ }
121
+ this.enteredPin = '';
122
+ }
123
+ clearTimeout(this.pinTimeout);
124
+ this.pinTimeout = setTimeout(() => (this.enteredPin = ''), 5000);
125
+ };
96
126
  this.render = () => {
127
+ var _a, _b;
97
128
  const dateLogo = getAssetPath(`./assets/date.svg`);
98
129
  const down = getAssetPath(`./assets/down.svg`);
99
130
  const loading = getAssetPath(`./assets/spinner.gif`);
@@ -104,7 +135,11 @@ export class HemfixarnaCheckout {
104
135
  return h("hemfixarna-getuser", null);
105
136
  }
106
137
  else if (state.checkoutStep === 2) {
107
- return (h("div", { class: "mb-2" }, h("div", { class: "hemfixarna_addressinfo" }, h("div", null, h("p", null, hideField(state.user.firstName)), h("p", null, hideField(state.user.lastName)), h("p", null, state.user.email), h("p", null, state.user.phone)), h("div", null, h("p", null, hideField(state.user.street)), h("p", null, hideField(state.user.zip)), h("p", null, hideField(state.user.town))), h("button", { onClick: () => (state.checkoutEdit = true) }, "Beh\u00F6ver du \u00E4ndra adressen?")), h("form", { onSubmit: e => this.handleSubmit(e) }, h("div", null, h("img", { src: dateLogo, width: 24 }), h("input", { class: `${this.date.length ? 'input_active' : ''}`, min: new Date().toISOString().split('T')[0], onChange: e => this.handleChangeDate(e), type: "date", name: "date", value: this.date }), h("label", { htmlFor: "date" }, "Tidigaste datum f\u00F6r hembes\u00F6k"), h("img", { src: down, width: 24 })), this.dateError && h("span", null, this.dateError), h("label", { class: "hemfixarna_checkbox" }, h("input", { onChange: () => this.handleChangeTerms(), type: "checkbox" }), h("span", { innerHTML: state.options.terms })), state.cart
138
+ return (h("div", { class: "mb-2" }, h("div", { class: "hemfixarna_addressinfo" }, h("div", null, h("p", null, hideField(state.user.firstName)), h("p", null, hideField(state.user.lastName)), h("p", null, state.user.email), h("p", null, state.user.phone)), h("div", null, h("p", null, hideField(state.user.street)), h("p", null, hideField(state.user.zip)), h("p", null, hideField(state.user.town))), h("button", { onClick: () => (state.checkoutEdit = true) }, "Beh\u00F6ver du \u00E4ndra adressen?")), h("form", { onSubmit: e => this.handleSubmit(e) }, h("div", null, h("img", { src: dateLogo, width: 24 }), h("input", { class: `${this.date.length ? 'input_active' : ''}`, min: new Date().toISOString().split('T')[0], onChange: e => this.handleChangeDate(e), type: "date", name: "date", value: this.date }), h("label", { htmlFor: "date" }, "Tidigaste datum f\u00F6r hembes\u00F6k"), h("img", { src: down, width: 24 })), state.sources ? (h(Fragment, null, h("div", null, h("input", { type: "text", placeholder: "Ange s\u00E4ljar id", onChange: e => (this.sellerId = e.target.value) })), h("div", null, h("input", { type: "text", placeholder: "Ange partner order id", onChange: e => (this.partnerOrderId = e.target.value) })), h("div", null, h("select", { onChange: e => {
139
+ this.selectedSource = state.sources.find(s => s.fieldData._id === e.target.value);
140
+ this.selectedSubSource = null;
141
+ console.log(this.selectedSource.portalData.So_SubSource);
142
+ } }, h("option", { disabled: true, selected: true, value: "null" }, "V\u00E4lj k\u00E4lla"), state.sources.map(source => (h("option", { value: source.fieldData._id }, source.fieldData.So01_Name))))), this.selectedSource && ((_b = (_a = this.selectedSource.portalData) === null || _a === void 0 ? void 0 : _a.So_SubSource) === null || _b === void 0 ? void 0 : _b.length) ? (h("div", null, h("select", { key: this.selectedSource.fieldData._id, onChange: e => (this.selectedSubSource = e.target.value) }, h("option", { disabled: true, selected: true, value: "null" }, "V\u00E4lj underk\u00E4lla"), this.selectedSource.portalData.So_SubSource.map(sub => (h("option", { value: sub['So_SubSource::_id'] }, sub['So_SubSource::Sus01_Name'])))))) : null)) : null, this.dateError && h("span", null, this.dateError), h("label", { class: "hemfixarna_checkbox" }, h("input", { onChange: () => this.handleChangeTerms(), type: "checkbox" }), h("span", { innerHTML: state.options.terms })), state.cart
108
143
  .filter(i => { var _a; return (_a = i.terms_checkout) === null || _a === void 0 ? void 0 : _a.length; })
109
144
  .map(item => (h(Fragment, null, h("label", { class: "hemfixarna_checkbox" }, h("input", { onChange: () => this.handleChangeTerms(), type: "checkbox" }), h("span", null, item.terms_checkout))))), this.generalError && h("span", null, this.generalError), h("div", { class: this.loading ? 'loading' : '' }, h("input", { type: "submit", value: this.loading ? '' : 'Skicka bokning' }), h("img", { width: 20, height: 20, src: loading, alt: "spinner" })))));
110
145
  }
@@ -113,11 +148,26 @@ export class HemfixarnaCheckout {
113
148
  this.dateError = null;
114
149
  this.generalError = null;
115
150
  this.loading = false;
151
+ this.enteredPin = '';
152
+ this.selectedSource = null;
153
+ this.selectedSubSource = null;
154
+ this.sellerId = null;
155
+ this.partnerOrderId = null;
156
+ }
157
+ async handleSources() {
158
+ const sources = await getSources();
159
+ if (sources === null || sources === void 0 ? void 0 : sources.length) {
160
+ state.sources = sources.filter(s => s.fieldData.So457_Aktiv_ac === 1 && s.fieldData.So39_WebSource === 1);
161
+ }
116
162
  }
117
163
  componentWillLoad() {
118
164
  if (Boolean(state.user && state.user.street)) {
119
165
  state.checkoutStep = 2;
120
166
  }
167
+ window.addEventListener('keydown', this.handleKeyDown);
168
+ }
169
+ disconnectedCallback() {
170
+ window.removeEventListener('keydown', this.handleKeyDown);
121
171
  }
122
172
  static get is() { return "hemfixarna-checkout"; }
123
173
  static get states() {
@@ -125,7 +175,12 @@ export class HemfixarnaCheckout {
125
175
  "date": {},
126
176
  "dateError": {},
127
177
  "generalError": {},
128
- "loading": {}
178
+ "loading": {},
179
+ "enteredPin": {},
180
+ "selectedSource": {},
181
+ "selectedSubSource": {},
182
+ "sellerId": {},
183
+ "partnerOrderId": {}
129
184
  };
130
185
  }
131
186
  static get elementRef() { return "el"; }