hemfixarna-web-components 1.3.0 → 1.3.2
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_20.cjs.entry.js +92 -11
- package/dist/cjs/hemfixarna-address_20.cjs.entry.js.map +1 -1
- package/dist/cjs/hemfixarna-components.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/montering.svg +15 -0
- package/dist/collection/components/hemfixarna-byggmax/hemfixarna-byggmax.js +62 -2
- package/dist/collection/components/hemfixarna-byggmax/hemfixarna-byggmax.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +66 -2
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna.css +40 -3
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.css +10 -0
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js +65 -4
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +1 -1
- package/dist/collection/components/hemfixarna-hornbach/hemfixarna-hornbach.js +62 -2
- package/dist/collection/components/hemfixarna-hornbach/hemfixarna-hornbach.js.map +1 -1
- package/dist/collection/components/hemfixarna-kund/hemfixarna-kund.js +62 -2
- package/dist/collection/components/hemfixarna-kund/hemfixarna-kund.js.map +1 -1
- package/dist/collection/components/hemfixarna-skanska/hemfixarna-skanska.js +62 -2
- package/dist/collection/components/hemfixarna-skanska/hemfixarna-skanska.js.map +1 -1
- package/dist/collection/components/hemfixarna-string/hemfixarna-string-furniture.js +62 -2
- package/dist/collection/components/hemfixarna-string/hemfixarna-string-furniture.js.map +1 -1
- package/dist/collection/types/index.js +7 -0
- package/dist/collection/types/index.js.map +1 -1
- package/dist/esm/hemfixarna-address_20.entry.js +92 -11
- package/dist/esm/hemfixarna-address_20.entry.js.map +1 -1
- package/dist/esm/hemfixarna-components.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/hemfixarna-components/assets/montering.svg +15 -0
- package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
- package/dist/hemfixarna-components/p-33a71663.entry.js +2 -0
- package/dist/types/components/hemfixarna-byggmax/hemfixarna-byggmax.d.ts +4 -1
- package/dist/types/components/hemfixarna-component/hemfixarna-component.d.ts +5 -2
- package/dist/types/components/hemfixarna-demo/hemfixarna-demo.d.ts +17 -1
- package/dist/types/components/hemfixarna-hornbach/hemfixarna-hornbach.d.ts +4 -0
- package/dist/types/components/hemfixarna-kund/hemfixarna-kund.d.ts +4 -0
- package/dist/types/components/hemfixarna-skanska/hemfixarna-skanska.d.ts +4 -0
- package/dist/types/components/hemfixarna-string/hemfixarna-string-furniture.d.ts +4 -0
- package/dist/types/components.d.ts +38 -2
- package/dist/types/types/index.d.ts +6 -0
- package/package.json +1 -1
- package/dist/hemfixarna-components/p-c21daccb.entry.js +0 -2
- /package/dist/hemfixarna-components/{p-c21daccb.entry.js.map → p-33a71663.entry.js.map} +0 -0
|
@@ -524,6 +524,13 @@ var Business;
|
|
|
524
524
|
Business["string"] = "string-furniture";
|
|
525
525
|
Business["hornbach"] = "hornbach";
|
|
526
526
|
})(Business || (Business = {}));
|
|
527
|
+
var WidgetStyle;
|
|
528
|
+
(function (WidgetStyle) {
|
|
529
|
+
WidgetStyle["standard"] = "standard";
|
|
530
|
+
WidgetStyle["alternative"] = "alternative";
|
|
531
|
+
WidgetStyle["alternative_2"] = "alternative_2";
|
|
532
|
+
WidgetStyle["alternative_3"] = "alternative_3";
|
|
533
|
+
})(WidgetStyle || (WidgetStyle = {}));
|
|
527
534
|
var TopCategory;
|
|
528
535
|
(function (TopCategory) {
|
|
529
536
|
TopCategory["byggmax"] = "category/bygg";
|
|
@@ -540,9 +547,12 @@ const MyComponent$5 = class {
|
|
|
540
547
|
this.forceOldTree = false;
|
|
541
548
|
this.loadFromQuery = false;
|
|
542
549
|
this.customer = undefined;
|
|
550
|
+
this.widgetStyle = WidgetStyle.standard;
|
|
551
|
+
this.buttonColor = undefined;
|
|
552
|
+
this.buttonBg = undefined;
|
|
543
553
|
}
|
|
544
554
|
render() {
|
|
545
|
-
return (index.h("hemfixarna-component", {
|
|
555
|
+
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 }));
|
|
546
556
|
}
|
|
547
557
|
};
|
|
548
558
|
MyComponent$5.style = hemfixarnaByggmaxCss;
|
|
@@ -799,7 +809,7 @@ const HemfixarnaCheckout = class {
|
|
|
799
809
|
get el() { return index.getElement(this); }
|
|
800
810
|
};
|
|
801
811
|
|
|
802
|
-
const hemfixarnaCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); *{box-sizing:border-box}:host{font-family:\"Inter\", sans-serif}:host .mb-2{margin-bottom:32px}:host button{color:#474444}:host form{display:flex;flex-direction:column;gap:16px}:host form img{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}:host form img:first-of-type{left:16px}:host form img:last-of-type{right:16px}:host form span{margin-top:-8px;color:#ec6632}:host form p{text-align:center}:host form p{margin:0}:host form div{position:relative}:host form div label{pointer-events:none;position:absolute;left:16px;top:50%;transform:translateY(-50%);background:#fff;padding:4px;transition:0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host form div input{padding:16px;width:100%;font-size:16px;border:1px solid #fcd9c9}:host form div input:focus~label,:host form div .input_active~label{top:0;transform:translateY(-50%);background:linear-gradient(180deg, #fffaf2 50%, #fff 50%)}:host h1{font-size:24px;font-weight:400;line-height:32px;letter-spacing:-3%;text-align:left;margin:0 0 8px}:host h2{margin:0 0 24px;font-weight:700;font-size:20px;line-height:28px;letter-spacing:-3%}:host p{font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna{width:100%;}:host .hemfixarna_nav{position:absolute;top:0;width:100dvw;left:0;height:80px;z-index:9999}:host .hemfixarna_nav--links{display:none !important}@media (min-width: 769px){:host .hemfixarna_nav--links{display:flex !important}}:host .hemfixarna_nav--links a{color:#ec6632;text-decoration:none;border:1px solid rgba(255, 255, 255, 0.3);border-radius:56px;padding:8px 32px;text-transform:capitalize}:host .hemfixarna_nav>div{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 16px}@media (min-width: 769px){:host .hemfixarna_nav>div{padding:0 32px}}:host .hemfixarna_nav>div>div{display:flex;gap:32px;justify-content:space-between}:host .hemfixarna_nav>div>img{position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1}:host .hemfixarna_nav p{color:#fff}:host .hemfixarna_standalone .hemfixarna_backdrop{background:#fffaf2;opacity:1}:host .hemfixarna_standalone .hemfixarna_modal{top:80px;transform:translateX(-50%);border:none;height:calc(100dvh - 80px);opacity:0}:host .hemfixarna_standalone .hemfixarna_modal--open{opacity:1}:host .hemfixarna .switch{position:relative;display:inline-block;width:40px;height:20px}:host .hemfixarna .switch input{opacity:0;width:0;height:0}:host .hemfixarna .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:0.4s;transition:0.4s;border-radius:34px}:host .hemfixarna .slider:before{position:absolute;content:\"\";height:18px;width:18px;left:2px;bottom:1px;background-color:white;-webkit-transition:0.4s;transition:0.4s;border-radius:50%}:host .hemfixarna input:checked+.slider{background-color:#fcd9c9}:host .hemfixarna input:focus+.slider{box-shadow:0 0 1px #fcd9c9}:host .hemfixarna input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translateX(18px);background:#ec6632}:host .hemfixarna_checkbox{display:grid;grid-template-columns:40px auto;font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna_checkbox>span{transform:translateY(6px)}:host .hemfixarna_checkbox span,:host .hemfixarna_checkbox span p{color:#474444;font-size:14px}:host .hemfixarna_checkbox p{text-align:left}:host .hemfixarna_info{display:flex;flex-direction:column;gap:24px;padding:32px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);border-radius:4px;border:1px solid #fcd9c9}:host .hemfixarna_info h2{margin:0}@media (min-width: 769px){:host .hemfixarna_info{position:sticky;top:0}}:host .hemfixarna_infomodal{position:absolute;top:40%;left:50%;transform:translate(-50%, -50%);width:100%;max-width:80%;background:#fffaf2;border:1px solid #fcd9c9;padding:32px;z-index:99;border-radius:4px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;flex-direction:column;gap:16px}:host .hemfixarna_infomodal p,:host .hemfixarna_infomodal h4{margin:0}:host .hemfixarna_infomodal button{background:#ec6632;color:#fff;border-radius:60px;font-size:16px;padding:8px 16px}:host .hemfixarna_addressinfo{padding:16px 16px 64px;border:1px solid #fcd9c9;position:relative;margin-bottom:32px;display:grid;grid-template-columns:1fr;gap:8px}@media (min-width: 769px){:host .hemfixarna_addressinfo{grid-template-columns:1fr 1fr}}:host .hemfixarna_addressinfo button{position:absolute;bottom:16px;right:16px;font-weight:500;text-underline-offset:2px;text-decoration:underline}:host .hemfixarna_part{background:#fff;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:grid;padding:16px;grid-template-columns:auto 75px}:host .hemfixarna_counter{display:flex;align-items:center}:host .hemfixarna_counter span{padding:0 8px}:host .hemfixarna_counter img{cursor:pointer}:host .hemfixarna_counter img:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_description{display:grid;gap:16px}:host .hemfixarna_description ul{list-style:disc;padding-right:12px;transform:translateX(12px)}:host .hemfixarna_description--hidden{max-height:140px;overflow:hidden;position:relative;cursor:pointer}:host .hemfixarna_description--hidden::after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:128px;background:linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #fffaf2)}:host .hemfixarna_terms{font-size:14px}:host .hemfixarna_terms a{color:inherit}:host .hemfixarna_logo{height:64px}:host .hemfixarna_box{padding:16px;display:flex;align-items:center;justify-content:space-between;background:#fffaf2;border:1px solid #fcd9c9;width:100%;box-sizing:border-box;border-radius:4px;gap:16px 8px}:host .hemfixarna_box>div{display:grid;gap:8px}:host .hemfixarna_btn,:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{border:none;border-radius:60px;font-weight:600;letter-spacing:0.5px;line-height:20px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn:not(.disabled):hover,:host .hemfixarna_buy:not(.disabled):hover,:host .hemfixarna input[type=submit]:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna div:has(>input[type=submit]){position:relative}:host .hemfixarna div:has(>input[type=submit]) input{cursor:initial}:host .hemfixarna div:has(>input[type=submit]) img{display:none}:host .hemfixarna .loading{cursor:default;opacity:0.6}:host .hemfixarna .loading>img{display:initial !important;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}:host .hemfixarna_btn{font-size:14px;background:#c84e18;color:#fff;padding:16px 24px;white-space:nowrap;position:relative}:host .hemfixarna_btn span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_btn span{background:#25a710;color:#fff;right:0 !important}:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{font-size:21px;background:#25a710;color:#fff;padding:16px 24px}:host .hemfixarna .disabled{opacity:0.5;cursor:default}:host .hemfixarna_modal{position:fixed;background:#fffaf2;border:1px solid #fcd9c9;border-radius:4px;top:50%;left:50%;z-index:1000;transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);transform:translate(-50%, -50%) scale(0.7);opacity:0;height:92%;width:92%;max-width:920px;display:flex;flex-direction:column;gap:8px}:host .hemfixarna_modal--open{opacity:1;transform:translate(-50%, -50%) scale(1)}:host .hemfixarna_backdrop{z-index:999;position:fixed;background:#474444;top:0;left:0;bottom:0;right:0;opacity:0;transition:transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host .hemfixarna_backdrop--open{opacity:0.3}:host .hemfixarna_order{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;background-repeat:no-repeat !important;background-size:cover !important;background-position:center !important;display:grid;grid-template-columns:1fr 1fr;padding:48px 32px 64px}@media (max-width: 768px){:host .hemfixarna_order{grid-template-columns:1fr;grid-template-rows:0 auto}}:host .hemfixarna_order>div:last-of-type{background:#fffaf2;padding:32px;display:flex;flex-direction:column;max-height:100%;overflow:auto}:host .hemfixarna_order img{cursor:pointer}:host .hemfixarna_order button{margin:16px 0;padding:0;text-decoration:underline;text-underline-offset:2px;font-size:14px;font-weight:600}:host .hemfixarna_cart{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_cart{grid-template-columns:1fr;gap:0}}:host .hemfixarna_cart--right h2,:host .hemfixarna_cart--left h2{display:flex;align-items:center}:host .hemfixarna_cart--right h2 img,:host .hemfixarna_cart--left h2 img{margin-top:3.2px}@media (min-width: 769px){:host .hemfixarna_cart--left h2 button{display:none}}@media (max-width: 768px){:host .hemfixarna_cart--right h2 button{display:none}}:host .hemfixarna_cart--startfee{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot div{display:flex;gap:16px;align-items:center}:host .hemfixarna_cart--additional{display:flex;flex-direction:column;gap:16px;padding:16px;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--additional p{font-size:14px}:host .hemfixarna_cart--additional strong{text-decoration:underline;text-underline-offset:2px;cursor:pointer;position:relative}:host .hemfixarna_cart--additional strong img{position:absolute;top:50%;transform:translateY(-50%);right:-24px}:host .hemfixarna_cart--price{border-top:1px solid #fcd9c9;padding:16px;display:flex;justify-content:space-between}:host .hemfixarna_cart--price h3{margin:0}:host .hemfixarna_cart--item{display:flex;flex-direction:column;gap:8px;padding:16px 0;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--item>div{display:flex;justify-content:space-between}:host .hemfixarna_cart--item>div>div{display:flex;align-items:center;gap:16px}:host .hemfixarna_cart--item>div button{color:#ec6632}:host .hemfixarna_categories{display:grid;gap:24px}:host .hemfixarna_categories--wrapper{gap:32px;display:grid;grid-template-columns:1fr 1fr}@media (max-width: 768px){:host .hemfixarna_categories--wrapper{grid-template-columns:1fr}}:host .hemfixarna_categories li{position:relative;background:#fff;border-radius:4px;min-height:132px;padding:24px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;align-items:center;gap:24px;cursor:pointer}:host .hemfixarna_categories li:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_categories li>button{height:100%;width:100%}:host .hemfixarna_categories li .price{font-weight:700}:host .hemfixarna_content{height:100%;overflow:auto;padding:0 32px 64px}:host .hemfixarna_content--5{padding-top:16px}:host .hemfixarna_crumbs{position:relative;padding:16px 24px;border-bottom:1px solid #fcd9c9;display:flex;justify-content:space-between}:host .hemfixarna_crumbs--back{padding:16px 24px 8px;display:flex;align-items:center;gap:8px;box-shadow:none !important}:host .hemfixarna_crumbs--back:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs img{cursor:pointer}:host .hemfixarna_crumbs .close{position:absolute;right:-16px;top:-16px;z-index:9}:host .hemfixarna_crumbs .cart{padding-left:16px;position:relative}:host .hemfixarna_crumbs .cart img{cursor:inherit}:host .hemfixarna_crumbs .cart span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_crumbs .cart_active{cursor:pointer}:host .hemfixarna_crumbs .cart_active span{background:#25a710;color:#fff}:host .hemfixarna_crumbs--links{display:flex;align-items:center;gap:16px;overflow:auto}@media (min-width: 769px){:host .hemfixarna_crumbs--links{-ms-overflow-style:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar{display:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar-button{display:none}}:host .hemfixarna_crumbs button{white-space:nowrap;background:#f1ded6;border-radius:64px;padding:12px 16px;font-size:12px;font-weight:600;letter-spacing:0.3px;box-shadow:none !important}:host .hemfixarna_crumbs button:not(.active):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs .active{background:#fffaf2;cursor:default}:host .hemfixarna_features{gap:12px !important}:host .hemfixarna_features li{display:flex;gap:16px;align-items:center}:host .hemfixarna_address{margin-bottom:16px}:host .hemfixarna_product{display:grid;gap:16px}:host .hemfixarna_product--link{font-weight:700;color:#474444;text-underline-offset:4px}:host .hemfixarna_product--left{gap:32px}:host .hemfixarna_product--right{gap:32px}:host .hemfixarna_product--price{margin-top:4px;font-weight:700}:host .hemfixarna_product--total{text-align:center;margin:-16px 0;font-size:21px;line-height:28px}:host .hemfixarna_product--item{background:#fff;padding:16px;display:grid;grid-template-columns:auto 75px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_product--grid{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_product--grid{grid-template-columns:1fr}}:host .hemfixarna_product--grid>div{display:flex;flex-direction:column}:host .hemfixarna_product--grid ul{display:flex;flex-direction:column;gap:4px}:host .hemfixarna_product p{margin:0}:host .hemfixarna_product--top{display:flex;gap:32px}:host .hemfixarna_product--top>div{width:100%}:host .hemfixarna_product--top>div h1{max-width:80%}@media (max-width: 768px){:host .hemfixarna_product--top>div h1{max-width:100%}}:host .hemfixarna_product--top h4{margin-bottom:8px}:host h5,:host p{margin:0}:host input[type=submit]{cursor:pointer}:host input[type=date]~label{left:56px}:host input[type=date]{border:1px solid #fcd9c9;padding-left:64px}:host input[type=checkbox]{height:18px;width:18px;border:1px solid #fcd9c9}:host input[type=checkbox]:checked{background:red}:host input[type=date]::-webkit-calendar-picker-indicator{background:transparent;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}:host button,:host a{cursor:pointer;background:none;border:none}:host ul{list-style:none;margin:0;padding:0}";
|
|
812
|
+
const hemfixarnaCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); *{box-sizing:border-box}:host{font-family:\"Inter\", sans-serif}:host .mb-2{margin-bottom:32px}:host button{color:#474444}:host form{display:flex;flex-direction:column;gap:16px}:host form img{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}:host form img:first-of-type{left:16px}:host form img:last-of-type{right:16px}:host form span{margin-top:-8px;color:#ec6632}:host form p{text-align:center}:host form p{margin:0}:host form div{position:relative}:host form div label{pointer-events:none;position:absolute;left:16px;top:50%;transform:translateY(-50%);background:#fff;padding:4px;transition:0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host form div input{padding:16px;width:100%;font-size:16px;border:1px solid #fcd9c9}:host form div input:focus~label,:host form div .input_active~label{top:0;transform:translateY(-50%);background:linear-gradient(180deg, #fffaf2 50%, #fff 50%)}:host h1{font-size:24px;font-weight:400;line-height:32px;letter-spacing:-3%;text-align:left;margin:0 0 8px}:host h2{margin:0 0 24px;font-weight:700;font-size:20px;line-height:28px;letter-spacing:-3%}:host p{font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna{width:100%;}:host .hemfixarna_nav{position:absolute;top:0;width:100dvw;left:0;height:80px;z-index:9999}:host .hemfixarna_nav--links{display:none !important}@media (min-width: 769px){:host .hemfixarna_nav--links{display:flex !important}}:host .hemfixarna_nav--links a{color:#ec6632;text-decoration:none;border:1px solid rgba(255, 255, 255, 0.3);border-radius:56px;padding:8px 32px;text-transform:capitalize}:host .hemfixarna_nav>div{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 16px}@media (min-width: 769px){:host .hemfixarna_nav>div{padding:0 32px}}:host .hemfixarna_nav>div>div{display:flex;gap:32px;justify-content:space-between}:host .hemfixarna_nav>div>img{position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1}:host .hemfixarna_nav p{color:#fff}:host .hemfixarna_standalone .hemfixarna_backdrop{background:#fffaf2;opacity:1}:host .hemfixarna_standalone .hemfixarna_modal{top:80px;transform:translateX(-50%);border:none;height:calc(100dvh - 80px);opacity:0}:host .hemfixarna_standalone .hemfixarna_modal--open{opacity:1}:host .hemfixarna .switch{position:relative;display:inline-block;width:40px;height:20px}:host .hemfixarna .switch input{opacity:0;width:0;height:0}:host .hemfixarna .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:0.4s;transition:0.4s;border-radius:34px}:host .hemfixarna .slider:before{position:absolute;content:\"\";height:18px;width:18px;left:2px;bottom:1px;background-color:white;-webkit-transition:0.4s;transition:0.4s;border-radius:50%}:host .hemfixarna input:checked+.slider{background-color:#fcd9c9}:host .hemfixarna input:focus+.slider{box-shadow:0 0 1px #fcd9c9}:host .hemfixarna input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translateX(18px);background:#ec6632}:host .hemfixarna_checkbox{display:grid;grid-template-columns:40px auto;font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna_checkbox>span{transform:translateY(6px)}:host .hemfixarna_checkbox span,:host .hemfixarna_checkbox span p{color:#474444;font-size:14px}:host .hemfixarna_checkbox p{text-align:left}:host .hemfixarna_info{display:flex;flex-direction:column;gap:24px;padding:32px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);border-radius:4px;border:1px solid #fcd9c9}:host .hemfixarna_info h2{margin:0}@media (min-width: 769px){:host .hemfixarna_info{position:sticky;top:0}}:host .hemfixarna_infomodal{position:absolute;top:40%;left:50%;transform:translate(-50%, -50%);width:100%;max-width:80%;background:#fffaf2;border:1px solid #fcd9c9;padding:32px;z-index:99;border-radius:4px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;flex-direction:column;gap:16px}:host .hemfixarna_infomodal p,:host .hemfixarna_infomodal h4{margin:0}:host .hemfixarna_infomodal button{background:#ec6632;color:#fff;border-radius:60px;font-size:16px;padding:8px 16px}:host .hemfixarna_addressinfo{padding:16px 16px 64px;border:1px solid #fcd9c9;position:relative;margin-bottom:32px;display:grid;grid-template-columns:1fr;gap:8px}@media (min-width: 769px){:host .hemfixarna_addressinfo{grid-template-columns:1fr 1fr}}:host .hemfixarna_addressinfo button{position:absolute;bottom:16px;right:16px;font-weight:500;text-underline-offset:2px;text-decoration:underline}:host .hemfixarna_part{background:#fff;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:grid;padding:16px;grid-template-columns:auto 75px}:host .hemfixarna_counter{display:flex;align-items:center}:host .hemfixarna_counter span{padding:0 8px}:host .hemfixarna_counter img{cursor:pointer}:host .hemfixarna_counter img:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_description{display:grid;gap:16px}:host .hemfixarna_description ul{list-style:disc;padding-right:12px;transform:translateX(12px)}:host .hemfixarna_description--hidden{max-height:140px;overflow:hidden;position:relative;cursor:pointer}:host .hemfixarna_description--hidden::after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:128px;background:linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #fffaf2)}:host .hemfixarna_terms{font-size:14px}:host .hemfixarna_terms a{color:inherit}:host .hemfixarna_logo{height:64px}:host .hemfixarna_box{padding:16px;display:flex;align-items:center;width:100%;box-sizing:border-box;border-radius:4px;gap:16px 8px;border-radius:4px;gap:16px 8px}:host .hemfixarna_box p,:host .hemfixarna_box span{font-size:15px}:host .hemfixarna_box .underline{text-decoration:underline;text-underline-offset:2px}:host .hemfixarna_box .pointer{cursor:pointer}:host .hemfixarna_box .p-s{font-size:12px}:host .hemfixarna_box>div{display:grid;gap:8px}:host .hemfixarna_box--standard{background:#fffaf2;border:1px solid #fcd9c9}:host .hemfixarna_box--alternative,:host .hemfixarna_box--alternative_2,:host .hemfixarna_box--alternative_3{background:transparent;border:1px solid #e3e3e3}:host .hemfixarna_box--alternative_2,:host .hemfixarna_box--alternative_3{box-shadow:0px 2px 16px 0px rgba(0, 0, 0, 0.0784313725)}:host .hemfixarna_box--alternative_3{justify-content:center}:host .hemfixarna_altbtn{display:flex !important;flex-direction:column;gap:8px;align-items:center;margin-left:auto}:host .hemfixarna_btn{margin-left:auto}:host .hemfixarna_btn,:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{border:none;border-radius:60px;font-weight:600;letter-spacing:0.5px;line-height:20px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn:not(.disabled):hover,:host .hemfixarna_buy:not(.disabled):hover,:host .hemfixarna input[type=submit]:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna div:has(>input[type=submit]){position:relative}:host .hemfixarna div:has(>input[type=submit]) input{cursor:initial}:host .hemfixarna div:has(>input[type=submit]) img{display:none}:host .hemfixarna .loading{cursor:default;opacity:0.6}:host .hemfixarna .loading>img{display:initial !important;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}:host .hemfixarna_btn{font-size:14px;background:#c84e18;color:#fff;padding:16px 24px;white-space:nowrap;position:relative}:host .hemfixarna_btn span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_btn span{background:#25a710;color:#fff;right:0 !important}:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{font-size:21px;background:#25a710;color:#fff;padding:16px 24px}:host .hemfixarna .disabled{opacity:0.5;cursor:default}:host .hemfixarna_modal{position:fixed;background:#fffaf2;border:1px solid #fcd9c9;border-radius:4px;top:50%;left:50%;z-index:1000;transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);transform:translate(-50%, -50%) scale(0.7);opacity:0;height:92%;width:92%;max-width:920px;display:flex;flex-direction:column;gap:8px}:host .hemfixarna_modal--open{opacity:1;transform:translate(-50%, -50%) scale(1)}:host .hemfixarna_backdrop{z-index:999;position:fixed;background:#474444;top:0;left:0;bottom:0;right:0;opacity:0;transition:transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host .hemfixarna_backdrop--open{opacity:0.3}:host .hemfixarna_order{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;background-repeat:no-repeat !important;background-size:cover !important;background-position:center !important;display:grid;grid-template-columns:1fr 1fr;padding:48px 32px 64px}@media (max-width: 768px){:host .hemfixarna_order{grid-template-columns:1fr;grid-template-rows:0 auto}}:host .hemfixarna_order>div:last-of-type{background:#fffaf2;padding:32px;display:flex;flex-direction:column;max-height:100%;overflow:auto}:host .hemfixarna_order img{cursor:pointer}:host .hemfixarna_order button{margin:16px 0;padding:0;text-decoration:underline;text-underline-offset:2px;font-size:14px;font-weight:600}:host .hemfixarna_cart{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_cart{grid-template-columns:1fr;gap:0}}:host .hemfixarna_cart--right h2,:host .hemfixarna_cart--left h2{display:flex;align-items:center}:host .hemfixarna_cart--right h2 img,:host .hemfixarna_cart--left h2 img{margin-top:3.2px}@media (min-width: 769px){:host .hemfixarna_cart--left h2 button{display:none}}@media (max-width: 768px){:host .hemfixarna_cart--right h2 button{display:none}}:host .hemfixarna_cart--startfee{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot div{display:flex;gap:16px;align-items:center}:host .hemfixarna_cart--additional{display:flex;flex-direction:column;gap:16px;padding:16px;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--additional p{font-size:14px}:host .hemfixarna_cart--additional strong{text-decoration:underline;text-underline-offset:2px;cursor:pointer;position:relative}:host .hemfixarna_cart--additional strong img{position:absolute;top:50%;transform:translateY(-50%);right:-24px}:host .hemfixarna_cart--price{border-top:1px solid #fcd9c9;padding:16px;display:flex;justify-content:space-between}:host .hemfixarna_cart--price h3{margin:0}:host .hemfixarna_cart--item{display:flex;flex-direction:column;gap:8px;padding:16px 0;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--item>div{display:flex;justify-content:space-between}:host .hemfixarna_cart--item>div>div{display:flex;align-items:center;gap:16px}:host .hemfixarna_cart--item>div button{color:#ec6632}:host .hemfixarna_categories{display:grid;gap:24px}:host .hemfixarna_categories--wrapper{gap:32px;display:grid;grid-template-columns:1fr 1fr}@media (max-width: 768px){:host .hemfixarna_categories--wrapper{grid-template-columns:1fr}}:host .hemfixarna_categories li{position:relative;background:#fff;border-radius:4px;min-height:132px;padding:24px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;align-items:center;gap:24px;cursor:pointer}:host .hemfixarna_categories li:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_categories li>button{height:100%;width:100%}:host .hemfixarna_categories li .price{font-weight:700}:host .hemfixarna_content{height:100%;overflow:auto;padding:0 32px 64px}:host .hemfixarna_content--5{padding-top:16px}:host .hemfixarna_crumbs{position:relative;padding:16px 24px;border-bottom:1px solid #fcd9c9;display:flex;justify-content:space-between}:host .hemfixarna_crumbs--back{padding:16px 24px 8px;display:flex;align-items:center;gap:8px;box-shadow:none !important}:host .hemfixarna_crumbs--back:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs img{cursor:pointer}:host .hemfixarna_crumbs .close{position:absolute;right:-16px;top:-16px;z-index:9}:host .hemfixarna_crumbs .cart{padding-left:16px;position:relative}:host .hemfixarna_crumbs .cart img{cursor:inherit}:host .hemfixarna_crumbs .cart span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_crumbs .cart_active{cursor:pointer}:host .hemfixarna_crumbs .cart_active span{background:#25a710;color:#fff}:host .hemfixarna_crumbs--links{display:flex;align-items:center;gap:16px;overflow:auto}@media (min-width: 769px){:host .hemfixarna_crumbs--links{-ms-overflow-style:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar{display:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar-button{display:none}}:host .hemfixarna_crumbs button{white-space:nowrap;background:#f1ded6;border-radius:64px;padding:12px 16px;font-size:12px;font-weight:600;letter-spacing:0.3px;box-shadow:none !important}:host .hemfixarna_crumbs button:not(.active):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs .active{background:#fffaf2;cursor:default}:host .hemfixarna_features{gap:12px !important}:host .hemfixarna_features li{display:flex;gap:16px;align-items:center}:host .hemfixarna_address{margin-bottom:16px}:host .hemfixarna_product{display:grid;gap:16px}:host .hemfixarna_product--link{font-weight:700;color:#474444;text-underline-offset:4px}:host .hemfixarna_product--left{gap:32px}:host .hemfixarna_product--right{gap:32px}:host .hemfixarna_product--price{margin-top:4px;font-weight:700}:host .hemfixarna_product--total{text-align:center;margin:-16px 0;font-size:21px;line-height:28px}:host .hemfixarna_product--item{background:#fff;padding:16px;display:grid;grid-template-columns:auto 75px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_product--grid{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_product--grid{grid-template-columns:1fr}}:host .hemfixarna_product--grid>div{display:flex;flex-direction:column}:host .hemfixarna_product--grid ul{display:flex;flex-direction:column;gap:4px}:host .hemfixarna_product p{margin:0}:host .hemfixarna_product--top{display:flex;gap:32px}:host .hemfixarna_product--top>div{width:100%}:host .hemfixarna_product--top>div h1{max-width:80%}@media (max-width: 768px){:host .hemfixarna_product--top>div h1{max-width:100%}}:host .hemfixarna_product--top h4{margin-bottom:8px}:host h5,:host p{margin:0}:host input[type=submit]{cursor:pointer}:host input[type=date]~label{left:56px}:host input[type=date]{border:1px solid #fcd9c9;padding-left:64px}:host input[type=checkbox]{height:18px;width:18px;border:1px solid #fcd9c9}:host input[type=checkbox]:checked{background:red}:host input[type=date]::-webkit-calendar-picker-indicator{background:transparent;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}:host button,:host a{cursor:pointer;background:none;border:none}:host ul{list-style:none;margin:0;padding:0}";
|
|
803
813
|
|
|
804
814
|
const HemfixarnaComponent = class {
|
|
805
815
|
constructor(hostRef) {
|
|
@@ -825,7 +835,10 @@ const HemfixarnaComponent = class {
|
|
|
825
835
|
this.forceOldTree = false;
|
|
826
836
|
this.loadFromQuery = false;
|
|
827
837
|
this.isDemo = false;
|
|
838
|
+
this.widgetStyle = undefined;
|
|
828
839
|
this.nav = undefined;
|
|
840
|
+
this.buttonColor = undefined;
|
|
841
|
+
this.buttonBg = undefined;
|
|
829
842
|
}
|
|
830
843
|
loadCategoryOrProduct(id) {
|
|
831
844
|
this.proppedProduct = null;
|
|
@@ -1001,11 +1014,15 @@ const HemfixarnaComponent = class {
|
|
|
1001
1014
|
return state.cart.reduce((acc, curr) => acc + curr.amount, 0);
|
|
1002
1015
|
}
|
|
1003
1016
|
render() {
|
|
1004
|
-
var _a, _b, _c, _d, _e;
|
|
1017
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1005
1018
|
const logo = index.getAssetPath(`./assets/hemfixarna.svg`);
|
|
1019
|
+
const monteringLogo = index.getAssetPath(`./assets/montering.svg`);
|
|
1006
1020
|
const navBackground = ((_a = this.nav) === null || _a === void 0 ? void 0 : _a.background) ? index.getAssetPath(this.nav.background) : '';
|
|
1007
1021
|
const navLogo = ((_b = this.nav) === null || _b === void 0 ? void 0 : _b.logo) ? index.getAssetPath(this.nav.logo) : '';
|
|
1008
|
-
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:
|
|
1022
|
+
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: {
|
|
1023
|
+
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}`,
|
|
1024
|
+
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
|
+
} }, "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))));
|
|
1009
1026
|
}
|
|
1010
1027
|
static get assetsDirs() { return ["assets"]; }
|
|
1011
1028
|
get el() { return index.getElement(this); }
|
|
@@ -1016,17 +1033,51 @@ const HemfixarnaComponent = class {
|
|
|
1016
1033
|
};
|
|
1017
1034
|
HemfixarnaComponent.style = hemfixarnaCss;
|
|
1018
1035
|
|
|
1019
|
-
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_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}";
|
|
1036
|
+
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}";
|
|
1020
1037
|
|
|
1021
1038
|
const MyComponent$4 = class {
|
|
1022
1039
|
constructor(hostRef) {
|
|
1023
1040
|
index.registerInstance(this, hostRef);
|
|
1041
|
+
this.debounce = null;
|
|
1024
1042
|
this.cdnLink = '<script type="module" src="https://cdn.jsdelivr.net/npm//hemfixarna-web-components@latest/dist/hemfixarna-components/hemfixarna-components.esm.js"></script>';
|
|
1025
1043
|
this.selectedSlug = undefined;
|
|
1026
1044
|
this.selectedID = undefined;
|
|
1027
1045
|
this.tooltipText = 'Kopiera till urklipp';
|
|
1028
1046
|
this.tree = null;
|
|
1029
1047
|
this.customer = null;
|
|
1048
|
+
this.widgetStyle = WidgetStyle.standard;
|
|
1049
|
+
this.buttonBg = '';
|
|
1050
|
+
this.buttonColor = '';
|
|
1051
|
+
this.colorAccessibility = undefined;
|
|
1052
|
+
}
|
|
1053
|
+
debouncedFunction() {
|
|
1054
|
+
if (this.debounce !== null) {
|
|
1055
|
+
clearTimeout(this.debounce);
|
|
1056
|
+
this.debounce = null;
|
|
1057
|
+
}
|
|
1058
|
+
this.debounce = window.setTimeout(() => {
|
|
1059
|
+
this.checkColorAccessibility();
|
|
1060
|
+
this.debounce = null;
|
|
1061
|
+
}, 1500);
|
|
1062
|
+
}
|
|
1063
|
+
async checkColorAccessibility() {
|
|
1064
|
+
const defaultTextColor = '#fff';
|
|
1065
|
+
const defaultBgColor = '#c84e18';
|
|
1066
|
+
const firstColor = this.buttonBg.length ? (this.buttonBg.startsWith('#') ? this.buttonBg : `#${this.buttonBg}`) : defaultBgColor;
|
|
1067
|
+
const secondColor = this.buttonColor.length ? (this.buttonColor.startsWith('#') ? this.buttonColor : `#${this.buttonColor}`) : defaultTextColor;
|
|
1068
|
+
fetch('https://www.aremycolorsaccessible.com/api/are-they', {
|
|
1069
|
+
mode: 'cors',
|
|
1070
|
+
method: 'POST',
|
|
1071
|
+
body: JSON.stringify({ colors: [firstColor, secondColor] }),
|
|
1072
|
+
})
|
|
1073
|
+
.then(response => response.json())
|
|
1074
|
+
.then(json => {
|
|
1075
|
+
console.log(json);
|
|
1076
|
+
if (json && (json)) {
|
|
1077
|
+
this.colorAccessibility = json;
|
|
1078
|
+
}
|
|
1079
|
+
});
|
|
1080
|
+
// Your color accessibility logic here
|
|
1030
1081
|
}
|
|
1031
1082
|
getTopLevelCategory() {
|
|
1032
1083
|
switch ("byggmax") {
|
|
@@ -1036,6 +1087,20 @@ const MyComponent$4 = class {
|
|
|
1036
1087
|
return '';
|
|
1037
1088
|
}
|
|
1038
1089
|
}
|
|
1090
|
+
getColor(rating) {
|
|
1091
|
+
switch (rating) {
|
|
1092
|
+
case 'AAA':
|
|
1093
|
+
return 'green';
|
|
1094
|
+
case 'AA':
|
|
1095
|
+
return 'orange';
|
|
1096
|
+
case 'A':
|
|
1097
|
+
return 'yellow';
|
|
1098
|
+
case 'Fail':
|
|
1099
|
+
return 'red';
|
|
1100
|
+
default:
|
|
1101
|
+
return 'black';
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1039
1104
|
async componentWillLoad() {
|
|
1040
1105
|
if (process.env.FORCE_OLD_TREE) {
|
|
1041
1106
|
const tree = await getTaxonomy(this.getTopLevelCategory());
|
|
@@ -1052,7 +1117,7 @@ const MyComponent$4 = class {
|
|
|
1052
1117
|
}
|
|
1053
1118
|
}
|
|
1054
1119
|
getExample() {
|
|
1055
|
-
return `<hemfixarna-${"byggmax"}${this.selectedSlug ? ` slug="${this.selectedSlug}" ` : ''}${this.selectedID ? ` id="${this.selectedID}" ` : ''}></hemfixarna-${"byggmax"}>`;
|
|
1120
|
+
return `<hemfixarna-${"byggmax"}${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-${"byggmax"}>`;
|
|
1056
1121
|
}
|
|
1057
1122
|
copyExample() {
|
|
1058
1123
|
navigator.clipboard.writeText(this.getExample());
|
|
@@ -1077,9 +1142,13 @@ const MyComponent$4 = class {
|
|
|
1077
1142
|
}
|
|
1078
1143
|
render() {
|
|
1079
1144
|
const copy = index.getAssetPath(`./assets/copy.png`);
|
|
1080
|
-
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)), "byggmax" === Business.byggmax && (index.h("hemfixarna-byggmax", { forceOldTree: Boolean(process.env.FORCE_OLD_TREE), slug: this.selectedSlug, id: this.selectedID })), "byggmax" === Business.skanska && index.h("hemfixarna-skanska", { id: this.selectedID }), "byggmax" === Business.string && index.h("hemfixarna-string-furniture", { id: this.selectedID }), "byggmax" === Business.hornbach && index.h("hemfixarna-hornbach", { isDemo: true, id: this.selectedID }), "byggmax" === Business.kund && index.h("hemfixarna-kund", { 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("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 &&
|
|
1145
|
+
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)), "byggmax" === 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 })), "byggmax" === Business.skanska && (index.h("hemfixarna-skanska", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "byggmax" === Business.string && (index.h("hemfixarna-string-furniture", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "byggmax" === Business.hornbach && (index.h("hemfixarna-hornbach", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, isDemo: true, id: this.selectedID })), "byggmax" === 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 &&
|
|
1081
1146
|
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)));
|
|
1082
1147
|
}
|
|
1148
|
+
static get watchers() { return {
|
|
1149
|
+
"buttonBg": ["debouncedFunction"],
|
|
1150
|
+
"buttonColor": ["debouncedFunction"]
|
|
1151
|
+
}; }
|
|
1083
1152
|
};
|
|
1084
1153
|
MyComponent$4.style = hemfixarnaDemoCss;
|
|
1085
1154
|
|
|
@@ -1816,9 +1885,12 @@ const MyComponent$3 = class {
|
|
|
1816
1885
|
this.id = undefined;
|
|
1817
1886
|
this.loadFromQuery = true;
|
|
1818
1887
|
this.isDemo = false;
|
|
1888
|
+
this.widgetStyle = WidgetStyle.standard;
|
|
1889
|
+
this.buttonColor = undefined;
|
|
1890
|
+
this.buttonBg = undefined;
|
|
1819
1891
|
}
|
|
1820
1892
|
render() {
|
|
1821
|
-
return (index.h("hemfixarna-component", { nav: { url: 'https://www.hornbach.se/', logo: 'assets/hornbach/logo.svg', background: './assets/hornbach/nav.jpg' }, isDemo: this.isDemo, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.hornbach }));
|
|
1893
|
+
return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, nav: { url: 'https://www.hornbach.se/', logo: 'assets/hornbach/logo.svg', background: './assets/hornbach/nav.jpg' }, isDemo: this.isDemo, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.hornbach }));
|
|
1822
1894
|
}
|
|
1823
1895
|
};
|
|
1824
1896
|
MyComponent$3.style = hemfixarnaHornbachCss;
|
|
@@ -1847,9 +1919,12 @@ const MyComponent$2 = class {
|
|
|
1847
1919
|
index.registerInstance(this, hostRef);
|
|
1848
1920
|
this.id = undefined;
|
|
1849
1921
|
this.loadFromQuery = false;
|
|
1922
|
+
this.widgetStyle = WidgetStyle.standard;
|
|
1923
|
+
this.buttonColor = undefined;
|
|
1924
|
+
this.buttonBg = undefined;
|
|
1850
1925
|
}
|
|
1851
1926
|
render() {
|
|
1852
|
-
return index.h("hemfixarna-component", { loadFromQuery: this.loadFromQuery, id: this.id, business: Business.kund });
|
|
1927
|
+
return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.kund }));
|
|
1853
1928
|
}
|
|
1854
1929
|
};
|
|
1855
1930
|
|
|
@@ -2070,9 +2145,12 @@ const MyComponent$1 = class {
|
|
|
2070
2145
|
this.id = undefined;
|
|
2071
2146
|
this.customer = undefined;
|
|
2072
2147
|
this.loadFromQuery = false;
|
|
2148
|
+
this.widgetStyle = WidgetStyle.standard;
|
|
2149
|
+
this.buttonColor = undefined;
|
|
2150
|
+
this.buttonBg = undefined;
|
|
2073
2151
|
}
|
|
2074
2152
|
render() {
|
|
2075
|
-
return index.h("hemfixarna-component", { loadFromQuery: this.loadFromQuery, id: this.id, business: Business.skanska });
|
|
2153
|
+
return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.skanska }));
|
|
2076
2154
|
}
|
|
2077
2155
|
};
|
|
2078
2156
|
MyComponent$1.style = hemfixarnaSkanskaCss;
|
|
@@ -2109,9 +2187,12 @@ const MyComponent = class {
|
|
|
2109
2187
|
index.registerInstance(this, hostRef);
|
|
2110
2188
|
this.id = undefined;
|
|
2111
2189
|
this.loadFromQuery = false;
|
|
2190
|
+
this.widgetStyle = WidgetStyle.standard;
|
|
2191
|
+
this.buttonColor = undefined;
|
|
2192
|
+
this.buttonBg = undefined;
|
|
2112
2193
|
}
|
|
2113
2194
|
render() {
|
|
2114
|
-
return index.h("hemfixarna-component", { loadFromQuery: this.loadFromQuery, id: this.id, business: Business.string });
|
|
2195
|
+
return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.string }));
|
|
2115
2196
|
}
|
|
2116
2197
|
};
|
|
2117
2198
|
MyComponent.style = hemfixarnaStringCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"hemfixarna-address.hemfixarna-box.hemfixarna-breadcrumbs.hemfixarna-byggmax.hemfixarna-cart.hemfixarna-category.hemfixarna-checkout.hemfixarna-component.hemfixarna-demo.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-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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -20,7 +20,7 @@ const patchBrowser = () => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
patchBrowser().then(options => {
|
|
23
|
-
return index.bootstrapLazy([["hemfixarna-address_20.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"load-from-query"],"customer":[1],"tree":[32]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[4,"load-from-query"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[4,"load-from-query"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[4,"load-from-query"]}],[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"],"nav":[16],"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_20.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-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);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -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_20.cjs",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"load-from-query"],"customer":[1],"tree":[32]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[4,"load-from-query"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[4,"load-from-query"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[4,"load-from-query"]}],[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"],"nav":[16],"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_20.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-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);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_6_393)">
|
|
3
|
+
<mask id="path-1-inside-1_6_393" fill="white">
|
|
4
|
+
<path d="M0.453333 7.65334C0.04842 6.66523 -0.0407982 5.57603 0.197926 4.53519C0.436649 3.49436 0.991613 2.5529 1.78667 1.84001C2.55887 1.12306 3.46511 0.565723 4.45333 0.200011C4.70978 0.106215 4.98029 0.0566224 5.25333 0.0533447H18.6667C18.7886 0.0533319 18.9093 0.0775629 19.0218 0.124629C19.1343 0.171695 19.2364 0.240656 19.322 0.327503C19.4076 0.41435 19.4751 0.51735 19.5205 0.630513C19.5659 0.743676 19.5884 0.864745 19.5867 0.986678V1.25334C19.8656 1.10565 20.1778 1.03219 20.4933 1.04001H21.0933C21.4915 1.04193 21.8782 1.17293 22.1956 1.41334C22.5129 1.65375 22.7437 1.99061 22.8533 2.37334H26.3867C26.5677 2.37488 26.7442 2.43061 26.8933 2.53334L28.52 3.64001C28.657 3.74126 28.7673 3.87422 28.8417 4.02749C28.916 4.18076 28.952 4.34976 28.9467 4.52001V5.20001H31.4533C31.5213 5.1926 31.5902 5.19942 31.6554 5.22003C31.7206 5.24064 31.7809 5.27459 31.8323 5.31973C31.8837 5.36487 31.9251 5.42021 31.954 5.48224C31.9829 5.54426 31.9986 5.61161 32 5.68001C32 5.81211 31.9485 5.939 31.8563 6.03365C31.7642 6.12829 31.6387 6.1832 31.5067 6.18668H28.9467V6.88001C28.9517 7.04086 28.9151 7.20028 28.8403 7.34279C28.7655 7.4853 28.6552 7.60606 28.52 7.69334L26.6667 8.84001C26.5273 8.92869 26.3652 8.97501 26.2 8.97334H22.9467V9.10668C22.9467 9.34944 22.8986 9.5898 22.8053 9.81391C22.712 10.038 22.5753 10.2415 22.403 10.4125C22.2308 10.5835 22.0263 10.7188 21.8016 10.8105C21.5768 10.9021 21.3361 10.9484 21.0933 10.9467H20.4933C20.1958 10.9456 19.903 10.8724 19.64 10.7333C19.6418 10.8483 19.6207 10.9624 19.5779 11.0691C19.5351 11.1758 19.4716 11.2729 19.3909 11.3548C19.3103 11.4367 19.2141 11.5017 19.1081 11.5461C19.0021 11.5905 18.8883 11.6134 18.7733 11.6133H13.64L12.08 22.4667H13.6267C14.6875 22.4667 15.7049 22.8881 16.4551 23.6382C17.2052 24.3884 17.6267 25.4058 17.6267 26.4667V28C17.6267 29.0609 17.2052 30.0783 16.4551 30.8284C15.7049 31.5786 14.6875 32 13.6267 32H4.8C3.73913 32 2.72172 31.5786 1.97157 30.8284C1.22143 30.0783 0.799999 29.0609 0.799999 28V26.44C0.795937 25.4387 1.16759 24.4722 1.84155 23.7316C2.51549 22.991 3.44271 22.5301 4.44 22.44L6.04 11.5067C5.57333 11.4 5.14667 11.28 4.70667 11.1467C3.78662 10.9081 2.92955 10.472 2.19505 9.86871C1.46054 9.26545 0.866199 8.50948 0.453333 7.65334ZM26.0933 8.00001L28 6.88001V4.45334L26.44 3.36001H22.9467V8.00001H26.0933ZM20.4933 9.96001H21.0933C21.3174 9.96004 21.5324 9.87197 21.6921 9.71481C21.8517 9.55765 21.9432 9.34401 21.9467 9.12001V2.89334C21.9467 2.66703 21.8568 2.44998 21.6967 2.28995C21.5367 2.12992 21.3197 2.04001 21.0933 2.04001H20.4933C20.3813 2.04001 20.2703 2.06208 20.1668 2.10497C20.0632 2.14785 19.9692 2.21071 19.8899 2.28995C19.8107 2.36919 19.7478 2.46326 19.705 2.56679C19.6621 2.67032 19.64 2.78128 19.64 2.89334V9.10668C19.6435 9.33068 19.7349 9.54432 19.8946 9.70147C20.0543 9.85863 20.2693 9.9467 20.4933 9.94668V9.96001ZM1.82667 26.4533V28C1.82667 28.7886 2.13993 29.5449 2.69753 30.1025C3.25514 30.6601 4.01142 30.9733 4.8 30.9733H13.6267C14.4152 30.9733 15.1715 30.6601 15.7291 30.1025C16.2867 29.5449 16.6 28.7886 16.6 28V26.44C16.6 25.6514 16.2867 24.8952 15.7291 24.3375C15.1715 23.7799 14.4152 23.4667 13.6267 23.4667H4.8C4.01142 23.4667 3.25514 23.7799 2.69753 24.3375C2.13993 24.8952 1.82667 25.6514 1.82667 26.44V26.4533ZM6.52 10.5867C6.69484 10.6223 6.84922 10.7239 6.95104 10.8704C7.05286 11.0169 7.09427 11.1971 7.06667 11.3733L5.48 22.4667H11.08L12.7067 11.04C12.7361 10.932 12.8005 10.8368 12.8897 10.7693C12.979 10.7018 13.0881 10.6657 13.2 10.6667H18.6667V9.33334C18.6667 9.33334 18.6667 9.33334 18.6667 9.22668V2.89334C18.6463 2.74292 18.6463 2.59044 18.6667 2.44001V1.10668H5.24C5.08539 1.10686 4.932 1.13393 4.78667 1.18668C3.91411 1.50096 3.11539 1.99108 2.44 2.62668C1.79481 3.19404 1.34179 3.9478 1.14354 4.78378C0.945293 5.61977 1.01161 6.49669 1.33333 7.29334C1.7107 8.00584 2.23311 8.6314 2.86692 9.12973C3.50074 9.62805 4.23191 9.9881 5.01333 10.1867C5.50705 10.3502 6.01018 10.4838 6.52 10.5867Z"/>
|
|
5
|
+
</mask>
|
|
6
|
+
<path d="M0.453333 7.65334C0.04842 6.66523 -0.0407982 5.57603 0.197926 4.53519C0.436649 3.49436 0.991613 2.5529 1.78667 1.84001C2.55887 1.12306 3.46511 0.565723 4.45333 0.200011C4.70978 0.106215 4.98029 0.0566224 5.25333 0.0533447H18.6667C18.7886 0.0533319 18.9093 0.0775629 19.0218 0.124629C19.1343 0.171695 19.2364 0.240656 19.322 0.327503C19.4076 0.41435 19.4751 0.51735 19.5205 0.630513C19.5659 0.743676 19.5884 0.864745 19.5867 0.986678V1.25334C19.8656 1.10565 20.1778 1.03219 20.4933 1.04001H21.0933C21.4915 1.04193 21.8782 1.17293 22.1956 1.41334C22.5129 1.65375 22.7437 1.99061 22.8533 2.37334H26.3867C26.5677 2.37488 26.7442 2.43061 26.8933 2.53334L28.52 3.64001C28.657 3.74126 28.7673 3.87422 28.8417 4.02749C28.916 4.18076 28.952 4.34976 28.9467 4.52001V5.20001H31.4533C31.5213 5.1926 31.5902 5.19942 31.6554 5.22003C31.7206 5.24064 31.7809 5.27459 31.8323 5.31973C31.8837 5.36487 31.9251 5.42021 31.954 5.48224C31.9829 5.54426 31.9986 5.61161 32 5.68001C32 5.81211 31.9485 5.939 31.8563 6.03365C31.7642 6.12829 31.6387 6.1832 31.5067 6.18668H28.9467V6.88001C28.9517 7.04086 28.9151 7.20028 28.8403 7.34279C28.7655 7.4853 28.6552 7.60606 28.52 7.69334L26.6667 8.84001C26.5273 8.92869 26.3652 8.97501 26.2 8.97334H22.9467V9.10668C22.9467 9.34944 22.8986 9.5898 22.8053 9.81391C22.712 10.038 22.5753 10.2415 22.403 10.4125C22.2308 10.5835 22.0263 10.7188 21.8016 10.8105C21.5768 10.9021 21.3361 10.9484 21.0933 10.9467H20.4933C20.1958 10.9456 19.903 10.8724 19.64 10.7333C19.6418 10.8483 19.6207 10.9624 19.5779 11.0691C19.5351 11.1758 19.4716 11.2729 19.3909 11.3548C19.3103 11.4367 19.2141 11.5017 19.1081 11.5461C19.0021 11.5905 18.8883 11.6134 18.7733 11.6133H13.64L12.08 22.4667H13.6267C14.6875 22.4667 15.7049 22.8881 16.4551 23.6382C17.2052 24.3884 17.6267 25.4058 17.6267 26.4667V28C17.6267 29.0609 17.2052 30.0783 16.4551 30.8284C15.7049 31.5786 14.6875 32 13.6267 32H4.8C3.73913 32 2.72172 31.5786 1.97157 30.8284C1.22143 30.0783 0.799999 29.0609 0.799999 28V26.44C0.795937 25.4387 1.16759 24.4722 1.84155 23.7316C2.51549 22.991 3.44271 22.5301 4.44 22.44L6.04 11.5067C5.57333 11.4 5.14667 11.28 4.70667 11.1467C3.78662 10.9081 2.92955 10.472 2.19505 9.86871C1.46054 9.26545 0.866199 8.50948 0.453333 7.65334ZM26.0933 8.00001L28 6.88001V4.45334L26.44 3.36001H22.9467V8.00001H26.0933ZM20.4933 9.96001H21.0933C21.3174 9.96004 21.5324 9.87197 21.6921 9.71481C21.8517 9.55765 21.9432 9.34401 21.9467 9.12001V2.89334C21.9467 2.66703 21.8568 2.44998 21.6967 2.28995C21.5367 2.12992 21.3197 2.04001 21.0933 2.04001H20.4933C20.3813 2.04001 20.2703 2.06208 20.1668 2.10497C20.0632 2.14785 19.9692 2.21071 19.8899 2.28995C19.8107 2.36919 19.7478 2.46326 19.705 2.56679C19.6621 2.67032 19.64 2.78128 19.64 2.89334V9.10668C19.6435 9.33068 19.7349 9.54432 19.8946 9.70147C20.0543 9.85863 20.2693 9.9467 20.4933 9.94668V9.96001ZM1.82667 26.4533V28C1.82667 28.7886 2.13993 29.5449 2.69753 30.1025C3.25514 30.6601 4.01142 30.9733 4.8 30.9733H13.6267C14.4152 30.9733 15.1715 30.6601 15.7291 30.1025C16.2867 29.5449 16.6 28.7886 16.6 28V26.44C16.6 25.6514 16.2867 24.8952 15.7291 24.3375C15.1715 23.7799 14.4152 23.4667 13.6267 23.4667H4.8C4.01142 23.4667 3.25514 23.7799 2.69753 24.3375C2.13993 24.8952 1.82667 25.6514 1.82667 26.44V26.4533ZM6.52 10.5867C6.69484 10.6223 6.84922 10.7239 6.95104 10.8704C7.05286 11.0169 7.09427 11.1971 7.06667 11.3733L5.48 22.4667H11.08L12.7067 11.04C12.7361 10.932 12.8005 10.8368 12.8897 10.7693C12.979 10.7018 13.0881 10.6657 13.2 10.6667H18.6667V9.33334C18.6667 9.33334 18.6667 9.33334 18.6667 9.22668V2.89334C18.6463 2.74292 18.6463 2.59044 18.6667 2.44001V1.10668H5.24C5.08539 1.10686 4.932 1.13393 4.78667 1.18668C3.91411 1.50096 3.11539 1.99108 2.44 2.62668C1.79481 3.19404 1.34179 3.9478 1.14354 4.78378C0.945293 5.61977 1.01161 6.49669 1.33333 7.29334C1.7107 8.00584 2.23311 8.6314 2.86692 9.12973C3.50074 9.62805 4.23191 9.9881 5.01333 10.1867C5.50705 10.3502 6.01018 10.4838 6.52 10.5867Z" fill="#313234" stroke="black" stroke-width="6" mask="url(#path-1-inside-1_6_393)"/>
|
|
7
|
+
<path d="M5.5467 4.71997H10.6667C10.7975 4.71997 10.923 4.66799 11.0155 4.57548C11.1081 4.48296 11.16 4.35748 11.16 4.22664C11.1601 4.09454 11.1085 3.96765 11.0164 3.873C10.9242 3.77836 10.7988 3.72345 10.6667 3.71997H5.48003C5.34798 3.72345 5.22251 3.77836 5.13035 3.873C5.0382 3.96765 4.98665 4.09454 4.9867 4.22664C4.98605 4.29743 5.00065 4.36754 5.0295 4.4322C5.05835 4.49685 5.10078 4.55454 5.1539 4.60134C5.20703 4.64814 5.26961 4.68296 5.33739 4.70343C5.40516 4.7239 5.47655 4.72954 5.5467 4.71997Z" fill="#BDBDBD"/>
|
|
8
|
+
<path d="M5.54666 7.03999H10.6667C10.7392 7.05187 10.8134 7.04784 10.8842 7.02818C10.955 7.00852 11.0206 6.9737 11.0766 6.92614C11.1326 6.87857 11.1776 6.8194 11.2084 6.75272C11.2393 6.68605 11.2552 6.61346 11.2552 6.53999C11.2552 6.46652 11.2393 6.39394 11.2084 6.32726C11.1776 6.26058 11.1326 6.20141 11.0766 6.15385C11.0206 6.10628 10.955 6.07146 10.8842 6.0518C10.8134 6.03214 10.7392 6.02811 10.6667 6.03999H5.49333C5.42083 6.02811 5.34661 6.03214 5.27582 6.0518C5.20504 6.07146 5.13937 6.10628 5.08338 6.15385C5.02739 6.20141 4.98241 6.26058 4.95156 6.32726C4.92072 6.39394 4.90474 6.46652 4.90474 6.53999C4.90474 6.61346 4.92072 6.68605 4.95156 6.75272C4.98241 6.8194 5.02739 6.87857 5.08338 6.92614C5.13937 6.9737 5.20504 7.00852 5.27582 7.02818C5.34661 7.04784 5.42083 7.05187 5.49333 7.03999H5.54666Z" fill="#BDBDBD"/>
|
|
9
|
+
</g>
|
|
10
|
+
<defs>
|
|
11
|
+
<clipPath id="clip0_6_393">
|
|
12
|
+
<rect width="32" height="32" fill="white" transform="matrix(-1 0 0 1 32 0)"/>
|
|
13
|
+
</clipPath>
|
|
14
|
+
</defs>
|
|
15
|
+
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
-
import { Business, TopCategory } from '../../types';
|
|
2
|
+
import { Business, TopCategory, WidgetStyle } from '../../types';
|
|
3
3
|
export class MyComponent {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.tree = null;
|
|
@@ -8,9 +8,12 @@ export class MyComponent {
|
|
|
8
8
|
this.forceOldTree = false;
|
|
9
9
|
this.loadFromQuery = false;
|
|
10
10
|
this.customer = undefined;
|
|
11
|
+
this.widgetStyle = WidgetStyle.standard;
|
|
12
|
+
this.buttonColor = undefined;
|
|
13
|
+
this.buttonBg = undefined;
|
|
11
14
|
}
|
|
12
15
|
render() {
|
|
13
|
-
return (h("hemfixarna-component", {
|
|
16
|
+
return (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 }));
|
|
14
17
|
}
|
|
15
18
|
static get is() { return "hemfixarna-byggmax"; }
|
|
16
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -112,6 +115,63 @@ export class MyComponent {
|
|
|
112
115
|
},
|
|
113
116
|
"attribute": "customer",
|
|
114
117
|
"reflect": false
|
|
118
|
+
},
|
|
119
|
+
"widgetStyle": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "WidgetStyle",
|
|
124
|
+
"resolved": "WidgetStyle.alternative | WidgetStyle.alternative_2 | WidgetStyle.alternative_3 | WidgetStyle.standard",
|
|
125
|
+
"references": {
|
|
126
|
+
"WidgetStyle": {
|
|
127
|
+
"location": "import",
|
|
128
|
+
"path": "../../types"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": true,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": ""
|
|
137
|
+
},
|
|
138
|
+
"attribute": "widget-style",
|
|
139
|
+
"reflect": false,
|
|
140
|
+
"defaultValue": "WidgetStyle.standard"
|
|
141
|
+
},
|
|
142
|
+
"buttonColor": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "string",
|
|
147
|
+
"resolved": "string",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": true,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": ""
|
|
155
|
+
},
|
|
156
|
+
"attribute": "button-color",
|
|
157
|
+
"reflect": false
|
|
158
|
+
},
|
|
159
|
+
"buttonBg": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"mutable": false,
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "string",
|
|
164
|
+
"resolved": "string",
|
|
165
|
+
"references": {}
|
|
166
|
+
},
|
|
167
|
+
"required": false,
|
|
168
|
+
"optional": true,
|
|
169
|
+
"docs": {
|
|
170
|
+
"tags": [],
|
|
171
|
+
"text": ""
|
|
172
|
+
},
|
|
173
|
+
"attribute": "button-bg",
|
|
174
|
+
"reflect": false
|
|
115
175
|
}
|
|
116
176
|
};
|
|
117
177
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hemfixarna-byggmax.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-byggmax/hemfixarna-byggmax.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAY,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"hemfixarna-byggmax.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-byggmax/hemfixarna-byggmax.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAY,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO3E,MAAM,OAAO,WAAW;;gBACY,IAAI;;;wBAGL,KAAK;yBACJ,KAAK;;uBAEH,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,OAAO,CACL,4BACE,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAC1B,WAAW,EAAE,WAAW,CAAC,OAAO,EAChC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,GACP,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, h } from '@stencil/core';\nimport { Business, Category, TopCategory, WidgetStyle } from '../../types';\n\n@Component({\n tag: 'hemfixarna-byggmax',\n styleUrl: 'hemfixarna-byggmax.scss',\n shadow: true,\n})\nexport class MyComponent {\n @State() tree?: Category | null = null;\n @Prop() slug?: string;\n @Prop() id?: string;\n @Prop() forceOldTree?: boolean = false;\n @Prop() loadFromQuery?: boolean = false;\n @Prop() customer?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component\n forceOldTree={this.forceOldTree}\n id={this.id}\n slug={this.slug}\n business={Business.byggmax}\n topCategory={TopCategory.byggmax}\n loadFromQuery={this.loadFromQuery}\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n ></hemfixarna-component>\n );\n }\n}\n"]}
|