hemfixarna-web-components 1.3.4 → 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.
- package/dist/cjs/{hemfixarna-address_21.cjs.entry.js → hemfixarna-address_23.cjs.entry.js} +198 -30
- package/dist/cjs/{hemfixarna-address_21.cjs.entry.js.map → hemfixarna-address_23.cjs.entry.js.map} +1 -1
- package/dist/cjs/hemfixarna-components.cjs.js +2 -2
- package/dist/cjs/{index-d9e286dc.js → index-83c1daf2.js} +5 -1
- package/dist/{esm/index-9863db6c.js.map → cjs/index-83c1daf2.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/drag-drop.svg +3 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/hemfixarna-box/hemfixarna-box.js +1 -1
- package/dist/collection/components/hemfixarna-box/hemfixarna-box.js.map +1 -1
- package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +5 -5
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js +1 -1
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +1 -1
- package/dist/collection/components/hemfixarna-doro/hemfixarna-doro.css +0 -0
- package/dist/collection/components/hemfixarna-doro/hemfixarna-doro.js +123 -0
- package/dist/collection/components/hemfixarna-doro/hemfixarna-doro.js.map +1 -0
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.css +76 -0
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js +164 -0
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +1 -0
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js +1 -1
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +1 -1
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.js +3 -3
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.js.map +1 -1
- package/dist/collection/components/hemfixarna-service/hemfixarna-service.js +1 -1
- package/dist/collection/components/hemfixarna-service/hemfixarna-service.js.map +1 -1
- package/dist/collection/components/hemfixarna-start/hemfixarna-start.js.map +1 -1
- package/dist/collection/store/index.js +1 -0
- package/dist/collection/store/index.js.map +1 -1
- package/dist/collection/types/index.js +1 -0
- package/dist/collection/types/index.js.map +1 -1
- package/dist/esm/{hemfixarna-address_21.entry.js → hemfixarna-address_23.entry.js} +195 -29
- package/dist/esm/{hemfixarna-address_21.entry.js.map → hemfixarna-address_23.entry.js.map} +1 -1
- package/dist/esm/hemfixarna-components.js +3 -3
- package/dist/esm/{index-9863db6c.js → index-1fd61928.js} +5 -1
- package/dist/{cjs/index-d9e286dc.js.map → esm/index-1fd61928.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/hemfixarna-components/assets/drag-drop.svg +3 -0
- package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
- package/dist/hemfixarna-components/{p-62a7c1a2.js → p-33d37833.js} +3 -3
- package/dist/hemfixarna-components/p-7ad71b65.entry.js +2 -0
- package/dist/types/components/hemfixarna-doro/hemfixarna-doro.d.ts +9 -0
- package/dist/types/components/hemfixarna-invoice/hemfixarna-invoice.d.ts +17 -0
- package/dist/types/components.d.ts +36 -0
- package/dist/types/store/index.d.ts +1 -0
- package/dist/types/types/index.d.ts +6 -1
- package/package.json +1 -1
- package/dist/hemfixarna-components/p-915d8f90.entry.js +0 -2
- /package/dist/hemfixarna-components/{p-62a7c1a2.js.map → p-33d37833.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-915d8f90.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-
|
|
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.
|
|
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
|
};
|
|
@@ -524,6 +525,7 @@ var Business;
|
|
|
524
525
|
Business["string"] = "string-furniture";
|
|
525
526
|
Business["hornbach"] = "hornbach";
|
|
526
527
|
Business["forebygg"] = "forebygg";
|
|
528
|
+
Business["doro"] = "doro";
|
|
527
529
|
})(Business || (Business = {}));
|
|
528
530
|
var WidgetStyle;
|
|
529
531
|
(function (WidgetStyle) {
|
|
@@ -539,7 +541,7 @@ var TopCategory;
|
|
|
539
541
|
|
|
540
542
|
const hemfixarnaByggmaxCss = "";
|
|
541
543
|
|
|
542
|
-
const MyComponent$
|
|
544
|
+
const MyComponent$7 = class {
|
|
543
545
|
constructor(hostRef) {
|
|
544
546
|
index.registerInstance(this, hostRef);
|
|
545
547
|
this.tree = null;
|
|
@@ -556,7 +558,7 @@ const MyComponent$6 = class {
|
|
|
556
558
|
return (index.h("hemfixarna-component", { forceOldTree: this.forceOldTree, id: this.id, slug: this.slug, business: Business.byggmax, topCategory: TopCategory.byggmax, loadFromQuery: this.loadFromQuery, widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor }));
|
|
557
559
|
}
|
|
558
560
|
};
|
|
559
|
-
MyComponent$
|
|
561
|
+
MyComponent$7.style = hemfixarnaByggmaxCss;
|
|
560
562
|
|
|
561
563
|
const HemfixarnaCart = class {
|
|
562
564
|
constructor(hostRef) {
|
|
@@ -591,7 +593,7 @@ const HemfixarnaCategory = class {
|
|
|
591
593
|
}
|
|
592
594
|
};
|
|
593
595
|
|
|
594
|
-
const base$
|
|
596
|
+
const base$2 = `${"https://hemfixarna.se"}/wp-json/headless` ;
|
|
595
597
|
async function fetchWithType(request, options) {
|
|
596
598
|
const response = await fetch(request, options);
|
|
597
599
|
const body = await response.json();
|
|
@@ -604,7 +606,7 @@ const getTaxonomy = async (endpoint) => {
|
|
|
604
606
|
const type = endpoint.split('/')[0];
|
|
605
607
|
const slug = endpoint.split('/')[1];
|
|
606
608
|
try {
|
|
607
|
-
const res = await fetch(`${base$
|
|
609
|
+
const res = await fetch(`${base$2}/${type}/${slug}`);
|
|
608
610
|
return await res.json();
|
|
609
611
|
}
|
|
610
612
|
catch (error) {
|
|
@@ -613,7 +615,7 @@ const getTaxonomy = async (endpoint) => {
|
|
|
613
615
|
};
|
|
614
616
|
const getCustomer = async (slug) => {
|
|
615
617
|
try {
|
|
616
|
-
const res = await fetch(`${base$
|
|
618
|
+
const res = await fetch(`${base$2}/customer/${slug}`);
|
|
617
619
|
return await res.json();
|
|
618
620
|
}
|
|
619
621
|
catch (error) {
|
|
@@ -622,7 +624,7 @@ const getCustomer = async (slug) => {
|
|
|
622
624
|
};
|
|
623
625
|
const getOptions = async () => {
|
|
624
626
|
try {
|
|
625
|
-
const res = await fetch(`${base$
|
|
627
|
+
const res = await fetch(`${base$2}/webcoptions`);
|
|
626
628
|
return (await res.json());
|
|
627
629
|
}
|
|
628
630
|
catch (error) {
|
|
@@ -631,7 +633,7 @@ const getOptions = async () => {
|
|
|
631
633
|
};
|
|
632
634
|
const getRut = async () => {
|
|
633
635
|
try {
|
|
634
|
-
const data = await fetchWithType(`${base$
|
|
636
|
+
const data = await fetchWithType(`${base$2}/rut`);
|
|
635
637
|
return data;
|
|
636
638
|
}
|
|
637
639
|
catch (error) {
|
|
@@ -640,7 +642,7 @@ const getRut = async () => {
|
|
|
640
642
|
};
|
|
641
643
|
const getRot = async () => {
|
|
642
644
|
try {
|
|
643
|
-
const res = await fetch(`${base$
|
|
645
|
+
const res = await fetch(`${base$2}/rot`);
|
|
644
646
|
return (await res.json());
|
|
645
647
|
}
|
|
646
648
|
catch (error) {
|
|
@@ -662,7 +664,7 @@ const getRot = async () => {
|
|
|
662
664
|
// }
|
|
663
665
|
const postOrder = async (data) => {
|
|
664
666
|
try {
|
|
665
|
-
const res = await fetch(`${base$
|
|
667
|
+
const res = await fetch(`${base$2}/weborder`, {
|
|
666
668
|
method: 'POST',
|
|
667
669
|
body: JSON.stringify(data),
|
|
668
670
|
headers: {
|
|
@@ -676,10 +678,10 @@ const postOrder = async (data) => {
|
|
|
676
678
|
}
|
|
677
679
|
};
|
|
678
680
|
|
|
679
|
-
const base = `${"https://hemfixarna.se"}/wp-json/felix` ;
|
|
681
|
+
const base$1 = `${"https://hemfixarna.se"}/wp-json/felix` ;
|
|
680
682
|
const postPerson = async (felixOrder) => {
|
|
681
683
|
try {
|
|
682
|
-
return await fetchWithType(`${base}/createperson`, {
|
|
684
|
+
return await fetchWithType(`${base$1}/createperson`, {
|
|
683
685
|
method: 'POST',
|
|
684
686
|
body: JSON.stringify(felixOrder),
|
|
685
687
|
headers: {
|
|
@@ -1015,14 +1017,14 @@ const HemfixarnaComponent = class {
|
|
|
1015
1017
|
return state.cart.reduce((acc, curr) => acc + curr.amount, 0);
|
|
1016
1018
|
}
|
|
1017
1019
|
render() {
|
|
1018
|
-
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;
|
|
1019
1021
|
const logo = index.getAssetPath(`./assets/hemfixarna.svg`);
|
|
1020
1022
|
const monteringLogo = index.getAssetPath(`./assets/montering.svg`);
|
|
1021
1023
|
const navBackground = ((_a = this.nav) === null || _a === void 0 ? void 0 : _a.background) ? index.getAssetPath(this.nav.background) : '';
|
|
1022
1024
|
const navLogo = ((_b = this.nav) === null || _b === void 0 ? void 0 : _b.logo) ? index.getAssetPath(this.nav.logo) : '';
|
|
1023
|
-
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: {
|
|
1024
|
-
color: ((
|
|
1025
|
-
backgroundColor: ((
|
|
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}`,
|
|
1026
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))));
|
|
1027
1029
|
}
|
|
1028
1030
|
static get assetsDirs() { return ["assets"]; }
|
|
@@ -1036,7 +1038,7 @@ HemfixarnaComponent.style = hemfixarnaCss;
|
|
|
1036
1038
|
|
|
1037
1039
|
const hemfixarnaDemoCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); :host{font-family:\"Inter\", sans-serif}:host .hemfixarna_widgetstyles label{cursor:pointer}:host .hemfixarna_widgetstyles>div{display:flex;gap:1rem}:host .hemfixarna_widgetstyles h5{margin:1rem 0}:host .hemfixarna_example{margin-bottom:16px;background:#000;padding:16px;color:#fff;display:flex;justify-content:space-between;cursor:pointer;max-width:500px;box-sizing:border-box;position:relative}:host .hemfixarna_example--tooltip{background:#000;top:-48px;font-size:16px;left:40%;color:white;padding:8px;position:absolute;opacity:0}:host .hemfixarna_example--tooltip::after{content:\"\";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}:host .hemfixarna_example:hover .hemfixarna_example--tooltip{opacity:1}:host .hemfixarna_example p{font-size:14px}:host .hemfixarna_example img{filter:invert(1)}:host .hemfixarna_install{display:grid;gap:8px;margin-top:16px}:host .hemfixarna_product--label{background:#e1e0f5}:host .hemfixarna_categories{max-height:100%;overflow:auto;position:relative}:host .hemfixarna_categories--label{display:flex;align-items:center;justify-content:space-between;padding:8px}:host .hemfixarna_categories--label button{background:#3f3a92;border:none;font-weight:600;padding:3.2px 9.6px;border-radius:10px;margin-right:8px;color:#ece8e8}:host .hemfixarna_categories--label button:active{transform:scale(0.95)}:host .hemfixarna_categories--label--big{font-weight:600;border-bottom:1px solid black}:host p{margin:0}:host span{color:darkolivegreen;font-size:10px}:host button{cursor:pointer}:host>div{display:grid;gap:32px;width:100%;grid-template-columns:1fr 1fr;height:100vh;place-items:center;overflow:hidden;padding:16px 32px;box-sizing:border-box}:host>div>*{width:100%}:host>div>div{max-width:500px}:host>div ul{margin:0;padding:0;list-style:none}:host>div ul ul{gap:1px;display:grid}:host>div ul li{padding-left:16px;background:#fff}";
|
|
1038
1040
|
|
|
1039
|
-
const MyComponent$
|
|
1041
|
+
const MyComponent$6 = class {
|
|
1040
1042
|
constructor(hostRef) {
|
|
1041
1043
|
index.registerInstance(this, hostRef);
|
|
1042
1044
|
this.debounce = null;
|
|
@@ -1081,7 +1083,7 @@ const MyComponent$5 = class {
|
|
|
1081
1083
|
// Your color accessibility logic here
|
|
1082
1084
|
}
|
|
1083
1085
|
getTopLevelCategory() {
|
|
1084
|
-
switch ("
|
|
1086
|
+
switch ("kund") {
|
|
1085
1087
|
case Business.byggmax:
|
|
1086
1088
|
return TopCategory.byggmax;
|
|
1087
1089
|
default:
|
|
@@ -1111,14 +1113,14 @@ const MyComponent$5 = class {
|
|
|
1111
1113
|
}
|
|
1112
1114
|
}
|
|
1113
1115
|
else {
|
|
1114
|
-
const customer = await getCustomer("
|
|
1116
|
+
const customer = await getCustomer("kund");
|
|
1115
1117
|
if (customer.code !== 'not_found' && customer) {
|
|
1116
1118
|
this.customer = customer;
|
|
1117
1119
|
}
|
|
1118
1120
|
}
|
|
1119
1121
|
}
|
|
1120
1122
|
getExample() {
|
|
1121
|
-
return `<hemfixarna-${"
|
|
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"}>`;
|
|
1122
1124
|
}
|
|
1123
1125
|
copyExample() {
|
|
1124
1126
|
navigator.clipboard.writeText(this.getExample());
|
|
@@ -1143,7 +1145,7 @@ const MyComponent$5 = class {
|
|
|
1143
1145
|
}
|
|
1144
1146
|
render() {
|
|
1145
1147
|
const copy = index.getAssetPath(`./assets/copy.png`);
|
|
1146
|
-
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)), "
|
|
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 &&
|
|
1147
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)));
|
|
1148
1150
|
}
|
|
1149
1151
|
static get watchers() { return {
|
|
@@ -1151,7 +1153,24 @@ const MyComponent$5 = class {
|
|
|
1151
1153
|
"buttonColor": ["debouncedFunction"]
|
|
1152
1154
|
}; }
|
|
1153
1155
|
};
|
|
1154
|
-
MyComponent$
|
|
1156
|
+
MyComponent$6.style = hemfixarnaDemoCss;
|
|
1157
|
+
|
|
1158
|
+
const hemfixarnaDoroCss = "";
|
|
1159
|
+
|
|
1160
|
+
const MyComponent$5 = class {
|
|
1161
|
+
constructor(hostRef) {
|
|
1162
|
+
index.registerInstance(this, hostRef);
|
|
1163
|
+
this.id = undefined;
|
|
1164
|
+
this.loadFromQuery = false;
|
|
1165
|
+
this.widgetStyle = WidgetStyle.standard;
|
|
1166
|
+
this.buttonColor = undefined;
|
|
1167
|
+
this.buttonBg = undefined;
|
|
1168
|
+
}
|
|
1169
|
+
render() {
|
|
1170
|
+
return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.doro }));
|
|
1171
|
+
}
|
|
1172
|
+
};
|
|
1173
|
+
MyComponent$5.style = hemfixarnaDoroCss;
|
|
1155
1174
|
|
|
1156
1175
|
const hemfixarnaForebyggCss = "";
|
|
1157
1176
|
|
|
@@ -1932,6 +1951,153 @@ const HemfixarnaInfo = class {
|
|
|
1932
1951
|
}
|
|
1933
1952
|
};
|
|
1934
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
|
+
|
|
1935
2101
|
const MyComponent$2 = class {
|
|
1936
2102
|
constructor(hostRef) {
|
|
1937
2103
|
index.registerInstance(this, hostRef);
|
|
@@ -1950,7 +2116,7 @@ const HemfixarnaOrder = class {
|
|
|
1950
2116
|
constructor(hostRef) {
|
|
1951
2117
|
index.registerInstance(this, hostRef);
|
|
1952
2118
|
this.render = () => {
|
|
1953
|
-
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,
|
|
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: [
|
|
1954
2120
|
{ trust_badge: 'Du kommer bli kontaktad av en Hemfixare för bokning av tid.' },
|
|
1955
2121
|
{ trust_badge: 'När jobbet är klart kommer du få en faktura med RUT/ROT-avdrag.' },
|
|
1956
2122
|
] }))));
|
|
@@ -2131,11 +2297,11 @@ const HemfixarnaProduct = class {
|
|
|
2131
2297
|
const checked = index.getAssetPath(`./assets/checked.svg`);
|
|
2132
2298
|
const plus = index.getAssetPath(`./assets/plus.svg`);
|
|
2133
2299
|
const minus = index.getAssetPath(`./assets/minus.svg`);
|
|
2134
|
-
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,
|
|
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) &&
|
|
2135
2301
|
state.selectedProduct.parts.map(p => {
|
|
2136
2302
|
var _a;
|
|
2137
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) }))));
|
|
2138
|
-
})), 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 })))));
|
|
2139
2305
|
}
|
|
2140
2306
|
get el() { return index.getElement(this); }
|
|
2141
2307
|
};
|
|
@@ -2149,7 +2315,7 @@ const HemfixarnaService = class {
|
|
|
2149
2315
|
.sort((a, b) => (a.post_title < b.post_title ? -1 : 1))
|
|
2150
2316
|
.map(p => {
|
|
2151
2317
|
var _a;
|
|
2152
|
-
return (index.h("hemfixarna-box", { post: p, icon: (_a = p.icon.url) !== null && _a !== void 0 ? _a : p.icon, postTitle: p.
|
|
2318
|
+
return (index.h("hemfixarna-box", { post: p, icon: (_a = p.icon.url) !== null && _a !== void 0 ? _a : p.icon, postTitle: p.title }));
|
|
2153
2319
|
}))), index.h("hemfixarna-info", { list: state.options.trust }))));
|
|
2154
2320
|
}
|
|
2155
2321
|
};
|
|
@@ -2217,16 +2383,18 @@ MyComponent.style = hemfixarnaStringCss;
|
|
|
2217
2383
|
exports.hemfixarna_address = HemfixarnaAddress;
|
|
2218
2384
|
exports.hemfixarna_box = HemfixarnaBox;
|
|
2219
2385
|
exports.hemfixarna_breadcrumbs = HemfixarnaBreadcrumbs;
|
|
2220
|
-
exports.hemfixarna_byggmax = MyComponent$
|
|
2386
|
+
exports.hemfixarna_byggmax = MyComponent$7;
|
|
2221
2387
|
exports.hemfixarna_cart = HemfixarnaCart;
|
|
2222
2388
|
exports.hemfixarna_category = HemfixarnaCategory;
|
|
2223
2389
|
exports.hemfixarna_checkout = HemfixarnaCheckout;
|
|
2224
2390
|
exports.hemfixarna_component = HemfixarnaComponent;
|
|
2225
|
-
exports.hemfixarna_demo = MyComponent$
|
|
2391
|
+
exports.hemfixarna_demo = MyComponent$6;
|
|
2392
|
+
exports.hemfixarna_doro = MyComponent$5;
|
|
2226
2393
|
exports.hemfixarna_forebygg = MyComponent$4;
|
|
2227
2394
|
exports.hemfixarna_getuser = HemfixarnaGetuser;
|
|
2228
2395
|
exports.hemfixarna_hornbach = MyComponent$3;
|
|
2229
2396
|
exports.hemfixarna_info = HemfixarnaInfo;
|
|
2397
|
+
exports.hemfixarna_invoice = HemfixarnaInvoice;
|
|
2230
2398
|
exports.hemfixarna_kund = MyComponent$2;
|
|
2231
2399
|
exports.hemfixarna_order = HemfixarnaOrder;
|
|
2232
2400
|
exports.hemfixarna_orderrows = HemfixarnaOrderrows;
|
|
@@ -2236,4 +2404,4 @@ exports.hemfixarna_skanska = MyComponent$1;
|
|
|
2236
2404
|
exports.hemfixarna_start = HemfixarnaGrid;
|
|
2237
2405
|
exports.hemfixarna_string_furniture = MyComponent;
|
|
2238
2406
|
|
|
2239
|
-
//# sourceMappingURL=hemfixarna-
|
|
2407
|
+
//# sourceMappingURL=hemfixarna-address_23.cjs.entry.js.map
|
package/dist/cjs/{hemfixarna-address_21.cjs.entry.js.map → hemfixarna-address_23.cjs.entry.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"hemfixarna-address.hemfixarna-box.hemfixarna-breadcrumbs.hemfixarna-byggmax.hemfixarna-cart.hemfixarna-category.hemfixarna-checkout.hemfixarna-component.hemfixarna-demo.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":"
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","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-
|
|
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-
|
|
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
|
|
|
1652
|
-
//# sourceMappingURL=index-
|
|
1656
|
+
//# sourceMappingURL=index-83c1daf2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index-
|
|
1
|
+
{"file":"index-83c1daf2.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
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-
|
|
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>
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
"./components/hemfixarna-checkout/hemfixarna-checkout.js",
|
|
10
10
|
"./components/hemfixarna-component/hemfixarna-component.js",
|
|
11
11
|
"./components/hemfixarna-demo/hemfixarna-demo.js",
|
|
12
|
+
"./components/hemfixarna-doro/hemfixarna-doro.js",
|
|
12
13
|
"./components/hemfixarna-forebygg/hemfixarna-forebygg.js",
|
|
13
14
|
"./components/hemfixarna-getuser/hemfixarna-getuser.js",
|
|
14
15
|
"./components/hemfixarna-hornbach/hemfixarna-hornbach.js",
|
|
15
16
|
"./components/hemfixarna-info/hemfixarna-info.js",
|
|
17
|
+
"./components/hemfixarna-invoice/hemfixarna-invoice.js",
|
|
16
18
|
"./components/hemfixarna-kund/hemfixarna-kund.js",
|
|
17
19
|
"./components/hemfixarna-order/hemfixarna-order.js",
|
|
18
20
|
"./components/hemfixarna-orderrows/hemfixarna-orderrows.js",
|