hemfixarna-web-components 1.6.3 → 1.7.0
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_36.cjs.entry.js → hemfixarna-address_15.cjs.entry.js} +341 -1030
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js +26 -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 +1 -1
- package/dist/cjs/hemfixarna-components.cjs.js.map +1 -1
- 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-4695c475.js +258 -0
- package/dist/cjs/index-4695c475.js.map +1 -0
- package/dist/cjs/index-8054ce93.js +42 -0
- package/dist/cjs/index-8054ce93.js.map +1 -0
- package/dist/cjs/index-b83343b9.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js +2 -82
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js +1 -20
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js +1 -39
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js +1 -39
- package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js +1 -39
- package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js +1 -20
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js +1 -39
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js +1 -39
- package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js +1 -20
- package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js +1 -20
- package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js +1 -39
- package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js +1 -38
- package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js +1 -38
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js +1 -38
- package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js +1 -20
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js +1 -1
- package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js +1 -39
- package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js +1 -20
- package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js +1 -39
- package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js.map +1 -1
- package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js +1 -60
- package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js.map +1 -1
- package/dist/collection/components/hemfixarna-cart/hemfixarna-cart.js +1 -28
- package/dist/collection/components/hemfixarna-cart/hemfixarna-cart.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +27 -236
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js +75 -39
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +1 -1
- package/dist/collection/components/hemfixarna-info/hemfixarna-info.js +2 -2
- package/dist/collection/components/hemfixarna-info/hemfixarna-info.js.map +1 -1
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js +2 -1
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +1 -1
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js +1 -26
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +1 -1
- package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js +7 -41
- package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js.map +1 -1
- package/dist/collection/types/index.js +4 -0
- package/dist/collection/types/index.js.map +1 -1
- package/dist/collection/utils/api.js +18 -2
- package/dist/collection/utils/api.js.map +1 -1
- package/dist/collection/utils/creditSafe.js +2 -2
- package/dist/collection/utils/creditSafe.js.map +1 -1
- package/dist/collection/utils/enviroment.js +31 -0
- package/dist/collection/utils/enviroment.js.map +1 -0
- package/dist/collection/utils/felixApi.js +2 -1
- package/dist/collection/utils/felixApi.js.map +1 -1
- package/dist/collection/utils/felixFunctions.js +0 -1
- package/dist/collection/utils/felixFunctions.js.map +1 -1
- package/dist/esm/{hemfixarna-address_36.entry.js → hemfixarna-address_15.entry.js} +150 -818
- package/dist/esm/hemfixarna-address_15.entry.js.map +1 -0
- package/dist/esm/hemfixarna-byggmax.entry.js +22 -0
- package/dist/esm/hemfixarna-byggmax.entry.js.map +1 -0
- package/dist/esm/hemfixarna-category.entry.js +24 -0
- package/dist/esm/hemfixarna-category.entry.js.map +1 -0
- package/dist/esm/hemfixarna-components.js +3 -3
- package/dist/esm/hemfixarna-components.js.map +1 -1
- package/dist/esm/hemfixarna-doro.entry.js +22 -0
- package/dist/esm/hemfixarna-doro.entry.js.map +1 -0
- package/dist/esm/hemfixarna-elfa.entry.js +22 -0
- package/dist/esm/hemfixarna-elfa.entry.js.map +1 -0
- package/dist/esm/hemfixarna-fargvaruhuset.entry.js +19 -0
- package/dist/esm/hemfixarna-fargvaruhuset.entry.js.map +1 -0
- package/dist/esm/hemfixarna-flyttsmart.entry.js +19 -0
- package/dist/esm/hemfixarna-flyttsmart.entry.js.map +1 -0
- package/dist/esm/hemfixarna-forebygg.entry.js +22 -0
- package/dist/esm/hemfixarna-forebygg.entry.js.map +1 -0
- package/dist/esm/hemfixarna-hornbach.entry.js +22 -0
- package/dist/esm/hemfixarna-hornbach.entry.js.map +1 -0
- package/dist/esm/hemfixarna-kbygg.entry.js +19 -0
- package/dist/esm/hemfixarna-kbygg.entry.js.map +1 -0
- package/dist/esm/hemfixarna-klint.entry.js +19 -0
- package/dist/esm/hemfixarna-klint.entry.js.map +1 -0
- package/dist/esm/hemfixarna-kund.entry.js +19 -0
- package/dist/esm/hemfixarna-kund.entry.js.map +1 -0
- package/dist/esm/hemfixarna-norrgavel.entry.js +19 -0
- package/dist/esm/hemfixarna-norrgavel.entry.js.map +1 -0
- package/dist/esm/hemfixarna-power.entry.js +19 -0
- package/dist/esm/hemfixarna-power.entry.js.map +1 -0
- package/dist/esm/hemfixarna-service.entry.js +20 -0
- package/dist/esm/hemfixarna-service.entry.js.map +1 -0
- package/dist/esm/hemfixarna-skanska.entry.js +22 -0
- package/dist/esm/hemfixarna-skanska.entry.js.map +1 -0
- package/dist/esm/hemfixarna-sparfonster.entry.js +19 -0
- package/dist/esm/hemfixarna-sparfonster.entry.js.map +1 -0
- package/dist/esm/hemfixarna-string-furniture.entry.js +22 -0
- package/dist/esm/hemfixarna-string-furniture.entry.js.map +1 -0
- package/dist/esm/hemfixarna-superfront.entry.js +20 -0
- package/dist/esm/hemfixarna-superfront.entry.js.map +1 -0
- package/dist/esm/hemfixarna-tesla.entry.js +19 -0
- package/dist/esm/hemfixarna-tesla.entry.js.map +1 -0
- package/dist/esm/hemfixarna-traningspartner.entry.js +19 -0
- package/dist/esm/hemfixarna-traningspartner.entry.js.map +1 -0
- package/dist/esm/hemfixarna-zaptec.entry.js +19 -0
- package/dist/esm/hemfixarna-zaptec.entry.js.map +1 -0
- package/dist/esm/{index-8c417125.js → index-04bcf90e.js} +2 -2
- package/dist/esm/index-04bcf90e.js.map +1 -0
- package/dist/esm/index-113a6b21.js +256 -0
- package/dist/esm/index-113a6b21.js.map +1 -0
- package/dist/esm/index-1fbc7a74.js +42 -0
- package/dist/esm/index-1fbc7a74.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
- package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
- package/dist/hemfixarna-components/p-12dbf4e6.entry.js +2 -0
- package/dist/hemfixarna-components/p-12dbf4e6.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-1b80999e.entry.js +2 -0
- package/dist/hemfixarna-components/p-1b80999e.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-1f875c7a.entry.js +2 -0
- package/dist/hemfixarna-components/p-1f875c7a.entry.js.map +1 -0
- package/dist/hemfixarna-components/{p-852e7173.js → p-32a8152b.js} +2 -2
- package/dist/hemfixarna-components/p-32a8152b.js.map +1 -0
- package/dist/hemfixarna-components/p-3acd1346.entry.js +2 -0
- package/dist/hemfixarna-components/p-3acd1346.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-53afbc10.entry.js +2 -0
- package/dist/hemfixarna-components/p-53afbc10.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-53f0abfa.entry.js +2 -0
- package/dist/hemfixarna-components/p-53f0abfa.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-61b4597f.entry.js +2 -0
- package/dist/hemfixarna-components/p-61b4597f.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-6c1d21dd.entry.js +2 -0
- package/dist/hemfixarna-components/p-6c1d21dd.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-6f6601b8.entry.js +2 -0
- package/dist/hemfixarna-components/p-6f6601b8.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-7c122f15.entry.js +2 -0
- package/dist/hemfixarna-components/p-7c122f15.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-8356796a.entry.js +2 -0
- package/dist/hemfixarna-components/p-8356796a.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-8d509bf1.entry.js +2 -0
- package/dist/hemfixarna-components/p-8d509bf1.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-8f0a688c.entry.js +2 -0
- package/dist/hemfixarna-components/p-8f0a688c.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-9b1e6bc2.entry.js +2 -0
- package/dist/hemfixarna-components/p-9b1e6bc2.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-a3d759d9.js +2 -0
- package/dist/hemfixarna-components/p-a3d759d9.js.map +1 -0
- package/dist/hemfixarna-components/p-a9845efc.entry.js +2 -0
- package/dist/hemfixarna-components/p-a9845efc.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-ae3fc85c.entry.js +2 -0
- package/dist/hemfixarna-components/p-ae3fc85c.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-b6bc1537.entry.js +2 -0
- package/dist/hemfixarna-components/p-b6bc1537.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-cb1634e8.entry.js +2 -0
- package/dist/hemfixarna-components/p-cb1634e8.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-cfdc93e9.js +2 -0
- package/dist/hemfixarna-components/p-cfdc93e9.js.map +1 -0
- package/dist/hemfixarna-components/p-dabad8a7.entry.js +2 -0
- package/dist/hemfixarna-components/p-dabad8a7.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-dfcefa54.entry.js +2 -0
- package/dist/hemfixarna-components/p-dfcefa54.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-e0aad0ff.entry.js +2 -0
- package/dist/hemfixarna-components/p-e0aad0ff.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-edac9f21.entry.js +2 -0
- package/dist/hemfixarna-components/p-edac9f21.entry.js.map +1 -0
- package/dist/types/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.d.ts +1 -6
- package/dist/types/components/customers/hemfixarna-doro/hemfixarna-doro.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-elfa/hemfixarna-elfa.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-klint/hemfixarna-klint.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-kund/hemfixarna-kund.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-power/hemfixarna-power.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-skanska/hemfixarna-skanska.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-string/hemfixarna-string-furniture.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-tesla/hemfixarna-tesla.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.d.ts +0 -2
- package/dist/types/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.d.ts +0 -4
- package/dist/types/components/hemfixarna-cart/hemfixarna-cart.d.ts +0 -2
- package/dist/types/components/hemfixarna-component/hemfixarna-component.d.ts +2 -18
- package/dist/types/components/hemfixarna-demo/hemfixarna-demo.d.ts +4 -2
- package/dist/types/components/hemfixarna-order/hemfixarna-order.d.ts +0 -2
- package/dist/types/components/hemfixarna-orderrows/hemfixarna-orderrows.d.ts +1 -2
- package/dist/types/components.d.ts +2 -100
- package/dist/types/types/index.d.ts +24 -22
- package/dist/types/utils/api.d.ts +5 -1
- package/dist/types/utils/enviroment.d.ts +3 -0
- package/package.json +4 -3
- package/readme.md +22 -0
- package/dist/cjs/hemfixarna-address_36.cjs.entry.js.map +0 -1
- package/dist/esm/hemfixarna-address_36.entry.js.map +0 -1
- package/dist/esm/index-8c417125.js.map +0 -1
- package/dist/hemfixarna-components/p-852e7173.js.map +0 -1
- package/dist/hemfixarna-components/p-97461831.entry.js +0 -2
- package/dist/hemfixarna-components/p-97461831.entry.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hemfixarna-component.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-component/hemfixarna-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1G,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAqD,WAAW,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzG,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAQjD,MAAM,OAAO,mBAAmB;;IAsF9B,oBAAe,GAAG,CAAC,IAAa,EAAE,EAAE;MAClC,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;MACxB,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5E,CAAC,CAAC;IA8EF,uBAAkB,GAAG,GAAG,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Fragment, Listen, Prop, State, Watch, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { Business, Category, Product, Service, TopCategory, WidgetStyle } from '../../types';\nimport { getCustomer, getGreenDiscount, getOptions, getRot, getRut, getTaxonomy } 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() tree: Category | null = null;\n @State() product: Product | null = null;\n @State() proppedProduct: Product | null = null;\n @Prop() slug?: string;\n @Prop() id?: string;\n @Prop() business: Business;\n @Prop() topCategory?: TopCategory;\n @Prop() forceOldTree?: boolean = false;\n @Prop() loadFromQuery?: boolean = false;\n @Prop() isDemo?: boolean = false;\n @Prop() widgetStyle: WidgetStyle;\n @Prop() nav?: {\n url: string;\n logo: string;\n background?: string;\n backgroundColor?: string;\n } = undefined;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\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('slug')\n async watchSlugChange(newValue: string) {\n if (this.slugIsOldFormat(newValue)) {\n this.fetchNewTaxonomy(newValue);\n } else if (state.customer && newValue) {\n this.loadCategoryOrProduct(newValue);\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 fetchNewTaxonomy(slug: string) {\n state.selectedCategory = null;\n state.selectedProduct = null;\n state.selectedService = null;\n state.maleri = null;\n\n const res = await getTaxonomy(slug);\n if (res?.code === 'not_found' || res?.code === 'rest_no_route') {\n console.log('taxonomy not found');\n } else if (res) {\n this.setTaxonomy(res);\n if ((res as Product)?.post_type === 'ikea_product') {\n this.product = res as Product;\n }\n }\n }\n\n slugIsOldFormat = (slug?: string) => {\n if (!slug) return false;\n return ['product', 'service', 'category'].some(str => slug.includes(str));\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 [tree, res, options, rut, rot, greenDiscount] = await Promise.all([\n this.topCategory ? getTaxonomy(this.topCategory) : null,\n this.slug ? getTaxonomy(this.slug) : Promise.resolve(null),\n getOptions(),\n getRut(),\n getRot(),\n getGreenDiscount(),\n ]);\n\n if ((!this.slug || !this.slugIsOldFormat(this.slug)) && !this.forceOldTree) {\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 if (this.id) {\n if (this.id === 'maleri') {\n state.maleri = true;\n state.step = 4;\n } else {\n this.loadCategoryOrProduct(this.id);\n }\n } else if (this.slug && !this.slugIsOldFormat(this.slug)) {\n this.loadCategoryOrProduct(this.slug);\n }\n }\n } catch (error) {\n console.warn('customer not found');\n }\n }\n\n if (tree?.code === 'not_found') {\n // console.warn('tree not found');\n } else if (tree) {\n this.tree = tree;\n }\n\n if (res?.code === 'not_found') {\n console.log('taxonomy not found');\n } else if (res) {\n this.setTaxonomy(res);\n if ((res as Product)?.post_type === 'ikea_product') {\n this.product = res as Product;\n }\n }\n\n if (this.loadFromQuery) {\n const params = new URL(document.location.toString()).searchParams;\n this.id = params.get('id');\n if (!this.isDemo) {\n this.openModal();\n }\n }\n\n state.rotOptions = rot;\n state.rutOptions = rut;\n state.greenOptions = greenDiscount;\n state.options = options;\n }\n\n triggerScrollTotop = () => {\n const el = this.el.shadowRoot.querySelector('.hemfixarna_content');\n scrollToTop(el);\n };\n\n setTaxonomy(taxonomy: Category | Service | Product) {\n if (taxonomy) {\n if ((taxonomy as Category)?.taxonomy === 'service_cat') {\n state.selectedCategory = taxonomy as Category;\n state.step = 2;\n } else if ((taxonomy as Service)?.post_type === 'service') {\n state.selectedService = taxonomy as Service;\n state.selectedCategory = this.tree.sub_cats.find(c => c.services.find(s => s.ID === (taxonomy as Service).ID));\n state.step = 3;\n } else if ((taxonomy as Product)?.post_type === 'ikea_product') {\n state.selectedProduct = taxonomy as Product;\n state.selectedService = this.tree.sub_cats\n .map(c => c.services)\n .flat()\n .find(s => s.products.find(p => p.ID === state.selectedProduct.ID));\n state.selectedCategory = this.tree.sub_cats.find(c => c.services.find(s => s.ID === state.selectedService.ID));\n state.step = 4;\n }\n this.triggerScrollTotop();\n }\n }\n\n // Open close modal && click outside event\n openModal() {\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 (this.loadFromQuery && !this.isDemo) return;\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 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 const navBackground = this.nav?.background ? getAssetPath(this.nav.background) : '';\n const navLogo = this.nav?.logo ? getAssetPath(this.nav.logo) : '';\n\n return (\n <div class={`hemfixarna ${this.loadFromQuery ? 'hemfixarna_standalone' : ''}`}>\n {this.loadFromQuery && !this.isDemo && this.nav ? (\n <nav class=\"hemfixarna_nav\" style={{ backgroundColor: this.nav.backgroundColor ?? '' }}>\n <div>\n <div class=\"hemfixarna_nav--logos\">\n <a href={this.nav.url} target=\"_blank\">\n <img class=\"hemfixarna_partnerlogo\" src={navLogo} alt={`${this.business} logo`} />\n </a>\n <a href=\"https://hemfixarna.se/\" target=\"_blank\">\n <p class={navBackground || this.nav.backgroundColor ? 'with-bg' : ''}>I samarbete med:</p>\n <img src={logo} alt=\"hemfixarna_logo\" width={104} />\n </a>\n </div>\n\n <div class=\"hemfixarna_nav--links\">\n <a href={this.nav.url} target=\"_blank\">\n Till {this.business}\n </a>\n <a href=\"https://www.hemfixarna.se/\" target=\"_blank\">\n Till Hemfixarna\n </a>\n </div>\n {navBackground ? <img src={navBackground} class=\"nav_background\" alt=\"nav_background\" /> : null}\n </div>\n </nav>\n ) : null}\n {!this.loadFromQuery || this.isDemo ? (\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.product && this.slug?.includes('product')) || (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 ) : null}\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 {state.modal.text.map((t: string) => (\n <p innerHTML={t}></p>\n ))}\n <div>\n <button onClick={() => (state.modal = null)}>Stäng</button>\n </div>\n </div>\n )}\n {(this.tree || state.customer) && (\n <hemfixarna-breadcrumbs isDemo={this.isDemo} loadFromQuery={this.loadFromQuery} closeModal={() => this.closeModal()} tree={this.tree} />\n )}\n {!state.customer || this.slugIsOldFormat(this.slug) ? (\n <div class={`hemfixarna_content hemfixarna_content--${state.step}`}>\n {/* // IF AT TOP LEVEL (step 1) */}\n {state.step === 1 && this.tree && <hemfixarna-start tree={this.tree} />}\n {/* // IF SELECTED CATEGORY (step 2) */}\n {state.step === 2 && state.selectedCategory && <hemfixarna-category />}\n {/* // IF SELECTED SERVICE (step 3) */}\n {state.step === 3 && state.selectedService && <hemfixarna-service />}\n {/* // IF SELECTED PRODUCT (step 4) */}\n {state.step === 4 && state.selectedProduct && <hemfixarna-product />}\n {/* // IF CHECKOUT (step 5) */}\n {state.step === 5 && <hemfixarna-cart tree={this.tree} />}\n {/* // IF ORDER CONFIRM (step 6) */}\n {state.step === 6 && <hemfixarna-order tree={this.tree} />}\n </div>\n ) : (\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 tree={this.tree} />}\n {/* // IF ORDER CONFIRM (step 6) */}\n {state.step === 6 && <hemfixarna-order tree={this.tree} />}\n </div>\n )}\n </div>\n {!this.isDemo ? <div class={`hemfixarna_backdrop ${this.showModal ? 'hemfixarna_backdrop--open' : ''}`}></div> : null}\n </div>\n )}\n </div>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"hemfixarna-component.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-component/hemfixarna-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1G,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAqB,WAAW,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAQjD,MAAM,OAAO,mBAAmB;;IA0F9B,uBAAkB,GAAG,GAAG,EAAE;MACxB,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;MACnE,WAAW,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC;iBA5FwB,KAAK;qBACD,KAAK;mBACA,IAAI;;;uBAGJ,WAAW,CAAC,QAAQ;;;0BAGb,IAAI;;EAI9C,qBAAqB,CAAC,EAAU;IAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;MACvB,MAAM,UAAU,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,GAAG,KAA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,IAAI,2BAAoB,CACrC,CACF;QACN,WAAK,KAAK,EAAE,uBAAuB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,EAAE,GAAQ,CAC1F,CACP,CACG,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 } 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() business: Business;\n @Prop() widgetStyle: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n @State() proppedProduct: Product | null = 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 if (this.id) {\n if (this.id === 'maleri') {\n state.maleri = true;\n state.step = 4;\n } else {\n this.loadCategoryOrProduct(this.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\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 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 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\">\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 {state.modal.text.map((t: string) => (\n <p innerHTML={t}></p>\n ))}\n <div>\n <button onClick={() => (state.modal = null)}>Stäng</button>\n </div>\n </div>\n )}\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"]}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { getAssetPath, h } from '@stencil/core';
|
2
|
-
import { Business,
|
3
|
-
import { getCustomer,
|
1
|
+
import { Fragment, getAssetPath, h } from '@stencil/core';
|
2
|
+
import { Business, WidgetStyle } from '../../types';
|
3
|
+
import { getCustomer, loginCustomer } from '../../utils/api';
|
4
|
+
import { getApiUrl } from '../../utils/enviroment';
|
4
5
|
import { isBusiness } from '../../utils/types';
|
5
6
|
export class MyComponent {
|
6
7
|
constructor() {
|
@@ -16,6 +17,8 @@ export class MyComponent {
|
|
16
17
|
this.buttonColor = '';
|
17
18
|
this.partner = undefined;
|
18
19
|
this.colorAccessibility = undefined;
|
20
|
+
this.loggedIn = false;
|
21
|
+
this.loginError = false;
|
19
22
|
}
|
20
23
|
debouncedFunction() {
|
21
24
|
if (this.debounce !== null) {
|
@@ -32,25 +35,22 @@ export class MyComponent {
|
|
32
35
|
const defaultBgColor = '#c84e18';
|
33
36
|
const firstColor = this.buttonBg.length ? (this.buttonBg.startsWith('#') ? this.buttonBg : `#${this.buttonBg}`) : defaultBgColor;
|
34
37
|
const secondColor = this.buttonColor.length ? (this.buttonColor.startsWith('#') ? this.buttonColor : `#${this.buttonColor}`) : defaultTextColor;
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
try {
|
39
|
+
const response = await fetch('https://www.aremycolorsaccessible.com/api/are-they', {
|
40
|
+
mode: 'cors',
|
41
|
+
method: 'POST',
|
42
|
+
body: JSON.stringify({ colors: [firstColor, secondColor] }),
|
43
|
+
});
|
44
|
+
if (!response) {
|
45
|
+
throw new Error('Network response was not ok');
|
46
|
+
}
|
47
|
+
const json = await response.json();
|
42
48
|
if (json && (json)) {
|
43
49
|
this.colorAccessibility = json;
|
44
50
|
}
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
getTopLevelCategory() {
|
49
|
-
switch (process.env.BUSINESS) {
|
50
|
-
case Business.byggmax:
|
51
|
-
return TopCategory.byggmax;
|
52
|
-
default:
|
53
|
-
return '';
|
51
|
+
}
|
52
|
+
catch (error) {
|
53
|
+
console.warn('Error fetching color accessibility:', error);
|
54
54
|
}
|
55
55
|
}
|
56
56
|
getColor(rating) {
|
@@ -68,27 +68,20 @@ export class MyComponent {
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
async componentWillLoad() {
|
71
|
-
|
72
|
-
if (
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
}
|
81
|
-
else {
|
82
|
-
const partner = window.location.pathname.replace('/', '');
|
83
|
-
this.partner = isBusiness(partner) ? partner : (_a = process.env.BUSINESS) !== null && _a !== void 0 ? _a : Business.kund;
|
84
|
-
const customer = await getCustomer(this.partner);
|
85
|
-
if (customer.code !== 'not_found' && customer) {
|
86
|
-
this.customer = customer;
|
71
|
+
const partner = window.location.pathname.replace('/', '');
|
72
|
+
if (!isBusiness(partner) && partner)
|
73
|
+
return;
|
74
|
+
this.partner = partner ? partner : Business.kund;
|
75
|
+
const customer = await getCustomer(this.partner);
|
76
|
+
if (customer.code !== 'not_found' && customer) {
|
77
|
+
this.customer = customer;
|
78
|
+
if (!this.customer.password_protected || window.localStorage.getItem(`${this.customer.ID}-loggedin`)) {
|
79
|
+
this.loggedIn = true;
|
87
80
|
}
|
88
81
|
}
|
89
82
|
}
|
90
83
|
getExample() {
|
91
|
-
return `<hemfixarna
|
84
|
+
return `<hemfixarna-component business="${this.partner}"${this.selectedSlug ? ` slug="${this.selectedSlug}" ` : ''}${this.selectedID ? ` id="${this.selectedID}" ` : ''} ${this.widgetStyle === WidgetStyle.standard ? '' : `widget-style="${this.widgetStyle}"`} ${this.buttonColor.length ? `button-color="${this.buttonColor}"` : ''} ${this.buttonBg.length ? `button-bg="${this.buttonBg}"` : ''}></hemfixarna-component>`;
|
92
85
|
}
|
93
86
|
copyExample() {
|
94
87
|
navigator.clipboard.writeText(this.getExample());
|
@@ -116,11 +109,52 @@ export class MyComponent {
|
|
116
109
|
const allCategories = (_a = this.customer) === null || _a === void 0 ? void 0 : _a.categories.map(c => (c.sub_categories ? c.sub_categories : c)).flat();
|
117
110
|
return allCategories === null || allCategories === void 0 ? void 0 : allCategories.some(c => c.add_painting);
|
118
111
|
}
|
112
|
+
async handleLogin() {
|
113
|
+
const shadowHost = document.querySelector('hemfixarna-demo');
|
114
|
+
const shadowRoot = shadowHost.shadowRoot;
|
115
|
+
const passwordInput = shadowRoot.querySelector('input[type="password"]');
|
116
|
+
const password = passwordInput.value;
|
117
|
+
this.loginError = false;
|
118
|
+
try {
|
119
|
+
const status = await loginCustomer({ id: this.customer.ID, password: password });
|
120
|
+
if (status === 200) {
|
121
|
+
this.loggedIn = true;
|
122
|
+
window.localStorage.setItem(`${this.customer.ID}-loggedin`, 'true');
|
123
|
+
}
|
124
|
+
else {
|
125
|
+
this.loginError = true;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
catch (error) {
|
129
|
+
console.log(error);
|
130
|
+
this.loginError = true;
|
131
|
+
}
|
132
|
+
}
|
119
133
|
render() {
|
120
134
|
var _a;
|
121
135
|
const copy = getAssetPath(`./assets/copy.png`);
|
122
|
-
return (h("div", { class: ((_a = this.customer) === null || _a === void 0 ? void 0 : _a.at_hemfixarna) ? 'hemfixarna_hosted' : '' }, h("div", { class: "hemfixarna_scripts" }, h("div", { onClick: () => this.copyExample(), class: "hemfixarna_example" }, h("p", null, this.getExample()), h("img", { src: copy, height: 20 }), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText)),
|
123
|
-
c.sub_categories.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.name), h("span", null, `c-${sc.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${sc.id}`) }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () =>
|
136
|
+
return this.customer ? (h(Fragment, null, this.loggedIn ? (h("div", { class: ((_a = this.customer) === null || _a === void 0 ? void 0 : _a.at_hemfixarna) ? 'hemfixarna_hosted' : '' }, h("div", { class: "hemfixarna_scripts" }, h("div", { onClick: () => this.copyExample(), class: "hemfixarna_example" }, h("p", null, this.getExample()), h("img", { src: copy, height: 20 }), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText)), h("hemfixarna-component", { business: this.partner, buttonBg: this.buttonBg, buttonColor: this.buttonColor, widgetStyle: this.widgetStyle, id: this.selectedID }), h("div", { class: "hemfixarna_install" }, h("div", { onClick: () => this.copyCdn(), class: "hemfixarna_example" }, h("p", null, this.cdnLink), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText), h("img", { src: copy, height: 20 }))), h("div", { class: "hemfixarna_widgetstyles" }, h("h5", null, "Widget styles"), h("div", null, Object.values(WidgetStyle).map(style => (h("label", { key: style }, h("input", { type: "radio", value: style, checked: this.widgetStyle === style, onChange: () => (this.widgetStyle = style) }), style)))), h("div", null, h("div", null, h("h5", null, "Button background color"), h("input", { type: "text", value: this.buttonBg, onInput: e => (this.buttonBg = e.target.value) })), h("div", null, h("h5", null, "Button text color"), h("input", { type: "text", value: this.buttonColor, onInput: e => (this.buttonColor = e.target.value) })))), h("span", null, "Write an hexa code no # needed"), this.colorAccessibility ? (h("div", null, h("h5", null, "Tillg\u00E4nglighetsrapport"), h("div", null, h("strong", null, "Liten text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.small) } }, this.colorAccessibility.small), h("br", null), h("strong", null, "Fet text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.bold) } }, this.colorAccessibility.bold), h("br", null), h("strong", null, "Stor text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.large) } }, this.colorAccessibility.large), h("br", null), h("strong", null, "Kontrastf\u00F6rh\u00E5llande:"), " ", this.colorAccessibility.contrast))) : null), h("ul", { class: "hemfixarna_categories" }, h("div", null, this.customer.logo ? (h("div", { style: { width: '100%', display: 'flex', justifyContent: 'center' } }, h("img", { style: { maxWidth: '250px', height: 'auto', margin: '0 auto 2rem' }, src: this.customer.logo.url, alt: this.customer.post_title }))) : null, this.showMaleri() ? (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, "M\u00E5leriverktyget"), h("span", null, "maleri")), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText('maleri') }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=maleri`) }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = 'maleri') }, "Ladda m\u00E5leri")))))) : null, this.customer.categories.map(c => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, c.name), h("span", null, `c-${c.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${c.id}`) }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=c-${c.id}`) }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = `c-${c.id}`) }, "Ladda kategori")))), c.show_products && c.products ? (h("ul", null, c.products.map(p => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, h("div", null, h("p", null, p.fields.title), h("span", null, p.fields.ID)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=${p.fields.ID}`) }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt"))))))))) : (h("ul", null, c.sub_categories &&
|
137
|
+
c.sub_categories.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.name), h("span", null, `c-${sc.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${sc.id}`) }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=c-${c.id}`) }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = `c-${sc.id}`) }, "Ladda kategori")))), h("ul", null, sc.products.map(p => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, h("div", null, h("p", null, p.fields.title), h("span", null, p.fields.ID)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), this.customer.at_hemfixarna ? (h("button", { onClick: () => navigator.clipboard.writeText(`${getApiUrl()}/partner/${this.customer.post_name}?id=${p.fields.ID}`) }, "Kopiera URL")) : (h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt")))))))))))))))))))) : (h("div", null, h("form", { onSubmit: e => {
|
138
|
+
e.preventDefault();
|
139
|
+
this.handleLogin();
|
140
|
+
}, style: {
|
141
|
+
display: 'flex',
|
142
|
+
flexDirection: 'column',
|
143
|
+
gap: '1rem',
|
144
|
+
maxWidth: '300px',
|
145
|
+
margin: 'auto',
|
146
|
+
padding: '20px',
|
147
|
+
border: '1px solid #ccc',
|
148
|
+
borderRadius: '5px',
|
149
|
+
gridColumn: 'span 2',
|
150
|
+
} }, h("input", { type: "password", placeholder: "L\u00F6senord" }), h("button", { type: "submit" }, "Logga in"), this.loginError && h("span", null, "Fel l\u00F6senord")))))) : (h("h1", { style: {
|
151
|
+
textAlign: 'center',
|
152
|
+
margin: 'auto',
|
153
|
+
padding: '20px',
|
154
|
+
fontSize: '24px',
|
155
|
+
fontWeight: 'bold',
|
156
|
+
color: 'red',
|
157
|
+
} }, "No customer found"));
|
124
158
|
}
|
125
159
|
static get is() { return "hemfixarna-demo"; }
|
126
160
|
static get encapsulation() { return "shadow"; }
|
@@ -145,7 +179,9 @@ export class MyComponent {
|
|
145
179
|
"buttonBg": {},
|
146
180
|
"buttonColor": {},
|
147
181
|
"partner": {},
|
148
|
-
"colorAccessibility": {}
|
182
|
+
"colorAccessibility": {},
|
183
|
+
"loggedIn": {},
|
184
|
+
"loginError": {}
|
149
185
|
};
|
150
186
|
}
|
151
187
|
static get watchers() {
|
@@ -1 +1 @@
|
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C,IAAI,CAAC,YAAY,GAAG,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC,qBAAyB,CAC3F,CACF;UACN,cACG,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CACrB;YACE,WAAK,KAAK,EAAC,8BAA8B;cACvC;gBACE,aAAI,EAAE,CAAC,UAAU,CAAK;gBACtB,gBAAO,WAAW,EAAE,CAAC,SAAS,EAAE,CAAQ,CACpC;cACN;gBACE,cAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC,mBAAuB;gBACtG,cAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC,oBAAwB,CAC1F,CACF,CACH,CACN,CAAC,CACC,CACF,CACN,CAAC,CACC,CACF,CACN,CAAC,CACE,CACP,CAAC,CAAC,CAAC,IAAI,CACL,CACD,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, State, Watch, getAssetPath, h } from '@stencil/core';\nimport { Business, Category, Customer, TopCategory, WidgetStyle } from '../../types';\nimport { getCustomer, getTaxonomy } from '../../utils/api';\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 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 fetch('https://www.aremycolorsaccessible.com/api/are-they', {\n mode: 'cors',\n method: 'POST',\n body: JSON.stringify({ colors: [firstColor, secondColor] }),\n })\n .then(response => response.json())\n .then(json => {\n if (json && (json satisfies ColorAccessibility)) {\n this.colorAccessibility = json;\n }\n });\n // Your color accessibility logic here\n }\n\n getTopLevelCategory() {\n switch (process.env.BUSINESS as Business) {\n case Business.byggmax:\n return TopCategory.byggmax;\n default:\n return '';\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 if (process.env.FORCE_OLD_TREE) {\n const tree = await getTaxonomy(this.getTopLevelCategory());\n if ((tree as any)?.code === 'not_found') {\n // console.warn('tree not found');\n } else if (tree) {\n this.tree = tree as Category;\n }\n } else {\n const partner = window.location.pathname.replace('/', '');\n this.partner = isBusiness(partner) ? partner : (process.env.BUSINESS as Business) ?? Business.kund;\n const customer = await getCustomer(this.partner);\n if (customer.code !== 'not_found' && customer) {\n this.customer = customer;\n }\n }\n }\n\n getExample() {\n return `<hemfixarna-${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-${this.partner}>`;\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 render() {\n const copy = getAssetPath(`./assets/copy.png`);\n\n return (\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 {(this.partner as Business) === Business.byggmax && (\n <hemfixarna-byggmax\n buttonColor={this.buttonColor}\n buttonBg={this.buttonBg}\n widgetStyle={this.widgetStyle}\n forceOldTree={Boolean(process.env.FORCE_OLD_TREE)}\n slug={this.selectedSlug}\n id={this.selectedID}\n />\n )}\n {this.partner === Business.skanska && <hemfixarna-skanska buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.sparfonster && (\n <hemfixarna-sparfonster buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.string && (\n <hemfixarna-string-furniture buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.hornbach && (\n <hemfixarna-hornbach isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.traningspartner && (\n <hemfixarna-traningspartner buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.superfront && (\n <hemfixarna-superfront buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.zaptec && (\n <hemfixarna-zaptec isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.tesla && (\n <hemfixarna-tesla isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.forebygg && (\n <hemfixarna-forebygg buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.doro && <hemfixarna-doro buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.elfa && <hemfixarna-elfa isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.kbygg && (\n <hemfixarna-kbygg isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.fargvaruhuset && (\n <hemfixarna-fargvaruhuset isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.norrgavel && (\n <hemfixarna-norrgavel isDemo buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.klint && <hemfixarna-klint buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.flyttsmart && (\n <hemfixarna-flyttsmart buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />\n )}\n {this.partner === Business.power && <hemfixarna-power buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\n {this.partner === Business.kund && <hemfixarna-kund buttonColor={this.buttonColor} buttonBg={this.buttonBg} widgetStyle={this.widgetStyle} id={this.selectedID} />}\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 {this.customer ? (\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(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=maleri`)}>\n Kopiera URL\n </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(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=c-${c.id}`)}>\n Kopiera URL\n </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\n onClick={() =>\n navigator.clipboard.writeText(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=${p.fields.ID}`)\n }\n >\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 ) : (\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\n onClick={() =>\n navigator.clipboard.writeText(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=c-${c.id}`)\n }\n >\n Kopiera URL\n </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\n onClick={() =>\n navigator.clipboard.writeText(`${process.env.API_URL ?? 'https://hemfixarna.se'}/partner/${this.customer.post_name}?id=${p.fields.ID}`)\n }\n >\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 ) : this.tree ? (\n <div>\n {this.tree.sub_cats.map(c => (\n <li>\n <div class=\"hemfixarna_categories--label hemfixarna_categories--label--big\">\n <div>\n <p>{c.name}</p>\n <span>{`category/${c.slug}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`category/${c.slug}`)}>Kopiera slug</button>\n <button onClick={() => (this.selectedSlug = `category/${c.slug}`)}>Ladda kategori</button>\n </div>\n </div>\n <ul>\n {c.services.map(sc => (\n <li>\n <div class=\"hemfixarna_categories--label\">\n <div>\n <p>{sc.post_title}</p>\n <span>{`service/${sc.post_name}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`service/${sc.post_name}`)}>Kopiera slug</button>\n <button onClick={() => (this.selectedSlug = `service/${sc.post_name}`)}>Ladda kategori</button>\n </div>\n </div>\n <ul>\n {sc.products.map(sc => (\n <li>\n <div class=\"hemfixarna_categories--label\">\n <div>\n <p>{sc.post_title}</p>\n <span>{`product/${sc.post_name}`}</span>\n </div>\n <div>\n <button onClick={() => navigator.clipboard.writeText(`product/${sc.post_name}`)}>Kopiera slug</button>\n <button onClick={() => (this.selectedSlug = `product/${sc.post_name}`)}>Ladda produkt</button>\n </div>\n </div>\n </li>\n ))}\n </ul>\n </li>\n ))}\n </ul>\n </li>\n ))}\n </div>\n ) : null}\n </ul>\n </div>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"hemfixarna-demo.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-demo/hemfixarna-demo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAsB,WAAW,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,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ACvF,CACG,CACF,CACH,CACN,CAAC,CACC,CACF,CACN,CAAC,CACD,CACN,CACE,CACN,CAAC,CACE,CACH,CACD,CACP,CAAC,CAAC,CAAC,CACF;MACE,YACE,QAAQ,EAAE,CAAC,CAAC,EAAE;UACZ,CAAC,CAAC,cAAc,EAAE,CAAC;UACnB,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,CAAC,EACD,KAAK,EAAE;UACL,OAAO,EAAE,MAAM;UACf,aAAa,EAAE,QAAQ;UACvB,GAAG,EAAE,MAAM;UACX,QAAQ,EAAE,OAAO;UACjB,MAAM,EAAE,MAAM;UACd,OAAO,EAAE,MAAM;UACf,MAAM,EAAE,gBAAgB;UACxB,YAAY,EAAE,KAAK;UACnB,UAAU,EAAE,QAAQ;SACrB;QAED,aAAO,IAAI,EAAC,UAAU,EAAC,WAAW,EAAC,eAAU,GAAG;QAChD,cAAQ,IAAI,EAAC,QAAQ,eAAkB;QACtC,IAAI,CAAC,UAAU,IAAI,oCAAyB,CACxC,CACH,CACP,CACQ,CACZ,CAAC,CAAC,CAAC,CACF,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;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
@@ -5,9 +5,9 @@ export class HemfixarnaInfo {
|
|
5
5
|
this.logo = getAssetPath(`./assets/hemfixarna.svg`);
|
6
6
|
}
|
7
7
|
render() {
|
8
|
-
var _a;
|
8
|
+
var _a, _b;
|
9
9
|
const checked = getAssetPath(`./assets/checked.svg`);
|
10
|
-
return (h("div", { class: "hemfixarna_info" }, state.step < 5 ? (h(Fragment, null, h("h2", null, state.customer.info_title), h("p", null, state.customer.info_text))) : (h("h2", null, state.customer.checkout_title)), h("ul", { class: "hemfixarna_features" }, state.step < 5 ? (h(Fragment, null, ((_a = state.customer.trust_badges) === null || _a === void 0 ? void 0 : _a.length) ? (h(Fragment, null, state.customer.trust_badges.map(l => (h("li", { key: l.text }, h("img", { src: checked, alt: "checked" }), h("p", null, l.text)))))) : (h(Fragment, null, state.options.trust.map(l => (h("li", { key: l.trust_badge }, h("img", { src: checked, alt: "checked" }), h("p", null, l.trust_badge)))))))) : (h(Fragment, null, state.customer.checkout_trust_badges.map(l => (h("li", { key: l.text }, h("img", { src: checked, alt: "checked" }), h("p", null, l.text))))))), h("img", { src: this.logo, width: 200, alt: "hemfixarna" }), h("a", { class: "hemfixarna_product--link", target: "_blank", href: state.options.link.url }, state.options.link.title)));
|
10
|
+
return (h("div", { class: "hemfixarna_info" }, state.step < 5 ? (h(Fragment, null, h("h2", null, state.customer.info_title), h("p", null, state.customer.info_text))) : (h("h2", null, state.customer.checkout_title)), h("ul", { class: "hemfixarna_features" }, state.step < 5 ? (h(Fragment, null, ((_a = state.customer.trust_badges) === null || _a === void 0 ? void 0 : _a.length) ? (h(Fragment, null, state.customer.trust_badges.map(l => (h("li", { key: l.text }, h("img", { src: checked, alt: "checked" }), h("p", null, l.text)))))) : (h(Fragment, null, state.options.trust.map(l => (h("li", { key: l.trust_badge }, h("img", { src: checked, alt: "checked" }), h("p", null, l.trust_badge)))))))) : (h(Fragment, null, (_b = state.customer.checkout_trust_badges) === null || _b === void 0 ? void 0 : _b.map(l => (h("li", { key: l.text }, h("img", { src: checked, alt: "checked" }), h("p", null, l.text))))))), h("img", { src: this.logo, width: 200, alt: "hemfixarna" }), h("a", { class: "hemfixarna_product--link", target: "_blank", href: state.options.link.url }, state.options.link.title)));
|
11
11
|
}
|
12
12
|
static get is() { return "hemfixarna-info"; }
|
13
13
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hemfixarna-info.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-info/hemfixarna-info.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,MAAM,aAAa,CAAC;AAMhC,MAAM,OAAO,cAAc;EAJ3B;IAKE,SAAI,GAAG,YAAY,CAAC,yBAAyB,CAAC,CAAC;GAuDhD;EArDC,MAAM;;IACJ,MAAM,OAAO,GAAG,YAAY,CAAC,sBAAsB,CAAC,CAAC;IACrD,OAAO,CACL,WAAK,KAAK,EAAC,iBAAiB;MACzB,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAChB,EAAC,QAAQ;QACP,cAAK,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAM;QACpC,aAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAK,CACxB,CACZ,CAAC,CAAC,CAAC,CACF,cAAK,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAM,CACzC;MACD,UAAI,KAAK,EAAC,qBAAqB,IAC5B,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAChB,EAAC,QAAQ,QACN,CAAA,MAAA,KAAK,CAAC,QAAQ,CAAC,YAAY,0CAAE,MAAM,EAAC,CAAC,CAAC,CACrC,EAAC,QAAQ,QACN,KAAK,C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AQ,EAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAC7E,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CACvB,CACA,CACP,CAAC;EACJ,CAAC;;CACF","sourcesContent":["import { Component, Fragment, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\n\n@Component({\n tag: 'hemfixarna-info',\n shadow: false,\n})\nexport class HemfixarnaInfo {\n logo = getAssetPath(`./assets/hemfixarna.svg`);\n\n render() {\n const checked = getAssetPath(`./assets/checked.svg`);\n return (\n <div class=\"hemfixarna_info\">\n {state.step < 5 ? (\n <Fragment>\n <h2>{state.customer.info_title}</h2>\n <p>{state.customer.info_text}</p>\n </Fragment>\n ) : (\n <h2>{state.customer.checkout_title}</h2>\n )}\n <ul class=\"hemfixarna_features\">\n {state.step < 5 ? (\n <Fragment>\n {state.customer.trust_badges?.length ? (\n <Fragment>\n {state.customer.trust_badges.map(l => (\n <li key={l.text}>\n <img src={checked} alt=\"checked\" />\n <p>{l.text}</p>\n </li>\n ))}\n </Fragment>\n ) : (\n <Fragment>\n {state.options.trust.map(l => (\n <li key={l.trust_badge}>\n <img src={checked} alt=\"checked\" />\n <p>{l.trust_badge}</p>\n </li>\n ))}\n </Fragment>\n )}\n </Fragment>\n ) : (\n <Fragment>\n {state.customer.checkout_trust_badges?.map(l => (\n <li key={l.text}>\n <img src={checked} alt=\"checked\" />\n <p>{l.text}</p>\n </li>\n ))}\n </Fragment>\n )}\n </ul>\n <img src={this.logo} width={200} alt=\"hemfixarna\" />\n <a class=\"hemfixarna_product--link\" target=\"_blank\" href={state.options.link.url}>\n {state.options.link.title}\n </a>\n </div>\n );\n }\n}\n"]}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { getAssetPath, h } from '@stencil/core';
|
2
2
|
import state from '../../store';
|
3
|
-
|
3
|
+
import { getApiUrl } from '../../utils/enviroment';
|
4
|
+
const base = `${getApiUrl()}/wp-json/headless`;
|
4
5
|
export class HemfixarnaInvoice {
|
5
6
|
constructor() {
|
6
7
|
this.formError = null;
|