hemfixarna-web-components 1.3.5 → 1.3.6

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 (44) hide show
  1. package/dist/cjs/{hemfixarna-address_22.cjs.entry.js → hemfixarna-address_23.cjs.entry.js} +173 -24
  2. package/dist/cjs/{hemfixarna-address_22.cjs.entry.js.map → hemfixarna-address_23.cjs.entry.js.map} +1 -1
  3. package/dist/cjs/hemfixarna-components.cjs.js +2 -2
  4. package/dist/cjs/{index-d9e286dc.js → index-83c1daf2.js} +5 -1
  5. package/dist/{esm/index-9863db6c.js.map → cjs/index-83c1daf2.js.map} +1 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/collection/assets/drag-drop.svg +3 -0
  8. package/dist/collection/collection-manifest.json +1 -0
  9. package/dist/collection/components/hemfixarna-box/hemfixarna-box.js +1 -1
  10. package/dist/collection/components/hemfixarna-box/hemfixarna-box.js.map +1 -1
  11. package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js.map +1 -1
  12. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +4 -4
  13. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
  14. package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.css +76 -0
  15. package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js +164 -0
  16. package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +1 -0
  17. package/dist/collection/components/hemfixarna-order/hemfixarna-order.js +1 -1
  18. package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +1 -1
  19. package/dist/collection/components/hemfixarna-product/hemfixarna-product.js +3 -3
  20. package/dist/collection/components/hemfixarna-product/hemfixarna-product.js.map +1 -1
  21. package/dist/collection/components/hemfixarna-service/hemfixarna-service.js +1 -1
  22. package/dist/collection/components/hemfixarna-service/hemfixarna-service.js.map +1 -1
  23. package/dist/collection/components/hemfixarna-start/hemfixarna-start.js.map +1 -1
  24. package/dist/collection/store/index.js +1 -0
  25. package/dist/collection/store/index.js.map +1 -1
  26. package/dist/collection/types/index.js.map +1 -1
  27. package/dist/esm/{hemfixarna-address_22.entry.js → hemfixarna-address_23.entry.js} +173 -25
  28. package/dist/esm/{hemfixarna-address_22.entry.js.map → hemfixarna-address_23.entry.js.map} +1 -1
  29. package/dist/esm/hemfixarna-components.js +3 -3
  30. package/dist/esm/{index-9863db6c.js → index-1fd61928.js} +5 -1
  31. package/dist/{cjs/index-d9e286dc.js.map → esm/index-1fd61928.js.map} +1 -1
  32. package/dist/esm/loader.js +3 -3
  33. package/dist/hemfixarna-components/assets/drag-drop.svg +3 -0
  34. package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
  35. package/dist/hemfixarna-components/{p-62a7c1a2.js → p-33d37833.js} +3 -3
  36. package/dist/hemfixarna-components/p-7ad71b65.entry.js +2 -0
  37. package/dist/types/components/hemfixarna-invoice/hemfixarna-invoice.d.ts +17 -0
  38. package/dist/types/components.d.ts +13 -0
  39. package/dist/types/store/index.d.ts +1 -0
  40. package/dist/types/types/index.d.ts +4 -0
  41. package/package.json +1 -1
  42. package/dist/hemfixarna-components/p-d5da3c5b.entry.js +0 -2
  43. /package/dist/hemfixarna-components/{p-62a7c1a2.js.map → p-33d37833.js.map} +0 -0
  44. /package/dist/hemfixarna-components/{p-d5da3c5b.entry.js.map → p-7ad71b65.entry.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-d9e286dc.js');
5
+ const index = require('./index-83c1daf2.js');
6
6
 
7
7
  const appendToMap = (map, propName, value) => {
8
8
  const items = map.get(propName);
@@ -216,6 +216,7 @@ const { state, onChange, } = createStore({
216
216
  selectedCustomerCategory: null,
217
217
  parentCategory: null,
218
218
  creditSafeUser: null,
219
+ checkoutInvoice: false,
219
220
  });
220
221
  onChange('cart', cart => {
221
222
  window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));
@@ -462,7 +463,7 @@ const HemfixarnaBox = class {
462
463
  scrollToTop(el);
463
464
  }
464
465
  render() {
465
- return this.category ? (index.h(index.Fragment, null, isProduct(this.category) ? (index.h("li", { onClick: () => this.setProduct() }, index.h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.post_name }), index.h("div", null, index.h("p", null, this.category.post_title), index.h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.category), "kr")))) : (index.h("li", { onClick: () => (state.selectedCustomerCategory = this.category) }, index.h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.name }), index.h("div", null, index.h("p", null, this.category.name)))))) : (index.h("li", { onClick: () => this.setTaxonomy(this.post) }, this.post.icon && index.h("img", { class: "hemfixarna_logo", height: 82, src: this.icon, alt: this.postTitle }), index.h("div", null, index.h("p", null, this.postTitle), state.step === 3 && index.h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.post), "kr"))));
466
+ return this.category ? (index.h(index.Fragment, null, isProduct(this.category) ? (index.h("li", { onClick: () => this.setProduct() }, index.h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.post_name }), index.h("div", null, index.h("p", null, this.category.title), !this.category.invoice ? index.h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.category), "kr") : null))) : (index.h("li", { onClick: () => (state.selectedCustomerCategory = this.category) }, index.h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.name }), index.h("div", null, index.h("p", null, this.category.name)))))) : (index.h("li", { onClick: () => this.setTaxonomy(this.post) }, this.post.icon && index.h("img", { class: "hemfixarna_logo", height: 82, src: this.icon, alt: this.postTitle }), index.h("div", null, index.h("p", null, this.postTitle), state.step === 3 && index.h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.post), "kr"))));
466
467
  }
467
468
  get el() { return index.getElement(this); }
468
469
  };
@@ -592,7 +593,7 @@ const HemfixarnaCategory = class {
592
593
  }
593
594
  };
594
595
 
