hemfixarna-web-components 1.8.5 → 1.8.7
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_15.cjs.entry.js +2180 -0
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js +27 -0
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-category.cjs.entry.js +28 -0
- package/dist/cjs/hemfixarna-category.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-components.cjs.js +28 -0
- package/dist/cjs/hemfixarna-components.cjs.js.map +1 -0
- package/dist/cjs/hemfixarna-doro.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-doro.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-elfa.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-elfa.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-forebygg.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-forebygg.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-hornbach.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-hornbach.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-kbygg.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-kbygg.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-klint.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-klint.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-kund.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-kund.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-power.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-power.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-service.cjs.entry.js +24 -0
- package/dist/cjs/hemfixarna-service.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-skanska.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-skanska.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-superfront.cjs.entry.js +24 -0
- package/dist/cjs/hemfixarna-superfront.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-tesla.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-tesla.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-zaptec.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-zaptec.cjs.entry.js.map +1 -0
- package/dist/cjs/index-6cce99a1.js +264 -0
- package/dist/cjs/index-6cce99a1.js.map +1 -0
- package/dist/cjs/index-dc8e80e4.js +53 -0
- package/dist/cjs/index-dc8e80e4.js.map +1 -0
- package/dist/cjs/index-e6926623.js +1741 -0
- package/dist/cjs/index-e6926623.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +24 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/assets/back.svg +3 -0
- package/dist/collection/assets/cart.svg +10 -0
- package/dist/collection/assets/checked.svg +10 -0
- package/dist/collection/assets/close.svg +5 -0
- package/dist/collection/assets/copy.png +0 -0
- package/dist/collection/assets/date.svg +6 -0
- package/dist/collection/assets/down.svg +3 -0
- package/dist/collection/assets/drag-drop.svg +3 -0
- package/dist/collection/assets/elfa.png +0 -0
- package/dist/collection/assets/gubbe-pensel.svg +1 -0
- package/dist/collection/assets/hemfixarna.svg +11 -0
- package/dist/collection/assets/hornbach/logo.svg +42 -0
- package/dist/collection/assets/hornbach/nav.jpg +0 -0
- package/dist/collection/assets/info.svg +5 -0
- package/dist/collection/assets/kbygg.svg +29 -0
- package/dist/collection/assets/minus.svg +4 -0
- package/dist/collection/assets/montering.svg +15 -0
- package/dist/collection/assets/norrgavel.svg +1 -0
- package/dist/collection/assets/pensel.svg +1 -0
- package/dist/collection/assets/plus.svg +5 -0
- package/dist/collection/assets/spinner.gif +0 -0
- package/dist/collection/assets/tesla.svg +1 -0
- package/dist/collection/assets/zaptec.svg +1 -0
- package/dist/collection/collection-manifest.json +47 -0
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.css +0 -0
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js +122 -0
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.css +0 -0
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js +104 -0
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.css +0 -0
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js +104 -0
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js +94 -0
- package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js +94 -0
- package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.css +0 -0
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js +104 -0
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.css +0 -0
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js +104 -0
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js +94 -0
- package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js +94 -0
- package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js +94 -0
- package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js +94 -0
- package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js +94 -0
- package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.css +0 -0
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js +104 -0
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js +94 -0
- package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js +104 -0
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string.css +0 -0
- package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js +113 -0
- package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js +94 -0
- package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js +94 -0
- package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js.map +1 -0
- package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js +94 -0
- package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js.map +1 -0
- package/dist/{hemfixarna-components/hemfixarna-address.entry.js → collection/components/hemfixarna-address/hemfixarna-address.js} +20 -14
- package/dist/collection/components/hemfixarna-address/hemfixarna-address.js.map +1 -0
- package/dist/collection/components/hemfixarna-box/hemfixarna-box.js +138 -0
- package/dist/collection/components/hemfixarna-box/hemfixarna-box.js.map +1 -0
- package/dist/{hemfixarna-components/hemfixarna-breadcrumbs.entry.js → collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js} +28 -13
- package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js.map +1 -0
- package/dist/{hemfixarna-components/hemfixarna-cart.entry.js → collection/components/hemfixarna-cart/hemfixarna-cart.js} +6 -12
- package/dist/collection/components/hemfixarna-cart/hemfixarna-cart.js.map +1 -0
- package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js +18 -0
- package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js.map +1 -0
- package/dist/{hemfixarna-components/hemfixarna-checkout.entry.js → collection/components/hemfixarna-checkout/hemfixarna-checkout.js} +26 -33
- package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js.map +1 -0
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +330 -0
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -0
- package/dist/collection/components/hemfixarna-component/hemfixarna.css +1061 -0
- package/dist/{hemfixarna-components/hemfixarna-contact.entry.js → collection/components/hemfixarna-contact/hemfixarna-contact.js} +29 -11
- package/dist/collection/components/hemfixarna-contact/hemfixarna-contact.js.map +1 -0
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.css +135 -0
- package/dist/{hemfixarna-components/hemfixarna-demo.entry.js → collection/components/hemfixarna-demo/hemfixarna-demo.js} +46 -21
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +1 -0
- package/dist/collection/components/hemfixarna-getuser/hemfixarna-getuser.js +91 -0
- package/dist/collection/components/hemfixarna-getuser/hemfixarna-getuser.js.map +1 -0
- package/dist/{hemfixarna-components/hemfixarna-info.entry.js → collection/components/hemfixarna-info/hemfixarna-info.js} +7 -11
- package/dist/collection/components/hemfixarna-info/hemfixarna-info.js.map +1 -0
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.css +76 -0
- package/dist/{hemfixarna-components/hemfixarna-invoice.entry.js → collection/components/hemfixarna-invoice/hemfixarna-invoice.js} +27 -16
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +1 -0
- package/dist/{hemfixarna-components/hemfixarna-order.entry.js → collection/components/hemfixarna-order/hemfixarna-order.js} +7 -11
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +1 -0
- package/dist/{hemfixarna-components/hemfixarna-orderrows.entry.js → collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js} +30 -12
- package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js.map +1 -0
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.css +0 -0
- package/dist/{hemfixarna-components/hemfixarna-product.entry.js → collection/components/hemfixarna-product/hemfixarna-product.js} +27 -18
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.js.map +1 -0
- package/dist/collection/components/hemfixarna-service/hemfixarna-service.js +14 -0
- package/dist/collection/components/hemfixarna-service/hemfixarna-service.js.map +1 -0
- package/dist/{hemfixarna-components/hemfixarna-start.entry.js → collection/components/hemfixarna-start/hemfixarna-start.js} +48 -11
- package/dist/collection/components/hemfixarna-start/hemfixarna-start.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/store/index.js +69 -0
- package/dist/collection/store/index.js.map +1 -0
- package/dist/collection/types/felixtypes.js +3 -0
- package/dist/collection/types/felixtypes.js.map +1 -0
- package/dist/collection/types/index.js +50 -0
- package/dist/collection/types/index.js.map +1 -0
- package/dist/{hemfixarna-components/api-e3c51cb3.js → collection/utils/api.js} +4 -7
- package/dist/collection/utils/api.js.map +1 -0
- package/dist/{hemfixarna-components/calc-b3b6593c.js → collection/utils/calc.js} +3 -6
- package/dist/collection/utils/calc.js.map +1 -0
- package/dist/collection/utils/creditSafe.js +18 -0
- package/dist/collection/utils/creditSafe.js.map +1 -0
- package/dist/{hemfixarna-components/enviroment-fd0a763a.js → collection/utils/enviroment.js} +6 -8
- package/dist/collection/utils/enviroment.js.map +1 -0
- package/dist/collection/utils/felixApi.js +19 -0
- package/dist/collection/utils/felixApi.js.map +1 -0
- package/dist/collection/utils/felixFunctions.js +188 -0
- package/dist/collection/utils/felixFunctions.js.map +1 -0
- package/dist/{hemfixarna-components/form-c53dca29.js → collection/utils/form.js} +2 -4
- package/dist/collection/utils/form.js.map +1 -0
- package/dist/{hemfixarna-components/scroll-6c26b5da.js → collection/utils/scroll.js} +2 -4
- package/dist/collection/utils/scroll.js.map +1 -0
- package/dist/{hemfixarna-components/types-6da209ae.js → collection/utils/types.js} +3 -6
- package/dist/collection/utils/types.js.map +1 -0
- package/dist/esm/hemfixarna-address_15.entry.js +2162 -0
- package/dist/esm/hemfixarna-address_15.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-byggmax.entry.js +2 -2
- package/dist/esm/hemfixarna-byggmax.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-category.entry.js +2 -2
- package/dist/esm/hemfixarna-category.entry.js.map +1 -0
- package/dist/esm/hemfixarna-components.js +23 -0
- package/dist/esm/hemfixarna-components.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-doro.entry.js +2 -2
- package/dist/esm/hemfixarna-doro.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-elfa.entry.js +2 -2
- package/dist/esm/hemfixarna-elfa.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-fargvaruhuset.entry.js +2 -2
- package/dist/esm/hemfixarna-fargvaruhuset.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-flyttsmart.entry.js +2 -2
- package/dist/esm/hemfixarna-flyttsmart.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-forebygg.entry.js +2 -2
- package/dist/esm/hemfixarna-forebygg.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-hornbach.entry.js +2 -2
- package/dist/esm/hemfixarna-hornbach.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-kbygg.entry.js +2 -2
- package/dist/esm/hemfixarna-kbygg.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-klint.entry.js +2 -2
- package/dist/esm/hemfixarna-klint.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-kund.entry.js +2 -2
- package/dist/esm/hemfixarna-kund.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-norrgavel.entry.js +2 -2
- package/dist/esm/hemfixarna-norrgavel.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-power.entry.js +2 -2
- package/dist/esm/hemfixarna-power.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-service.entry.js +2 -2
- package/dist/esm/hemfixarna-service.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-skanska.entry.js +2 -2
- package/dist/esm/hemfixarna-skanska.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-sparfonster.entry.js +2 -2
- package/dist/esm/hemfixarna-sparfonster.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-string-furniture.entry.js +2 -2
- package/dist/esm/hemfixarna-string-furniture.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-superfront.entry.js +2 -2
- package/dist/esm/hemfixarna-superfront.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-tesla.entry.js +2 -2
- package/dist/esm/hemfixarna-tesla.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-traningspartner.entry.js +2 -2
- package/dist/esm/hemfixarna-traningspartner.entry.js.map +1 -0
- package/dist/{hemfixarna-components → esm}/hemfixarna-zaptec.entry.js +2 -2
- package/dist/esm/hemfixarna-zaptec.entry.js.map +1 -0
- package/dist/{hemfixarna-components/index-c8ce6f4b.js → esm/index-17dff2be.js} +5 -1
- package/dist/esm/index-17dff2be.js.map +1 -0
- package/dist/{hemfixarna-components/index-21ba2b05.js → esm/index-20d4c934.js} +5 -6
- package/dist/esm/index-20d4c934.js.map +1 -0
- package/dist/esm/index-ea1d222e.js +1710 -0
- package/dist/esm/index-ea1d222e.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +20 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -162
- package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
- package/dist/hemfixarna-components/index.esm.js +0 -1
- package/dist/hemfixarna-components/index.esm.js.map +1 -1
- package/dist/hemfixarna-components/p-13c814e5.entry.js +2 -0
- package/dist/hemfixarna-components/p-13c814e5.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-22402dcd.entry.js +2 -0
- package/dist/hemfixarna-components/p-22402dcd.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-2af882e6.entry.js +2 -0
- package/dist/hemfixarna-components/p-2af882e6.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-3038b208.entry.js +2 -0
- package/dist/hemfixarna-components/p-3038b208.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-45ab00f1.entry.js +2 -0
- package/dist/hemfixarna-components/p-45ab00f1.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-5c9563b4.entry.js +2 -0
- package/dist/hemfixarna-components/p-5c9563b4.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-6bd272c5.entry.js +2 -0
- package/dist/hemfixarna-components/p-6bd272c5.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-6e20e1b0.js +2 -0
- package/dist/hemfixarna-components/p-6e20e1b0.js.map +1 -0
- package/dist/hemfixarna-components/p-7b495586.entry.js +2 -0
- package/dist/hemfixarna-components/p-7b495586.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-7c0e45f5.entry.js +2 -0
- package/dist/hemfixarna-components/p-7c0e45f5.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-7cb8e61f.entry.js +2 -0
- package/dist/hemfixarna-components/p-7cb8e61f.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-7df046a3.entry.js +2 -0
- package/dist/hemfixarna-components/p-7df046a3.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-81571614.entry.js +2 -0
- package/dist/hemfixarna-components/p-81571614.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-82273497.entry.js +2 -0
- package/dist/hemfixarna-components/p-82273497.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-8b7e8357.entry.js +2 -0
- package/dist/hemfixarna-components/p-8b7e8357.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-9c484473.entry.js +2 -0
- package/dist/hemfixarna-components/p-9c484473.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-9cf1fb6b.entry.js +2 -0
- package/dist/hemfixarna-components/p-9cf1fb6b.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-b115aec3.entry.js +2 -0
- package/dist/hemfixarna-components/p-b115aec3.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-c707b937.js +3 -0
- package/dist/hemfixarna-components/p-c707b937.js.map +1 -0
- package/dist/hemfixarna-components/p-cdc0d010.js +2 -0
- package/dist/hemfixarna-components/p-cdc0d010.js.map +1 -0
- package/dist/hemfixarna-components/p-de0582a4.entry.js +2 -0
- package/dist/hemfixarna-components/p-de0582a4.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-e162b027.entry.js +2 -0
- package/dist/hemfixarna-components/p-e162b027.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-ea31b5fc.entry.js +2 -0
- package/dist/hemfixarna-components/p-ea31b5fc.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-f9fdaa51.entry.js +2 -0
- package/dist/hemfixarna-components/p-f9fdaa51.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-fe40c699.entry.js +2 -0
- package/dist/hemfixarna-components/p-fe40c699.entry.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/types/index.d.ts +5 -1
- package/package.json +1 -1
- package/dist/hemfixarna-components/api-e3c51cb3.js.map +0 -1
- package/dist/hemfixarna-components/app-globals-0f993ce5.js +0 -5
- package/dist/hemfixarna-components/app-globals-0f993ce5.js.map +0 -1
- package/dist/hemfixarna-components/calc-b3b6593c.js.map +0 -1
- package/dist/hemfixarna-components/css-shim-4fde41f0.js +0 -6
- package/dist/hemfixarna-components/css-shim-4fde41f0.js.map +0 -1
- package/dist/hemfixarna-components/dom-8de30773.js +0 -75
- package/dist/hemfixarna-components/dom-8de30773.js.map +0 -1
- package/dist/hemfixarna-components/enviroment-fd0a763a.js.map +0 -1
- package/dist/hemfixarna-components/form-c53dca29.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-address.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-box.entry.js +0 -49
- package/dist/hemfixarna-components/hemfixarna-box.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-breadcrumbs.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-byggmax.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-cart.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-category.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-checkout.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-component.entry.js +0 -189
- package/dist/hemfixarna-components/hemfixarna-component.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-contact.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-demo.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-doro.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-elfa.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-fargvaruhuset.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-flyttsmart.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-forebygg.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-getuser.entry.js +0 -770
- package/dist/hemfixarna-components/hemfixarna-getuser.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-hornbach.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-info.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-invoice.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-kbygg.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-klint.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-kund.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-norrgavel.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-order.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-orderrows.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-power.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-product.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-service.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-skanska.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-sparfonster.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-start.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-string-furniture.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-superfront.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-tesla.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-traningspartner.entry.js.map +0 -1
- package/dist/hemfixarna-components/hemfixarna-zaptec.entry.js.map +0 -1
- package/dist/hemfixarna-components/index-21ba2b05.js.map +0 -1
- package/dist/hemfixarna-components/index-2ce8b901.js +0 -3461
- package/dist/hemfixarna-components/index-2ce8b901.js.map +0 -1
- package/dist/hemfixarna-components/index-c8ce6f4b.js.map +0 -1
- package/dist/hemfixarna-components/scroll-6c26b5da.js.map +0 -1
- package/dist/hemfixarna-components/shadow-css-af2290df.js +0 -389
- package/dist/hemfixarna-components/shadow-css-af2290df.js.map +0 -1
- package/dist/hemfixarna-components/types-6da209ae.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"hemfixarna-checkout.entry.esm.js","mappings":";;;;;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;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}
|
@@ -1,189 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"hemfixarna-component.entry.esm.js","mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,q+sBAAq+sB;;MCa9+sB,mBAAmB;;;IAiG9B,uBAAkB,GAAG;MACnB,MAAM,EAAE,GAAG,IAAI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ow","./src/components/hemfixarna-component/hemfixarna-component.tsx"],"sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n$yellow: #fffaf2;\n$background: #faf1e8;\n$grey: #b7b7b7;\n$brown: #e9d7ca;\n$black: #474444;\n$white: #fff;\n$darkyellow: #fcd9c9;\n$pink: #f1ded6;\n$green: #25a710;\n$orange: #ec6632;\n$darkorange: #c84e18;\n\n$border: 1px solid $darkyellow;\n$greyBorder: 1px solid #e3e3e3;\n$border-radius: 4px;\n$box-shadow: 0px 4px 8px 0px #0000000a;\n$box-shadow-hover: 0px 8px 16px 2px #0000000a;\n$widgetBoxColor: 0px 2px 16px 0px #00000014;\n\n@mixin hover {\n &: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: $box-shadow-hover;\n }\n}\n\n@mixin cartLength {\n position: relative;\n span {\n position: absolute;\n background: $white;\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}\n\n@mixin mobile {\n @media (max-width: 768px) {\n @content;\n }\n}\n\n@mixin desktop {\n @media (min-width: 769px) {\n @content;\n }\n}\n\n* {\n box-sizing: border-box;\n}\n\n:host {\n font-family: 'Inter', sans-serif;\n input[type='text'] {\n padding: 16px;\n width: 100%;\n font-size: 16px;\n border: 1px solid $darkyellow;\n }\n .mb-2 {\n margin-bottom: 32px;\n }\n button {\n color: $black;\n }\n form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n position: relative;\n button {\n position: absolute;\n right: 0;\n top: -1rem;\n }\n img {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n &:first-of-type {\n left: 16px;\n }\n &:last-of-type {\n right: 16px;\n }\n }\n span {\n margin-top: -8px;\n color: $orange;\n }\n p {\n text-align: center;\n }\n p {\n margin: 0;\n }\n div {\n position: relative;\n label {\n pointer-events: none;\n position: absolute;\n left: 16px;\n top: 50%;\n transform: translateY(-50%);\n background: $white;\n padding: 4px;\n transition: 0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n }\n input {\n padding: 16px;\n width: 100%;\n font-size: 16px;\n border: 1px solid $darkyellow;\n }\n input:focus ~ label,\n .input_active ~ label {\n top: 0;\n transform: translateY(-50%);\n background: linear-gradient(180deg, $background 50%, $white 50%);\n }\n }\n select {\n padding: 0.75rem 1rem;\n width: 100%;\n }\n }\n 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 h2 {\n margin: 0 0 24px;\n font-weight: 700;\n font-size: 20px;\n line-height: 28px;\n letter-spacing: -3%;\n }\n p {\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: -3%;\n }\n .hemfixarna {\n width: 100%;\n &_source {\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n img {\n width: 20px;\n }\n &--pw {\n max-width: 300px !important;\n input[type='password'] {\n padding: 0.5rem;\n }\n form {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n &_contact {\n display: flex;\n gap: 16px;\n a {\n display: flex;\n align-items: center;\n gap: 8px;\n color: $black;\n text-decoration: none;\n font-weight: 600;\n font-size: 13px;\n &:hover {\n text-decoration: underline;\n }\n }\n &--horizontal {\n span {\n display: none;\n }\n @include desktop {\n span {\n display: initial;\n }\n }\n }\n }\n &_painting {\n > h2,\n p {\n text-align: center;\n padding: 0 16px;\n }\n > h2 {\n margin: 0 0 8px;\n }\n opacity: 0;\n padding: 0 1rem;\n animation: fadeIn 0.5s forwards 0.3s;\n }\n &_partnerlogo {\n max-height: 50px;\n min-height: 45px;\n object-fit: contain;\n max-width: 150px;\n @include desktop {\n max-width: 200px;\n }\n }\n &_nav {\n position: absolute;\n top: 0;\n width: 100dvw;\n left: 0;\n height: 80px;\n z-index: 9999;\n\n &--links {\n display: none !important;\n @include desktop {\n display: flex !important;\n }\n a {\n color: $orange;\n text-decoration: none;\n border: 1px solid rgba($color: $white, $alpha: 0.3);\n border-radius: 56px;\n padding: 8px 32px;\n text-transform: capitalize;\n }\n }\n > 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 @include desktop {\n padding: 0 32px;\n }\n > div {\n display: flex;\n gap: 32px;\n justify-content: space-between;\n }\n\n > img {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: -1;\n }\n }\n a {\n text-decoration: none;\n }\n p {\n color: $black;\n }\n p.with-bg {\n color: $white;\n }\n }\n &_standalone {\n .hemfixarna {\n &_backdrop {\n background: $yellow;\n opacity: 1;\n }\n &_modal {\n top: 80px;\n transform: translateX(-50%);\n border: none;\n height: calc(100dvh - 80px);\n opacity: 0;\n &--open {\n opacity: 1;\n }\n }\n }\n }\n .switch {\n position: relative;\n display: inline-block;\n width: 40px;\n height: 20px;\n }\n\n /* Hide default HTML checkbox */\n .switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n /* The slider */\n .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\n .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\n input:checked + .slider {\n background-color: $darkyellow;\n }\n\n input:focus + .slider {\n box-shadow: 0 0 1px $darkyellow;\n }\n\n input:checked + .slider:before {\n -webkit-transform: translateX(18px);\n -ms-transform: translateX(18px);\n transform: translateX(18px);\n background: $orange;\n }\n\n &_maleribox {\n background: $white;\n box-shadow: $box-shadow;\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 @include hover;\n }\n\n &_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 > span {\n transform: translateY(6px);\n }\n span,\n span p {\n color: $black;\n font-size: 14px;\n }\n p {\n text-align: left;\n }\n }\n\n &_info {\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 32px;\n box-shadow: $box-shadow;\n border-radius: $border-radius;\n border: $border;\n h2 {\n margin: 0;\n }\n @include desktop {\n position: sticky;\n top: 0;\n }\n }\n\n &_infomodal {\n position: absolute;\n top: 40%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n max-width: 80%;\n background: $yellow;\n border: $border;\n padding: 32px;\n z-index: 99;\n border-radius: $border-radius;\n box-shadow: $box-shadow;\n display: flex;\n flex-direction: column;\n gap: 16px;\n p,\n h4 {\n margin: 0;\n }\n button {\n background: $orange;\n color: $white;\n border-radius: 60px;\n font-size: 16px;\n padding: 8px 16px;\n }\n }\n\n &_addressinfo {\n padding: 16px 16px 64px;\n border: $border;\n position: relative;\n margin-bottom: 32px;\n display: grid;\n grid-template-columns: 1fr;\n gap: 8px;\n @include desktop {\n grid-template-columns: 1fr 1fr;\n }\n 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 }\n\n &_part {\n background: $white;\n box-shadow: $box-shadow;\n display: grid;\n padding: 16px;\n grid-template-columns: auto 75px;\n }\n &_counter {\n display: flex;\n align-items: center;\n span {\n padding: 0 8px;\n }\n img {\n cursor: pointer;\n &:not(.disabled) {\n @include hover;\n }\n }\n }\n &_description {\n display: grid;\n gap: 16px;\n ul {\n list-style: disc;\n padding-right: 12px;\n transform: translateX(12px);\n }\n &--hidden {\n max-height: 140px;\n overflow: hidden;\n position: relative;\n cursor: pointer;\n &::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%, $background);\n }\n }\n }\n &_terms {\n font-size: 14px;\n a {\n color: inherit;\n }\n }\n &_logo {\n height: 64px;\n }\n &_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 p,\n span {\n font-size: 15px;\n }\n .underline {\n text-decoration: underline;\n text-underline-offset: 2px;\n }\n .pointer {\n cursor: pointer;\n }\n .p-s {\n font-size: 12px;\n }\n > div {\n display: grid;\n gap: 8px;\n }\n &--standard {\n background: $yellow;\n border: $border;\n }\n &--alternative,\n &--alternative_2,\n &--alternative_3 {\n background: transparent;\n border: $greyBorder;\n }\n &--alternative_2,\n &--alternative_3 {\n box-shadow: $widgetBoxColor;\n }\n &--alternative_3 {\n justify-content: center;\n }\n }\n &_altbtn {\n display: flex !important;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n margin-left: auto;\n }\n &_btn {\n margin-left: auto;\n }\n &_btn,\n &_buy,\n 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: $box-shadow;\n &:not(.disabled) {\n @include hover;\n }\n }\n div:has(> input[type='submit']) {\n position: relative;\n input {\n cursor: pointer;\n }\n img {\n display: none;\n }\n }\n .loading {\n cursor: default;\n opacity: 0.6;\n > img {\n display: initial !important;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n &_btn {\n font-size: 14px;\n background: $darkorange;\n color: $white;\n padding: 16px 24px;\n white-space: nowrap;\n @include cartLength;\n span {\n background: $green;\n color: $white;\n right: 0 !important;\n }\n }\n &_buy,\n input[type='submit'] {\n font-size: 21px;\n background: $green;\n color: $white;\n padding: 16px 24px;\n }\n .disabled {\n opacity: 0.5;\n cursor: default;\n }\n &_modal {\n position: fixed;\n background: $background;\n border: $border;\n border-radius: $border-radius;\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 &--open {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n }\n &_backdrop {\n z-index: 999;\n position: fixed;\n background: $black;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n transition:\n transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946),\n opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946);\n &--open {\n opacity: 0.3;\n }\n }\n &_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 @include mobile {\n grid-template-columns: 1fr;\n grid-template-rows: 0 auto;\n }\n > div:last-of-type {\n background: $yellow;\n padding: 32px;\n display: flex;\n flex-direction: column;\n max-height: 100%;\n overflow: auto;\n }\n img {\n cursor: pointer;\n }\n 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 }\n &_cart {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 32px;\n @include mobile {\n grid-template-columns: 1fr;\n gap: 0;\n }\n &--right,\n &--left {\n h2 {\n display: flex;\n align-items: center;\n img {\n margin-top: 3.2px;\n }\n }\n }\n &--left {\n h2 {\n button {\n @include desktop {\n display: none;\n }\n }\n }\n }\n &--right {\n h2 {\n button {\n @include mobile {\n display: none;\n }\n }\n }\n }\n &--startfee {\n display: flex;\n justify-content: space-between;\n }\n &--rutrot {\n display: flex;\n justify-content: space-between;\n div {\n display: flex;\n gap: 16px;\n align-items: center;\n }\n }\n &--additional {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n border-top: $border;\n p {\n font-size: 14px;\n position: relative;\n strong {\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: pointer;\n }\n img {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: -20px;\n cursor: pointer;\n }\n }\n }\n &--price {\n border-top: $border;\n h3 {\n margin: 0;\n }\n padding: 16px;\n display: flex;\n justify-content: space-between;\n }\n &--item {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px 0;\n border-top: $border;\n span {\n font-size: 12px;\n }\n > div {\n display: flex;\n justify-content: space-between;\n > div {\n display: flex;\n align-items: center;\n gap: 16px;\n }\n button {\n color: $orange;\n }\n }\n }\n &--group {\n border-radius: 16px;\n background: #fefaf6;\n margin-bottom: 16px;\n padding: 10px 20px;\n ul {\n li {\n &:first-of-type {\n border-top: 0;\n }\n }\n }\n }\n }\n &_categories {\n &--wrapper {\n gap: 32px;\n display: grid;\n grid-template-columns: 1fr 1fr;\n @include mobile {\n grid-template-columns: 1fr;\n }\n }\n display: flex;\n flex-direction: column;\n gap: 24px;\n li {\n position: relative;\n background: $white;\n border-radius: $border-radius;\n min-height: 132px;\n padding: 24px;\n box-shadow: $box-shadow;\n display: flex;\n align-items: center;\n gap: 24px;\n cursor: pointer;\n @include hover;\n > button {\n height: 100%;\n width: 100%;\n }\n .price {\n font-weight: 700;\n }\n }\n }\n &_content {\n height: 100%;\n overflow: auto;\n padding: 0 32px 64px;\n &--5 {\n padding-top: 16px;\n }\n &--painting {\n padding: 0;\n overflow: initial;\n }\n }\n &_crumbs {\n position: relative;\n padding: 16px 24px;\n border-bottom: $border;\n display: flex;\n justify-content: space-between;\n &--back {\n padding: 16px 24px 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n box-shadow: none !important;\n @include hover;\n }\n img {\n cursor: pointer;\n }\n .close {\n position: absolute;\n right: -16px;\n top: -16px;\n z-index: 9;\n -webkit-transform: translate3d(0, 0, 0);\n }\n .cart {\n display: flex;\n padding-left: 16px;\n img {\n cursor: inherit;\n }\n @include cartLength;\n &_active {\n cursor: pointer;\n span {\n background: $green;\n color: $white;\n }\n }\n }\n &--links {\n display: flex;\n align-items: center;\n gap: 16px;\n overflow: auto;\n @include desktop {\n &::-webkit-scrollbar {\n display: none;\n }\n\n &::-webkit-scrollbar-button {\n display: none;\n }\n -ms-overflow-style: none;\n }\n }\n &--right {\n display: flex;\n align-items: center;\n }\n button {\n white-space: nowrap;\n background: $pink;\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 &:not(.active) {\n @include hover;\n }\n @include mobile {\n display: none;\n }\n }\n .active {\n background: $yellow;\n cursor: default;\n // border: 1px solid $pink;\n }\n }\n &_features {\n gap: 12px !important;\n li {\n display: flex;\n gap: 16px;\n align-items: center;\n }\n }\n &_address {\n margin-bottom: 16px;\n }\n &_product {\n display: grid;\n gap: 16px;\n &--link {\n font-weight: 700;\n color: $black;\n text-underline-offset: 4px;\n }\n &--left {\n gap: 32px;\n }\n &--right {\n gap: 32px;\n }\n &--price {\n margin-top: 4px;\n font-weight: 700;\n }\n &--total {\n text-align: center;\n margin: -16px 0;\n font-size: 21px;\n line-height: 28px;\n }\n &--item {\n background: $white;\n padding: 16px;\n display: grid;\n grid-template-columns: auto 75px;\n box-shadow: $box-shadow;\n }\n &--grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 32px;\n @include mobile {\n grid-template-columns: 1fr;\n }\n > div {\n display: flex;\n flex-direction: column;\n }\n ul {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n }\n p {\n margin: 0;\n }\n &--top {\n img {\n object-fit: contain;\n }\n > div {\n width: 100%;\n h1 {\n max-width: 80%;\n @include mobile {\n max-width: 100%;\n }\n }\n }\n display: flex;\n gap: 32px;\n h4 {\n margin-bottom: 8px;\n }\n }\n }\n }\n h5,\n p {\n margin: 0;\n }\n input[type='submit'] {\n cursor: pointer;\n }\n input[type='date'] ~ label {\n left: 56px;\n }\n input[type='date'] {\n border: 1px solid $darkyellow;\n padding-left: 64px;\n }\n input[type='checkbox'] {\n height: 18px;\n width: 18px;\n border: $border;\n }\n input[type='checkbox']:checked {\n background: red;\n }\n 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 button,\n a {\n cursor: pointer;\n background: none;\n border: none;\n }\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n}\n","import { Component, Element, Fragment, Listen, Prop, State, Watch, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { Business, Product, WidgetStyle } from '../../types';\nimport { getCustomer, getGreenDiscount, getOptions, getRot, getRut, loginCustomer } from '../../utils/api';\nimport { getProductPriceWithRotAndRut } from '../../utils/calc';\nimport { scrollToTop } from '../../utils/scroll';\n\n@Component({\n tag: 'hemfixarna-component',\n styleUrl: 'hemfixarna.scss',\n shadow: true,\n assetsDirs: ['assets'],\n})\nexport class HemfixarnaComponent {\n @State() modal: boolean = false;\n @State() showModal: boolean = false;\n @State() product: Product | null = null;\n @Prop() id?: string;\n @Prop() slug?: string;\n @Prop() business: Business;\n @Prop() widgetStyle: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n @State() proppedProduct: Product | null = null;\n @State() loginSourceError: null | string = null;\n\n @Element() private el: HTMLElement;\n\n loadCategoryOrProduct(id: string) {\n this.proppedProduct = null;\n if (id.startsWith('c-')) {\n const categories = [...state.customer.categories, ...state.customer.categories.map(c => c.sub_categories ?? [])].flat();\n const category = categories.find(c => c && c.id === id.replace('c-', ''));\n if (category) {\n state.selectedCustomerCategory = category;\n state.step = 2;\n }\n } else {\n const products = state.customer.categories\n .map(c => (c.show_products ? c.products : c.sub_categories ? c.sub_categories.map(c => c.products) : []))\n .flat()\n .flat();\n const product = products.find(p => p && p.fields.ID === parseInt(id));\n if (product) {\n state.selectedProduct = product.fields;\n state.step = 4;\n this.proppedProduct = product.fields;\n }\n }\n }\n\n @Watch('id')\n async watchIdChange(id: string) {\n if (id && state.customer) {\n if (id === 'maleri') {\n state.maleri = true;\n state.step = 4;\n } else {\n this.loadCategoryOrProduct(id);\n }\n }\n }\n\n async componentWillLoad() {\n state.business = this.business;\n const cart = window.sessionStorage.getItem(`hemfixarna-${this.business}-cart`);\n if (cart) {\n state.cart = JSON.parse(cart);\n }\n const user = window.sessionStorage.getItem(`hemfixarna-${this.business}-user`);\n if (user) {\n state.user = JSON.parse(user);\n }\n const creditSafeUser = window.sessionStorage.getItem(`hemfixarna-${this.business}-creditSafeUser`);\n if (creditSafeUser) {\n state.creditSafeUser = JSON.parse(creditSafeUser);\n }\n\n const [options, rut, rot, greenDiscount] = await Promise.all([getOptions(), getRut(), getRot(), getGreenDiscount()]);\n\n try {\n const customer = await getCustomer(this.business);\n if (customer?.code === 'not_found') {\n console.warn('customer not found');\n } else if (customer) {\n state.customer = customer;\n const id = this.id || this.slug;\n if (id) {\n if (id === 'maleri') {\n state.maleri = true;\n state.step = 4;\n } else {\n this.loadCategoryOrProduct(id);\n }\n }\n }\n } catch (error) {\n console.warn('customer not found');\n }\n\n state.rotOptions = rot;\n state.rutOptions = rut;\n state.greenOptions = greenDiscount;\n state.options = options;\n\n if (localStorage.getItem('select_source')) {\n state.selectSource = true;\n }\n }\n\n triggerScrollTotop = () => {\n const el = this.el.shadowRoot.querySelector('.hemfixarna_content');\n scrollToTop(el);\n };\n\n // Open close modal && click outside event\n openModal() {\n if (this.id) {\n if (this.id === 'maleri') {\n state.maleri = true;\n state.step = 4;\n } else {\n state.maleri = false;\n this.loadCategoryOrProduct(this.id);\n }\n }\n this.modal = true;\n setTimeout(() => {\n this.showModal = true;\n }, 50);\n }\n closeModal() {\n this.showModal = false;\n setTimeout(() => {\n this.modal = false;\n }, 200);\n }\n @Listen('click')\n handleClick(e: Event) {\n if ((e?.composedPath()[0] as HTMLElement).classList.contains('hemfixarna_backdrop')) {\n this.closeModal();\n }\n const infomodal = this.el.shadowRoot.querySelector('.hemfixarna_infomodal');\n if (infomodal) {\n const isClickInside = infomodal.contains(e.composedPath()[0] as HTMLInputElement);\n if (!isClickInside) {\n state.modal = null;\n }\n }\n }\n\n async handleLogin() {\n this.loginSourceError = null;\n const passwordInput = this.el.shadowRoot.querySelector('input[type=\"password\"]');\n const password = (passwordInput as HTMLInputElement).value;\n\n try {\n const status = await loginCustomer({ id: state.customer.ID, password: password });\n if (status === 200) {\n state.showSourcePasswordPrompt = false;\n state.selectSource = true;\n } else {\n this.loginSourceError = 'Fel lösenord';\n }\n } catch (error) {\n console.log(error);\n this.loginSourceError = 'Fel lösenord';\n }\n }\n\n getCartLength() {\n return state.cart.reduce((acc, curr) => acc + curr.amount, 0);\n }\n\n render() {\n const logo = getAssetPath(`./assets/hemfixarna.svg`);\n const pensel = getAssetPath(`./assets/pensel.svg`);\n const monteringLogo = getAssetPath(`./assets/montering.svg`);\n\n return (\n <div class={`hemfixarna hemfixarna-${this.business}`}>\n <div class={`hemfixarna_box hemfixarna_box--${this.widgetStyle}`}>\n {[WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) ? (\n <img src={this.id === 'maleri' ? pensel : monteringLogo} alt=\"montering logo\" width={32} height={32} />\n ) : null}\n <div>\n <div>\n <p\n onClick={() => this.openModal()}\n class={`pointer ${[WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) && state.selectedProduct ? 'underline' : ''}`}\n >\n {this.id === 'maleri' ? (\n <span>Beräkna fast pris på måleri & tapetsering här</span>\n ) : (\n <Fragment>\n {!state.selectedCustomerCategory && !this.product && !this.proppedProduct ? (\n <Fragment>\n {state.customer?.widget_title ? (\n <span>{state.customer.widget_title}</span>\n ) : (\n <span>\n Montering/Installation - <strong class=\"underline\">se priser här</strong>\n </span>\n )}\n </Fragment>\n ) : (\n <Fragment>\n {this.product?.title || this.proppedProduct?.title || state.selectedCustomerCategory?.widget_title || (\n <span>\n Montering\n <wbr />\n /Installation {state.selectedCustomerCategory?.name ?? 'på plats'} - <strong class=\"underline\">se priser här</strong>\n </span>\n )}\n {this.proppedProduct && !this.product?.invoice && !this.proppedProduct?.invoice ? (\n <span>\n {' från'} <strong>{getProductPriceWithRotAndRut(this.proppedProduct || this.product)}kr</strong>\n </span>\n ) : null}\n </Fragment>\n )}\n </Fragment>\n )}\n </p>\n </div>\n {this.widgetStyle === WidgetStyle.standard ? <img src={logo} width={104} /> : null}\n {this.widgetStyle === WidgetStyle.alternative ? (\n <span class=\"p-s\">\n Utförs av <strong>Hemfixarna</strong>\n </span>\n ) : null}\n </div>\n {[WidgetStyle.standard, WidgetStyle.alternative].includes(this.widgetStyle) ? (\n <button\n onClick={() => this.openModal()}\n class=\"hemfixarna_btn\"\n style={{\n color: this.buttonColor?.startsWith('#') || !this.buttonColor?.length ? this.buttonColor : `#${this.buttonColor}`,\n backgroundColor: this.buttonBg?.startsWith('#') || !this.buttonBg?.length ? this.buttonBg : `#${this.buttonBg}`,\n }}\n >\n Beställ här\n {this.getCartLength() > 0 && <span>{this.getCartLength()}</span>}\n </button>\n ) : null}\n {WidgetStyle.alternative_2 === this.widgetStyle ? (\n <div class=\"hemfixarna_altbtn\">\n <strong class=\"p-s\">Utförs av</strong>\n <img src={logo} alt=\"hemfixarna logo\" width={98} />\n </div>\n ) : null}\n </div>\n {this.modal && (\n <div>\n <div class={`hemfixarna_modal ${this.showModal ? 'hemfixarna_modal--open' : ''}`}>\n {state.modal && (\n <div class=\"hemfixarna_infomodal\">\n {state.modal.title && <h2>{state.modal.title}</h2>}\n <p innerHTML={state.modal.text}></p>\n <div>\n <button onClick={() => (state.modal = null)}>Stäng</button>\n </div>\n </div>\n )}\n {state.showSourcePasswordPrompt ? (\n <div class=\"hemfixarna_source--pw hemfixarna_infomodal\">\n <form\n onSubmit={e => {\n e.preventDefault();\n this.handleLogin();\n }}\n >\n <input type=\"password\" placeholder=\"Lösenord\" />\n <input type=\"submit\" value=\"Logga in\" />\n {this.loginSourceError && <span>Fel lösenord</span>}\n </form>\n </div>\n ) : null}\n {state.customer && <hemfixarna-breadcrumbs closeModal={() => this.closeModal()} />}\n <div class={`hemfixarna_content hemfixarna_content--${state.step} ${state.step === 4 && state.maleri ? 'hemfixarna_content--painting' : ''}`}>\n {state.step < 4 && <hemfixarna-start />}\n {/* // IF SELECTED PRODUCT (step 4) */}\n {state.step === 4 && <hemfixarna-product />}\n {/* // IF CHECKOUT (step 5) */}\n {state.step === 5 && <hemfixarna-cart />}\n {/* // IF ORDER CONFIRM (step 6) */}\n {state.step === 6 && <hemfixarna-order />}\n </div>\n </div>\n <div class={`hemfixarna_backdrop ${this.showModal ? 'hemfixarna_backdrop--open' : ''}`}></div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"hemfixarna-contact.entry.esm.js","mappings":";;;MAOa,cAAc;;;oBACI,KAAK;;EAElC,MAAM;IACJ,QACE,WAAK,KAAK,EAAE,sBAAsB,IAAI,CAAC,QAAQ,GAAG,8BAA8B,GAAG,gCAAgC,EAAE,IAClH,KAAK,CAAC,QAAQ,CAAC,MAAM,IACpB,WACE,OAAO,EAAE;QACP,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;UACvB,KAAK,CAAC,wBAAwB,GAAG,IAAI,CAAC;SACvC;OACF,EACD,KAAK,EAAC,mBAAmB,IAExB,KAAK,CAAC,YAAY,IACjB,WAAK,OAAO,EAAC,eAAe,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,IAClE,YAAM,CAAC,EAAC,mVAAmV,GAAG,CAC1V,KAEN,WAAK,OAAO,EAAC,eAAe,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,IAClE,YAAM,CAAC,EAAC,8TAA8T,GAAG,CACrU,CACP,CACG,IACJ,IAAI,EACR,SAAG,IAAI,EAAC,kBAAkB,IACxB,WAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,IAC5F,YACE,CAAC,EAAC,+PAA+P,EACjQ,IAAI,EAAC,SAAS,GACd,CACE,EACN,+BAAyB,CACvB,EACJ,SAAG,IAAI,EAAC,oCAAoC,EAAC,MAAM,EAAC,QAAQ,IAC1D,WAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,IAC5F,sBAAa,sBAAsB,IACjC,YACE,CAAC,EAAC,sQAAsQ,EACxQ,IAAI,EAAC,SAAS,GACd,EACF,YAAM,CAAC,EAAC,mHAAmH,EAAC,IAAI,EAAC,SAAS,GAAG,EAC7I,YAAM,CAAC,EAAC,yHAAyH,EAAC,IAAI,EAAC,SAAS,GAAG,EACnJ,YACE,CAAC,EAAC,6IAA6I,EAC/I,IAAI,EAAC,SAAS,GACd,CACA,EACJ,gBACE,gBAAU,EAAE,EAAC,gBAAgB,IAC3B,YAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,GAAG,CACnC,CACN,CACH,EACN,8BAAwB,CACtB,CACA,EACN;GACH;;;;;","names":[],"sources":["./src/components/hemfixarna-contact/hemfixarna-contact.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport state from '../../store';\n\n@Component({\n tag: 'hemfixarna-contact',\n shadow: false,\n})\nexport class HemfixarnaInfo {\n @Prop() vertical?: boolean = false;\n\n render() {\n return (\n <div class={`hemfixarna_contact ${this.vertical ? 'hemfixarna_contact--vertical' : 'hemfixarna_contact--horizontal'}`}>\n {state.customer.source ? (\n <div\n onClick={() => {\n if (!state.selectSource) {\n state.showSourcePasswordPrompt = true;\n }\n }}\n class=\"hemfixarna_source\"\n >\n {state.selectSource ? (\n <svg viewBox=\"0 0 1024 1024\" fill=\"#C84E18\" height=\"1em\" width=\"1em\">\n <path d=\"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM540 701v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 1156 0z\" />\n </svg>\n ) : (\n <svg viewBox=\"0 0 1024 1024\" fill=\"#C84E18\" height=\"1em\" width=\"1em\">\n <path d=\"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM540 701v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 1156 0zm152-237H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224z\" />\n </svg>\n )}\n </div>\n ) : null}\n <a href=\"tel:0770-220 720\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7 4V20H17V4H7ZM6 2H18C18.5523 2 19 2.44772 19 3V21C19 21.5523 18.5523 22 18 22H6C5.44772 22 5 21.5523 5 21V3C5 2.44772 5.44772 2 6 2ZM12 17C12.5523 17 13 17.4477 13 18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18C11 17.4477 11.4477 17 12 17Z\"\n fill=\"#C84E18\"\n />\n </svg>\n <span>0770-220 720</span>\n </a>\n <a href=\"https://hemfixarna.se/kundservice/\" target=\"_blank\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_1001_894)\">\n <path\n d=\"M21 12.22C21 6.73 16.74 3 12 3C7.31 3 3 6.65 3 12.28C2.4 12.62 2 13.26 2 14V16C2 17.1 2.9 18 4 18H5V11.9C5 8.03 8.13 4.9 12 4.9C15.87 4.9 19 8.03 19 11.9V19H11V21H19C20.1 21 21 20.1 21 19V17.78C21.59 17.47 22 16.86 22 16.14V13.84C22 13.14 21.59 12.53 21 12.22Z\"\n fill=\"#C84E18\"\n />\n <path d=\"M9 14C9.55228 14 10 13.5523 10 13C10 12.4477 9.55228 12 9 12C8.44772 12 8 12.4477 8 13C8 13.5523 8.44772 14 9 14Z\" fill=\"#C84E18\" />\n <path d=\"M15 14C15.5523 14 16 13.5523 16 13C16 12.4477 15.5523 12 15 12C14.4477 12 14 12.4477 14 13C14 13.5523 14.4477 14 15 14Z\" fill=\"#C84E18\" />\n <path\n d=\"M18 11.03C17.52 8.18 15.04 6 12.05 6C9.01997 6 5.75997 8.51 6.01997 12.45C8.48997 11.44 10.35 9.24 10.88 6.56C12.19 9.19 14.88 11 18 11.03Z\"\n fill=\"#C84E18\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_1001_894\">\n <rect width=\"24\" height=\"24\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n <span>Kundservice</span>\n </a>\n </div>\n );\n }\n}\n"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"hemfixarna-demo.entry.esm.js","mappings":";;;;;;AAAA,MAAM,iBAAiB,GAAG,+lEAA+lE;;MCmB5mE,WAAW;;;IAad,aAAQ,GAAY,IAAI,CAAC;IAmFjC,YAA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Q;QACvB,GAAG,EAAE,MAAM;QACX,QAAQ,EAAE,OAAO;QACjB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,gBAAgB;QACxB,YAAY,EAAE,KAAK;QACnB,UAAU,EAAE,QAAQ;OACrB,IAED,aAAO,IAAI,EAAC,UAAU,EAAC,WAAW,EAAC,eAAU,GAAG,EAChD,cAAQ,IAAI,EAAC,QAAQ,eAAkB,EACtC,IAAI,CAAC,UAAU,IAAI,oCAAyB,CACxC,CACH,CACP,CACQ,KAEX,UACE,KAAK,EAAE;QACL,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,KAAK;OACb,wBAGE,CACN,CAAC;GACH;;;;;;;;;;","names":[],"sources":["./src/components/hemfixarna-demo/hemfixarna-demo.scss?tag=hemfixarna-demo&encapsulation=shadow","./src/components/hemfixarna-demo/hemfixarna-demo.tsx"],"sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');\n\n:host {\n font-family: 'Inter', sans-serif;\n\n .hemfixarna {\n &_widgetstyles {\n label {\n cursor: pointer;\n }\n > div {\n display: flex;\n gap: 1rem;\n }\n h5 {\n margin: 1rem 0;\n }\n }\n &_example {\n margin-bottom: 16px;\n background: #000;\n padding: 16px;\n color: #fff;\n display: flex;\n justify-content: space-between;\n cursor: pointer;\n max-width: 500px;\n box-sizing: border-box;\n position: relative;\n\n &--tooltip {\n background: #000;\n top: -48px;\n font-size: 16px;\n left: 40%;\n color: white;\n padding: 8px;\n position: absolute;\n opacity: 0;\n &::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n border-color: #000 transparent transparent transparent;\n }\n }\n &:hover {\n .hemfixarna_example--tooltip {\n opacity: 1;\n }\n }\n p {\n font-size: 14px;\n }\n img {\n filter: invert(1);\n }\n }\n &_install {\n display: grid;\n gap: 8px;\n margin-top: 16px;\n }\n &_product--label {\n background: #e1e0f5;\n }\n &_categories {\n max-height: 100%;\n overflow: auto;\n position: relative;\n &--label {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px;\n button {\n background: #3f3a92;\n border: none;\n font-weight: 600;\n padding: 3.2px 9.6px;\n border-radius: 10px;\n margin-right: 8px;\n color: #ece8e8;\n &:active {\n transform: scale(0.95);\n }\n }\n &--big {\n font-weight: 600;\n border-bottom: 1px solid black;\n }\n }\n }\n }\n p {\n margin: 0;\n }\n span {\n color: darkolivegreen;\n font-size: 10px;\n }\n button {\n cursor: pointer;\n }\n > div:not(.hemfixarna_hosted) {\n grid-template-columns: 1fr 1fr;\n }\n .hemfixarna_hosted {\n .hemfixarna_scripts {\n display: none;\n }\n }\n > div {\n display: grid;\n gap: 32px;\n width: 100%;\n height: 100vh;\n place-items: center;\n overflow: hidden;\n padding: 16px 32px;\n box-sizing: border-box;\n > * {\n width: 100%;\n }\n > div {\n max-width: 500px;\n }\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n ul {\n gap: 1px;\n display: grid;\n }\n li {\n padding-left: 16px;\n background: #fff;\n }\n }\n }\n}\n","import { Component, Fragment, State, Watch, getAssetPath, h } from '@stencil/core';\nimport { Business, Category, Customer, WidgetStyle } from '../../types';\nimport { getCustomer, loginCustomer } from '../../utils/api';\nimport { getApiUrl } from '../../utils/enviroment';\nimport { isBusiness } from '../../utils/types';\n\ninterface ColorAccessibility {\n small: string;\n bold: string;\n large: string;\n overall: string;\n contrast: string;\n}\n\n@Component({\n tag: 'hemfixarna-demo',\n styleUrl: 'hemfixarna-demo.scss',\n shadow: true,\n})\nexport class MyComponent {\n @State() selectedSlug: string;\n @State() selectedID: string;\n @State() tooltipText: string = 'Kopiera till urklipp';\n @State() tree: Category | null = null;\n @State() customer: Customer | null = null;\n @State() widgetStyle: WidgetStyle = WidgetStyle.standard;\n @State() buttonBg: string = '';\n @State() buttonColor: string = '';\n @State() partner: Business | undefined = undefined;\n @State() colorAccessibility?: ColorAccessibility = undefined;\n @State() loggedIn: boolean = false;\n @State() loginError: boolean = false;\n private debounce?: number = null;\n\n @Watch('buttonBg')\n @Watch('buttonColor')\n debouncedFunction() {\n if (this.debounce !== null) {\n clearTimeout(this.debounce);\n this.debounce = null;\n }\n\n this.debounce = window.setTimeout(() => {\n this.checkColorAccessibility();\n this.debounce = null;\n }, 1500);\n }\n\n async checkColorAccessibility() {\n const defaultTextColor = '#fff';\n const defaultBgColor = '#c84e18';\n const firstColor = this.buttonBg.length ? (this.buttonBg.startsWith('#') ? this.buttonBg : `#${this.buttonBg}`) : defaultBgColor;\n const secondColor = this.buttonColor.length ? (this.buttonColor.startsWith('#') ? this.buttonColor : `#${this.buttonColor}`) : defaultTextColor;\n try {\n const response = await fetch('https://www.aremycolorsaccessible.com/api/are-they', {\n mode: 'cors',\n method: 'POST',\n body: JSON.stringify({ colors: [firstColor, secondColor] }),\n });\n\n if (!response) {\n throw new Error('Network response was not ok');\n }\n\n const json = await response.json();\n if (json && (json satisfies ColorAccessibility)) {\n this.colorAccessibility = json;\n }\n } catch (error) {\n console.warn('Error fetching color accessibility:', error);\n }\n }\n\n getColor(rating: string) {\n switch (rating) {\n case 'AAA':\n return 'green';\n case 'AA':\n return 'orange';\n case 'A':\n return 'yellow';\n case 'Fail':\n return 'red';\n default:\n return 'black';\n }\n }\n\n async componentWillLoad() {\n const partner = window.location.pathname.replace('/', '');\n if (!isBusiness(partner) && partner) return;\n this.partner = partner ? (partner as Business) : Business.kund;\n const customer = await getCustomer(this.partner);\n if (customer.code !== 'not_found' && customer) {\n this.customer = customer;\n if (!this.customer.password_protected || window.localStorage.getItem(`${this.customer.ID}-loggedin`)) {\n this.loggedIn = true;\n }\n }\n }\n\n getExample() {\n return `<hemfixarna-component business=\"${this.partner}\"${this.selectedSlug ? ` slug=\"${this.selectedSlug}\" ` : ''}${this.selectedID ? ` id=\"${this.selectedID}\" ` : ''} ${\n this.widgetStyle === WidgetStyle.standard ? '' : `widget-style=\"${this.widgetStyle}\"`\n } ${this.buttonColor.length ? `button-color=\"${this.buttonColor}\"` : ''} ${this.buttonBg.length ? `button-bg=\"${this.buttonBg}\"` : ''}></hemfixarna-component>`;\n }\n\n copyExample() {\n navigator.clipboard.writeText(this.getExample());\n this.tooltipText = 'Snippet kopierad';\n setTimeout(() => {\n this.tooltipText = 'Kopiera till urklipp';\n }, 2000);\n }\n\n cdnLink = '<script type=\"module\" src=\"https://cdn.jsdelivr.net/npm//hemfixarna-web-components@latest/dist/hemfixarna-components/hemfixarna-components.esm.js\"></script>';\n\n copyCdn() {\n navigator.clipboard.writeText(this.cdnLink);\n this.tooltipText = 'Text kopierad';\n setTimeout(() => {\n this.tooltipText = 'Kopiera till urklipp';\n }, 2000);\n }\n\n copyNpmInstall() {\n navigator.clipboard.writeText('npm i hemfixarna-web-components');\n this.tooltipText = 'Text kopierad';\n setTimeout(() => {\n this.tooltipText = 'Kopiera till urklipp';\n }, 2000);\n }\n\n showMaleri() {\n const allCategories = this.customer?.categories.map(c => (c.sub_categories ? c.sub_categories : c)).flat();\n return allCategories?.some(c => c.add_painting);\n }\n\n async handleLogin() {\n const shadowHost = document.querySelector('hemfixarna-demo');\n const shadowRoot = shadowHost.shadowRoot;\n const passwordInput = shadowRoot.querySelector('input[type=\"password\"]');\n const password = (passwordInput as HTMLInputElement).value;\n\n this.loginError = false;\n try {\n const status = await loginCustomer({ id: this.customer.ID, password: password });\n if (status === 200) {\n this.loggedIn = true;\n window.localStorage.setItem(`${this.customer.ID}-loggedin`, 'true');\n } else {\n this.loginError = true;\n }\n } catch (error) {\n console.log(error);\n this.loginError = true;\n }\n }\n\n render() {\n const copy = getAssetPath(`./assets/copy.png`);\n\n return this.customer ? (\n <Fragment>\n {this.loggedIn ? (\n <div class={this.customer?.at_hemfixarna ? 'hemfixarna_hosted' : ''}>\n <div class=\"hemfixarna_scripts\">\n <div onClick={() => this.copyExample()} class=\"hemfixarna_example\">\n <p>{this.getExample()}</p>\n <img src={copy} height={20} />\n <span class=\"hemfixarna_example--tooltip\">{this.tooltipText}</span>\n </div>\n <hemfixarna-component\n business={this.partner}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n widgetStyle={this.widgetStyle}\n id={this.selectedID}\n ></hemfixarna-component>\n <div class=\"hemfixarna_install\">\n <div onClick={() => this.copyCdn()} class=\"hemfixarna_example\">\n <p>{this.cdnLink}</p>\n <span class=\"hemfixarna_example--tooltip\">{this.tooltipText}</span>\n <img src={copy} height={20} />\n </div>\n </div>\n <div class=\"hemfixarna_widgetstyles\">\n <h5>Widget styles</h5>\n <div>\n {Object.values(WidgetStyle).map(style => (\n <label key={style}>\n <input type=\"radio\" value={style} checked={this.widgetStyle === style} onChange={() => (this.widgetStyle = style)} />\n {style}\n </label>\n ))}\n </div>\n <div>\n <div>\n <h5>Button background color</h5>\n <input type=\"text\" value={this.buttonBg} onInput={e => (this.buttonBg = (e.target as HTMLInputElement).value)} />\n </div>\n <div>\n <h5>Button text color</h5>\n <input type=\"text\" value={this.buttonColor} onInput={e => (this.buttonColor = (e.target as HTMLInputElement).value)} />\n </div>\n </div>\n </div>\n <span>Write an hexa code no # needed</span>\n {this.colorAccessibility ? (\n <div>\n <h5>Tillgänglighetsrapport</h5>\n <div>\n <strong>Liten text:</strong>\n <span style={{ color: this.getColor(this.colorAccessibility.small) }}>{this.colorAccessibility.small}</span>\n <br />\n <strong>Fet text:</strong>\n <span style={{ color: this.getColor(this.colorAccessibility.bold) }}>{this.colorAccessibility.bold}</span>\n <br />\n <strong>Stor text:</strong>\n <span style={{ color: this.getColor(this.colorAccessibility.large) }}>{this.colorAccessibility.large}</span>\n <br />\n <strong>Kontrastförhållande:</strong> {this.colorAccessibility.contrast}\n </div>\n </div>\n ) : null}\n </div>\n <ul class=\"hemfixarna_categories\">\n <div>\n {this.customer.logo ? (\n <div style={{ width: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ maxWidth: '250px', height: 'auto', margin: '0 auto 2rem' }} src={this.customer.logo.url} alt={this.customer.post_title} />\n </div>\n ) : null}\n {this.showMaleri() ? (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_categories--label--big\">\n <div>\n <p>Måleriverktyget</p>\n <span>maleri</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText('maleri')}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button onClick={() => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=maleri`)}>Kopiera URL</button>\n ) : (\n <button onClick={() => (this.selectedID = 'maleri')}>Ladda måleri</button>\n )}\n </div>\n </div>\n </li>\n ) : null}\n {this.customer.categories.map(c => (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_categories--label--big\">\n <div>\n <p>{c.name}</p>\n <span>{`c-${c.id}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`c-${c.id}`)}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button onClick={() => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=c-${c.id}`)}>Kopiera URL</button>\n ) : (\n <button onClick={() => (this.selectedID = `c-${c.id}`)}>Ladda kategori</button>\n )}\n </div>\n </div>\n {c.show_products && c.products ? (\n <ul>\n {c.products.map(p => (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_product--label\">\n <div>\n <p>{p.fields.title}</p>\n <span>{p.fields.ID}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(String(p.fields.ID))}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button onClick={() => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=${p.fields.ID}`)}>Kopiera URL</button>\n ) : (\n <button onClick={() => (this.selectedID = String(p.fields.ID))}>Ladda produkt</button>\n )}\n </div>\n </div>\n </li>\n ))}\n </ul>\n ) : (\n <ul>\n {c.sub_categories &&\n c.sub_categories.map(sc => (\n <li>\n <div class=\"hemfixarna_categories--label\">\n <div>\n <p>{sc.name}</p>\n <span>{`c-${sc.id}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`c-${sc.id}`)}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button onClick={() => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=c-${c.id}`)}>Kopiera URL</button>\n ) : (\n <button onClick={() => (this.selectedID = `c-${sc.id}`)}>Ladda kategori</button>\n )}\n </div>\n </div>\n <ul>\n {sc.products.map(p => (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_product--label\">\n <div>\n <p>{p.fields.title}</p>\n <span>{p.fields.ID}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(String(p.fields.ID))}>Kopiera ID</button>\n {this.customer.at_hemfixarna ? (\n <button onClick={() => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=${p.fields.ID}`)}>\n Kopiera URL\n </button>\n ) : (\n <button onClick={() => (this.selectedID = String(p.fields.ID))}>Ladda produkt</button>\n )}\n </div>\n </div>\n </li>\n ))}\n </ul>\n </li>\n ))}\n </ul>\n )}\n </li>\n ))}\n </div>\n </ul>\n </div>\n ) : (\n <div>\n <form\n onSubmit={e => {\n e.preventDefault();\n this.handleLogin();\n }}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '1rem',\n maxWidth: '300px',\n margin: 'auto',\n padding: '20px',\n border: '1px solid #ccc',\n borderRadius: '5px',\n gridColumn: 'span 2',\n }}\n >\n <input type=\"password\" placeholder=\"Lösenord\" />\n <button type=\"submit\">Logga in</button>\n {this.loginError && <span>Fel lösenord</span>}\n </form>\n </div>\n )}\n </Fragment>\n ) : (\n <h1\n style={{\n textAlign: 'center',\n margin: 'auto',\n padding: '20px',\n fontSize: '24px',\n fontWeight: 'bold',\n color: 'red',\n }}\n >\n No customer found\n </h1>\n );\n }\n}\n"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"hemfixarna-doro.entry.esm.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,EAAE;;MCQf,WAAW;;;;uBAEc,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACE,4BAAsB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,GAAyB,EAC1K;GACH;;;;;;","names":[],"sources":["./src/components/customers/hemfixarna-doro/hemfixarna-doro.scss?tag=hemfixarna-doro&encapsulation=shadow","./src/components/customers/hemfixarna-doro/hemfixarna-doro.tsx"],"sourcesContent":["","import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-doro',\n styleUrl: 'hemfixarna-doro.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component widgetStyle={this.widgetStyle} buttonBg={this.buttonBg} buttonColor={this.buttonColor} id={this.id} business={Business.doro}></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"hemfixarna-elfa.entry.esm.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,EAAE;;MCQf,WAAW;;;;uBAEc,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACE,4BAAsB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,GAAyB,EAC1K;GACH;;;;;;","names":[],"sources":["./src/components/customers/hemfixarna-elfa/hemfixarna-elfa.scss?tag=hemfixarna-elfa&encapsulation=shadow","./src/components/customers/hemfixarna-elfa/hemfixarna-elfa.tsx"],"sourcesContent":["","import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-elfa',\n styleUrl: 'hemfixarna-elfa.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component widgetStyle={this.widgetStyle} buttonBg={this.buttonBg} buttonColor={this.buttonColor} id={this.id} business={Business.elfa}></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"hemfixarna-fargvaruhuset.entry.esm.js","mappings":";;;MAOa,WAAW;;;;uBAEc,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACE,4BACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,aAAa,GACV,EACxB;GACH;;;;;","names":[],"sources":["./src/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-fargvaruhuset',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n id={this.id}\n business={Business.fargvaruhuset}\n ></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"hemfixarna-flyttsmart.entry.esm.js","mappings":";;;MAOa,WAAW;;;;uBAEc,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACE,4BACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,UAAU,GACP,EACxB;GACH;;;;;","names":[],"sources":["./src/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-flyttsmart',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n id={this.id}\n business={Business.flyttsmart}\n ></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"hemfixarna-forebygg.entry.esm.js","mappings":";;;AAAA,MAAM,qBAAqB,GAAG,EAAE;;MCQnB,WAAW;;;;uBAEc,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACE,4BAAsB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAyB,EAC9K;GACH;;;;;;","names":[],"sources":["./src/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.scss?tag=hemfixarna-forebygg&encapsulation=shadow","./src/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.tsx"],"sourcesContent":["","import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-forebygg',\n styleUrl: 'hemfixarna-forebygg.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component widgetStyle={this.widgetStyle} buttonBg={this.buttonBg} buttonColor={this.buttonColor} id={this.id} business={Business.forebygg}></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|