hemfixarna-web-components 1.7.2 → 1.7.4

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 (29) hide show
  1. package/dist/cjs/hemfixarna-address_15.cjs.entry.js +5 -5
  2. package/dist/cjs/hemfixarna-address_15.cjs.entry.js.map +1 -1
  3. package/dist/cjs/hemfixarna-byggmax.cjs.entry.js +2 -1
  4. package/dist/cjs/hemfixarna-byggmax.cjs.entry.js.map +1 -1
  5. package/dist/cjs/hemfixarna-components.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js +19 -1
  8. package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js.map +1 -1
  9. package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js +3 -3
  10. package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js.map +1 -1
  11. package/dist/esm/hemfixarna-address_15.entry.js +5 -5
  12. package/dist/esm/hemfixarna-address_15.entry.js.map +1 -1
  13. package/dist/esm/hemfixarna-byggmax.entry.js +2 -1
  14. package/dist/esm/hemfixarna-byggmax.entry.js.map +1 -1
  15. package/dist/esm/hemfixarna-components.js +1 -1
  16. package/dist/esm/loader.js +1 -1
  17. package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
  18. package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
  19. package/dist/hemfixarna-components/p-72901f4a.entry.js +2 -0
  20. package/dist/hemfixarna-components/p-72901f4a.entry.js.map +1 -0
  21. package/dist/hemfixarna-components/p-a63a6a56.entry.js +2 -0
  22. package/dist/hemfixarna-components/p-a63a6a56.entry.js.map +1 -0
  23. package/dist/types/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.d.ts +1 -0
  24. package/dist/types/components.d.ts +2 -0
  25. package/package.json +1 -1
  26. package/dist/hemfixarna-components/p-9b1e6bc2.entry.js +0 -2
  27. package/dist/hemfixarna-components/p-9b1e6bc2.entry.js.map +0 -1
  28. package/dist/hemfixarna-components/p-fb43b148.entry.js +0 -2
  29. package/dist/hemfixarna-components/p-fb43b148.entry.js.map +0 -1
@@ -14,9 +14,10 @@ const MyComponent = class {
14
14
  this.widgetStyle = index$1.WidgetStyle.standard;
15
15
  this.buttonColor = undefined;
16
16
  this.buttonBg = undefined;
17
+ this.slug = undefined;
17
18
  }
18
19
  render() {
19
- return (index.h("hemfixarna-component", { id: this.id, business: index$1.Business.byggmax, widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor }));
20
+ return (index.h("hemfixarna-component", { slug: this.slug, id: this.id, business: index$1.Business.byggmax, widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor }));
20
21
  }
21
22
  };
22
23
  MyComponent.style = hemfixarnaByggmaxCss;
@@ -1 +1 @@
1
- {"file":"hemfixarna-byggmax.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,EAAE;;MCQlB,WAAW;;;;uBAEcA,mBAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACEC,kCAAsB,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAEC,gBAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,GAAyB,EAC7K;GACH;;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.scss?tag=hemfixarna-byggmax&encapsulation=shadow","./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.tsx"],"sourcesContent":["","import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-byggmax',\n styleUrl: 'hemfixarna-byggmax.scss',\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 id={this.id} business={Business.byggmax} widgetStyle={this.widgetStyle} buttonBg={this.buttonBg} buttonColor={this.buttonColor}></hemfixarna-component>\n );\n }\n}\n"],"version":3}
1
+ {"file":"hemfixarna-byggmax.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,EAAE;;MCQlB,WAAW;;;;uBAEcA,mBAAW,CAAC,QAAQ;;;;;EAKxD,MAAM;IACJ,QACEC,kCACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAEC,gBAAQ,CAAC,OAAO,EAC1B,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,GACP,EACxB;GACH;;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.scss?tag=hemfixarna-byggmax&encapsulation=shadow","./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.tsx"],"sourcesContent":["","import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-byggmax',\n styleUrl: 'hemfixarna-byggmax.scss',\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 @Prop() slug?: string;\n\n render() {\n return (\n <hemfixarna-component\n slug={this.slug}\n id={this.id}\n business={Business.byggmax}\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n ></hemfixarna-component>\n );\n }\n}\n"],"version":3}
@@ -20,7 +20,7 @@ const patchBrowser = () => {
20
20
  };
21
21
 