595
- const base$1 = `${"https://hemfixarna.se"}/wp-json/headless` ;
596
+ const base$2 = `${"https://hemfixarna.se"}/wp-json/headless` ;
596
597
  async function fetchWithType(request, options) {
597
598
  const response = await fetch(request, options);
598
599
  const body = await response.json();
@@ -605,7 +606,7 @@ const getTaxonomy = async (endpoint) => {
605
606
  const type = endpoint.split('/')[0];
606
607
  const slug = endpoint.split('/')[1];
607
608
  try {
608
- const res = await fetch(`${base$1}/${type}/${slug}`);
609
+ const res = await fetch(`${base$2}/${type}/${slug}`);
609
610
  return await res.json();
610
611
  }
611
612
  catch (error) {
@@ -614,7 +615,7 @@ const getTaxonomy = async (endpoint) => {
614
615
  };
615
616
  const getCustomer = async (slug) => {
616
617
  try {
617
- const res = await fetch(`${base$1}/customer/${slug}`);
618
+ const res = await fetch(`${base$2}/customer/${slug}`);
618
619
  return await res.json();
619
620
  }
620
621
  catch (error) {
@@ -623,7 +624,7 @@ const getCustomer = async (slug) => {
623
624
  };
624
625
  const getOptions = async () => {
625
626
  try {
626
- const res = await fetch(`${base$1}/webcoptions`);
627
+ const res = await fetch(`${base$2}/webcoptions`);
627
628
  return (await res.json());
628
629
  }
629
630
  catch (error) {
@@ -632,7 +633,7 @@ const getOptions = async () => {
632
633
  };
633
634
  const getRut = async () => {
634
635
  try {
635
- const data = await fetchWithType(`${base$1}/rut`);
636
+ const data = await fetchWithType(`${base$2}/rut`);
636
637
  return data;
637
638
  }
638
639
  catch (error) {
@@ -641,7 +642,7 @@ const getRut = async () => {
641
642
  };
642
643
  const getRot = async () => {
643
644
  try {
644
- const res = await fetch(`${base$1}/rot`);
645
+ const res = await fetch(`${base$2}/rot`);
645
646
  return (await res.json());
646
647
  }
647
648
  catch (error) {
@@ -663,7 +664,7 @@ const getRot = async () => {
663
664
  // }
664
665
  const postOrder = async (data) => {
665
666
  try {
666
- const res = await fetch(`${base$1}/weborder`, {
667
+ const res = await fetch(`${base$2}/weborder`, {
667
668
  method: 'POST',
668
669
  body: JSON.stringify(data),
669
670
  headers: {
@@ -677,10 +678,10 @@ const postOrder = async (data) => {
677
678
  }
678
679
  };
679
680
 
680
- const base = `${"https://hemfixarna.se"}/wp-json/felix` ;
681
+ const base$1 = `${"https://hemfixarna.se"}/wp-json/felix` ;
681
682
  const postPerson = async (felixOrder) => {
682
683
  try {
683
- return await fetchWithType(`${base}/createperson`, {
684
+ return await fetchWithType(`${base$1}/createperson`, {
684
685
  method: 'POST',
685
686
  body: JSON.stringify(felixOrder),
686
687
  headers: {
@@ -1016,14 +1017,14 @@ const HemfixarnaComponent = class {
1016
1017
  return state.cart.reduce((acc, curr) => acc + curr.amount, 0);
1017
1018
  }
1018
1019
  render() {
1019
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1020
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1020
1021
  const logo = index.getAssetPath(`./assets/hemfixarna.svg`);
1021
1022
  const monteringLogo = index.getAssetPath(`./assets/montering.svg`);
1022
1023
  const navBackground = ((_a = this.nav) === null || _a === void 0 ? void 0 : _a.background) ? index.getAssetPath(this.nav.background) : '';
1023
1024
  const navLogo = ((_b = this.nav) === null || _b === void 0 ? void 0 : _b.logo) ? index.getAssetPath(this.nav.logo) : '';
1024
- return (index.h("div", { class: `hemfixarna ${this.loadFromQuery ? 'hemfixarna_standalone' : ''}` }, this.loadFromQuery && !this.isDemo && this.nav ? (index.h("nav", { class: "hemfixarna_nav" }, index.h("div", null, index.h("div", { class: "hemfixarna_nav--logos" }, index.h("a", { href: this.nav.url, target: "_blank" }, index.h("img", { src: navLogo, alt: `${this.business} logo` })), index.h("a", { href: "https://hemfixarna.se/", target: "_blank" }, index.h("p", null, "I samarbete med:"), index.h("img", { src: logo, alt: "hemfixarna_logo", width: 104 }))), index.h("div", { class: "hemfixarna_nav--links" }, index.h("a", { href: this.nav.url, target: "_blank" }, "Till ", this.business), index.h("a", { href: "https://www.hemfixarna.se/", target: "_blank" }, "Till Hemfixarna")), index.h("img", { src: navBackground, alt: "nav_background" })))) : null, !this.loadFromQuery || this.isDemo ? (index.h("div", { class: `hemfixarna_box hemfixarna_box--${this.widgetStyle}` }, [WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) ? index.h("img", { src: monteringLogo, alt: "montering logo", width: 32, height: 32 }) : null, index.h("div", null, index.h("div", null, index.h("p", { onClick: () => this.openModal(), class: `pointer ${[WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) && state.selectedProduct ? 'underline' : ''}` }, ((_c = this.product) === null || _c === void 0 ? void 0 : _c.post_title) || ((_d = this.proppedProduct) === null || _d === void 0 ? void 0 : _d.post_title) || (index.h("span", null, "Montering", index.h("wbr", null), "/Installation ", (_f = (_e = state.selectedCustomerCategory) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : 'på plats', " - ", index.h("strong", { class: "underline" }, "se priser h\u00E4r"))), (this.product && ((_g = this.slug) === null || _g === void 0 ? void 0 : _g.includes('product'))) || this.proppedProduct ? (index.h("span", null, ' från', " ", index.h("strong", null, getProductPriceWithRotAndRut(this.proppedProduct || this.product), "kr"))) : null)), this.widgetStyle === WidgetStyle.standard ? index.h("img", { src: logo, width: 104 }) : null, this.widgetStyle === WidgetStyle.alternative ? (index.h("span", { class: "p-s" }, "Utf\u00F6rs av ", index.h("strong", null, "Hemfixarna"))) : null), [WidgetStyle.standard, WidgetStyle.alternative].includes(this.widgetStyle) ? (index.h("button", { onClick: () => this.openModal(), class: "hemfixarna_btn", style: {
1025
- color: ((_h = this.buttonColor) === null || _h === void 0 ? void 0 : _h.startsWith('#')) || !((_j = this.buttonColor) === null || _j === void 0 ? void 0 : _j.length) ? this.buttonColor : `#${this.buttonColor}`,
1026
- backgroundColor: ((_k = this.buttonBg) === null || _k === void 0 ? void 0 : _k.startsWith('#')) || !((_l = this.buttonBg) === null || _l === void 0 ? void 0 : _l.length) ? this.buttonBg : `#${this.buttonBg}`,
1025
+ return (index.h("div", { class: `hemfixarna ${this.loadFromQuery ? 'hemfixarna_standalone' : ''}` }, this.loadFromQuery && !this.isDemo && this.nav ? (index.h("nav", { class: "hemfixarna_nav" }, index.h("div", null, index.h("div", { class: "hemfixarna_nav--logos" }, index.h("a", { href: this.nav.url, target: "_blank" }, index.h("img", { src: navLogo, alt: `${this.business} logo` })), index.h("a", { href: "https://hemfixarna.se/", target: "_blank" }, index.h("p", null, "I samarbete med:"), index.h("img", { src: logo, alt: "hemfixarna_logo", width: 104 }))), index.h("div", { class: "hemfixarna_nav--links" }, index.h("a", { href: this.nav.url, target: "_blank" }, "Till ", this.business), index.h("a", { href: "https://www.hemfixarna.se/", target: "_blank" }, "Till Hemfixarna")), index.h("img", { src: navBackground, alt: "nav_background" })))) : null, !this.loadFromQuery || this.isDemo ? (index.h("div", { class: `hemfixarna_box hemfixarna_box--${this.widgetStyle}` }, [WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) ? index.h("img", { src: monteringLogo, alt: "montering logo", width: 32, height: 32 }) : null, index.h("div", null, index.h("div", null, index.h("p", { onClick: () => this.openModal(), class: `pointer ${[WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) && state.selectedProduct ? 'underline' : ''}` }, ((_c = this.product) === null || _c === void 0 ? void 0 : _c.post_title) || ((_d = this.proppedProduct) === null || _d === void 0 ? void 0 : _d.post_title) || (index.h("span", null, "Montering", index.h("wbr", null), "/Installation ", (_f = (_e = state.selectedCustomerCategory) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : 'på plats', " - ", index.h("strong", { class: "underline" }, "se priser h\u00E4r"))), (this.product && ((_g = this.slug) === null || _g === void 0 ? void 0 : _g.includes('product'))) || (this.proppedProduct && !((_h = this.product) === null || _h === void 0 ? void 0 : _h.invoice) && !((_j = this.proppedProduct) === null || _j === void 0 ? void 0 : _j.invoice)) ? (index.h("span", null, ' från', " ", index.h("strong", null, getProductPriceWithRotAndRut(this.proppedProduct || this.product), "kr"))) : null, ((_k = this.product) === null || _k === void 0 ? void 0 : _k.invoice) || ((_l = this.proppedProduct) === null || _l === void 0 ? void 0 : _l.invoice) ? (index.h("span", null, ' - ', index.h("strong", { class: "underling" }, "se priser h\u00E4r"))) : null)), this.widgetStyle === WidgetStyle.standard ? index.h("img", { src: logo, width: 104 }) : null, this.widgetStyle === WidgetStyle.alternative ? (index.h("span", { class: "p-s" }, "Utf\u00F6rs av ", index.h("strong", null, "Hemfixarna"))) : null), [WidgetStyle.standard, WidgetStyle.alternative].includes(this.widgetStyle) ? (index.h("button", { onClick: () => this.openModal(), class: "hemfixarna_btn", style: {
1026
+ color: ((_m = this.buttonColor) === null || _m === void 0 ? void 0 : _m.startsWith('#')) || !((_o = this.buttonColor) === null || _o === void 0 ? void 0 : _o.length) ? this.buttonColor : `#${this.buttonColor}`,
1027
+ backgroundColor: ((_p = this.buttonBg) === null || _p === void 0 ? void 0 : _p.startsWith('#')) || !((_q = this.buttonBg) === null || _q === void 0 ? void 0 : _q.length) ? this.buttonBg : `#${this.buttonBg}`,
1027
1028
  } }, "Best\u00E4ll h\u00E4r", this.getCartLength() > 0 && index.h("span", null, this.getCartLength()))) : null, WidgetStyle.alternative_2 === this.widgetStyle ? (index.h("div", { class: "hemfixarna_altbtn" }, index.h("strong", { class: "p-s" }, "Utf\u00F6rs av"), index.h("img", { src: logo, alt: "hemfixarna logo", width: 98 }))) : null)) : null, this.modal && (index.h("div", null, index.h("div", { class: `hemfixarna_modal ${this.showModal ? 'hemfixarna_modal--open' : ''}` }, state.modal && (index.h("div", { class: "hemfixarna_infomodal" }, state.modal.title && index.h("h2", null, state.modal.title), state.modal.text.map((t) => (index.h("p", { innerHTML: t }))), index.h("div", null, index.h("button", { onClick: () => (state.modal = null) }, "St\u00E4ng")))), (this.tree || state.customer) && (index.h("hemfixarna-breadcrumbs", { isDemo: this.isDemo, loadFromQuery: this.loadFromQuery, closeModal: () => this.closeModal(), tree: this.tree })), !state.customer || this.slugIsOldFormat(this.slug) ? (index.h("div", { class: `hemfixarna_content hemfixarna_content--${state.step}` }, state.step === 1 && this.tree && index.h("hemfixarna-start", { tree: this.tree }), state.step === 2 && state.selectedCategory && index.h("hemfixarna-category", null), state.step === 3 && state.selectedService && index.h("hemfixarna-service", null), state.step === 4 && state.selectedProduct && index.h("hemfixarna-product", null), state.step === 5 && index.h("hemfixarna-cart", { tree: this.tree }), state.step === 6 && index.h("hemfixarna-order", { tree: this.tree }))) : (index.h("div", { class: `hemfixarna_content hemfixarna_content--${state.step}` }, state.step < 4 && index.h("hemfixarna-start", null), state.step === 4 && state.selectedProduct && index.h("hemfixarna-product", null), state.step === 5 && index.h("hemfixarna-cart", { tree: this.tree }), state.step === 6 && index.h("hemfixarna-order", { tree: this.tree })))), !this.isDemo ? index.h("div", { class: `hemfixarna_backdrop ${this.showModal ? 'hemfixarna_backdrop--open' : ''}` }) : null))));
1028
1029
  }
1029
1030
  static get assetsDirs() { return ["assets"]; }
@@ -1082,7 +1083,7 @@ const MyComponent$6 = class {
1082
1083
  // Your color accessibility logic here
1083
1084
  }
1084
1085
  getTopLevelCategory() {
1085
- switch ("doro") {
1086
+ switch ("kund") {
1086
1087
  case Business.byggmax:
1087
1088
  return TopCategory.byggmax;
1088
1089
  default:
@@ -1112,14 +1113,14 @@ const MyComponent$6 = class {
1112
1113
  }
1113
1114
  }
1114
1115
  else {
1115
- const customer = await getCustomer("doro");
1116
+ const customer = await getCustomer("kund");
1116
1117
  if (customer.code !== 'not_found' && customer) {
1117
1118
  this.customer = customer;
1118
1119
  }
1119
1120
  }
1120
1121
  }
1121
1122
  getExample() {
1122
- return `<hemfixarna-${"doro"}${this.selectedSlug ? ` slug="${this.selectedSlug}" ` : ''}${this.selectedID ? ` id="${this.selectedID}" ` : ''} ${this.widgetStyle === WidgetStyle.standard ? '' : `widgetStyle="${this.widgetStyle}"`} ${this.buttonColor.length ? `buttonColor="${this.buttonColor}"` : ''} ${this.buttonBg.length ? `buttonBg="${this.buttonBg}"` : ''}></hemfixarna-${"doro"}>`;
1123
+ return `<hemfixarna-${"kund"}${this.selectedSlug ? ` slug="${this.selectedSlug}" ` : ''}${this.selectedID ? ` id="${this.selectedID}" ` : ''} ${this.widgetStyle === WidgetStyle.standard ? '' : `widgetStyle="${this.widgetStyle}"`} ${this.buttonColor.length ? `buttonColor="${this.buttonColor}"` : ''} ${this.buttonBg.length ? `buttonBg="${this.buttonBg}"` : ''}></hemfixarna-${"kund"}>`;
1123
1124
  }
1124
1125
  copyExample() {
1125
1126
  navigator.clipboard.writeText(this.getExample());
@@ -1144,7 +1145,7 @@ const MyComponent$6 = class {
1144
1145
  }
1145
1146
  render() {
1146
1147
  const copy = index.getAssetPath(`./assets/copy.png`);
1147
- return (index.h("div", null, index.h("div", null, index.h("div", { onClick: () => this.copyExample(), class: "hemfixarna_example" }, index.h("p", null, this.getExample()), index.h("img", { src: copy, height: 20 }), index.h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText)), "doro" === Business.byggmax && (index.h("hemfixarna-byggmax", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, forceOldTree: Boolean(process.env.FORCE_OLD_TREE), slug: this.selectedSlug, id: this.selectedID })), "doro" === Business.skanska && (index.h("hemfixarna-skanska", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "doro" === Business.string && (index.h("hemfixarna-string-furniture", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "doro" === Business.hornbach && (index.h("hemfixarna-hornbach", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "doro" === Business.forebygg && (index.h("hemfixarna-forebygg", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "doro" === Business.doro && (index.h("hemfixarna-doro", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "doro" === Business.kund && (index.h("hemfixarna-kund", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), index.h("div", { class: "hemfixarna_install" }, index.h("div", { onClick: () => this.copyCdn(), class: "hemfixarna_example" }, index.h("p", null, this.cdnLink), index.h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText), index.h("img", { src: copy, height: 20 }))), index.h("div", { class: "hemfixarna_widgetstyles" }, index.h("h5", null, "Widget styles"), index.h("div", null, Object.values(WidgetStyle).map(style => (index.h("label", { key: style }, index.h("input", { type: "radio", value: style, checked: this.widgetStyle === style, onChange: () => (this.widgetStyle = style) }), style)))), index.h("div", null, index.h("div", null, index.h("h5", null, "Button background color"), index.h("input", { type: "text", value: this.buttonBg, onInput: e => (this.buttonBg = e.target.value) })), index.h("div", null, index.h("h5", null, "Button text color"), index.h("input", { type: "text", value: this.buttonColor, onInput: e => (this.buttonColor = e.target.value) })))), index.h("span", null, "Write an hexa code no # needed"), this.colorAccessibility ? (index.h("div", null, index.h("h5", null, "Tillg\u00E4nglighetsrapport"), index.h("div", null, index.h("strong", null, "Liten text:"), index.h("span", { style: { color: this.getColor(this.colorAccessibility.small) } }, this.colorAccessibility.small), index.h("br", null), index.h("strong", null, "Fet text:"), index.h("span", { style: { color: this.getColor(this.colorAccessibility.bold) } }, this.colorAccessibility.bold), index.h("br", null), index.h("strong", null, "Stor text:"), index.h("span", { style: { color: this.getColor(this.colorAccessibility.large) } }, this.colorAccessibility.large), index.h("br", null), index.h("strong", null, "Kontrastf\u00F6rh\u00E5llande:"), " ", this.colorAccessibility.contrast))) : null), index.h("ul", { class: "hemfixarna_categories" }, this.customer ? (index.h("div", null, this.customer.categories.map(c => (index.h("li", null, index.h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, index.h("div", null, index.h("p", null, c.name), index.h("span", null, `c-${c.id}`)), index.h("div", null, index.h("button", { onClick: () => navigator.clipboard.writeText(`c-${c.id}`) }, "Kopiera ID"), index.h("button", { onClick: () => (this.selectedID = `c-${c.id}`) }, "Ladda kategori"))), c.show_products && c.products ? (index.h("ul", null, c.products.map(p => (index.h("li", null, index.h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, index.h("div", null, index.h("p", null, p.fields.post_title), index.h("span", null, p.fields.ID)), index.h("div", null, index.h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), index.h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt")))))))) : (index.h("ul", null, c.sub_categories &&
1148
+ return (index.h("div", null, index.h("div", null, index.h("div", { onClick: () => this.copyExample(), class: "hemfixarna_example" }, index.h("p", null, this.getExample()), index.h("img", { src: copy, height: 20 }), index.h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText)), "kund" === Business.byggmax && (index.h("hemfixarna-byggmax", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, forceOldTree: Boolean(process.env.FORCE_OLD_TREE), slug: this.selectedSlug, id: this.selectedID })), "kund" === Business.skanska && (index.h("hemfixarna-skanska", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.string && (index.h("hemfixarna-string-furniture", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.hornbach && (index.h("hemfixarna-hornbach", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.forebygg && (index.h("hemfixarna-forebygg", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.doro && (index.h("hemfixarna-doro", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.kund && (index.h("hemfixarna-kund", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), index.h("div", { class: "hemfixarna_install" }, index.h("div", { onClick: () => this.copyCdn(), class: "hemfixarna_example" }, index.h("p", null, this.cdnLink), index.h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText), index.h("img", { src: copy, height: 20 }))), index.h("div", { class: "hemfixarna_widgetstyles" }, index.h("h5", null, "Widget styles"), index.h("div", null, Object.values(WidgetStyle).map(style => (index.h("label", { key: style }, index.h("input", { type: "radio", value: style, checked: this.widgetStyle === style, onChange: () => (this.widgetStyle = style) }), style)))), index.h("div", null, index.h("div", null, index.h("h5", null, "Button background color"), index.h("input", { type: "text", value: this.buttonBg, onInput: e => (this.buttonBg = e.target.value) })), index.h("div", null, index.h("h5", null, "Button text color"), index.h("input", { type: "text", value: this.buttonColor, onInput: e => (this.buttonColor = e.target.value) })))), index.h("span", null, "Write an hexa code no # needed"), this.colorAccessibility ? (index.h("div", null, index.h("h5", null, "Tillg\u00E4nglighetsrapport"), index.h("div", null, index.h("strong", null, "Liten text:"), index.h("span", { style: { color: this.getColor(this.colorAccessibility.small) } }, this.colorAccessibility.small), index.h("br", null), index.h("strong", null, "Fet text:"), index.h("span", { style: { color: this.getColor(this.colorAccessibility.bold) } }, this.colorAccessibility.bold), index.h("br", null), index.h("strong", null, "Stor text:"), index.h("span", { style: { color: this.getColor(this.colorAccessibility.large) } }, this.colorAccessibility.large), index.h("br", null), index.h("strong", null, "Kontrastf\u00F6rh\u00E5llande:"), " ", this.colorAccessibility.contrast))) : null), index.h("ul", { class: "hemfixarna_categories" }, this.customer ? (index.h("div", null, this.customer.categories.map(c => (index.h("li", null, index.h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, index.h("div", null, index.h("p", null, c.name), index.h("span", null, `c-${c.id}`)), index.h("div", null, index.h("button", { onClick: () => navigator.clipboard.writeText(`c-${c.id}`) }, "Kopiera ID"), index.h("button", { onClick: () => (this.selectedID = `c-${c.id}`) }, "Ladda kategori"))), c.show_products && c.products ? (index.h("ul", null, c.products.map(p => (index.h("li", null, index.h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, index.h("div", null, index.h("p", null, p.fields.post_title), index.h("span", null, p.fields.ID)), index.h("div", null, index.h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), index.h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt")))))))) : (index.h("ul", null, c.sub_categories &&
1148
1149
  c.sub_categories.map(sc => (index.h("li", null, index.h("div", { class: "hemfixarna_categories--label" }, index.h("div", null, index.h("p", null, sc.name), index.h("span", null, `c-${sc.id}`)), index.h("div", null, index.h("button", { onClick: () => navigator.clipboard.writeText(`c-${sc.id}`) }, "Kopiera ID"), index.h("button", { onClick: () => (this.selectedID = `c-${sc.id}`) }, "Ladda kategori"))), index.h("ul", null, sc.products.map(p => (index.h("li", null, index.h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, index.h("div", null, index.h("p", null, p.fields.post_title), index.h("span", null, p.fields.ID)), index.h("div", null, index.h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), index.h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt"))))))))))))))))) : this.tree ? (index.h("div", null, this.tree.sub_cats.map(c => (index.h("li", null, index.h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, index.h("div", null, index.h("p", null, c.name), index.h("span", null, `category/${c.slug}`)), index.h("div", null, index.h("button", { onClick: () => navigator.clipboard.writeText(`category/${c.slug}`) }, "Kopiera slug"), index.h("button", { onClick: () => (this.selectedSlug = `category/${c.slug}`) }, "Ladda kategori"))), index.h("ul", null, c.services.map(sc => (index.h("li", null, index.h("div", { class: "hemfixarna_categories--label" }, index.h("div", null, index.h("p", null, sc.post_title), index.h("span", null, `service/${sc.post_name}`)), index.h("div", null, index.h("button", { onClick: () => navigator.clipboard.writeText(`service/${sc.post_name}`) }, "Kopiera slug"), index.h("button", { onClick: () => (this.selectedSlug = `service/${sc.post_name}`) }, "Ladda kategori"))), index.h("ul", null, sc.products.map(sc => (index.h("li", null, index.h("div", { class: "hemfixarna_categories--label" }, index.h("div", null, index.h("p", null, sc.post_title), index.h("span", null, `product/${sc.post_name}`)), index.h("div", null, index.h("button", { onClick: () => navigator.clipboard.writeText(`product/${sc.post_name}`) }, "Kopiera slug"), index.h("button", { onClick: () => (this.selectedSlug = `product/${sc.post_name}`) }, "Ladda kategori")))))))))))))))) : null)));
1149
1150
  }
1150
1151
  static get watchers() { return {
@@ -1950,6 +1951,153 @@ const HemfixarnaInfo = class {
1950
1951
  }
1951
1952
  };
1952
1953
 
1954
+ const hemfixarnaInvoiceCss = ":host .invoice{gap:16px;display:grid}:host .invoice form>span{text-align:center;padding:16px 0}:host .invoice img{right:unset;left:unset;position:initial;transform:none}:host .invoice label{cursor:pointer;font-size:14px;display:flex;align-items:flex-start;padding:16px 0}:host .invoice label input{margin:0 5px 0 0;accent-color:#ea662c}:host .invoice-preview{display:flex;gap:4px}:host .invoice-preview div{position:relative}:host .invoice-preview div button{position:absolute;top:0;right:0;padding:0}:host .invoice-preview div button img{width:24px;height:24px}:host .invoice-preview div>img{width:100px;height:80px;object-fit:cover}:host .invoice input[type=email],:host .invoice input[type=tel],:host .invoice textarea{padding:16px;border:1px solid #fcd9c9;font-size:16px}:host .invoice textarea{resize:none;height:200px;font-family:\"Inter\", sans-serif}:host .invoice div:has(>input[type=file]){display:flex;align-items:center;justify-content:center;cursor:pointer;background:#fff;border:1px solid #fcd9c9;padding:32px 16px;gap:16px}:host .invoice div:has(>input[type=file]) span{color:#000;font-size:12px}:host .invoice input[type=file]{display:none}";
1955
+
1956
+ const base = `${"https://hemfixarna.se"}/wp-json/headless` ;
1957
+ const HemfixarnaInvoice = class {
1958
+ constructor(hostRef) {
1959
+ index.registerInstance(this, hostRef);
1960
+ this.formError = null;
1961
+ this.displayImages = [];
1962
+ this.formImages = [];
1963
+ this.formState = 'initial';
1964
+ }
1965
+ isValidEmail(email) {
1966
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1967
+ return emailRegex.test(email);
1968
+ }
1969
+ componentDidRender() {
1970
+ const form = this.el.querySelector('form');
1971
+ if (form) {
1972
+ form.addEventListener('input', () => {
1973
+ this.formError = null;
1974
+ });
1975
+ }
1976
+ }
1977
+ disconnectedCallback() {
1978
+ const form = this.el.querySelector('form');
1979
+ if (form) {
1980
+ form.removeEventListener('input', () => {
1981
+ this.formError = null;
1982
+ });
1983
+ }
1984
+ }
1985
+ async submit(e) {
1986
+ var _a;
1987
+ e.preventDefault();
1988
+ this.formState = 'loading';
1989
+ this.formError = null;
1990
+ const form = e.currentTarget.elements;
1991
+ const values = {
1992
+ description: form.descriptionInput.value.length ? form.descriptionInput.value : null,
1993
+ email: form.emailInput.value.length ? form.emailInput.value : null,
1994
+ tel: form.telInput.value.length ? form.telInput.value : null,
1995
+ terms: (_a = form.termsInput) === null || _a === void 0 ? void 0 : _a.checked,
1996
+ };
1997
+ if (!values.description) {
1998
+ this.formError = 'Vänligen fyll i formulärtexten';
1999
+ this.formState = 'initial';
2000
+ return;
2001
+ }
2002
+ if (!values.email || !this.isValidEmail(values.email)) {
2003
+ this.formError = 'Vänligen ange en giltig e-postadress';
2004
+ this.formState = 'initial';
2005
+ return;
2006
+ }
2007
+ if (!values.tel) {
2008
+ this.formError = 'Vänligen ange ditt telefonnummer';
2009
+ this.formState = 'initial';
2010
+ return;
2011
+ }
2012
+ if (state.selectedProduct.terms_show_checkbox && !values.terms) {
2013
+ this.formError = 'Vänligen acceptera villkoren';
2014
+ this.formState = 'initial';
2015
+ return;
2016
+ }
2017
+ const formData = new FormData();
2018
+ formData.append('text', values.description);
2019
+ formData.append('email', values.email);
2020
+ formData.append('tel', values.tel);
2021
+ formData.append('customer', state.business);
2022
+ this.formImages.forEach(file => {
2023
+ formData.append('images[]', file);
2024
+ });
2025
+ formData.append('product', JSON.stringify({
2026
+ title: state.selectedProduct.post_title,
2027
+ amount: 1,
2028
+ has_rut: state.selectedProduct.rut,
2029
+ has_rot: state.selectedProduct.rot,
2030
+ ID: state.selectedProduct.ID,
2031
+ parts: [],
2032
+ }));
2033
+ try {
2034
+ const res = await fetch(`${base}/saveinvoiceproduct`, {
2035
+ method: 'POST',
2036
+ body: formData,
2037
+ });
2038
+ const { response } = await res.json();
2039
+ if (response.code === 200) {
2040
+ state.checkoutInvoice = true;
2041
+ state.step = 6;
2042
+ }
2043
+ else {
2044
+ this.formError = 'Vi kan inte ta emot din beställning just nu';
2045
+ this.formState = 'initial';
2046
+ }
2047
+ }
2048
+ catch (error) {
2049
+ this.formError = 'Vi kan inte ta emot din beställning just nu';
2050
+ this.formState = 'initial';
2051
+ }
2052
+ }
2053
+ handleImageDrop(e) {
2054
+ e.preventDefault();
2055
+ const files = e.dataTransfer.files;
2056
+ for (let i = 0; i < files.length; i++) {
2057
+ const file = files[i];
2058
+ if (file.type.startsWith('image/')) {
2059
+ const reader = new FileReader();
2060
+ reader.onload = () => {
2061
+ this.displayImages = [...this.displayImages, reader.result];
2062
+ this.formImages = [...this.formImages, file];
2063
+ };
2064
+ reader.readAsDataURL(file);
2065
+ }
2066
+ }
2067
+ }
2068
+ handleFileInputChange(e) {
2069
+ e.preventDefault();
2070
+ const files = e.target.files;
2071
+ for (let i = 0; i < files.length; i++) {
2072
+ const file = files[i];
2073
+ if (file.type.startsWith('image/')) {
2074
+ const reader = new FileReader();
2075
+ reader.onload = () => {
2076
+ this.displayImages = [...this.displayImages, reader.result];
2077
+ this.formImages = [...this.formImages, file];
2078
+ };
2079
+ reader.readAsDataURL(file);
2080
+ }
2081
+ }
2082
+ }
2083
+ handleImageClick() {
2084
+ this.el.querySelector('.hemfixarna-file-upload').click();
2085
+ }
2086
+ preventDragOver(e) {
2087
+ e.preventDefault();
2088
+ }
2089
+ removeImage(index) {
2090
+ this.displayImages = this.displayImages.filter((_, i) => i !== index);
2091
+ this.formImages = this.formImages.filter((_, i) => i !== index);
2092
+ }
2093
+ render() {
2094
+ const upload = index.getAssetPath(`./assets/drag-drop.svg`);
2095
+ return (index.h("div", { class: "invoice" }, index.h("p", null, state.selectedProduct.invoice_description), index.h("form", { onSubmit: e => this.submit(e) }, index.h("textarea", { name: "descriptionInput", placeholder: "Beskriv ditt \u00E4rende" }), index.h("div", { role: "button", "aria-label": "upload image", onDragOver: e => this.preventDragOver(e), onDrop: e => this.handleImageDrop(e), onClick: () => this.handleImageClick() }, index.h("img", { src: upload, alt: "hemfixarna_logo", width: 24 }), index.h("div", null, index.h("p", null, "Bifoga ev bilder"), index.h("span", null, "(dra bilder hit)")), index.h("input", { onChange: e => this.handleFileInputChange(e), class: "hemfixarna-file-upload", accept: "image/*", type: "file", multiple: true, name: "fileInput" })), index.h("div", { class: "invoice-preview" }, this.displayImages.map((img, i) => (index.h("div", { key: i }, index.h("img", { src: img, alt: "uploaded image" }), index.h("button", { onClick: () => this.removeImage(i) }, index.h("img", { src: index.getAssetPath(`./assets/close.svg`), alt: "close" })))))), index.h("input", { placeholder: "E-post", type: "email", name: "emailInput" }), index.h("input", { placeholder: "Telefonnummer", type: "tel", name: "telInput" }), state.selectedProduct.terms_show_checkbox ? (index.h("label", null, index.h("input", { type: "checkbox", name: "termsInput" }), state.selectedProduct.terms)) : null, this.formError ? index.h("span", null, this.formError) : null, index.h("input", { type: "submit", value: this.formState === 'loading' ? 'Skickar' : 'Kontakta mig' }))));
2096
+ }
2097
+ get el() { return index.getElement(this); }
2098
+ };
2099
+ HemfixarnaInvoice.style = hemfixarnaInvoiceCss;
2100
+
1953
2101
  const MyComponent$2 = class {
1954
2102
  constructor(hostRef) {
1955
2103
  index.registerInstance(this, hostRef);
@@ -1968,7 +2116,7 @@ const HemfixarnaOrder = class {
1968
2116
  constructor(hostRef) {
1969
2117
  index.registerInstance(this, hostRef);
1970
2118
  this.render = () => {
1971
- return (index.h("div", { style: { background: `url(${state.options.thank_you_image})` }, class: "hemfixarna_order" }, index.h("div", null), index.h("div", null, index.h("h2", null, "Tack f\u00F6r din bokning"), index.h("hemfixarna-orderrows", { tree: this.tree, cart: false }), index.h("span", { onClick: () => this.resetShop() }, index.h("button", null, "G\u00F6r en ny bokning")), index.h("hemfixarna-info", { list: [
2119
+ return (index.h("div", { style: { background: `url(${state.options.thank_you_image})` }, class: "hemfixarna_order" }, index.h("div", null), index.h("div", null, index.h("h2", null, state.checkoutInvoice ? 'Tack för din förfrågan' : 'Tack för din bokning'), state.checkoutInvoice ? index.h("p", null, "Vi \u00E5terkommer inom kort till dig p\u00E5 angivet telefonnummer eller epost") : null, state.checkoutInvoice ? index.h("div", null) : index.h("hemfixarna-orderrows", { tree: this.tree, cart: false }), index.h("span", { onClick: () => this.resetShop() }, index.h("button", null, "G\u00F6r en ny bokning")), index.h("hemfixarna-info", { list: [
1972
2120
  { trust_badge: 'Du kommer bli kontaktad av en Hemfixare för bokning av tid.' },
1973
2121
  { trust_badge: 'När jobbet är klart kommer du få en faktura med RUT/ROT-avdrag.' },
1974
2122
  ] }))));
@@ -2149,11 +2297,11 @@ const HemfixarnaProduct = class {
2149
2297
  const checked = index.getAssetPath(`./assets/checked.svg`);
2150
2298
  const plus = index.getAssetPath(`./assets/plus.svg`);
2151
2299
  const minus = index.getAssetPath(`./assets/minus.svg`);
2152
- return (index.h("div", { class: "hemfixarna_product" }, index.h("div", { class: "hemfixarna_product--top" }, state.selectedProduct.icon && (index.h("img", { width: 80, src: (_a = state.selectedProduct.icon.url) !== null && _a !== void 0 ? _a : state.selectedProduct.icon, alt: state.selectedProduct.post_title })), index.h("div", null, index.h("h1", null, state.selectedProduct.post_title), index.h("h2", null, "Fr\u00E5n: ", getProductPrice(state.selectedProduct), " kr"))), index.h("div", { class: "hemfixarna_product--grid" }, index.h("div", { class: "hemfixarna_product--left" }, ((_b = state.selectedProduct.list) === null || _b === void 0 ? void 0 : _b.length) && (index.h("ul", { class: "hemfixarna_features" }, state.selectedProduct.list.map(l => (index.h("li", { key: l.bullet }, index.h("img", { src: checked, alt: "checked" }), index.h("p", null, l.bullet)))))), state.selectedProduct.description && (index.h("p", { onClick: () => (this.hideDescription = false), class: `hemfixarna_description ${this.hideDescription ? 'hemfixarna_description--hidden' : ''}`, innerHTML: state.selectedProduct.description }))), index.h("div", { class: "hemfixarna_product--right" }, index.h("ul", null, index.h("li", { class: "hemfixarna_product--item" }, index.h("div", null, index.h("p", null, "Antal ", state.selectedProduct.post_title), index.h("p", { class: "hemfixarna_product--price" }, getProductPrice(state.selectedProduct), "kr/st")), index.h("div", { class: "hemfixarna_counter" }, index.h("img", { class: `${this.getAmount() === 0 ? 'disabled' : ''}`, src: minus, onClick: () => this.removeProduct() }), index.h("span", null, this.getAmount()), index.h("img", { src: plus, onClick: () => this.addProduct() }))), ((_c = state.selectedProduct.parts) === null || _c === void 0 ? void 0 : _c.length) &&
2300
+ return (index.h("div", { class: "hemfixarna_product" }, index.h("div", { class: "hemfixarna_product--top" }, state.selectedProduct.icon && (index.h("img", { width: 80, src: (_a = state.selectedProduct.icon.url) !== null && _a !== void 0 ? _a : state.selectedProduct.icon, alt: state.selectedProduct.post_title })), index.h("div", null, index.h("h1", null, state.selectedProduct.post_title), !state.selectedProduct.invoice ? index.h("h2", null, getProductPrice(state.selectedProduct), " kr/st") : index.h("h2", null, state.selectedProduct.invoice_price))), index.h("div", { class: "hemfixarna_product--grid" }, index.h("div", { class: "hemfixarna_product--left" }, ((_b = state.selectedProduct.list) === null || _b === void 0 ? void 0 : _b.length) && (index.h("ul", { class: "hemfixarna_features" }, state.selectedProduct.list.map(l => (index.h("li", { key: l.bullet }, index.h("img", { src: checked, alt: "checked" }), index.h("p", null, l.bullet)))))), state.selectedProduct.description && (index.h("p", { onClick: () => (this.hideDescription = false), class: `hemfixarna_description ${this.hideDescription ? 'hemfixarna_description--hidden' : ''}`, innerHTML: state.selectedProduct.description }))), index.h("div", { class: "hemfixarna_product--right" }, state.selectedProduct.invoice ? (index.h("hemfixarna-invoice", null)) : (index.h(index.Fragment, null, index.h("ul", null, index.h("li", { class: "hemfixarna_product--item" }, index.h("div", null, index.h("p", null, "Antal ", state.selectedProduct.post_title), index.h("p", { class: "hemfixarna_product--price" }, getProductPrice(state.selectedProduct), "kr/st")), index.h("div", { class: "hemfixarna_counter" }, index.h("img", { class: `${this.getAmount() === 0 ? 'disabled' : ''}`, src: minus, onClick: () => this.removeProduct() }), index.h("span", null, this.getAmount()), index.h("img", { src: plus, onClick: () => this.addProduct() }))), ((_c = state.selectedProduct.parts) === null || _c === void 0 ? void 0 : _c.length) &&
2153
2301
  state.selectedProduct.parts.map(p => {
2154
2302
  var _a;
2155
2303
  return (index.h("li", { class: "hemfixarna_part" }, index.h("div", null, index.h("p", null, (_a = p.title) !== null && _a !== void 0 ? _a : p.post_title), index.h("p", { class: "hemfixarna_product--price" }, getPartPrice(p, state.selectedProduct), "kr/st")), index.h("div", { class: "hemfixarna_counter" }, index.h("img", { class: `${this.getPartAmount(p.ID) === 0 ? 'disabled' : ''}`, src: minus, onClick: () => this.removePart(p) }), index.h("span", null, this.getPartAmount(p.ID)), index.h("img", { class: `${this.getAmount() === 0 ? 'disabled' : ''}`, src: plus, onClick: () => this.addPart(p) }))));
2156
- })), index.h("h4", { class: "hemfixarna_product--total" }, "Totalt ", this.getTotalPrice(), " kr"), index.h("button", { onClick: () => this.goToCart(), class: `hemfixarna_buy ${this.getAmount() === 0 ? 'disabled' : ''}` }, "Forts\u00E4tt"), !state.selectedProduct.hide_start_fee && (state.selectedProduct.rot || state.selectedProduct.rut) && state.rutOptions && state.rotOptions && (index.h("p", { class: "hemfixarna_terms" }, index.h("strong", null, state.selectedProduct.rot ? state.rotOptions.rot_start_fee_heading : state.rutOptions.rut_start_fee_heading), index.h("br", null), index.h("span", { innerHTML: state.selectedProduct.rot ? state.rotOptions.rot_start_fee_text : state.rutOptions.rut_start_fee_text }))), state.options && index.h("hemfixarna-info", { list: state.options.trust })))));
2304
+ })), index.h("h4", { class: "hemfixarna_product--total" }, "Totalt ", this.getTotalPrice(), " kr"), index.h("button", { onClick: () => this.goToCart(), class: `hemfixarna_buy ${this.getAmount() === 0 ? 'disabled' : ''}` }, "Forts\u00E4tt"))), !state.selectedProduct.hide_start_fee && (state.selectedProduct.rot || state.selectedProduct.rut) && state.rutOptions && state.rotOptions && (index.h("p", { class: "hemfixarna_terms" }, index.h("strong", null, state.selectedProduct.rot ? state.rotOptions.rot_start_fee_heading : state.rutOptions.rut_start_fee_heading), index.h("br", null), index.h("span", { innerHTML: state.selectedProduct.rot ? state.rotOptions.rot_start_fee_text : state.rutOptions.rut_start_fee_text }))), state.options && index.h("hemfixarna-info", { list: state.options.trust })))));
2157
2305
  }
2158
2306
  get el() { return index.getElement(this); }
2159
2307
  };
@@ -2167,7 +2315,7 @@ const HemfixarnaService = class {
2167
2315
  .sort((a, b) => (a.post_title < b.post_title ? -1 : 1))
2168
2316
  .map(p => {
2169
2317
  var _a;
2170
- return (index.h("hemfixarna-box", { post: p, icon: (_a = p.icon.url) !== null && _a !== void 0 ? _a : p.icon, postTitle: p.post_title }));
2318
+ return (index.h("hemfixarna-box", { post: p, icon: (_a = p.icon.url) !== null && _a !== void 0 ? _a : p.icon, postTitle: p.title }));
2171
2319
  }))), index.h("hemfixarna-info", { list: state.options.trust }))));
2172
2320
  }
2173
2321
  };
@@ -2246,6 +2394,7 @@ exports.hemfixarna_forebygg = MyComponent$4;
2246
2394
  exports.hemfixarna_getuser = HemfixarnaGetuser;
2247
2395
  exports.hemfixarna_hornbach = MyComponent$3;
2248
2396
  exports.hemfixarna_info = HemfixarnaInfo;
2397
+ exports.hemfixarna_invoice = HemfixarnaInvoice;
2249
2398
  exports.hemfixarna_kund = MyComponent$2;
2250
2399
  exports.hemfixarna_order = HemfixarnaOrder;
2251
2400
  exports.hemfixarna_orderrows = HemfixarnaOrderrows;
@@ -2255,4 +2404,4 @@ exports.hemfixarna_skanska = MyComponent$1;
2255
2404
  exports.hemfixarna_start = HemfixarnaGrid;
2256
2405
  exports.hemfixarna_string_furniture = MyComponent;
2257
2406
 
2258
- //# sourceMappingURL=hemfixarna-address_22.cjs.entry.js.map
2407
+ //# sourceMappingURL=hemfixarna-address_23.cjs.entry.js.map
@@ -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-forebygg.hemfixarna-getuser.hemfixarna-hornbach.hemfixarna-info.hemfixarna-kund.hemfixarna-order.hemfixarna-orderrows.hemfixarna-product.hemfixarna-service.hemfixarna-skanska.hemfixarna-start.hemfixarna-string-furniture.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-demo.hemfixarna-doro.hemfixarna-forebygg.hemfixarna-getuser.hemfixarna-hornbach.hemfixarna-info.hemfixarna-invoice.hemfixarna-kund.hemfixarna-order.hemfixarna-orderrows.hemfixarna-product.hemfixarna-service.hemfixarna-skanska.hemfixarna-start.hemfixarna-string-furniture.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-d9e286dc.js');
5
+ const index = require('./index-83c1daf2.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_22.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"colorAccessibility":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"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":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-forebygg",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[4,"load-from-query"],"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-service"],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[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-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_23.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"colorAccessibility":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"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":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-forebygg",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[4,"load-from-query"],"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);
24
24
  });
25
25
 
26
26
  exports.setNonce = index.setNonce;
@@ -1038,7 +1038,11 @@ const postUpdateComponent = (hostRef) => {
1038
1038
  const tagName = hostRef.$cmpMeta$.$tagName$;
1039
1039
  const elm = hostRef.$hostElement$;
1040
1040
  const endPostUpdate = createTime('postUpdate', tagName);
1041
+ const instance = hostRef.$lazyInstance$ ;
1041
1042
  const ancestorComponent = hostRef.$ancestorComponent$;
1043
+ {
1044
+ safeCall(instance, 'componentDidRender');
1045
+ }
1042
1046
  if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1043
1047
  hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1044
1048
  {
@@ -1649,4 +1653,4 @@ exports.promiseResolve = promiseResolve;
1649
1653
  exports.registerInstance = registerInstance;
1650
1654
  exports.setNonce = setNonce;
1651
1655
 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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-d9e286dc.js');
5
+ const index = require('./index-83c1daf2.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_22.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"colorAccessibility":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"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":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-forebygg",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[4,"load-from-query"],"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-service"],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[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-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_23.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"colorAccessibility":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"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":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-forebygg",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[4,"load-from-query"],"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);
18
18
  });
19
19
  };
20
20
 
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M11 16V7.85L8.4 10.45L7 9L12 4L17 9L15.6 10.45L13 7.85V16H11ZM6 20C5.45 20 4.97917 19.8042 4.5875 19.4125C4.19583 19.0208 4 18.55 4 18V15H6V18H18V15H20V18C20 18.55 19.8042 19.0208 19.4125 19.4125C19.0208 19.8042 18.55 20 18 20H6Z" fill="black"/>
3
+ </svg>
@@ -14,6 +14,7 @@
14
14
  "./components/hemfixarna-getuser/hemfixarna-getuser.js",
15
15
  "./components/hemfixarna-hornbach/hemfixarna-hornbach.js",
16
16
  "./components/hemfixarna-info/hemfixarna-info.js",
17
+ "./components/hemfixarna-invoice/hemfixarna-invoice.js",
17
18
  "./components/hemfixarna-kund/hemfixarna-kund.js",
18
19
  "./components/hemfixarna-order/hemfixarna-order.js",
19
20
  "./components/hemfixarna-orderrows/hemfixarna-orderrows.js",
@@ -36,7 +36,7 @@ export class HemfixarnaBox {
36
36
  scrollToTop(el);
37
37
  }
38
38
  render() {
39
- return this.category ? (h(Fragment, null, isProduct(this.category) ? (h("li", { onClick: () => this.setProduct() }, h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.post_name }), h("div", null, h("p", null, this.category.post_title), h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.category), "kr")))) : (h("li", { onClick: () => (state.selectedCustomerCategory = this.category) }, h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.name }), h("div", null, h("p", null, this.category.name)))))) : (h("li", { onClick: () => this.setTaxonomy(this.post) }, this.post.icon && h("img", { class: "hemfixarna_logo", height: 82, src: this.icon, alt: this.postTitle }), h("div", null, h("p", null, this.postTitle), state.step === 3 && h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.post), "kr"))));
39
+ return this.category ? (h(Fragment, null, isProduct(this.category) ? (h("li", { onClick: () => this.setProduct() }, h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.post_name }), h("div", null, h("p", null, this.category.title), !this.category.invoice ? h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.category), "kr") : null))) : (h("li", { onClick: () => (state.selectedCustomerCategory = this.category) }, h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.name }), h("div", null, h("p", null, this.category.name)))))) : (h("li", { onClick: () => this.setTaxonomy(this.post) }, this.post.icon && h("img", { class: "hemfixarna_logo", height: 82, src: this.icon, alt: this.postTitle }), h("div", null, h("p", null, this.postTitle), state.step === 3 && h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.post), "kr"))));
40
40
  }
41
41
  static get is() { return "hemfixarna-box"; }
42
42
  static get properties() {
@@ -1 +1 @@
1
- {"version":3,"file":"hemfixarna-box.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-box/hemfixarna-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAM9C,MAAM,OAAO,aAAa;;;;;;;EAOxB,WAAW,CAAC,QAAsC;IAChD,IAAI,QAAQ,EAAE;MACZ,IAAI,CAAC,QAAqB,aAArB,QAAQ,uBAAR,QAAQ,CAAe,QAAQ,MAAK,aAAa,EAAE;QACtD,KAAK,CAAC,gBAAgB,GAAG,QAAoB,CAAC;QAC9C,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;OAChB;WAAM,IAAI,CAAC,QAAoB,aAApB,QAAQ,uBAAR,QAAQ,CAAc,SAAS,MAAK,SAAS,EAAE;QACzD,KAAK,CAAC,eAAe,GAAG,QAAmB,CAAC;QAC5C,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;OAChB;WAAM,IAAI,CAAC,QAAoB,aAApB,QAAQ,uBAAR,QAAQ,CAAc,SAAS,MAAK,cAAc,EAAE;QAC9D,KAAK,CAAC,eAAe,GAAG,QAAmB,CAAC;QAC5C,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;OAChB;MACD,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC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N,CACQ,CACZ,CAAC,CAAC,CAAC,CACF,UAAI,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;MAC3C,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,WAAK,KAAK,EAAC,iBAAiB,EAAC,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,GAAI;MACnG;QACE,aAAI,IAAI,CAAC,SAAS,CAAK;QACtB,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,SAAG,KAAK,EAAC,OAAO;;UAAO,eAAe,CAAC,IAAI,CAAC,IAAe,CAAC;eAAO,CACpF,CACH,CACN,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Fragment, Prop, h } from '@stencil/core';\nimport state from '../../store';\nimport { Category, CustomerCategory, CustomerSubCategory, Product, Service } from '../../types';\nimport { getProductPrice } from '../../utils/calc';\nimport { scrollToTop } from '../../utils/scroll';\nimport { isProduct } from '../../utils/types';\n\n@Component({\n tag: 'hemfixarna-box',\n shadow: false,\n})\nexport class HemfixarnaBox {\n @Prop() post: Category | Product | Service;\n @Prop() category: CustomerCategory | CustomerSubCategory | Product;\n @Prop() icon: string;\n @Prop() postTitle: string;\n @Element() private el: HTMLElement;\n\n setTaxonomy(taxonomy: Category | Service | Product) {\n if (taxonomy) {\n if ((taxonomy as Category)?.taxonomy === 'service_cat') {\n state.selectedCategory = taxonomy as Category;\n state.step = 2;\n } else if ((taxonomy as Service)?.post_type === 'service') {\n state.selectedService = taxonomy as Service;\n state.step = 3;\n } else if ((taxonomy as Product)?.post_type === 'ikea_product') {\n state.selectedProduct = taxonomy as Product;\n state.step = 4;\n }\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n }\n }\n\n setProduct() {\n state.selectedProduct = this.category as Product;\n state.step = 4;\n state.selectedCustomerCategory = null;\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n }\n\n render() {\n return this.category ? (\n <Fragment>\n {isProduct(this.category) ? (\n <li onClick={() => this.setProduct()}>\n <img class=\"hemfixarna_logo\" height={82} src={this.category.icon as string} alt={this.category.post_name} />\n <div>\n <p>{this.category.post_title}</p>\n <p class=\"price\">Från {getProductPrice(this.category)}kr</p>\n </div>\n </li>\n ) : (\n <li onClick={() => (state.selectedCustomerCategory = this.category as CustomerCategory)}>\n <img class=\"hemfixarna_logo\" height={82} src={this.category.icon} alt={this.category.name} />\n <div>\n <p>{this.category.name}</p>\n </div>\n </li>\n )}\n </Fragment>\n ) : (\n <li onClick={() => this.setTaxonomy(this.post)}>\n {this.post.icon && <img class=\"hemfixarna_logo\" height={82} src={this.icon} alt={this.postTitle} />}\n <div>\n <p>{this.postTitle}</p>\n {state.step === 3 && <p class=\"price\">Från {getProductPrice(this.post as Product)}kr</p>}\n </div>\n </li>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"hemfixarna-box.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-box/hemfixarna-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAM9C,MAAM,OAAO,aAAa;;;;;;;EAOxB,WAAW,CAAC,QAAsC;IAChD,IAAI,QAAQ,EAAE;MACZ,IAAI,CAAC,QAAqB,aAArB,QAAQ,uBAAR,QAAQ,CAAe,QAAQ,MAAK,a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import state from '../../store';\nimport { Category, CustomerCategory, CustomerSubCategory, Product, Service } from '../../types';\nimport { getProductPrice } from '../../utils/calc';\nimport { scrollToTop } from '../../utils/scroll';\nimport { isProduct } from '../../utils/types';\n\n@Component({\n tag: 'hemfixarna-box',\n shadow: false,\n})\nexport class HemfixarnaBox {\n @Prop() post: Category | Product | Service;\n @Prop() category: CustomerCategory | CustomerSubCategory | Product;\n @Prop() icon: string;\n @Prop() postTitle: string;\n @Element() private el: HTMLElement;\n\n setTaxonomy(taxonomy: Category | Service | Product) {\n if (taxonomy) {\n if ((taxonomy as Category)?.taxonomy === 'service_cat') {\n state.selectedCategory = taxonomy as Category;\n state.step = 2;\n } else if ((taxonomy as Service)?.post_type === 'service') {\n state.selectedService = taxonomy as Service;\n state.step = 3;\n } else if ((taxonomy as Product)?.post_type === 'ikea_product') {\n state.selectedProduct = taxonomy as Product;\n state.step = 4;\n }\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n }\n }\n\n setProduct() {\n state.selectedProduct = this.category as Product;\n state.step = 4;\n state.selectedCustomerCategory = null;\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n }\n\n render() {\n return this.category ? (\n <Fragment>\n {isProduct(this.category) ? (\n <li onClick={() => this.setProduct()}>\n <img class=\"hemfixarna_logo\" height={82} src={this.category.icon as string} alt={this.category.post_name} />\n <div>\n <p>{this.category.title}</p>\n {!this.category.invoice ? <p class=\"price\">Från {getProductPrice(this.category)}kr</p> : null}\n </div>\n </li>\n ) : (\n <li onClick={() => (state.selectedCustomerCategory = this.category as CustomerCategory)}>\n <img class=\"hemfixarna_logo\" height={82} src={this.category.icon} alt={this.category.name} />\n <div>\n <p>{this.category.name}</p>\n </div>\n </li>\n )}\n </Fragment>\n ) : (\n <li onClick={() => this.setTaxonomy(this.post)}>\n {this.post.icon && <img class=\"hemfixarna_logo\" height={82} src={this.icon} alt={this.postTitle} />}\n <div>\n <p>{this.postTitle}</p>\n {state.step === 3 && <p class=\"price\">Från {getProductPrice(this.post as Product)}kr</p>}\n </div>\n </li>\n );\n }\n}\n"]}
@@ -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;AAE7C,OAAO,KAAK,MAAM,aAAa,CAAC;AAMhC,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 { Icon, Service } from '../../types';\nimport state from '../../store';\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,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"]}