hemfixarna-web-components 1.8.3 → 1.8.5
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/{collection/utils/api.js → hemfixarna-components/api-e3c51cb3.js} +7 -4
- package/dist/hemfixarna-components/api-e3c51cb3.js.map +1 -0
- package/dist/hemfixarna-components/app-globals-0f993ce5.js +5 -0
- package/dist/hemfixarna-components/app-globals-0f993ce5.js.map +1 -0
- package/dist/{collection/utils/calc.js → hemfixarna-components/calc-b3b6593c.js} +7 -13
- package/dist/hemfixarna-components/calc-b3b6593c.js.map +1 -0
- package/dist/hemfixarna-components/css-shim-4fde41f0.js +6 -0
- package/dist/hemfixarna-components/css-shim-4fde41f0.js.map +1 -0
- package/dist/hemfixarna-components/dom-8de30773.js +75 -0
- package/dist/hemfixarna-components/dom-8de30773.js.map +1 -0
- package/dist/{collection/utils/enviroment.js → hemfixarna-components/enviroment-fd0a763a.js} +8 -6
- package/dist/hemfixarna-components/enviroment-fd0a763a.js.map +1 -0
- package/dist/{collection/utils/form.js → hemfixarna-components/form-c53dca29.js} +4 -2
- package/dist/hemfixarna-components/form-c53dca29.js.map +1 -0
- package/dist/{collection/components/hemfixarna-address/hemfixarna-address.js → hemfixarna-components/hemfixarna-address.entry.js} +14 -20
- package/dist/hemfixarna-components/hemfixarna-address.entry.js.map +1 -0
- package/dist/hemfixarna-components/hemfixarna-box.entry.js +49 -0
- package/dist/hemfixarna-components/hemfixarna-box.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js → hemfixarna-components/hemfixarna-breadcrumbs.entry.js} +13 -28
- package/dist/hemfixarna-components/hemfixarna-breadcrumbs.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-byggmax.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-byggmax.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-cart/hemfixarna-cart.js → hemfixarna-components/hemfixarna-cart.entry.js} +12 -6
- package/dist/hemfixarna-components/hemfixarna-cart.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-category.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-category.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-checkout/hemfixarna-checkout.js → hemfixarna-components/hemfixarna-checkout.entry.js} +33 -26
- package/dist/hemfixarna-components/hemfixarna-checkout.entry.js.map +1 -0
- package/dist/hemfixarna-components/hemfixarna-component.entry.js +189 -0
- package/dist/hemfixarna-components/hemfixarna-component.entry.js.map +1 -0
- package/dist/hemfixarna-components/hemfixarna-components.esm.js +162 -1
- package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
- package/dist/{collection/components/hemfixarna-contact/hemfixarna-contact.js → hemfixarna-components/hemfixarna-contact.entry.js} +11 -29
- package/dist/hemfixarna-components/hemfixarna-contact.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-demo/hemfixarna-demo.js → hemfixarna-components/hemfixarna-demo.entry.js} +21 -46
- package/dist/hemfixarna-components/hemfixarna-demo.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-doro.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-doro.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-elfa.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-elfa.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-fargvaruhuset.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-fargvaruhuset.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-flyttsmart.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-flyttsmart.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-forebygg.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-forebygg.entry.js.map +1 -0
- package/dist/hemfixarna-components/hemfixarna-getuser.entry.js +770 -0
- package/dist/hemfixarna-components/hemfixarna-getuser.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-hornbach.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-hornbach.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-info/hemfixarna-info.js → hemfixarna-components/hemfixarna-info.entry.js} +11 -7
- package/dist/hemfixarna-components/hemfixarna-info.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-invoice/hemfixarna-invoice.js → hemfixarna-components/hemfixarna-invoice.entry.js} +16 -27
- package/dist/hemfixarna-components/hemfixarna-invoice.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-kbygg.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-kbygg.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-klint.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-klint.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-kund.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-kund.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-norrgavel.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-norrgavel.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-order/hemfixarna-order.js → hemfixarna-components/hemfixarna-order.entry.js} +11 -7
- package/dist/hemfixarna-components/hemfixarna-order.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js → hemfixarna-components/hemfixarna-orderrows.entry.js} +12 -30
- package/dist/hemfixarna-components/hemfixarna-orderrows.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-power.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-power.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-product/hemfixarna-product.js → hemfixarna-components/hemfixarna-product.entry.js} +18 -27
- package/dist/hemfixarna-components/hemfixarna-product.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-service.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-service.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-skanska.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-skanska.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-sparfonster.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-sparfonster.entry.js.map +1 -0
- package/dist/{collection/components/hemfixarna-start/hemfixarna-start.js → hemfixarna-components/hemfixarna-start.entry.js} +11 -48
- package/dist/hemfixarna-components/hemfixarna-start.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-string-furniture.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-string-furniture.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-superfront.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-superfront.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-tesla.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-tesla.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-traningspartner.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-traningspartner.entry.js.map +1 -0
- package/dist/{esm → hemfixarna-components}/hemfixarna-zaptec.entry.js +2 -2
- package/dist/hemfixarna-components/hemfixarna-zaptec.entry.js.map +1 -0
- package/dist/{esm/index-8282f88e.js → hemfixarna-components/index-21ba2b05.js} +2 -2
- package/dist/{esm/index-8282f88e.js.map → hemfixarna-components/index-21ba2b05.js.map} +1 -1
- package/dist/hemfixarna-components/index-2ce8b901.js +3461 -0
- package/dist/hemfixarna-components/index-2ce8b901.js.map +1 -0
- package/dist/{esm/index-c8aebf0d.js → hemfixarna-components/index-c8ce6f4b.js} +6 -1
- package/dist/hemfixarna-components/index-c8ce6f4b.js.map +1 -0
- package/dist/hemfixarna-components/index.esm.js +1 -0
- package/dist/hemfixarna-components/index.esm.js.map +1 -1
- package/dist/{collection/utils/scroll.js → hemfixarna-components/scroll-6c26b5da.js} +4 -2
- package/dist/hemfixarna-components/scroll-6c26b5da.js.map +1 -0
- package/dist/hemfixarna-components/shadow-css-af2290df.js +389 -0
- package/dist/hemfixarna-components/shadow-css-af2290df.js.map +1 -0
- package/dist/{collection/utils/types.js → hemfixarna-components/types-6da209ae.js} +6 -3
- package/dist/hemfixarna-components/types-6da209ae.js.map +1 -0
- package/dist/types/stencil-public-runtime.d.ts +3 -0
- package/dist/types/types/index.d.ts +6 -1
- package/package.json +1 -1
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js +0 -2180
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js +0 -27
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-category.cjs.entry.js +0 -28
- package/dist/cjs/hemfixarna-category.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-components.cjs.js +0 -28
- package/dist/cjs/hemfixarna-components.cjs.js.map +0 -1
- package/dist/cjs/hemfixarna-doro.cjs.entry.js +0 -26
- package/dist/cjs/hemfixarna-doro.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-elfa.cjs.entry.js +0 -26
- package/dist/cjs/hemfixarna-elfa.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-forebygg.cjs.entry.js +0 -26
- package/dist/cjs/hemfixarna-forebygg.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-hornbach.cjs.entry.js +0 -26
- package/dist/cjs/hemfixarna-hornbach.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-kbygg.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-kbygg.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-klint.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-klint.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-kund.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-kund.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-power.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-power.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-service.cjs.entry.js +0 -24
- package/dist/cjs/hemfixarna-service.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-skanska.cjs.entry.js +0 -26
- package/dist/cjs/hemfixarna-skanska.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js +0 -26
- package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-superfront.cjs.entry.js +0 -24
- package/dist/cjs/hemfixarna-superfront.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-tesla.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-tesla.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js.map +0 -1
- package/dist/cjs/hemfixarna-zaptec.cjs.entry.js +0 -23
- package/dist/cjs/hemfixarna-zaptec.cjs.entry.js.map +0 -1
- package/dist/cjs/index-6af772cf.js +0 -265
- package/dist/cjs/index-6af772cf.js.map +0 -1
- package/dist/cjs/index-739bf321.js +0 -44
- package/dist/cjs/index-739bf321.js.map +0 -1
- package/dist/cjs/index-b83343b9.js +0 -1687
- package/dist/cjs/index-b83343b9.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -4
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -24
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/collection/assets/back.svg +0 -3
- package/dist/collection/assets/cart.svg +0 -10
- package/dist/collection/assets/checked.svg +0 -10
- package/dist/collection/assets/close.svg +0 -5
- package/dist/collection/assets/copy.png +0 -0
- package/dist/collection/assets/date.svg +0 -6
- package/dist/collection/assets/down.svg +0 -3
- package/dist/collection/assets/drag-drop.svg +0 -3
- package/dist/collection/assets/elfa.png +0 -0
- package/dist/collection/assets/gubbe-pensel.svg +0 -1
- package/dist/collection/assets/hemfixarna.svg +0 -11
- package/dist/collection/assets/hornbach/logo.svg +0 -42
- package/dist/collection/assets/hornbach/nav.jpg +0 -0
- package/dist/collection/assets/info.svg +0 -5
- package/dist/collection/assets/kbygg.svg +0 -29
- package/dist/collection/assets/minus.svg +0 -4
- package/dist/collection/assets/montering.svg +0 -15
- package/dist/collection/assets/norrgavel.svg +0 -1
- package/dist/collection/assets/pensel.svg +0 -1
- package/dist/collection/assets/plus.svg +0 -5
- package/dist/collection/assets/spinner.gif +0 -0
- package/dist/collection/assets/tesla.svg +0 -1
- package/dist/collection/assets/zaptec.svg +0 -1
- package/dist/collection/collection-manifest.json +0 -47
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.css +0 -0
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js +0 -122
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.css +0 -0
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js +0 -104
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.css +0 -0
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js +0 -104
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js +0 -94
- package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js +0 -94
- package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.css +0 -0
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js +0 -104
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.css +0 -0
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js +0 -104
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js +0 -94
- package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js +0 -94
- package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js +0 -94
- package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js +0 -94
- package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js +0 -94
- package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.css +0 -0
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js +0 -104
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js +0 -94
- package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js +0 -104
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string.css +0 -0
- package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js +0 -113
- package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js +0 -94
- package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js +0 -94
- package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js.map +0 -1
- package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js +0 -94
- package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js.map +0 -1
- package/dist/collection/components/hemfixarna-address/hemfixarna-address.js.map +0 -1
- package/dist/collection/components/hemfixarna-box/hemfixarna-box.js +0 -138
- package/dist/collection/components/hemfixarna-box/hemfixarna-box.js.map +0 -1
- package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js.map +0 -1
- package/dist/collection/components/hemfixarna-cart/hemfixarna-cart.js.map +0 -1
- package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js +0 -18
- package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js.map +0 -1
- package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js.map +0 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +0 -330
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +0 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna.css +0 -1061
- package/dist/collection/components/hemfixarna-contact/hemfixarna-contact.js.map +0 -1
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.css +0 -135
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +0 -1
- package/dist/collection/components/hemfixarna-getuser/hemfixarna-getuser.js +0 -91
- package/dist/collection/components/hemfixarna-getuser/hemfixarna-getuser.js.map +0 -1
- package/dist/collection/components/hemfixarna-info/hemfixarna-info.js.map +0 -1
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.css +0 -76
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +0 -1
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +0 -1
- package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js.map +0 -1
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.css +0 -0
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.js.map +0 -1
- package/dist/collection/components/hemfixarna-service/hemfixarna-service.js +0 -14
- package/dist/collection/components/hemfixarna-service/hemfixarna-service.js.map +0 -1
- package/dist/collection/components/hemfixarna-start/hemfixarna-start.js.map +0 -1
- package/dist/collection/index.js +0 -2
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/store/index.js +0 -69
- package/dist/collection/store/index.js.map +0 -1
- package/dist/collection/types/felixtypes.js +0 -3
- package/dist/collection/types/felixtypes.js.map +0 -1
- package/dist/collection/types/index.js +0 -41
- package/dist/collection/types/index.js.map +0 -1
- package/dist/collection/utils/api.js.map +0 -1
- package/dist/collection/utils/calc.js.map +0 -1
- package/dist/collection/utils/creditSafe.js +0 -18
- package/dist/collection/utils/creditSafe.js.map +0 -1
- package/dist/collection/utils/enviroment.js.map +0 -1
- package/dist/collection/utils/felixApi.js +0 -19
- package/dist/collection/utils/felixApi.js.map +0 -1
- package/dist/collection/utils/felixFunctions.js +0 -188
- package/dist/collection/utils/felixFunctions.js.map +0 -1
- package/dist/collection/utils/form.js.map +0 -1
- package/dist/collection/utils/scroll.js.map +0 -1
- package/dist/collection/utils/types.js.map +0 -1
- package/dist/esm/hemfixarna-address_15.entry.js +0 -2162
- package/dist/esm/hemfixarna-address_15.entry.js.map +0 -1
- package/dist/esm/hemfixarna-byggmax.entry.js.map +0 -1
- package/dist/esm/hemfixarna-category.entry.js.map +0 -1
- package/dist/esm/hemfixarna-components.js +0 -23
- package/dist/esm/hemfixarna-components.js.map +0 -1
- package/dist/esm/hemfixarna-doro.entry.js.map +0 -1
- package/dist/esm/hemfixarna-elfa.entry.js.map +0 -1
- package/dist/esm/hemfixarna-fargvaruhuset.entry.js.map +0 -1
- package/dist/esm/hemfixarna-flyttsmart.entry.js.map +0 -1
- package/dist/esm/hemfixarna-forebygg.entry.js.map +0 -1
- package/dist/esm/hemfixarna-hornbach.entry.js.map +0 -1
- package/dist/esm/hemfixarna-kbygg.entry.js.map +0 -1
- package/dist/esm/hemfixarna-klint.entry.js.map +0 -1
- package/dist/esm/hemfixarna-kund.entry.js.map +0 -1
- package/dist/esm/hemfixarna-norrgavel.entry.js.map +0 -1
- package/dist/esm/hemfixarna-power.entry.js.map +0 -1
- package/dist/esm/hemfixarna-service.entry.js.map +0 -1
- package/dist/esm/hemfixarna-skanska.entry.js.map +0 -1
- package/dist/esm/hemfixarna-sparfonster.entry.js.map +0 -1
- package/dist/esm/hemfixarna-string-furniture.entry.js.map +0 -1
- package/dist/esm/hemfixarna-superfront.entry.js.map +0 -1
- package/dist/esm/hemfixarna-tesla.entry.js.map +0 -1
- package/dist/esm/hemfixarna-traningspartner.entry.js.map +0 -1
- package/dist/esm/hemfixarna-zaptec.entry.js.map +0 -1
- package/dist/esm/index-04bcf90e.js +0 -1656
- package/dist/esm/index-04bcf90e.js.map +0 -1
- package/dist/esm/index-c8aebf0d.js.map +0 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js +0 -20
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/hemfixarna-components/p-075a13b6.entry.js +0 -2
- package/dist/hemfixarna-components/p-075a13b6.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-0aa722e7.entry.js +0 -2
- package/dist/hemfixarna-components/p-0aa722e7.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-1cbfbf5a.entry.js +0 -2
- package/dist/hemfixarna-components/p-1cbfbf5a.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-226a06bb.entry.js +0 -2
- package/dist/hemfixarna-components/p-226a06bb.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-24b53f91.entry.js +0 -2
- package/dist/hemfixarna-components/p-24b53f91.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-32a8152b.js +0 -3
- package/dist/hemfixarna-components/p-32a8152b.js.map +0 -1
- package/dist/hemfixarna-components/p-49c372d6.entry.js +0 -2
- package/dist/hemfixarna-components/p-49c372d6.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-506c766c.entry.js +0 -2
- package/dist/hemfixarna-components/p-506c766c.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-53edf50e.entry.js +0 -2
- package/dist/hemfixarna-components/p-53edf50e.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-66515865.entry.js +0 -2
- package/dist/hemfixarna-components/p-66515865.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-6c0e0f95.entry.js +0 -2
- package/dist/hemfixarna-components/p-6c0e0f95.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-8cc96dd9.entry.js +0 -2
- package/dist/hemfixarna-components/p-8cc96dd9.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-9b409902.entry.js +0 -2
- package/dist/hemfixarna-components/p-9b409902.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-a09f4a5d.entry.js +0 -2
- package/dist/hemfixarna-components/p-a09f4a5d.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-b397b966.js +0 -2
- package/dist/hemfixarna-components/p-b397b966.js.map +0 -1
- package/dist/hemfixarna-components/p-bf515028.entry.js +0 -2
- package/dist/hemfixarna-components/p-bf515028.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-d013eeee.entry.js +0 -2
- package/dist/hemfixarna-components/p-d013eeee.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-d281e9e3.entry.js +0 -2
- package/dist/hemfixarna-components/p-d281e9e3.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-d297cb30.js +0 -2
- package/dist/hemfixarna-components/p-d297cb30.js.map +0 -1
- package/dist/hemfixarna-components/p-d6af83de.entry.js +0 -2
- package/dist/hemfixarna-components/p-d6af83de.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-e8800c3b.entry.js +0 -2
- package/dist/hemfixarna-components/p-e8800c3b.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-eaa3e1c0.entry.js +0 -2
- package/dist/hemfixarna-components/p-eaa3e1c0.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-ee6d1a35.entry.js +0 -2
- package/dist/hemfixarna-components/p-ee6d1a35.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-f6de66c8.entry.js +0 -2
- package/dist/hemfixarna-components/p-f6de66c8.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-facaf951.entry.js +0 -2
- package/dist/hemfixarna-components/p-facaf951.entry.js.map +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
@@ -0,0 +1,49 @@
|
|
1
|
+
import { r as registerInstance, h, F as Fragment, i as getElement } from './index-2ce8b901.js';
|
2
|
+
import { s as state } from './index-21ba2b05.js';
|
3
|
+
import { a as getProductPrice } from './calc-b3b6593c.js';
|
4
|
+
import { s as scrollToTop } from './scroll-6c26b5da.js';
|
5
|
+
import { a as isProduct } from './types-6da209ae.js';
|
6
|
+
import './index-c8ce6f4b.js';
|
7
|
+
|
8
|
+
const HemfixarnaBox = class {
|
9
|
+
constructor(hostRef) {
|
10
|
+
registerInstance(this, hostRef);
|
11
|
+
this.post = undefined;
|
12
|
+
this.category = undefined;
|
13
|
+
this.icon = undefined;
|
14
|
+
this.postTitle = undefined;
|
15
|
+
}
|
16
|
+
setTaxonomy(taxonomy) {
|
17
|
+
if (taxonomy) {
|
18
|
+
if ((taxonomy === null || taxonomy === void 0 ? void 0 : taxonomy.taxonomy) === 'service_cat') {
|
19
|
+
state.selectedCategory = taxonomy;
|
20
|
+
state.step = 2;
|
21
|
+
}
|
22
|
+
else if ((taxonomy === null || taxonomy === void 0 ? void 0 : taxonomy.post_type) === 'service') {
|
23
|
+
state.selectedService = taxonomy;
|
24
|
+
state.step = 3;
|
25
|
+
}
|
26
|
+
else if ((taxonomy === null || taxonomy === void 0 ? void 0 : taxonomy.post_type) === 'ikea_product') {
|
27
|
+
state.selectedProduct = taxonomy;
|
28
|
+
state.step = 4;
|
29
|
+
}
|
30
|
+
const el = this.el.closest('.hemfixarna_content');
|
31
|
+
scrollToTop(el);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
setProduct() {
|
35
|
+
state.selectedProduct = this.category;
|
36
|
+
state.step = 4;
|
37
|
+
state.selectedCustomerCategory = null;
|
38
|
+
const el = this.el.closest('.hemfixarna_content');
|
39
|
+
scrollToTop(el);
|
40
|
+
}
|
41
|
+
render() {
|
42
|
+
return this.category ? (h(Fragment, null, isProduct(this.category) ? (h("li", { onClick: () => this.setProduct() }, h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.post_name }), h("div", null, h("p", null, this.category.title), !this.category.invoice ? h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.category), "kr") : null))) : (h("li", { onClick: () => (state.selectedCustomerCategory = this.category) }, h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.name }), h("div", null, h("p", null, this.category.name)))))) : (h("li", { onClick: () => this.setTaxonomy(this.post) }, this.post.icon && h("img", { class: "hemfixarna_logo", height: 82, src: this.icon, alt: this.postTitle }), h("div", null, h("p", null, this.postTitle), state.step === 3 && h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.post), "kr"))));
|
43
|
+
}
|
44
|
+
get el() { return getElement(this); }
|
45
|
+
};
|
46
|
+
|
47
|
+
export { HemfixarnaBox as hemfixarna_box };
|
48
|
+
|
49
|
+
//# sourceMappingURL=hemfixarna-box.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-box.entry.esm.js","mappings":";;;;;;;MAWa,aAAa;;;;;;;;EAOxB,WAAW,CAAC,QAAsC;IAChD,IAAI,QAAQ,EAAE;MACZ,IAAI,CAAC,QAAqB,aAArB,QAAQ,uBAAR,QAAQ,CAAe,QAAQ,MAAK,aAAa,EAAE;QACtD,KAAK,CAAC,gBAAgB,GAAG,QAAoB,CAAC;QAC9C,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;OAChB;WAAM,IAAI,CAAC,QAAoB,aAApB,QAAQ,uBAAR,QAAQ,CAAc,SAAS,MAAK,SAAS,EAAE;QACzD,KAAK,CAAC,eAAe,GAAG,QAAmB,CAAC;QAC5C,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;OAChB;WAAM,IAAI,CAAC,QAAoB,aAApB,QAAQ,uBAAR,QAAQ,CAAc,SAAS,MAAK,cAAc,EAAE;QAC9D,KAAK,CAAC,eAAe,GAAG,QAAmB,CAAC;QAC5C,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;OAChB;MACD,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CA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W,CAAC,IAAI,CAAC,IAAI,CAAC,IAC3C,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,WAAK,KAAK,EAAC,iBAAiB,EAAC,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,GAAI,EACnG,eACE,aAAI,IAAI,CAAC,SAAS,CAAK,EACtB,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,SAAG,KAAK,EAAC,OAAO,kBAAO,eAAe,CAAC,IAAI,CAAC,IAAe,CAAC,OAAO,CACpF,CACH,CACN,CAAC;GACH;;;;;;","names":[],"sources":["./src/components/hemfixarna-box/hemfixarna-box.tsx"],"sourcesContent":["import { Component, Element, Fragment, Prop, h } from '@stencil/core';\nimport state from '../../store';\nimport { Category, CustomerCategory, CustomerSubCategory, Product, Service } from '../../types';\nimport { getProductPrice } from '../../utils/calc';\nimport { scrollToTop } from '../../utils/scroll';\nimport { isProduct } from '../../utils/types';\n\n@Component({\n tag: 'hemfixarna-box',\n shadow: false,\n})\nexport class HemfixarnaBox {\n @Prop() post: Category | Product | Service;\n @Prop() category: CustomerCategory | CustomerSubCategory | Product;\n @Prop() icon: string;\n @Prop() postTitle: string;\n @Element() private el: HTMLElement;\n\n setTaxonomy(taxonomy: Category | Service | Product) {\n if (taxonomy) {\n if ((taxonomy as Category)?.taxonomy === 'service_cat') {\n state.selectedCategory = taxonomy as Category;\n state.step = 2;\n } else if ((taxonomy as Service)?.post_type === 'service') {\n state.selectedService = taxonomy as Service;\n state.step = 3;\n } else if ((taxonomy as Product)?.post_type === 'ikea_product') {\n state.selectedProduct = taxonomy as Product;\n state.step = 4;\n }\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n }\n }\n\n setProduct() {\n state.selectedProduct = this.category as Product;\n state.step = 4;\n state.selectedCustomerCategory = null;\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n }\n\n render() {\n return this.category ? (\n <Fragment>\n {isProduct(this.category) ? (\n <li onClick={() => this.setProduct()}>\n <img class=\"hemfixarna_logo\" height={82} src={this.category.icon as string} alt={this.category.post_name} />\n <div>\n <p>{this.category.title}</p>\n {!this.category.invoice ? <p class=\"price\">Från {getProductPrice(this.category)}kr</p> : null}\n </div>\n </li>\n ) : (\n <li onClick={() => (state.selectedCustomerCategory = this.category as CustomerCategory)}>\n <img class=\"hemfixarna_logo\" height={82} src={this.category.icon} alt={this.category.name} />\n <div>\n <p>{this.category.name}</p>\n </div>\n </li>\n )}\n </Fragment>\n ) : (\n <li onClick={() => this.setTaxonomy(this.post)}>\n {this.post.icon && <img class=\"hemfixarna_logo\" height={82} src={this.icon} alt={this.postTitle} />}\n <div>\n <p>{this.postTitle}</p>\n {state.step === 3 && <p class=\"price\">Från {getProductPrice(this.post as Product)}kr</p>}\n </div>\n </li>\n );\n }\n}\n"],"version":3}
|
@@ -1,8 +1,10 @@
|
|
1
|
-
import { getAssetPath, h } from '
|
2
|
-
import state from '
|
3
|
-
import { scrollToTop } from '
|
4
|
-
|
5
|
-
|
1
|
+
import { r as registerInstance, e as getAssetPath, h, i as getElement } from './index-2ce8b901.js';
|
2
|
+
import { s as state } from './index-21ba2b05.js';
|
3
|
+
import { s as scrollToTop } from './scroll-6c26b5da.js';
|
4
|
+
|
5
|
+
const HemfixarnaBreadcrumbs = class {
|
6
|
+
constructor(hostRef) {
|
7
|
+
registerInstance(this, hostRef);
|
6
8
|
this.triggerScrollTotop = () => {
|
7
9
|
const el = this.el.nextSibling;
|
8
10
|
scrollToTop(el);
|
@@ -50,26 +52,9 @@ export class HemfixarnaBreadcrumbs {
|
|
50
52
|
state.maleri = null;
|
51
53
|
} }, h("img", { width: 24, src: back, alt: "back arrow" }), h("span", null, "Se allt ", state.parentCategory.name)))));
|
52
54
|
}
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
"complexType": {
|
60
|
-
"original": "() => void",
|
61
|
-
"resolved": "() => void",
|
62
|
-
"references": {}
|
63
|
-
},
|
64
|
-
"required": false,
|
65
|
-
"optional": false,
|
66
|
-
"docs": {
|
67
|
-
"tags": [],
|
68
|
-
"text": ""
|
69
|
-
}
|
70
|
-
}
|
71
|
-
};
|
72
|
-
}
|
73
|
-
static get elementRef() { return "el"; }
|
74
|
-
}
|
75
|
-
//# sourceMappingURL=hemfixarna-breadcrumbs.js.map
|
55
|
+
get el() { return getElement(this); }
|
56
|
+
};
|
57
|
+
|
58
|
+
export { HemfixarnaBreadcrumbs as hemfixarna_breadcrumbs };
|
59
|
+
|
60
|
+
//# sourceMappingURL=hemfixarna-breadcrumbs.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-breadcrumbs.entry.esm.js","mappings":";;;;MAQa,qBAAqB;;;IAQhC,uBAAkB,GAAG;MACnB,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,WAA0B,CAAC;MAC9C,WAAW,CAAC,EAAE,CAAC,CAAC;KACjB,CAAC;;;EAPF,aAAa;IACX,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;GAC/D;EAOD,eAAe;;IACb,IAAI,MAAA,KAAK,CAAC,IAAI,0CAAE,MAAM,EAAE;MACtB,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;MACf,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;GACF;EAED,mBAAmB;IACjB,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;IACf,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,wBAAwB,GAAG,IAAI,CAAC;IACtC,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC1B,UAAU,CAAC;MACT,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;MAC9B,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC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umbs/hemfixarna-breadcrumbs.tsx"],"sourcesContent":["import { Component, Element, Prop, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { scrollToTop } from '../../utils/scroll';\n\n@Component({\n tag: 'hemfixarna-breadcrumbs',\n shadow: false,\n})\nexport class HemfixarnaBreadcrumbs {\n @Prop() closeModal: () => void;\n @Element() private el: HTMLElement;\n\n getCartLength() {\n return state.cart.reduce((acc, curr) => acc + curr.amount, 0);\n }\n\n triggerScrollTotop = () => {\n const el = this.el.nextSibling as HTMLElement;\n scrollToTop(el);\n };\n\n handleCartClick() {\n if (state.cart?.length) {\n state.step = 5;\n this.triggerScrollTotop();\n }\n }\n\n handleHomePageClick() {\n state.step = 1;\n state.parentCategory = null;\n state.selectedCustomerCategory = null;\n this.triggerScrollTotop();\n setTimeout(() => {\n state.selectedCategory = null;\n state.selectedProduct = null;\n state.maleri = null;\n state.selectedService = null;\n }, 200);\n }\n\n render() {\n const logo = getAssetPath(`./assets/hemfixarna.svg`);\n const close = getAssetPath(`./assets/close.svg`);\n const cart = getAssetPath(`./assets/cart.svg`);\n const back = getAssetPath(`./assets/back.svg`);\n\n return (\n <div>\n <div class=\"hemfixarna_crumbs\">\n <div class=\"hemfixarna_crumbs--links\">\n <img onClick={() => this.handleHomePageClick()} src={logo} width={110} />\n <img onClick={() => this.closeModal()} class=\"close\" src={close} width={32} />\n <div>\n <button onClick={() => this.handleHomePageClick()}>Alla tjänster</button>\n </div>\n </div>\n <div class=\"hemfixarna_crumbs--right\">\n <hemfixarna-contact></hemfixarna-contact>\n <div onClick={() => this.handleCartClick()} class={`cart ${this.getCartLength() > 0 ? 'cart_active' : ''}`}>\n <img src={cart} width={24} />\n <span>{this.getCartLength()}</span>\n </div>\n </div>\n </div>\n {[3, 4].includes(state.step) && !state.customer && (\n <button\n class=\"hemfixarna_crumbs--back\"\n onClick={() => {\n state.step = state.step === 4 ? 3 : 2;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n <span>Se allt {state.step === 4 ? state.selectedService.post_title : state.selectedCategory.name}</span>\n </button>\n )}\n {!state.parentCategory && state.step && state.selectedCustomerCategory && (\n <button\n class=\"hemfixarna_crumbs--back\"\n onClick={() => {\n state.step = 1;\n state.selectedCustomerCategory = null;\n state.selectedProduct = null;\n state.maleri = null;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n <span>Se alla tjänster</span>\n </button>\n )}\n {state.parentCategory && state.step < 5 && (\n <button\n class=\"hemfixarna_crumbs--back\"\n onClick={() => {\n state.step = 1;\n state.selectedCustomerCategory = state.parentCategory;\n state.selectedProduct = null;\n state.maleri = null;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n <span>Se allt {state.parentCategory.name}</span>\n </button>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-2ce8b901.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8ce6f4b.js';
|
3
3
|
|
4
4
|
const hemfixarnaByggmaxCss = "";
|
5
5
|
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-byggmax.entry.esm.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG,EAAE;;MCQlB,WAAW;;;;uBAEc,WAAW,CAAC,QAAQ;;;;;EAKxD,MAAM;IACJ,QACE,4BACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAC1B,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,GACP,EACxB;GACH;;;;;;","names":[],"sources":["./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.scss?tag=hemfixarna-byggmax&encapsulation=shadow","./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.tsx"],"sourcesContent":["","import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-byggmax',\n styleUrl: 'hemfixarna-byggmax.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n @Prop() slug?: string;\n\n render() {\n return (\n <hemfixarna-component\n slug={this.slug}\n id={this.id}\n business={Business.byggmax}\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n ></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -1,6 +1,10 @@
|
|
1
|
-
import { getAssetPath, h } from '
|
2
|
-
import state from '
|
3
|
-
|
1
|
+
import { r as registerInstance, e as getAssetPath, h } from './index-2ce8b901.js';
|
2
|
+
import { s as state } from './index-21ba2b05.js';
|
3
|
+
|
4
|
+
const HemfixarnaCart = class {
|
5
|
+
constructor(hostRef) {
|
6
|
+
registerInstance(this, hostRef);
|
7
|
+
}
|
4
8
|
render() {
|
5
9
|
const back = getAssetPath(`./assets/back.svg`);
|
6
10
|
return (h("div", { class: "hemfixarna_cart" }, h("div", { class: "hemfixarna_cart--left" }, h("h2", null, state.checkoutStep === 2 && !state.checkoutEdit && (h("button", { onClick: () => {
|
@@ -9,6 +13,8 @@ export class HemfixarnaCart {
|
|
9
13
|
state.checkoutStep = 1;
|
10
14
|
} }, h("img", { width: 24, src: back, alt: "back arrow" }))), "Dina uppgifter"), h("hemfixarna-checkout", null), h("hemfixarna-info", null))));
|
11
15
|
}
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
};
|
17
|
+
|
18
|
+
export { HemfixarnaCart as hemfixarna_cart };
|
19
|
+
|
20
|
+
//# sourceMappingURL=hemfixarna-cart.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-cart.entry.esm.js","mappings":";;;MAOa,cAAc;;;;EACzB,MAAM;IACJ,MAAM,IAAI,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAC;IAE/C,QACE,WAAK,KAAK,EAAC,iBAAiB,IAC1B,WAAK,KAAK,EAAC,uBAAuB,IAChC,cACG,KAAK,CAAC,YAAY,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,KAC9C,cACE,OAAO,EAAE;QACP,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC;OACxB,IAED,WAAK,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAC,YAAY,GAAG,CACvC,CACV,gBAEE,EACL,+BAAwB,CACpB,EACN,WAAK,KAAK,EAAC,wBAAwB,IACjC,cACG,KAAK,CAAC,YAAY,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,KAC9C,cACE,OAAO,EAAE;QACP,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC;OACxB,IAED,WAAK,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAC,YAAY,GAAG,CACvC,CACV,mBAEE,EACL,8BAAuB,EACvB,0BAAmB,CACf,CACF,EACN;GACH;;;;;","names":[],"sources":["./src/components/hemfixarna-cart/hemfixarna-cart.tsx"],"sourcesContent":["import { Component, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\n\n@Component({\n tag: 'hemfixarna-cart',\n shadow: false,\n})\nexport class HemfixarnaCart {\n render() {\n const back = getAssetPath(`./assets/back.svg`);\n\n return (\n <div class=\"hemfixarna_cart\">\n <div class=\"hemfixarna_cart--left\">\n <h2>\n {state.checkoutStep === 2 && !state.checkoutEdit && (\n <button\n onClick={() => {\n state.checkoutStep = 1;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n </button>\n )}\n Din bokning\n </h2>\n <hemfixarna-orderrows />\n </div>\n <div class=\"hemfixarna_cart--right\">\n <h2>\n {state.checkoutStep === 2 && !state.checkoutEdit && (\n <button\n onClick={() => {\n state.checkoutStep = 1;\n }}\n >\n <img width={24} src={back} alt=\"back arrow\" />\n </button>\n )}\n Dina uppgifter\n </h2>\n <hemfixarna-checkout />\n <hemfixarna-info />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { s as state } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-2ce8b901.js';
|
2
|
+
import { s as state } from './index-21ba2b05.js';
|
3
3
|
|
4
4
|
const HemfixarnaCategory = class {
|
5
5
|
constructor(hostRef) {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-category.entry.esm.js","mappings":";;;MAQa,kBAAkB;;;;EAC7B,kBAAkB,CAAC,OAAgB;IACjC,KAAK,CAAC,eAAe,GAAG,OAAO,CAAC;IAChC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;GAChB;EAED,MAAM;IACJ,QACE,eACE,cAAK,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAM,EACtC,WAAK,KAAK,EAAC,gCAAgC,IACzC,eACE,UAAI,KAAK,EAAC,uBAAuB,IAC9B,KAAK,CAAC,gBAAgB,CAAC,QAAQ;OAC7B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;OACtD,GAAG,CAAC,CAAC;;MAAI,QACR,sBAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAC,CAAC,CAAC,IAAa,CAAC,GAAG,mCAAK,CAAC,CAAC,IAAe,EAAE,SAAS,EAAE,CAAC,CAAC,UAAU,GAAmB,EACtH;KAAA,CAAC,CACD,CACD,EACN,0BAAmB,CACf,CACF,EACN;GACH;;;;;","names":[],"sources":["./src/components/hemfixarna-category.tsx/hemfixarna-category.tsx"],"sourcesContent":["import { Component, h } from '@stencil/core';\nimport state from '../../store';\nimport { Icon, Service } from '../../types';\n\n@Component({\n tag: 'hemfixarna-category',\n shadow: false,\n})\nexport class HemfixarnaCategory {\n setSelectedService(service: Service) {\n state.selectedService = service;\n state.step = 3;\n }\n\n render() {\n return (\n <div>\n <h2>{state.selectedCategory.name}</h2>\n <div class=\"hemfixarna_categories--wrapper\">\n <div>\n <ul class=\"hemfixarna_categories\">\n {state.selectedCategory.services\n .sort((a, b) => (a.post_title < b.post_title ? -1 : 1))\n .map(s => (\n <hemfixarna-box post={s} icon={(s.icon as Icon).url ?? (s.icon as string)} postTitle={s.post_title}></hemfixarna-box>\n ))}\n </ul>\n </div>\n <hemfixarna-info />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
@@ -1,12 +1,30 @@
|
|
1
|
-
import {
|
2
|
-
import state from '
|
3
|
-
import { Business } from '
|
4
|
-
import { postOrder } from '
|
5
|
-
import {
|
6
|
-
import { hideField } from '
|
7
|
-
import { scrollToTop } from '
|
8
|
-
|
9
|
-
|
1
|
+
import { r as registerInstance, e as getAssetPath, h, F as Fragment, i as getElement } from './index-2ce8b901.js';
|
2
|
+
import { s as state } from './index-21ba2b05.js';
|
3
|
+
import { B as Business } from './index-c8ce6f4b.js';
|
4
|
+
import { f as fetchWithType, p as postOrder } from './api-e3c51cb3.js';
|
5
|
+
import { g as getApiUrl } from './enviroment-fd0a763a.js';
|
6
|
+
import { h as hideField } from './form-c53dca29.js';
|
7
|
+
import { s as scrollToTop } from './scroll-6c26b5da.js';
|
8
|
+
|
9
|
+
const base = `${getApiUrl()}/wp-json/felix`;
|
10
|
+
const postPerson = async (felixOrder) => {
|
11
|
+
try {
|
12
|
+
return await fetchWithType(`${base}/createperson`, {
|
13
|
+
method: 'POST',
|
14
|
+
body: JSON.stringify(felixOrder),
|
15
|
+
headers: {
|
16
|
+
'Content-Type': 'application/json',
|
17
|
+
},
|
18
|
+
});
|
19
|
+
}
|
20
|
+
catch (error) {
|
21
|
+
console.log(error);
|
22
|
+
}
|
23
|
+
};
|
24
|
+
|
25
|
+
const HemfixarnaCheckout = class {
|
26
|
+
constructor(hostRef) {
|
27
|
+
registerInstance(this, hostRef);
|
10
28
|
this.handleChangeDate = (e) => {
|
11
29
|
this.dateError = null;
|
12
30
|
this.date = e.target.value;
|
@@ -156,20 +174,9 @@ export class HemfixarnaCheckout {
|
|
156
174
|
state.checkoutStep = 2;
|
157
175
|
}
|
158
176
|
}
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
"loading": {},
|
166
|
-
"enteredPin": {},
|
167
|
-
"selectedSubSource": {},
|
168
|
-
"partnerOrderId": {},
|
169
|
-
"sellerID": {},
|
170
|
-
"RefferalID": {}
|
171
|
-
};
|
172
|
-
}
|
173
|
-
static get elementRef() { return "el"; }
|
174
|
-
}
|
175
|
-
//# sourceMappingURL=hemfixarna-checkout.js.map
|
177
|
+
get el() { return getElement(this); }
|
178
|
+
};
|
179
|
+
|
180
|
+
export { HemfixarnaCheckout as hemfixarna_checkout };
|
181
|
+
|
182
|
+
//# sourceMappingURL=hemfixarna-checkout.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-checkout.entry.esm.js","mappings":";;;;;;;;AAGA,MAAM,IAAI,GAAG,GAAG,SAAS,EAAE,gBAAgB,CAAC;AA6C5C,MAAM,UAAU,GAAG,OAAO,UAAsB;EAC9C,IAAI;IACF,OAAO,MAAM,aAAa,CAcxB,GAAG,IAAI,eAAe,EAAE;MACxB,MAAM,EAAE,MAAM;MACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;MAChC,OAAO,EAAE;QACP,cAAc,EAAE,kBAAkB;OACnC;KACF,CAAC,CAAC;GACJ;EAAC,OAAO,KAAK,EAAE;IACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;GACpB;AACH,CAAC;;MC9DY,kBAAkB;;;IAY7B,qBAAgB,GAA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,OAAA,MAAA,CAAC,CAAC,cAAc,0CAAE,MAAM,CAAA,EAAA,CAAC;WACrC,GAAG,CAAC,IAAI,KACP,EAAC,QAAQ,QACP,aAAO,KAAK,EAAC,qBAAqB,IAChC,aAAO,QAAQ,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAC,UAAU,GAAG,EACnE,gBAAO,IAAI,CAAC,cAAc,CAAQ,CAC5B,CACC,CACZ,CAAC,EACH,IAAI,CAAC,YAAY,IAAI,gBAAO,IAAI,CAAC,YAAY,CAAQ,EACtD,WAAK,KAAK,EAAE,IAAI,CAAC,OAAO,GAAG,SAAS,GAAG,EAAE,IACvC,aAAO,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG,gBAAgB,GAAI,EACpE,WAAK,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,SAAS,GAAG,CACtD,CACD,CACH,EACN;OACH;KACF,CAAC;gBAnOsB,EAAE;qBACU,IAAI;wBACD,IAAI;mBACxB,KAAK;sBACM,EAAE;6BAEY,IAAI;0BACP,IAAI;oBACV,IAAI;sBACF,IAAI;;EAsHzC,iBAAiB;IACf,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;MAC5C,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC;KACxB;GACF;;;;;;","names":[],"sources":["./src/utils/felixApi.ts","./src/components/hemfixarna-checkout/hemfixarna-checkout.tsx"],"sourcesContent":["import { fetchWithType } from './api';\nimport { getApiUrl } from './enviroment';\n\nconst base = `${getApiUrl()}/wp-json/felix`;\n\ninterface FelixOrder {\n firstName: string;\n lastName: string;\n street: string;\n zip: string;\n town: string;\n ssn: string;\n email: string;\n phone: string;\n url: string;\n date: string;\n notes?: string;\n wws?: string;\n referral_id?: string;\n id_source?: string;\n id_sub_source?: string;\n products: {\n id: string;\n name: string;\n quantity: number;\n rut: number;\n rot: number;\n }[];\n start_fees: {\n ID: number;\n price: number;\n rut: number;\n rot: number;\n green: number;\n }[];\n creditSafe: {\n firstName: string;\n lastName: string;\n street: string;\n zip: string;\n town: string;\n };\n felixStatus?: 'success' | 'error';\n customer?: string;\n seller_id?: string;\n refferal_id?: string;\n}\n\nconst postPerson = async (felixOrder: FelixOrder) => {\n try {\n return await fetchWithType<\n | {\n response: {\n scriptResult: string;\n scriptError: string;\n };\n messages: [\n {\n code: string;\n message: string;\n },\n ];\n }\n | false\n >(`${base}/createperson`, {\n method: 'POST',\n body: JSON.stringify(felixOrder),\n headers: {\n 'Content-Type': 'application/json',\n },\n });\n } catch (error) {\n console.log(error);\n }\n};\n\nexport { FelixOrder, postPerson };\n","import { Component, Element, Fragment, State, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { Business } from '../../types';\nimport { postOrder } from '../../utils/api';\nimport { FelixOrder, postPerson } from '../../utils/felixApi';\nimport { hideField } from '../../utils/form';\nimport { scrollToTop } from '../../utils/scroll';\n\n@Component({\n tag: 'hemfixarna-checkout',\n shadow: false,\n})\nexport class HemfixarnaCheckout {\n @State() date: string = '';\n @State() dateError: string | null = null;\n @State() generalError: string | null = null;\n @State() loading = false;\n @State() enteredPin: string = '';\n @Element() private el: HTMLElement;\n @State() selectedSubSource: string | null = null;\n @State() partnerOrderId: string | null = null;\n @State() sellerID: string | null = null;\n @State() RefferalID: string | null = null;\n\n handleChangeDate = (e: Event) => {\n this.dateError = null;\n this.date = (e.target as HTMLInputElement).value;\n };\n\n handleChangeTerms = () => {\n this.generalError = null;\n };\n\n sendOrder = async () => {\n if (this.loading) return;\n this.loading = true;\n\n const startFees = state.cart\n .filter(item => item.start_fee_obj)\n .map(item => ({\n ID: item.start_fee_obj?.ID,\n title: item.start_fee_obj?.title,\n price: item.start_fee_obj?.price,\n rut: item.rut ? 1 : 0,\n rot: item.rot ? 1 : 0,\n green: item.green ? 1 : 0,\n }));\n\n let order: FelixOrder = {\n firstName: state.creditSafeUser.firstName,\n lastName: state.creditSafeUser.lastName,\n street: state.user.street,\n zip: state.user.zip,\n town: state.user.town,\n ssn: state.user.ssn,\n email: state.user.email,\n phone: state.user.phone,\n url: `${state.business === Business.string ? 'string' : state.business}-webk`,\n date: this.date,\n products: [\n ...state.cart.map(item => {\n const parts = item.parts.map(part => ({\n id: String(part.id),\n name: part.name,\n quantity: part.amount,\n rut: 0,\n rot: 0,\n start_fee_id: item.start_fee_obj ? item.start_fee_obj.ID : null,\n }));\n return [\n {\n id: String(item.id),\n name: item.name,\n quantity: item.amount,\n rot: item.rot ? 1 : 0,\n rut: item.rut ? 1 : 0,\n start_fee_id: item.start_fee_obj ? item.start_fee_obj.ID : null,\n },\n ...parts,\n ];\n }),\n ].flat(),\n start_fees: startFees,\n creditSafe: state.creditSafeUser,\n customer: state.business,\n id_source: state.customer.source ? state.customer.source.fieldData.So01_Name : '',\n id_sub_source: this.selectedSubSource ? this.selectedSubSource : '',\n seller_id: this.sellerID ?? '',\n referral_id: this.RefferalID ?? '',\n };\n\n const felixOrder = await postPerson(order);\n if (!felixOrder || !felixOrder.response?.scriptResult?.includes('OK')) {\n order = { ...order, felixStatus: 'error' };\n } else {\n order = { ...order, felixStatus: 'success' };\n }\n\n try {\n const { data: orderConfirm, status } = await postOrder(order);\n if (orderConfirm && status && status === 200) {\n state.step = 6;\n const el = this.el.closest('.hemfixarna_content');\n scrollToTop(el);\n } else {\n this.generalError = 'Något gick fel, försök igen senare';\n }\n } catch (error) {\n this.generalError = 'Något gick fel, försök igen senare';\n }\n this.loading = false;\n };\n\n handleSubmit = (e: Event) => {\n e.preventDefault();\n this.generalError = null;\n const validDate = this.date.length > 0;\n if (!validDate) {\n this.dateError = 'Ange ett giltigt datum';\n }\n const checkBoxes = Array.from(this.el.querySelectorAll('input[type=\"checkbox\"]'));\n const notValidTerms = checkBoxes.find(i => !(i as HTMLInputElement).checked);\n if (notValidTerms) {\n this.generalError = 'Du måste godkänna villkoren';\n }\n if (state.customer.source && state.selectSource) {\n if (!this.sellerID) {\n this.generalError = 'Ange säljare';\n return;\n }\n if (state.customer.source.sub_sources?.length && !this.selectedSubSource) {\n this.generalError = 'Välj underkälla';\n return;\n }\n }\n if (validDate && !notValidTerms) {\n this.sendOrder();\n }\n };\n\n componentWillLoad() {\n if (Boolean(state.user && state.user.street)) {\n state.checkoutStep = 2;\n }\n }\n\n render = () => {\n const dateLogo = getAssetPath(`./assets/date.svg`);\n const down = getAssetPath(`./assets/down.svg`);\n const loading = getAssetPath(`./assets/spinner.gif`);\n\n if (state.checkoutEdit) {\n return <hemfixarna-address />;\n } else if (state.checkoutStep === 1) {\n return <hemfixarna-getuser />;\n } else if (state.checkoutStep === 2) {\n return (\n <div class=\"mb-2\">\n <div class=\"hemfixarna_addressinfo\">\n <div>\n <p>{hideField(state.user.firstName)}</p>\n <p>{hideField(state.user.lastName)}</p>\n <p>{state.user.email}</p>\n <p>{state.user.phone}</p>\n </div>\n <div>\n <p>{hideField(state.user.street)}</p>\n <p>{hideField(state.user.zip)}</p>\n <p>{hideField(state.user.town)}</p>\n </div>\n <button onClick={() => (state.checkoutEdit = true)}>Behöver du ändra adressen?</button>\n </div>\n <form onSubmit={e => this.handleSubmit(e)}>\n <div>\n <img src={dateLogo} width={24} />\n <input\n class={`${this.date.length ? 'input_active' : ''}`}\n min={new Date().toISOString().split('T')[0]}\n onChange={e => this.handleChangeDate(e)}\n type=\"date\"\n name=\"date\"\n value={this.date}\n />\n <label htmlFor=\"date\">Tidigaste datum för hembesök</label>\n <img src={down} width={24} />\n </div>\n {this.dateError && <span>{this.dateError}</span>}\n {state.customer.source && state.selectSource ? (\n <Fragment>\n <p>\n Inloggad som:\n <strong> {state.customer.source.fieldData.So01_Name}</strong>\n </p>\n <label>\n Säljare (SäljarId)\n <input type=\"text\" value={this.sellerID} onChange={e => (this.sellerID = (e.target as HTMLInputElement).value)} />\n </label>\n <label>\n PartnerOrderID (RefferalID)\n <input type=\"text\" value={this.RefferalID} onChange={e => (this.RefferalID = (e.target as HTMLInputElement).value)} />\n </label>\n {state.customer.source.sub_sources?.length ? (\n <div>\n <select onChange={e => (this.selectedSubSource = (e.target as HTMLSelectElement).value)}>\n <option disabled selected value=\"null\">\n Välj underkälla\n </option>\n {state.customer.source.sub_sources.map(sub => (\n <option value={sub['So_SubSource::Sus01_Name']}>{sub['So_SubSource::Sus01_Name']}</option>\n ))}\n </select>\n </div>\n ) : (\n <p>Det finns inga underkällor att välja</p>\n )}\n </Fragment>\n ) : null}\n <label class=\"hemfixarna_checkbox\">\n <input onChange={() => this.handleChangeTerms()} type=\"checkbox\" />\n <span innerHTML={state.options.terms} />\n </label>\n {state.cart\n .filter(i => i.terms_checkout?.length)\n .map(item => (\n <Fragment>\n <label class=\"hemfixarna_checkbox\">\n <input onChange={() => this.handleChangeTerms()} type=\"checkbox\" />\n <span>{item.terms_checkout}</span>\n </label>\n </Fragment>\n ))}\n {this.generalError && <span>{this.generalError}</span>}\n <div class={this.loading ? 'loading' : ''}>\n <input type=\"submit\" value={this.loading ? '' : 'Skicka bokning'} />\n <img width={20} height={20} src={loading} alt=\"spinner\" />\n </div>\n </form>\n </div>\n );\n }\n };\n}\n"],"version":3}
|
@@ -0,0 +1,189 @@
|
|
1
|
+
import { r as registerInstance, e as getAssetPath, h, F as Fragment, i as getElement } from './index-2ce8b901.js';
|
2
|
+
import { s as state } from './index-21ba2b05.js';
|
3
|
+
import { W as WidgetStyle } from './index-c8ce6f4b.js';
|
4
|
+
import { a as getOptions, b as getRut, c as getRot, d as getGreenDiscount, g as getCustomer, l as loginCustomer } from './api-e3c51cb3.js';
|
5
|
+
import { g as getProductPriceWithRotAndRut } from './calc-b3b6593c.js';
|
6
|
+
import { s as scrollToTop } from './scroll-6c26b5da.js';
|
7
|
+
import './enviroment-fd0a763a.js';
|
8
|
+
|
9
|
+
const hemfixarnaCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\");\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n* {\n box-sizing: border-box;\n}\n\n:host {\n font-family: \"Inter\", sans-serif;\n}\n:host input[type=text] {\n padding: 16px;\n width: 100%;\n font-size: 16px;\n border: 1px solid #fcd9c9;\n}\n:host .mb-2 {\n margin-bottom: 32px;\n}\n:host button {\n color: #474444;\n}\n:host form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n position: relative;\n}\n:host form button {\n position: absolute;\n right: 0;\n top: -1rem;\n}\n:host form img {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n}\n:host form img:first-of-type {\n left: 16px;\n}\n:host form img:last-of-type {\n right: 16px;\n}\n:host form span {\n margin-top: -8px;\n color: #ec6632;\n}\n:host form p {\n text-align: center;\n}\n:host form p {\n margin: 0;\n}\n:host form div {\n position: relative;\n}\n:host form div label {\n pointer-events: none;\n position: absolute;\n left: 16px;\n top: 50%;\n transform: translateY(-50%);\n background: #fff;\n padding: 4px;\n transition: 0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n}\n:host form div input {\n padding: 16px;\n width: 100%;\n font-size: 16px;\n border: 1px solid #fcd9c9;\n}\n:host form div input:focus ~ label,\n:host form div .input_active ~ label {\n top: 0;\n transform: translateY(-50%);\n background: linear-gradient(180deg, #faf1e8 50%, #fff 50%);\n}\n:host form select {\n padding: 0.75rem 1rem;\n width: 100%;\n}\n:host h1 {\n font-size: 24px;\n font-weight: 400;\n line-height: 32px;\n letter-spacing: -3%;\n text-align: left;\n margin: 0 0 8px;\n}\n:host h2 {\n margin: 0 0 24px;\n font-weight: 700;\n font-size: 20px;\n line-height: 28px;\n letter-spacing: -3%;\n}\n:host p {\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: -3%;\n}\n:host .hemfixarna {\n width: 100%;\n /* Hide default HTML checkbox */\n /* The slider */\n}\n:host .hemfixarna_source {\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n:host .hemfixarna_source img {\n width: 20px;\n}\n:host .hemfixarna_source--pw {\n max-width: 300px !important;\n}\n:host .hemfixarna_source--pw input[type=password] {\n padding: 0.5rem;\n}\n:host .hemfixarna_source--pw form {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n:host .hemfixarna_contact {\n display: flex;\n gap: 16px;\n}\n:host .hemfixarna_contact a {\n display: flex;\n align-items: center;\n gap: 8px;\n color: #474444;\n text-decoration: none;\n font-weight: 600;\n font-size: 13px;\n}\n:host .hemfixarna_contact a:hover {\n text-decoration: underline;\n}\n:host .hemfixarna_contact--horizontal span {\n display: none;\n}\n@media (min-width: 769px) {\n :host .hemfixarna_contact--horizontal span {\n display: initial;\n }\n}\n:host .hemfixarna_painting {\n opacity: 0;\n padding: 0 1rem;\n animation: fadeIn 0.5s forwards 0.3s;\n}\n:host .hemfixarna_painting > h2,\n:host .hemfixarna_painting p {\n text-align: center;\n padding: 0 16px;\n}\n:host .hemfixarna_painting > h2 {\n margin: 0 0 8px;\n}\n:host .hemfixarna_partnerlogo {\n max-height: 50px;\n min-height: 45px;\n object-fit: contain;\n max-width: 150px;\n}\n@media (min-width: 769px) {\n :host .hemfixarna_partnerlogo {\n max-width: 200px;\n }\n}\n:host .hemfixarna_nav {\n position: absolute;\n top: 0;\n width: 100dvw;\n left: 0;\n height: 80px;\n z-index: 9999;\n}\n:host .hemfixarna_nav--links {\n display: none !important;\n}\n@media (min-width: 769px) {\n :host .hemfixarna_nav--links {\n display: flex !important;\n }\n}\n:host .hemfixarna_nav--links a {\n color: #ec6632;\n text-decoration: none;\n border: 1px solid rgba(255, 255, 255, 0.3);\n border-radius: 56px;\n padding: 8px 32px;\n text-transform: capitalize;\n}\n:host .hemfixarna_nav > div {\n position: relative;\n overflow: hidden;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 16px;\n}\n@media (min-width: 769px) {\n :host .hemfixarna_nav > div {\n padding: 0 32px;\n }\n}\n:host .hemfixarna_nav > div > div {\n display: flex;\n gap: 32px;\n justify-content: space-between;\n}\n:host .hemfixarna_nav > div > img {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: -1;\n}\n:host .hemfixarna_nav a {\n text-decoration: none;\n}\n:host .hemfixarna_nav p {\n color: #474444;\n}\n:host .hemfixarna_nav p.with-bg {\n color: #fff;\n}\n:host .hemfixarna_standalone .hemfixarna_backdrop {\n background: #fffaf2;\n opacity: 1;\n}\n:host .hemfixarna_standalone .hemfixarna_modal {\n top: 80px;\n transform: translateX(-50%);\n border: none;\n height: calc(100dvh - 80px);\n opacity: 0;\n}\n:host .hemfixarna_standalone .hemfixarna_modal--open {\n opacity: 1;\n}\n:host .hemfixarna .switch {\n position: relative;\n display: inline-block;\n width: 40px;\n height: 20px;\n}\n:host .hemfixarna .switch input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n:host .hemfixarna .slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n -webkit-transition: 0.4s;\n transition: 0.4s;\n border-radius: 34px;\n}\n:host .hemfixarna .slider:before {\n position: absolute;\n content: \"\";\n height: 18px;\n width: 18px;\n left: 2px;\n bottom: 1px;\n background-color: white;\n -webkit-transition: 0.4s;\n transition: 0.4s;\n border-radius: 50%;\n}\n:host .hemfixarna input:checked + .slider {\n background-color: #fcd9c9;\n}\n:host .hemfixarna input:focus + .slider {\n box-shadow: 0 0 1px #fcd9c9;\n}\n:host .hemfixarna input:checked + .slider:before {\n -webkit-transform: translateX(18px);\n -ms-transform: translateX(18px);\n transform: translateX(18px);\n background: #ec6632;\n}\n:host .hemfixarna_maleribox {\n background: #fff;\n box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);\n width: 100%;\n min-height: 132px;\n padding: 24px;\n display: flex;\n align-items: center;\n gap: 24px;\n text-align: left;\n}\n:host .hemfixarna_maleribox:hover {\n transition: 0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n filter: brightness(1.02);\n transform: scale(1.01);\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863);\n}\n:host .hemfixarna_checkbox {\n display: grid;\n grid-template-columns: 40px auto;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: -3%;\n}\n:host .hemfixarna_checkbox > span {\n transform: translateY(6px);\n}\n:host .hemfixarna_checkbox span,\n:host .hemfixarna_checkbox span p {\n color: #474444;\n font-size: 14px;\n}\n:host .hemfixarna_checkbox p {\n text-align: left;\n}\n:host .hemfixarna_info {\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 32px;\n box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);\n border-radius: 4px;\n border: 1px solid #fcd9c9;\n}\n:host .hemfixarna_info h2 {\n margin: 0;\n}\n@media (min-width: 769px) {\n :host .hemfixarna_info {\n position: sticky;\n top: 0;\n }\n}\n:host .hemfixarna_infomodal {\n position: absolute;\n top: 40%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n max-width: 80%;\n background: #fffaf2;\n border: 1px solid #fcd9c9;\n padding: 32px;\n z-index: 99;\n border-radius: 4px;\n box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n:host .hemfixarna_infomodal p,\n:host .hemfixarna_infomodal h4 {\n margin: 0;\n}\n:host .hemfixarna_infomodal button {\n background: #ec6632;\n color: #fff;\n border-radius: 60px;\n font-size: 16px;\n padding: 8px 16px;\n}\n:host .hemfixarna_addressinfo {\n padding: 16px 16px 64px;\n border: 1px solid #fcd9c9;\n position: relative;\n margin-bottom: 32px;\n display: grid;\n grid-template-columns: 1fr;\n gap: 8px;\n}\n@media (min-width: 769px) {\n :host .hemfixarna_addressinfo {\n grid-template-columns: 1fr 1fr;\n }\n}\n:host .hemfixarna_addressinfo button {\n position: absolute;\n bottom: 16px;\n right: 16px;\n font-weight: 500;\n text-underline-offset: 2px;\n text-decoration: underline;\n}\n:host .hemfixarna_part {\n background: #fff;\n box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);\n display: grid;\n padding: 16px;\n grid-template-columns: auto 75px;\n}\n:host .hemfixarna_counter {\n display: flex;\n align-items: center;\n}\n:host .hemfixarna_counter span {\n padding: 0 8px;\n}\n:host .hemfixarna_counter img {\n cursor: pointer;\n}\n:host .hemfixarna_counter img:not(.disabled):hover {\n transition: 0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n filter: brightness(1.02);\n transform: scale(1.01);\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863);\n}\n:host .hemfixarna_description {\n display: grid;\n gap: 16px;\n}\n:host .hemfixarna_description ul {\n list-style: disc;\n padding-right: 12px;\n transform: translateX(12px);\n}\n:host .hemfixarna_description--hidden {\n max-height: 140px;\n overflow: hidden;\n position: relative;\n cursor: pointer;\n}\n:host .hemfixarna_description--hidden::after {\n content: \"\";\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 128px;\n background: linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #faf1e8);\n}\n:host .hemfixarna_terms {\n font-size: 14px;\n}\n:host .hemfixarna_terms a {\n color: inherit;\n}\n:host .hemfixarna_logo {\n height: 64px;\n}\n:host .hemfixarna_box {\n padding: 16px;\n display: flex;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n border-radius: 4px;\n gap: 16px 8px;\n border-radius: 4px;\n gap: 16px 8px;\n}\n:host .hemfixarna_box p,\n:host .hemfixarna_box span {\n font-size: 15px;\n}\n:host .hemfixarna_box .underline {\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n:host .hemfixarna_box .pointer {\n cursor: pointer;\n}\n:host .hemfixarna_box .p-s {\n font-size: 12px;\n}\n:host .hemfixarna_box > div {\n display: grid;\n gap: 8px;\n}\n:host .hemfixarna_box--standard {\n background: #fffaf2;\n border: 1px solid #fcd9c9;\n}\n:host .hemfixarna_box--alternative, :host .hemfixarna_box--alternative_2, :host .hemfixarna_box--alternative_3 {\n background: transparent;\n border: 1px solid #e3e3e3;\n}\n:host .hemfixarna_box--alternative_2, :host .hemfixarna_box--alternative_3 {\n box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, 0.0784313725);\n}\n:host .hemfixarna_box--alternative_3 {\n justify-content: center;\n}\n:host .hemfixarna_altbtn {\n display: flex !important;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n margin-left: auto;\n}\n:host .hemfixarna_btn {\n margin-left: auto;\n}\n:host .hemfixarna_btn, :host .hemfixarna_buy,\n:host .hemfixarna input[type=submit] {\n border: none;\n border-radius: 60px;\n font-weight: 600;\n letter-spacing: 0.5px;\n line-height: 20px;\n box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);\n}\n:host .hemfixarna_btn:not(.disabled):hover, :host .hemfixarna_buy:not(.disabled):hover,\n:host .hemfixarna input[type=submit]:not(.disabled):hover {\n transition: 0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n filter: brightness(1.02);\n transform: scale(1.01);\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863);\n}\n:host .hemfixarna div:has(> input[type=submit]) {\n position: relative;\n}\n:host .hemfixarna div:has(> input[type=submit]) input {\n cursor: pointer;\n}\n:host .hemfixarna div:has(> input[type=submit]) img {\n display: none;\n}\n:host .hemfixarna .loading {\n cursor: default;\n opacity: 0.6;\n}\n:host .hemfixarna .loading > img {\n display: initial !important;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n:host .hemfixarna_btn {\n font-size: 14px;\n background: #c84e18;\n color: #fff;\n padding: 16px 24px;\n white-space: nowrap;\n position: relative;\n}\n:host .hemfixarna_btn span {\n position: absolute;\n background: #fff;\n border-radius: 100%;\n width: 24px;\n height: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: 600;\n font-size: 13px;\n line-height: 11px;\n top: -6px;\n right: -12px;\n}\n:host .hemfixarna_btn span {\n background: #25a710;\n color: #fff;\n right: 0 !important;\n}\n:host .hemfixarna_buy,\n:host .hemfixarna input[type=submit] {\n font-size: 21px;\n background: #25a710;\n color: #fff;\n padding: 16px 24px;\n}\n:host .hemfixarna .disabled {\n opacity: 0.5;\n cursor: default;\n}\n:host .hemfixarna_modal {\n position: fixed;\n background: #faf1e8;\n border: 1px solid #fcd9c9;\n border-radius: 4px;\n top: 50%;\n left: 50%;\n z-index: 1000;\n transition: 0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n transform: translate(-50%, -50%) scale(0.7);\n opacity: 0;\n height: 92%;\n width: 92%;\n max-width: 920px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n:host .hemfixarna_modal--open {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n}\n:host .hemfixarna_backdrop {\n z-index: 999;\n position: fixed;\n background: #474444;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n 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);\n}\n:host .hemfixarna_backdrop--open {\n opacity: 0.3;\n}\n:host .hemfixarna_order {\n position: absolute;\n top: -1px;\n left: -1px;\n right: -1px;\n bottom: -1px;\n background-repeat: no-repeat !important;\n background-size: cover !important;\n background-position: center !important;\n display: grid;\n grid-template-columns: 1fr 1fr;\n padding: 48px 32px 64px;\n}\n@media (max-width: 768px) {\n :host .hemfixarna_order {\n grid-template-columns: 1fr;\n grid-template-rows: 0 auto;\n }\n}\n:host .hemfixarna_order > div:last-of-type {\n background: #fffaf2;\n padding: 32px;\n display: flex;\n flex-direction: column;\n max-height: 100%;\n overflow: auto;\n}\n:host .hemfixarna_order img {\n cursor: pointer;\n}\n:host .hemfixarna_order button {\n margin: 16px 0;\n padding: 0;\n text-decoration: underline;\n text-underline-offset: 2px;\n font-size: 14px;\n font-weight: 600;\n}\n:host .hemfixarna_cart {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 32px;\n}\n@media (max-width: 768px) {\n :host .hemfixarna_cart {\n grid-template-columns: 1fr;\n gap: 0;\n }\n}\n:host .hemfixarna_cart--right h2, :host .hemfixarna_cart--left h2 {\n display: flex;\n align-items: center;\n}\n:host .hemfixarna_cart--right h2 img, :host .hemfixarna_cart--left h2 img {\n margin-top: 3.2px;\n}\n@media (min-width: 769px) {\n :host .hemfixarna_cart--left h2 button {\n display: none;\n }\n}\n@media (max-width: 768px) {\n :host .hemfixarna_cart--right h2 button {\n display: none;\n }\n}\n:host .hemfixarna_cart--startfee {\n display: flex;\n justify-content: space-between;\n}\n:host .hemfixarna_cart--rutrot {\n display: flex;\n justify-content: space-between;\n}\n:host .hemfixarna_cart--rutrot div {\n display: flex;\n gap: 16px;\n align-items: center;\n}\n:host .hemfixarna_cart--additional {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n border-top: 1px solid #fcd9c9;\n}\n:host .hemfixarna_cart--additional p {\n font-size: 14px;\n position: relative;\n}\n:host .hemfixarna_cart--additional p strong {\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: pointer;\n}\n:host .hemfixarna_cart--additional p img {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: -20px;\n cursor: pointer;\n}\n:host .hemfixarna_cart--price {\n border-top: 1px solid #fcd9c9;\n padding: 16px;\n display: flex;\n justify-content: space-between;\n}\n:host .hemfixarna_cart--price h3 {\n margin: 0;\n}\n:host .hemfixarna_cart--item {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px 0;\n border-top: 1px solid #fcd9c9;\n}\n:host .hemfixarna_cart--item span {\n font-size: 12px;\n}\n:host .hemfixarna_cart--item > div {\n display: flex;\n justify-content: space-between;\n}\n:host .hemfixarna_cart--item > div > div {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n:host .hemfixarna_cart--item > div button {\n color: #ec6632;\n}\n:host .hemfixarna_cart--group {\n border-radius: 16px;\n background: #fefaf6;\n margin-bottom: 16px;\n padding: 10px 20px;\n}\n:host .hemfixarna_cart--group ul li:first-of-type {\n border-top: 0;\n}\n:host .hemfixarna_categories {\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n:host .hemfixarna_categories--wrapper {\n gap: 32px;\n display: grid;\n grid-template-columns: 1fr 1fr;\n}\n@media (max-width: 768px) {\n :host .hemfixarna_categories--wrapper {\n grid-template-columns: 1fr;\n }\n}\n:host .hemfixarna_categories li {\n position: relative;\n background: #fff;\n border-radius: 4px;\n min-height: 132px;\n padding: 24px;\n box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);\n display: flex;\n align-items: center;\n gap: 24px;\n cursor: pointer;\n}\n:host .hemfixarna_categories li:hover {\n transition: 0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n filter: brightness(1.02);\n transform: scale(1.01);\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863);\n}\n:host .hemfixarna_categories li > button {\n height: 100%;\n width: 100%;\n}\n:host .hemfixarna_categories li .price {\n font-weight: 700;\n}\n:host .hemfixarna_content {\n height: 100%;\n overflow: auto;\n padding: 0 32px 64px;\n}\n:host .hemfixarna_content--5 {\n padding-top: 16px;\n}\n:host .hemfixarna_content--painting {\n padding: 0;\n overflow: initial;\n}\n:host .hemfixarna_crumbs {\n position: relative;\n padding: 16px 24px;\n border-bottom: 1px solid #fcd9c9;\n display: flex;\n justify-content: space-between;\n}\n:host .hemfixarna_crumbs--back {\n padding: 16px 24px 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n box-shadow: none !important;\n}\n:host .hemfixarna_crumbs--back:hover {\n transition: 0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n filter: brightness(1.02);\n transform: scale(1.01);\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863);\n}\n:host .hemfixarna_crumbs img {\n cursor: pointer;\n}\n:host .hemfixarna_crumbs .close {\n position: absolute;\n right: -16px;\n top: -16px;\n z-index: 9;\n -webkit-transform: translate3d(0, 0, 0);\n}\n:host .hemfixarna_crumbs .cart {\n display: flex;\n padding-left: 16px;\n position: relative;\n}\n:host .hemfixarna_crumbs .cart img {\n cursor: inherit;\n}\n:host .hemfixarna_crumbs .cart span {\n position: absolute;\n background: #fff;\n border-radius: 100%;\n width: 24px;\n height: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: 600;\n font-size: 13px;\n line-height: 11px;\n top: -6px;\n right: -12px;\n}\n:host .hemfixarna_crumbs .cart_active {\n cursor: pointer;\n}\n:host .hemfixarna_crumbs .cart_active span {\n background: #25a710;\n color: #fff;\n}\n:host .hemfixarna_crumbs--links {\n display: flex;\n align-items: center;\n gap: 16px;\n overflow: auto;\n}\n@media (min-width: 769px) {\n :host .hemfixarna_crumbs--links {\n -ms-overflow-style: none;\n }\n :host .hemfixarna_crumbs--links::-webkit-scrollbar {\n display: none;\n }\n :host .hemfixarna_crumbs--links::-webkit-scrollbar-button {\n display: none;\n }\n}\n:host .hemfixarna_crumbs--right {\n display: flex;\n align-items: center;\n}\n:host .hemfixarna_crumbs button {\n white-space: nowrap;\n background: #f1ded6;\n border-radius: 64px;\n padding: 12px 16px;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.3px;\n box-shadow: none !important;\n}\n:host .hemfixarna_crumbs button:not(.active):hover {\n transition: 0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n filter: brightness(1.02);\n transform: scale(1.01);\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863);\n}\n@media (max-width: 768px) {\n :host .hemfixarna_crumbs button {\n display: none;\n }\n}\n:host .hemfixarna_crumbs .active {\n background: #fffaf2;\n cursor: default;\n}\n:host .hemfixarna_features {\n gap: 12px !important;\n}\n:host .hemfixarna_features li {\n display: flex;\n gap: 16px;\n align-items: center;\n}\n:host .hemfixarna_address {\n margin-bottom: 16px;\n}\n:host .hemfixarna_product {\n display: grid;\n gap: 16px;\n}\n:host .hemfixarna_product--link {\n font-weight: 700;\n color: #474444;\n text-underline-offset: 4px;\n}\n:host .hemfixarna_product--left {\n gap: 32px;\n}\n:host .hemfixarna_product--right {\n gap: 32px;\n}\n:host .hemfixarna_product--price {\n margin-top: 4px;\n font-weight: 700;\n}\n:host .hemfixarna_product--total {\n text-align: center;\n margin: -16px 0;\n font-size: 21px;\n line-height: 28px;\n}\n:host .hemfixarna_product--item {\n background: #fff;\n padding: 16px;\n display: grid;\n grid-template-columns: auto 75px;\n box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);\n}\n:host .hemfixarna_product--grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 32px;\n}\n@media (max-width: 768px) {\n :host .hemfixarna_product--grid {\n grid-template-columns: 1fr;\n }\n}\n:host .hemfixarna_product--grid > div {\n display: flex;\n flex-direction: column;\n}\n:host .hemfixarna_product--grid ul {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n:host .hemfixarna_product p {\n margin: 0;\n}\n:host .hemfixarna_product--top {\n display: flex;\n gap: 32px;\n}\n:host .hemfixarna_product--top img {\n object-fit: contain;\n}\n:host .hemfixarna_product--top > div {\n width: 100%;\n}\n:host .hemfixarna_product--top > div h1 {\n max-width: 80%;\n}\n@media (max-width: 768px) {\n :host .hemfixarna_product--top > div h1 {\n max-width: 100%;\n }\n}\n:host .hemfixarna_product--top h4 {\n margin-bottom: 8px;\n}\n:host h5,\n:host p {\n margin: 0;\n}\n:host input[type=submit] {\n cursor: pointer;\n}\n:host input[type=date] ~ label {\n left: 56px;\n}\n:host input[type=date] {\n border: 1px solid #fcd9c9;\n padding-left: 64px;\n}\n:host input[type=checkbox] {\n height: 18px;\n width: 18px;\n border: 1px solid #fcd9c9;\n}\n:host input[type=checkbox]:checked {\n background: red;\n}\n:host input[type=date]::-webkit-calendar-picker-indicator {\n background: transparent;\n bottom: 0;\n color: transparent;\n cursor: pointer;\n height: auto;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n width: auto;\n}\n:host button,\n:host a {\n cursor: pointer;\n background: none;\n border: none;\n}\n:host ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}";
|
10
|
+
|
11
|
+
const HemfixarnaComponent = class {
|
12
|
+
constructor(hostRef) {
|
13
|
+
registerInstance(this, hostRef);
|
14
|
+
this.triggerScrollTotop = () => {
|
15
|
+
const el = this.el.shadowRoot.querySelector('.hemfixarna_content');
|
16
|
+
scrollToTop(el);
|
17
|
+
};
|
18
|
+
this.modal = false;
|
19
|
+
this.showModal = false;
|
20
|
+
this.product = null;
|
21
|
+
this.id = undefined;
|
22
|
+
this.slug = undefined;
|
23
|
+
this.business = undefined;
|
24
|
+
this.widgetStyle = WidgetStyle.standard;
|
25
|
+
this.buttonColor = undefined;
|
26
|
+
this.buttonBg = undefined;
|
27
|
+
this.proppedProduct = null;
|
28
|
+
this.loginSourceError = null;
|
29
|
+
}
|
30
|
+
loadCategoryOrProduct(id) {
|
31
|
+
this.proppedProduct = null;
|
32
|
+
if (id.startsWith('c-')) {
|
33
|
+
const categories = [...state.customer.categories, ...state.customer.categories.map(c => { var _a; return (_a = c.sub_categories) !== null && _a !== void 0 ? _a : []; })].flat();
|
34
|
+
const category = categories.find(c => c && c.id === id.replace('c-', ''));
|
35
|
+
if (category) {
|
36
|
+
state.selectedCustomerCategory = category;
|
37
|
+
state.step = 2;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
else {
|
41
|
+
const products = state.customer.categories
|
42
|
+
.map(c => (c.show_products ? c.products : c.sub_categories ? c.sub_categories.map(c => c.products) : []))
|
43
|
+
.flat()
|
44
|
+
.flat();
|
45
|
+
const product = products.find(p => p && p.fields.ID === parseInt(id));
|
46
|
+
if (product) {
|
47
|
+
state.selectedProduct = product.fields;
|
48
|
+
state.step = 4;
|
49
|
+
this.proppedProduct = product.fields;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
async watchIdChange(id) {
|
54
|
+
if (id && state.customer) {
|
55
|
+
if (id === 'maleri') {
|
56
|
+
state.maleri = true;
|
57
|
+
state.step = 4;
|
58
|
+
}
|
59
|
+
else {
|
60
|
+
this.loadCategoryOrProduct(id);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
async componentWillLoad() {
|
65
|
+
state.business = this.business;
|
66
|
+
const cart = window.sessionStorage.getItem(`hemfixarna-${this.business}-cart`);
|
67
|
+
if (cart) {
|
68
|
+
state.cart = JSON.parse(cart);
|
69
|
+
}
|
70
|
+
const user = window.sessionStorage.getItem(`hemfixarna-${this.business}-user`);
|
71
|
+
if (user) {
|
72
|
+
state.user = JSON.parse(user);
|
73
|
+
}
|
74
|
+
const creditSafeUser = window.sessionStorage.getItem(`hemfixarna-${this.business}-creditSafeUser`);
|
75
|
+
if (creditSafeUser) {
|
76
|
+
state.creditSafeUser = JSON.parse(creditSafeUser);
|
77
|
+
}
|
78
|
+
const [options, rut, rot, greenDiscount] = await Promise.all([getOptions(), getRut(), getRot(), getGreenDiscount()]);
|
79
|
+
try {
|
80
|
+
const customer = await getCustomer(this.business);
|
81
|
+
if ((customer === null || customer === void 0 ? void 0 : customer.code) === 'not_found') {
|
82
|
+
console.warn('customer not found');
|
83
|
+
}
|
84
|
+
else if (customer) {
|
85
|
+
state.customer = customer;
|
86
|
+
const id = this.id || this.slug;
|
87
|
+
if (id) {
|
88
|
+
if (id === 'maleri') {
|
89
|
+
state.maleri = true;
|
90
|
+
state.step = 4;
|
91
|
+
}
|
92
|
+
else {
|
93
|
+
this.loadCategoryOrProduct(id);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
catch (error) {
|
99
|
+
console.warn('customer not found');
|
100
|
+
}
|
101
|
+
state.rotOptions = rot;
|
102
|
+
state.rutOptions = rut;
|
103
|
+
state.greenOptions = greenDiscount;
|
104
|
+
state.options = options;
|
105
|
+
if (localStorage.getItem('select_source')) {
|
106
|
+
state.selectSource = true;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
// Open close modal && click outside event
|
110
|
+
openModal() {
|
111
|
+
if (this.id) {
|
112
|
+
if (this.id === 'maleri') {
|
113
|
+
state.maleri = true;
|
114
|
+
state.step = 4;
|
115
|
+
}
|
116
|
+
else {
|
117
|
+
state.maleri = false;
|
118
|
+
this.loadCategoryOrProduct(this.id);
|
119
|
+
}
|
120
|
+
}
|
121
|
+
this.modal = true;
|
122
|
+
setTimeout(() => {
|
123
|
+
this.showModal = true;
|
124
|
+
}, 50);
|
125
|
+
}
|
126
|
+
closeModal() {
|
127
|
+
this.showModal = false;
|
128
|
+
setTimeout(() => {
|
129
|
+
this.modal = false;
|
130
|
+
}, 200);
|
131
|
+
}
|
132
|
+
handleClick(e) {
|
133
|
+
if ((e === null || e === void 0 ? void 0 : e.composedPath()[0]).classList.contains('hemfixarna_backdrop')) {
|
134
|
+
this.closeModal();
|
135
|
+
}
|
136
|
+
const infomodal = this.el.shadowRoot.querySelector('.hemfixarna_infomodal');
|
137
|
+
if (infomodal) {
|
138
|
+
const isClickInside = infomodal.contains(e.composedPath()[0]);
|
139
|
+
if (!isClickInside) {
|
140
|
+
state.modal = null;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
async handleLogin() {
|
145
|
+
this.loginSourceError = null;
|
146
|
+
const passwordInput = this.el.shadowRoot.querySelector('input[type="password"]');
|
147
|
+
const password = passwordInput.value;
|
148
|
+
try {
|
149
|
+
const status = await loginCustomer({ id: state.customer.ID, password: password });
|
150
|
+
if (status === 200) {
|
151
|
+
state.showSourcePasswordPrompt = false;
|
152
|
+
state.selectSource = true;
|
153
|
+
}
|
154
|
+
else {
|
155
|
+
this.loginSourceError = 'Fel lösenord';
|
156
|
+
}
|
157
|
+
}
|
158
|
+
catch (error) {
|
159
|
+
console.log(error);
|
160
|
+
this.loginSourceError = 'Fel lösenord';
|
161
|
+
}
|
162
|
+
}
|
163
|
+
getCartLength() {
|
164
|
+
return state.cart.reduce((acc, curr) => acc + curr.amount, 0);
|
165
|
+
}
|
166
|
+
render() {
|
167
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
168
|
+
const logo = getAssetPath(`./assets/hemfixarna.svg`);
|
169
|
+
const pensel = getAssetPath(`./assets/pensel.svg`);
|
170
|
+
const monteringLogo = getAssetPath(`./assets/montering.svg`);
|
171
|
+
return (h("div", { class: `hemfixarna hemfixarna-${this.business}` }, h("div", { class: `hemfixarna_box hemfixarna_box--${this.widgetStyle}` }, [WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) ? (h("img", { src: this.id === 'maleri' ? pensel : monteringLogo, alt: "montering logo", width: 32, height: 32 })) : null, h("div", null, h("div", null, h("p", { onClick: () => this.openModal(), class: `pointer ${[WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) && state.selectedProduct ? 'underline' : ''}` }, this.id === 'maleri' ? (h("span", null, "Ber\u00E4kna fast pris p\u00E5 m\u00E5leri & tapetsering h\u00E4r")) : (h(Fragment, null, !state.selectedCustomerCategory && !this.product && !this.proppedProduct ? (h(Fragment, null, ((_a = state.customer) === null || _a === void 0 ? void 0 : _a.widget_title) ? (h("span", null, state.customer.widget_title)) : (h("span", null, "Montering/Installation - ", h("strong", { class: "underline" }, "se priser h\u00E4r"))))) : (h(Fragment, null, ((_b = this.product) === null || _b === void 0 ? void 0 : _b.title) || ((_c = this.proppedProduct) === null || _c === void 0 ? void 0 : _c.title) || ((_d = state.selectedCustomerCategory) === null || _d === void 0 ? void 0 : _d.widget_title) || (h("span", null, "Montering", h("wbr", null), "/Installation ", (_f = (_e = state.selectedCustomerCategory) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : 'på plats', " - ", h("strong", { class: "underline" }, "se priser h\u00E4r"))), this.proppedProduct && !((_g = this.product) === null || _g === void 0 ? void 0 : _g.invoice) && !((_h = this.proppedProduct) === null || _h === void 0 ? void 0 : _h.invoice) ? (h("span", null, ' från', " ", h("strong", null, getProductPriceWithRotAndRut(this.proppedProduct || this.product), "kr"))) : null)))))), this.widgetStyle === WidgetStyle.standard ? h("img", { src: logo, width: 104 }) : null, this.widgetStyle === WidgetStyle.alternative ? (h("span", { class: "p-s" }, "Utf\u00F6rs av ", h("strong", null, "Hemfixarna"))) : null), [WidgetStyle.standard, WidgetStyle.alternative].includes(this.widgetStyle) ? (h("button", { onClick: () => this.openModal(), class: "hemfixarna_btn", style: {
|
172
|
+
color: ((_j = this.buttonColor) === null || _j === void 0 ? void 0 : _j.startsWith('#')) || !((_k = this.buttonColor) === null || _k === void 0 ? void 0 : _k.length) ? this.buttonColor : `#${this.buttonColor}`,
|
173
|
+
backgroundColor: ((_l = this.buttonBg) === null || _l === void 0 ? void 0 : _l.startsWith('#')) || !((_m = this.buttonBg) === null || _m === void 0 ? void 0 : _m.length) ? this.buttonBg : `#${this.buttonBg}`,
|
174
|
+
} }, "Best\u00E4ll h\u00E4r", this.getCartLength() > 0 && h("span", null, this.getCartLength()))) : null, WidgetStyle.alternative_2 === this.widgetStyle ? (h("div", { class: "hemfixarna_altbtn" }, h("strong", { class: "p-s" }, "Utf\u00F6rs av"), h("img", { src: logo, alt: "hemfixarna logo", width: 98 }))) : null), this.modal && (h("div", null, h("div", { class: `hemfixarna_modal ${this.showModal ? 'hemfixarna_modal--open' : ''}` }, state.modal && (h("div", { class: "hemfixarna_infomodal" }, state.modal.title && h("h2", null, state.modal.title), h("p", { innerHTML: state.modal.text }), h("div", null, h("button", { onClick: () => (state.modal = null) }, "St\u00E4ng")))), state.showSourcePasswordPrompt ? (h("div", { class: "hemfixarna_source--pw hemfixarna_infomodal" }, h("form", { onSubmit: e => {
|
175
|
+
e.preventDefault();
|
176
|
+
this.handleLogin();
|
177
|
+
} }, h("input", { type: "password", placeholder: "L\u00F6senord" }), h("input", { type: "submit", value: "Logga in" }), this.loginSourceError && h("span", null, "Fel l\u00F6senord")))) : null, state.customer && h("hemfixarna-breadcrumbs", { closeModal: () => this.closeModal() }), h("div", { class: `hemfixarna_content hemfixarna_content--${state.step} ${state.step === 4 && state.maleri ? 'hemfixarna_content--painting' : ''}` }, state.step < 4 && h("hemfixarna-start", null), state.step === 4 && h("hemfixarna-product", null), state.step === 5 && h("hemfixarna-cart", null), state.step === 6 && h("hemfixarna-order", null))), h("div", { class: `hemfixarna_backdrop ${this.showModal ? 'hemfixarna_backdrop--open' : ''}` })))));
|
178
|
+
}
|
179
|
+
static get assetsDirs() { return ["assets"]; }
|
180
|
+
get el() { return getElement(this); }
|
181
|
+
static get watchers() { return {
|
182
|
+
"id": ["watchIdChange"]
|
183
|
+
}; }
|
184
|
+
};
|
185
|
+
HemfixarnaComponent.style = hemfixarnaCss;
|
186
|
+
|
187
|
+
export { HemfixarnaComponent as hemfixarna_component };
|
188
|
+
|
189
|
+
//# sourceMappingURL=hemfixarna-component.entry.js.map
|