22
22
  patchBrowser().then(options => {
23
- return index.bootstrapLazy([["hemfixarna-address_15.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32],"loggedIn":[32],"loginError":[32]}],[1,"hemfixarna-component",{"id":[1],"slug":[1],"business":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"product":[32],"proppedProduct":[32],"loginSourceError":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"closeModal":[16]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSubSource":[32],"partnerOrderId":[32],"sellerID":[32],"RefferalID":[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]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info"]]],["hemfixarna-byggmax.cjs",[[1,"hemfixarna-byggmax",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-doro.cjs",[[1,"hemfixarna-doro",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-elfa.cjs",[[1,"hemfixarna-elfa",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-fargvaruhuset.cjs",[[1,"hemfixarna-fargvaruhuset",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-flyttsmart.cjs",[[1,"hemfixarna-flyttsmart",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-forebygg.cjs",[[1,"hemfixarna-forebygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-hornbach.cjs",[[1,"hemfixarna-hornbach",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kbygg.cjs",[[1,"hemfixarna-kbygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-klint.cjs",[[1,"hemfixarna-klint",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kund.cjs",[[1,"hemfixarna-kund",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-norrgavel.cjs",[[1,"hemfixarna-norrgavel",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-power.cjs",[[1,"hemfixarna-power",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-skanska.cjs",[[1,"hemfixarna-skanska",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-sparfonster.cjs",[[1,"hemfixarna-sparfonster",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-string-furniture.cjs",[[1,"hemfixarna-string-furniture",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-superfront.cjs",[[1,"hemfixarna-superfront",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-tesla.cjs",[[1,"hemfixarna-tesla",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-traningspartner.cjs",[[1,"hemfixarna-traningspartner",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-zaptec.cjs",[[1,"hemfixarna-zaptec",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-category.cjs",[[0,"hemfixarna-category"]]],["hemfixarna-service.cjs",[[0,"hemfixarna-service"]]]], options);
23
+ return index.bootstrapLazy([["hemfixarna-address_15.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32],"loggedIn":[32],"loginError":[32]}],[1,"hemfixarna-component",{"id":[1],"slug":[1],"business":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"product":[32],"proppedProduct":[32],"loginSourceError":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"closeModal":[16]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSubSource":[32],"partnerOrderId":[32],"sellerID":[32],"RefferalID":[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]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info"]]],["hemfixarna-byggmax.cjs",[[1,"hemfixarna-byggmax",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"slug":[1]}]]],["hemfixarna-doro.cjs",[[1,"hemfixarna-doro",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-elfa.cjs",[[1,"hemfixarna-elfa",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-fargvaruhuset.cjs",[[1,"hemfixarna-fargvaruhuset",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-flyttsmart.cjs",[[1,"hemfixarna-flyttsmart",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-forebygg.cjs",[[1,"hemfixarna-forebygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-hornbach.cjs",[[1,"hemfixarna-hornbach",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kbygg.cjs",[[1,"hemfixarna-kbygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-klint.cjs",[[1,"hemfixarna-klint",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kund.cjs",[[1,"hemfixarna-kund",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-norrgavel.cjs",[[1,"hemfixarna-norrgavel",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-power.cjs",[[1,"hemfixarna-power",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-skanska.cjs",[[1,"hemfixarna-skanska",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-sparfonster.cjs",[[1,"hemfixarna-sparfonster",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-string-furniture.cjs",[[1,"hemfixarna-string-furniture",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-superfront.cjs",[[1,"hemfixarna-superfront",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-tesla.cjs",[[1,"hemfixarna-tesla",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-traningspartner.cjs",[[1,"hemfixarna-traningspartner",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-zaptec.cjs",[[1,"hemfixarna-zaptec",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-category.cjs",[[0,"hemfixarna-category"]]],["hemfixarna-service.cjs",[[0,"hemfixarna-service"]]]], options);
24
24
  });
25
25
 
26
26
  exports.setNonce = index.setNonce;
@@ -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_15.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32],"loggedIn":[32],"loginError":[32]}],[1,"hemfixarna-component",{"id":[1],"slug":[1],"business":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"product":[32],"proppedProduct":[32],"loginSourceError":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"closeModal":[16]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSubSource":[32],"partnerOrderId":[32],"sellerID":[32],"RefferalID":[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]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info"]]],["hemfixarna-byggmax.cjs",[[1,"hemfixarna-byggmax",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-doro.cjs",[[1,"hemfixarna-doro",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-elfa.cjs",[[1,"hemfixarna-elfa",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-fargvaruhuset.cjs",[[1,"hemfixarna-fargvaruhuset",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-flyttsmart.cjs",[[1,"hemfixarna-flyttsmart",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-forebygg.cjs",[[1,"hemfixarna-forebygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-hornbach.cjs",[[1,"hemfixarna-hornbach",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kbygg.cjs",[[1,"hemfixarna-kbygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-klint.cjs",[[1,"hemfixarna-klint",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kund.cjs",[[1,"hemfixarna-kund",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-norrgavel.cjs",[[1,"hemfixarna-norrgavel",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-power.cjs",[[1,"hemfixarna-power",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-skanska.cjs",[[1,"hemfixarna-skanska",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-sparfonster.cjs",[[1,"hemfixarna-sparfonster",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-string-furniture.cjs",[[1,"hemfixarna-string-furniture",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-superfront.cjs",[[1,"hemfixarna-superfront",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-tesla.cjs",[[1,"hemfixarna-tesla",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-traningspartner.cjs",[[1,"hemfixarna-traningspartner",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-zaptec.cjs",[[1,"hemfixarna-zaptec",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-category.cjs",[[0,"hemfixarna-category"]]],["hemfixarna-service.cjs",[[0,"hemfixarna-service"]]]], options);
17
+ return index.bootstrapLazy([["hemfixarna-address_15.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32],"loggedIn":[32],"loginError":[32]}],[1,"hemfixarna-component",{"id":[1],"slug":[1],"business":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"product":[32],"proppedProduct":[32],"loginSourceError":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"closeModal":[16]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSubSource":[32],"partnerOrderId":[32],"sellerID":[32],"RefferalID":[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]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info"]]],["hemfixarna-byggmax.cjs",[[1,"hemfixarna-byggmax",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"slug":[1]}]]],["hemfixarna-doro.cjs",[[1,"hemfixarna-doro",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-elfa.cjs",[[1,"hemfixarna-elfa",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-fargvaruhuset.cjs",[[1,"hemfixarna-fargvaruhuset",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-flyttsmart.cjs",[[1,"hemfixarna-flyttsmart",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-forebygg.cjs",[[1,"hemfixarna-forebygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-hornbach.cjs",[[1,"hemfixarna-hornbach",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kbygg.cjs",[[1,"hemfixarna-kbygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-klint.cjs",[[1,"hemfixarna-klint",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kund.cjs",[[1,"hemfixarna-kund",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-norrgavel.cjs",[[1,"hemfixarna-norrgavel",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-power.cjs",[[1,"hemfixarna-power",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-skanska.cjs",[[1,"hemfixarna-skanska",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-sparfonster.cjs",[[1,"hemfixarna-sparfonster",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-string-furniture.cjs",[[1,"hemfixarna-string-furniture",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-superfront.cjs",[[1,"hemfixarna-superfront",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-tesla.cjs",[[1,"hemfixarna-tesla",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-traningspartner.cjs",[[1,"hemfixarna-traningspartner",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-zaptec.cjs",[[1,"hemfixarna-zaptec",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-category.cjs",[[0,"hemfixarna-category"]]],["hemfixarna-service.cjs",[[0,"hemfixarna-service"]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -6,9 +6,10 @@ export class MyComponent {
6
6
  this.widgetStyle = WidgetStyle.standard;
7
7
  this.buttonColor = undefined;
8
8
  this.buttonBg = undefined;
9
+ this.slug = undefined;
9
10
  }
10
11
  render() {
11
- return (h("hemfixarna-component", { id: this.id, business: Business.byggmax, widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor }));
12
+ return (h("hemfixarna-component", { slug: this.slug, id: this.id, business: Business.byggmax, widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor }));
12
13
  }
13
14
  static get is() { return "hemfixarna-byggmax"; }
14
15
  static get encapsulation() { return "shadow"; }
@@ -97,6 +98,23 @@ export class MyComponent {
97
98
  },
98
99
  "attribute": "button-bg",
99
100
  "reflect": false
101
+ },
102
+ "slug": {
103
+ "type": "string",
104
+ "mutable": false,
105
+ "complexType": {
106
+ "original": "string",
107
+ "resolved": "string",
108
+ "references": {}
109
+ },
110
+ "required": false,
111
+ "optional": true,
112
+ "docs": {
113
+ "tags": [],
114
+ "text": ""
115
+ },
116
+ "attribute": "slug",
117
+ "reflect": false
100
118
  }
101
119
  };
102
120
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hemfixarna-byggmax.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.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;AAOvD,MAAM,OAAO,WAAW;;;uBAEc,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,OAAO,CACL,4BAAsB,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,GAAyB,CAC9K,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-byggmax',\n styleUrl: 'hemfixarna-byggmax.scss',\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 id={this.id} business={Business.byggmax} widgetStyle={this.widgetStyle} buttonBg={this.buttonBg} buttonColor={this.buttonColor}></hemfixarna-component>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"hemfixarna-byggmax.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.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;AAOvD,MAAM,OAAO,WAAW;;;uBAEc,WAAW,CAAC,QAAQ;;;;;EAKxD,MAAM;IACJ,OAAO,CACL,4BACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAC1B,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,GACP,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-byggmax',\n styleUrl: 'hemfixarna-byggmax.scss',\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 @Prop() slug?: string;\n\n render() {\n return (\n <hemfixarna-component\n slug={this.slug}\n id={this.id}\n business={Business.byggmax}\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -53,8 +53,8 @@ export class HemfixarnaCheckout {
53
53
  ].flat(),
54
54
  creditSafe: state.creditSafeUser,
55
55
  customer: state.business,
56
- id_source: '',
57
- id_sub_source: '',
56
+ id_source: state.customer.source ? state.customer.source.fieldData.So01_Name : '',
57
+ id_sub_source: this.selectedSubSource ? this.selectedSubSource : '',
58
58
  seller_id: (_a = this.sellerID) !== null && _a !== void 0 ? _a : '',
59
59
  referral_id: (_b = this.RefferalID) !== null && _b !== void 0 ? _b : '',
60
60
  };
@@ -120,7 +120,7 @@ export class HemfixarnaCheckout {
120
120
  return h("hemfixarna-getuser", null);
121
121
  }
122
122
  else if (state.checkoutStep === 2) {
123
- 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), state.customer.source && state.selectSource ? (h(Fragment, null, h("p", null, "Inloggad som:", h("strong", null, " ", state.customer.source.fieldData.So01_Name)), h("label", null, "S\u00E4ljare (S\u00E4ljarId)", h("input", { type: "text", value: this.sellerID, onChange: e => (this.sellerID = e.target.value) })), h("label", null, "PartnerOrderID (RefferalID)", h("input", { type: "text", value: this.RefferalID, onChange: e => (this.RefferalID = e.target.value) })), ((_a = state.customer.source.sub_sources) === null || _a === void 0 ? void 0 : _a.length) ? (h("div", null, h("select", { onChange: e => (this.selectedSubSource = e.target.value) }, h("option", { disabled: true, selected: true, value: "null" }, "V\u00E4lj underk\u00E4lla"), state.customer.source.sub_sources.map(sub => (h("option", { value: sub['So_SubSource::_id'] }, sub['So_SubSource::Sus01_Name'])))))) : (h("p", null, "Det finns inga underk\u00E4llor att v\u00E4lja")))) : null, h("label", { class: "hemfixarna_checkbox" }, h("input", { onChange: () => this.handleChangeTerms(), type: "checkbox" }), h("span", { innerHTML: state.options.terms })), state.cart
123
+ 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), state.customer.source && state.selectSource ? (h(Fragment, null, h("p", null, "Inloggad som:", h("strong", null, " ", state.customer.source.fieldData.So01_Name)), h("label", null, "S\u00E4ljare (S\u00E4ljarId)", h("input", { type: "text", value: this.sellerID, onChange: e => (this.sellerID = e.target.value) })), h("label", null, "PartnerOrderID (RefferalID)", h("input", { type: "text", value: this.RefferalID, onChange: e => (this.RefferalID = e.target.value) })), ((_a = state.customer.source.sub_sources) === null || _a === void 0 ? void 0 : _a.length) ? (h("div", null, h("select", { onChange: e => (this.selectedSubSource = e.target.value) }, h("option", { disabled: true, selected: true, value: "null" }, "V\u00E4lj underk\u00E4lla"), state.customer.source.sub_sources.map(sub => (h("option", { value: sub['So_SubSource::Sus01_Name'] }, sub['So_SubSource::Sus01_Name'])))))) : (h("p", null, "Det finns inga underk\u00E4llor att v\u00E4lja")))) : null, h("label", { class: "hemfixarna_checkbox" }, h("input", { onChange: () => this.handleChangeTerms(), type: "checkbox" }), h("span", { innerHTML: state.options.terms })), state.cart
124
124
  .filter(i => { var _a; return (_a = i.terms_checkout) === null || _a === void 0 ? void 0 : _a.length; })
125
125
  .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" })))));
126
126
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hemfixarna-checkout.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-checkout/hemfixarna-checkout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAc,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,E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,CAAC;YACH,IAAI,CAAC,YAAY,IAAI,gBAAO,IAAI,CAAC,YAAY,CAAQ;YACtD,WAAK,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;cACvC,aAAO,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,GAAI;cACpE,WAAK,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,SAAS,GAAG,CACtD,CACD,CACH,CACP,CAAC;OACH;IACH,CAAC,CAAC;gBApNsB,EAAE;qBACU,IAAI;wBACD,IAAI;mBACxB,KAAK;sBACM,EAAE;6BAEY,IAAI;0BACP,IAAI;oBACV,IAAI;sBACF,IAAI;;EAuGzC,iBAAiB;IACf,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;MAC5C,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC;KACxB;EACH,CAAC;;;;;;;;;;;;;;CAiGF","sourcesContent":["import { Component, Element, Fragment, State, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { Business } from '../../types';\nimport { postOrder } from '../../utils/api';\nimport { FelixOrder, postPerson } from '../../utils/felixApi';\nimport { hideField } from '../../utils/form';\nimport { scrollToTop } from '../../utils/scroll';\n\n@Component({\n tag: 'hemfixarna-checkout',\n shadow: false,\n})\nexport class HemfixarnaCheckout {\n @State() date: string = '';\n @State() dateError: string | null = null;\n @State() generalError: string | null = null;\n @State() loading = false;\n @State() enteredPin: string = '';\n @Element() private el: HTMLElement;\n @State() selectedSubSource: string | null = null;\n @State() partnerOrderId: string | null = null;\n @State() sellerID: string | null = null;\n @State() RefferalID: string | null = null;\n\n handleChangeDate = (e: Event) => {\n this.dateError = null;\n this.date = (e.target as HTMLInputElement).value;\n };\n\n handleChangeTerms = () => {\n this.generalError = null;\n };\n\n sendOrder = async () => {\n if (this.loading) return;\n this.loading = true;\n let order: FelixOrder = {\n firstName: state.creditSafeUser.firstName,\n lastName: state.creditSafeUser.lastName,\n street: state.user.street,\n zip: state.user.zip,\n town: state.user.town,\n ssn: state.user.ssn,\n email: state.user.email,\n phone: state.user.phone,\n url: `${state.business === Business.string ? 'string' : state.business}-webk`,\n date: this.date,\n products: [\n ...state.cart.map(item => {\n const parts = item.parts.map(part => ({\n id: String(part.id),\n name: part.name,\n quantity: part.amount,\n rut: 0,\n rot: 0,\n }));\n return [\n {\n id: String(item.id),\n name: item.name,\n quantity: item.amount,\n rot: item.rot ? 1 : 0,\n rut: item.rut ? 1 : 0,\n },\n ...parts,\n ];\n }),\n ].flat(),\n creditSafe: state.creditSafeUser,\n customer: state.business,\n id_source: '',\n id_sub_source: '',\n seller_id: this.sellerID ?? '',\n referral_id: this.RefferalID ?? '',\n };\n\n const felixOrder = await postPerson(order);\n if (!felixOrder || !felixOrder.response?.scriptResult?.includes('OK')) {\n order = { ...order, felixStatus: 'error' };\n } else {\n order = { ...order, felixStatus: 'success' };\n }\n\n try {\n const { data: orderConfirm, status } = await postOrder(order);\n if (orderConfirm && status && status === 200) {\n state.step = 6;\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n } else {\n this.generalError = 'Något gick fel, försök igen senare';\n }\n } catch (error) {\n this.generalError = 'Något gick fel, försök igen senare';\n }\n this.loading = false;\n };\n\n handleSubmit = (e: Event) => {\n e.preventDefault();\n this.generalError = null;\n const validDate = this.date.length > 0;\n if (!validDate) {\n this.dateError = 'Ange ett giltigt datum';\n }\n const checkBoxes = Array.from(this.el.querySelectorAll('input[type=\"checkbox\"]'));\n const notValidTerms = checkBoxes.find(i => !(i as HTMLInputElement).checked);\n if (notValidTerms) {\n this.generalError = 'Du måste godkänna villkoren';\n }\n if (state.customer.source && state.selectSource) {\n if (!this.sellerID) {\n this.generalError = 'Ange säljare';\n return;\n }\n if (state.customer.source.sub_sources?.length && !this.selectedSubSource) {\n this.generalError = 'Välj underkälla';\n return;\n }\n }\n if (validDate && !notValidTerms) {\n this.sendOrder();\n }\n };\n\n componentWillLoad() {\n if (Boolean(state.user && state.user.street)) {\n state.checkoutStep = 2;\n }\n }\n\n render = () => {\n const dateLogo = getAssetPath(`./assets/date.svg`);\n const down = getAssetPath(`./assets/down.svg`);\n const loading = getAssetPath(`./assets/spinner.gif`);\n\n if (state.checkoutEdit) {\n return <hemfixarna-address />;\n } else if (state.checkoutStep === 1) {\n return <hemfixarna-getuser />;\n } else if (state.checkoutStep === 2) {\n return (\n <div class=\"mb-2\">\n <div class=\"hemfixarna_addressinfo\">\n <div>\n <p>{hideField(state.user.firstName)}</p>\n <p>{hideField(state.user.lastName)}</p>\n <p>{state.user.email}</p>\n <p>{state.user.phone}</p>\n </div>\n <div>\n <p>{hideField(state.user.street)}</p>\n <p>{hideField(state.user.zip)}</p>\n <p>{hideField(state.user.town)}</p>\n </div>\n <button onClick={() => (state.checkoutEdit = true)}>Behöver du ändra adressen?</button>\n </div>\n <form onSubmit={e => this.handleSubmit(e)}>\n <div>\n <img src={dateLogo} width={24} />\n <input\n class={`${this.date.length ? 'input_active' : ''}`}\n min={new Date().toISOString().split('T')[0]}\n onChange={e => this.handleChangeDate(e)}\n type=\"date\"\n name=\"date\"\n value={this.date}\n />\n <label htmlFor=\"date\">Tidigaste datum för hembesök</label>\n <img src={down} width={24} />\n </div>\n {this.dateError && <span>{this.dateError}</span>}\n {state.customer.source && state.selectSource ? (\n <Fragment>\n <p>\n Inloggad som:\n <strong> {state.customer.source.fieldData.So01_Name}</strong>\n </p>\n <label>\n Säljare (SäljarId)\n <input type=\"text\" value={this.sellerID} onChange={e => (this.sellerID = (e.target as HTMLInputElement).value)} />\n </label>\n <label>\n PartnerOrderID (RefferalID)\n <input type=\"text\" value={this.RefferalID} onChange={e => (this.RefferalID = (e.target as HTMLInputElement).value)} />\n </label>\n {state.customer.source.sub_sources?.length ? (\n <div>\n <select onChange={e => (this.selectedSubSource = (e.target as HTMLSelectElement).value)}>\n <option disabled selected value=\"null\">\n Välj underkälla\n </option>\n {state.customer.source.sub_sources.map(sub => (\n <option value={sub['So_SubSource::_id']}>{sub['So_SubSource::Sus01_Name']}</option>\n ))}\n </select>\n </div>\n ) : (\n <p>Det finns inga underkällor att välja</p>\n )}\n </Fragment>\n ) : null}\n <label class=\"hemfixarna_checkbox\">\n <input onChange={() => this.handleChangeTerms()} type=\"checkbox\" />\n <span innerHTML={state.options.terms} />\n </label>\n {state.cart\n .filter(i => i.terms_checkout?.length)\n .map(item => (\n <Fragment>\n <label class=\"hemfixarna_checkbox\">\n <input onChange={() => this.handleChangeTerms()} type=\"checkbox\" />\n <span>{item.terms_checkout}</span>\n </label>\n </Fragment>\n ))}\n {this.generalError && <span>{this.generalError}</span>}\n <div class={this.loading ? 'loading' : ''}>\n <input type=\"submit\" value={this.loading ? '' : 'Skicka bokning'} />\n <img width={20} height={20} src={loading} alt=\"spinner\" />\n </div>\n </form>\n </div>\n );\n }\n };\n}\n"]}
1
+ {"version":3,"file":"hemfixarna-checkout.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-checkout/hemfixarna-checkout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAc,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMjD,MAAM,OAAO,kBAAkB;;IAY7B,qBA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,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAC,UAAU,GAAG;gBACnE,gBAAO,IAAI,CAAC,cAAc,CAAQ,CAC5B,CACC,CACZ,CAAC;YACH,IAAI,CAAC,YAAY,IAAI,gBAAO,IAAI,CAAC,YAAY,CAAQ;YACtD,WAAK,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;cACvC,aAAO,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,GAAI;cACpE,WAAK,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,SAAS,GAAG,CACtD,CACD,CACH,CACP,CAAC;OACH;IACH,CAAC,CAAC;gBApNsB,EAAE;qBACU,IAAI;wBACD,IAAI;mBACxB,KAAK;sBACM,EAAE;6BAEY,IAAI;0BACP,IAAI;oBACV,IAAI;sBACF,IAAI;;EAuGzC,iBAAiB;IACf,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;MAC5C,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC;KACxB;EACH,CAAC;;;;;;;;;;;;;;CAiGF","sourcesContent":["import { Component, Element, Fragment, State, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { Business } from '../../types';\nimport { postOrder } from '../../utils/api';\nimport { FelixOrder, postPerson } from '../../utils/felixApi';\nimport { hideField } from '../../utils/form';\nimport { scrollToTop } from '../../utils/scroll';\n\n@Component({\n tag: 'hemfixarna-checkout',\n shadow: false,\n})\nexport class HemfixarnaCheckout {\n @State() date: string = '';\n @State() dateError: string | null = null;\n @State() generalError: string | null = null;\n @State() loading = false;\n @State() enteredPin: string = '';\n @Element() private el: HTMLElement;\n @State() selectedSubSource: string | null = null;\n @State() partnerOrderId: string | null = null;\n @State() sellerID: string | null = null;\n @State() RefferalID: string | null = null;\n\n handleChangeDate = (e: Event) => {\n this.dateError = null;\n this.date = (e.target as HTMLInputElement).value;\n };\n\n handleChangeTerms = () => {\n this.generalError = null;\n };\n\n sendOrder = async () => {\n if (this.loading) return;\n this.loading = true;\n let order: FelixOrder = {\n firstName: state.creditSafeUser.firstName,\n lastName: state.creditSafeUser.lastName,\n street: state.user.street,\n zip: state.user.zip,\n town: state.user.town,\n ssn: state.user.ssn,\n email: state.user.email,\n phone: state.user.phone,\n url: `${state.business === Business.string ? 'string' : state.business}-webk`,\n date: this.date,\n products: [\n ...state.cart.map(item => {\n const parts = item.parts.map(part => ({\n id: String(part.id),\n name: part.name,\n quantity: part.amount,\n rut: 0,\n rot: 0,\n }));\n return [\n {\n id: String(item.id),\n name: item.name,\n quantity: item.amount,\n rot: item.rot ? 1 : 0,\n rut: item.rut ? 1 : 0,\n },\n ...parts,\n ];\n }),\n ].flat(),\n creditSafe: state.creditSafeUser,\n customer: state.business,\n id_source: state.customer.source ? state.customer.source.fieldData.So01_Name : '',\n id_sub_source: this.selectedSubSource ? this.selectedSubSource : '',\n seller_id: this.sellerID ?? '',\n referral_id: this.RefferalID ?? '',\n };\n\n const felixOrder = await postPerson(order);\n if (!felixOrder || !felixOrder.response?.scriptResult?.includes('OK')) {\n order = { ...order, felixStatus: 'error' };\n } else {\n order = { ...order, felixStatus: 'success' };\n }\n\n try {\n const { data: orderConfirm, status } = await postOrder(order);\n if (orderConfirm && status && status === 200) {\n state.step = 6;\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n } else {\n this.generalError = 'Något gick fel, försök igen senare';\n }\n } catch (error) {\n this.generalError = 'Något gick fel, försök igen senare';\n }\n this.loading = false;\n };\n\n handleSubmit = (e: Event) => {\n e.preventDefault();\n this.generalError = null;\n const validDate = this.date.length > 0;\n if (!validDate) {\n this.dateError = 'Ange ett giltigt datum';\n }\n const checkBoxes = Array.from(this.el.querySelectorAll('input[type=\"checkbox\"]'));\n const notValidTerms = checkBoxes.find(i => !(i as HTMLInputElement).checked);\n if (notValidTerms) {\n this.generalError = 'Du måste godkänna villkoren';\n }\n if (state.customer.source && state.selectSource) {\n if (!this.sellerID) {\n this.generalError = 'Ange säljare';\n return;\n }\n if (state.customer.source.sub_sources?.length && !this.selectedSubSource) {\n this.generalError = 'Välj underkälla';\n return;\n }\n }\n if (validDate && !notValidTerms) {\n this.sendOrder();\n }\n };\n\n componentWillLoad() {\n if (Boolean(state.user && state.user.street)) {\n state.checkoutStep = 2;\n }\n }\n\n render = () => {\n const dateLogo = getAssetPath(`./assets/date.svg`);\n const down = getAssetPath(`./assets/down.svg`);\n const loading = getAssetPath(`./assets/spinner.gif`);\n\n if (state.checkoutEdit) {\n return <hemfixarna-address />;\n } else if (state.checkoutStep === 1) {\n return <hemfixarna-getuser />;\n } else if (state.checkoutStep === 2) {\n return (\n <div class=\"mb-2\">\n <div class=\"hemfixarna_addressinfo\">\n <div>\n <p>{hideField(state.user.firstName)}</p>\n <p>{hideField(state.user.lastName)}</p>\n <p>{state.user.email}</p>\n <p>{state.user.phone}</p>\n </div>\n <div>\n <p>{hideField(state.user.street)}</p>\n <p>{hideField(state.user.zip)}</p>\n <p>{hideField(state.user.town)}</p>\n </div>\n <button onClick={() => (state.checkoutEdit = true)}>Behöver du ändra adressen?</button>\n </div>\n <form onSubmit={e => this.handleSubmit(e)}>\n <div>\n <img src={dateLogo} width={24} />\n <input\n class={`${this.date.length ? 'input_active' : ''}`}\n min={new Date().toISOString().split('T')[0]}\n onChange={e => this.handleChangeDate(e)}\n type=\"date\"\n name=\"date\"\n value={this.date}\n />\n <label htmlFor=\"date\">Tidigaste datum för hembesök</label>\n <img src={down} width={24} />\n </div>\n {this.dateError && <span>{this.dateError}</span>}\n {state.customer.source && state.selectSource ? (\n <Fragment>\n <p>\n Inloggad som:\n <strong> {state.customer.source.fieldData.So01_Name}</strong>\n </p>\n <label>\n Säljare (SäljarId)\n <input type=\"text\" value={this.sellerID} onChange={e => (this.sellerID = (e.target as HTMLInputElement).value)} />\n </label>\n <label>\n PartnerOrderID (RefferalID)\n <input type=\"text\" value={this.RefferalID} onChange={e => (this.RefferalID = (e.target as HTMLInputElement).value)} />\n </label>\n {state.customer.source.sub_sources?.length ? (\n <div>\n <select onChange={e => (this.selectedSubSource = (e.target as HTMLSelectElement).value)}>\n <option disabled selected value=\"null\">\n Välj underkälla\n </option>\n {state.customer.source.sub_sources.map(sub => (\n <option value={sub['So_SubSource::Sus01_Name']}>{sub['So_SubSource::Sus01_Name']}</option>\n ))}\n </select>\n </div>\n ) : (\n <p>Det finns inga underkällor att välja</p>\n )}\n </Fragment>\n ) : null}\n <label class=\"hemfixarna_checkbox\">\n <input onChange={() => this.handleChangeTerms()} type=\"checkbox\" />\n <span innerHTML={state.options.terms} />\n </label>\n {state.cart\n .filter(i => i.terms_checkout?.length)\n .map(item => (\n <Fragment>\n <label class=\"hemfixarna_checkbox\">\n <input onChange={() => this.handleChangeTerms()} type=\"checkbox\" />\n <span>{item.terms_checkout}</span>\n </label>\n </Fragment>\n ))}\n {this.generalError && <span>{this.generalError}</span>}\n <div class={this.loading ? 'loading' : ''}>\n <input type=\"submit\" value={this.loading ? '' : 'Skicka bokning'} />\n <img width={20} height={20} src={loading} alt=\"spinner\" />\n </div>\n </form>\n </div>\n );\n }\n };\n}\n"]}
@@ -317,8 +317,8 @@ const getDefaultApiUrl = () => {
317
317
  }
318
318
  };
319
319
  const getApiUrl = () => {
320
- if (typeof process !== 'undefined' && process.env && "http://hemfixare.test") {
321
- return "http://hemfixare.test";
320
+ if (typeof process !== 'undefined' && process.env && "https://hemfixarna.se") {
321
+ return "https://hemfixarna.se";
322
322
  }
323
323
  return getDefaultApiUrl();
324
324
  };
@@ -484,8 +484,8 @@ const HemfixarnaCheckout = class {
484
484
  ].flat(),
485
485
  creditSafe: state.creditSafeUser,
486
486
  customer: state.business,
487
- id_source: '',
488
- id_sub_source: '',
487
+ id_source: state.customer.source ? state.customer.source.fieldData.So01_Name : '',
488
+ id_sub_source: this.selectedSubSource ? this.selectedSubSource : '',
489
489
  seller_id: (_a = this.sellerID) !== null && _a !== void 0 ? _a : '',
490
490
  referral_id: (_b = this.RefferalID) !== null && _b !== void 0 ? _b : '',
491
491
  };
@@ -551,7 +551,7 @@ const HemfixarnaCheckout = class {
551
551
  return h("hemfixarna-getuser", null);
552
552
  }
553
553
  else if (state.checkoutStep === 2) {
554
- 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), state.customer.source && state.selectSource ? (h(Fragment, null, h("p", null, "Inloggad som:", h("strong", null, " ", state.customer.source.fieldData.So01_Name)), h("label", null, "S\u00E4ljare (S\u00E4ljarId)", h("input", { type: "text", value: this.sellerID, onChange: e => (this.sellerID = e.target.value) })), h("label", null, "PartnerOrderID (RefferalID)", h("input", { type: "text", value: this.RefferalID, onChange: e => (this.RefferalID = e.target.value) })), ((_a = state.customer.source.sub_sources) === null || _a === void 0 ? void 0 : _a.length) ? (h("div", null, h("select", { onChange: e => (this.selectedSubSource = e.target.value) }, h("option", { disabled: true, selected: true, value: "null" }, "V\u00E4lj underk\u00E4lla"), state.customer.source.sub_sources.map(sub => (h("option", { value: sub['So_SubSource::_id'] }, sub['So_SubSource::Sus01_Name'])))))) : (h("p", null, "Det finns inga underk\u00E4llor att v\u00E4lja")))) : null, h("label", { class: "hemfixarna_checkbox" }, h("input", { onChange: () => this.handleChangeTerms(), type: "checkbox" }), h("span", { innerHTML: state.options.terms })), state.cart
554
+ 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), state.customer.source && state.selectSource ? (h(Fragment, null, h("p", null, "Inloggad som:", h("strong", null, " ", state.customer.source.fieldData.So01_Name)), h("label", null, "S\u00E4ljare (S\u00E4ljarId)", h("input", { type: "text", value: this.sellerID, onChange: e => (this.sellerID = e.target.value) })), h("label", null, "PartnerOrderID (RefferalID)", h("input", { type: "text", value: this.RefferalID, onChange: e => (this.RefferalID = e.target.value) })), ((_a = state.customer.source.sub_sources) === null || _a === void 0 ? void 0 : _a.length) ? (h("div", null, h("select", { onChange: e => (this.selectedSubSource = e.target.value) }, h("option", { disabled: true, selected: true, value: "null" }, "V\u00E4lj underk\u00E4lla"), state.customer.source.sub_sources.map(sub => (h("option", { value: sub['So_SubSource::Sus01_Name'] }, sub['So_SubSource::Sus01_Name'])))))) : (h("p", null, "Det finns inga underk\u00E4llor att v\u00E4lja")))) : null, h("label", { class: "hemfixarna_checkbox" }, h("input", { onChange: () => this.handleChangeTerms(), type: "checkbox" }), h("span", { innerHTML: state.options.terms })), state.cart
555
555
  .filter(i => { var _a; return (_a = i.terms_checkout) === null || _a === void 0 ? void 0 : _a.length; })
556
556
  .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" })))));
557
557
  }