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
@@ -0,0 +1,24 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-b83343b9.js');
|
6
|
+
const index$1 = require('./index-8054ce93.js');
|
7
|
+
|
8
|
+
const MyComponent = class {
|
9
|
+
constructor(hostRef) {
|
10
|
+
index.registerInstance(this, hostRef);
|
11
|
+
this.id = undefined;
|
12
|
+
this.loadFromQuery = undefined;
|
13
|
+
this.widgetStyle = index$1.WidgetStyle.standard;
|
14
|
+
this.buttonColor = undefined;
|
15
|
+
this.buttonBg = undefined;
|
16
|
+
}
|
17
|
+
render() {
|
18
|
+
return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, id: this.id, business: index$1.Business.superfront }));
|
19
|
+
}
|
20
|
+
};
|
21
|
+
|
22
|
+
exports.hemfixarna_superfront = MyComponent;
|
23
|
+
|
24
|
+
//# sourceMappingURL=hemfixarna-superfront.cjs.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-superfront.entry.cjs.js","mappings":";;;;;;;MAOa,WAAW;;;;yBAEW,SAAS;uBACNA,mBAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACEC,kCACE,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,EAAEC,gBAAQ,CAAC,UAAU,GACP,EACxB;GACH;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-superfront',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() loadFromQuery?: string = undefined;\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.superfront}\n ></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-b83343b9.js');
|
6
|
+
const index$1 = require('./index-8054ce93.js');
|
7
|
+
|
8
|
+
const MyComponent = class {
|
9
|
+
constructor(hostRef) {
|
10
|
+
index.registerInstance(this, hostRef);
|
11
|
+
this.id = undefined;
|
12
|
+
this.widgetStyle = index$1.WidgetStyle.standard;
|
13
|
+
this.buttonColor = undefined;
|
14
|
+
this.buttonBg = undefined;
|
15
|
+
}
|
16
|
+
render() {
|
17
|
+
return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, id: this.id, business: index$1.Business.tesla }));
|
18
|
+
}
|
19
|
+
};
|
20
|
+
|
21
|
+
exports.hemfixarna_tesla = MyComponent;
|
22
|
+
|
23
|
+
//# sourceMappingURL=hemfixarna-tesla.cjs.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-tesla.entry.cjs.js","mappings":";;;;;;;MAOa,WAAW;;;;uBAEcA,mBAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACEC,kCAAsB,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,EAAEC,gBAAQ,CAAC,KAAK,GAAyB,EAC3K;GACH;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-tesla/hemfixarna-tesla.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-tesla',\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.tesla}></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-b83343b9.js');
|
6
|
+
const index$1 = require('./index-8054ce93.js');
|
7
|
+
|
8
|
+
const MyComponent = class {
|
9
|
+
constructor(hostRef) {
|
10
|
+
index.registerInstance(this, hostRef);
|
11
|
+
this.id = undefined;
|
12
|
+
this.widgetStyle = index$1.WidgetStyle.standard;
|
13
|
+
this.buttonColor = undefined;
|
14
|
+
this.buttonBg = undefined;
|
15
|
+
}
|
16
|
+
render() {
|
17
|
+
return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, id: this.id, business: index$1.Business.traningspartner }));
|
18
|
+
}
|
19
|
+
};
|
20
|
+
|
21
|
+
exports.hemfixarna_traningspartner = MyComponent;
|
22
|
+
|
23
|
+
//# sourceMappingURL=hemfixarna-traningspartner.cjs.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-traningspartner.entry.cjs.js","mappings":";;;;;;;MAOa,WAAW;;;;uBAEcA,mBAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACEC,kCACE,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,EAAEC,gBAAQ,CAAC,eAAe,GACZ,EACxB;GACH;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-traningspartner',\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.traningspartner}\n ></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-b83343b9.js');
|
6
|
+
const index$1 = require('./index-8054ce93.js');
|
7
|
+
|
8
|
+
const MyComponent = class {
|
9
|
+
constructor(hostRef) {
|
10
|
+
index.registerInstance(this, hostRef);
|
11
|
+
this.id = undefined;
|
12
|
+
this.widgetStyle = index$1.WidgetStyle.standard;
|
13
|
+
this.buttonColor = undefined;
|
14
|
+
this.buttonBg = undefined;
|
15
|
+
}
|
16
|
+
render() {
|
17
|
+
return (index.h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, id: this.id, business: index$1.Business.zaptec }));
|
18
|
+
}
|
19
|
+
};
|
20
|
+
|
21
|
+
exports.hemfixarna_zaptec = MyComponent;
|
22
|
+
|
23
|
+
//# sourceMappingURL=hemfixarna-zaptec.cjs.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"hemfixarna-zaptec.entry.cjs.js","mappings":";;;;;;;MAOa,WAAW;;;;uBAEcA,mBAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,QACEC,kCAAsB,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,EAAEC,gBAAQ,CAAC,MAAM,GAAyB,EAC5K;GACH;;;;;","names":["WidgetStyle","h","Business"],"sources":["./src/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-zaptec',\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.zaptec}></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -0,0 +1,258 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const index = require('./index-b83343b9.js');
|
4
|
+
|
5
|
+
const appendToMap = (map, propName, value) => {
|
6
|
+
const items = map.get(propName);
|
7
|
+
if (!items) {
|
8
|
+
map.set(propName, [value]);
|
9
|
+
}
|
10
|
+
else if (!items.includes(value)) {
|
11
|
+
items.push(value);
|
12
|
+
}
|
13
|
+
};
|
14
|
+
const debounce = (fn, ms) => {
|
15
|
+
let timeoutId;
|
16
|
+
return (...args) => {
|
17
|
+
if (timeoutId) {
|
18
|
+
clearTimeout(timeoutId);
|
19
|
+
}
|
20
|
+
timeoutId = setTimeout(() => {
|
21
|
+
timeoutId = 0;
|
22
|
+
fn(...args);
|
23
|
+
}, ms);
|
24
|
+
};
|
25
|
+
};
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Check if a possible element isConnected.
|
29
|
+
* The property might not be there, so we check for it.
|
30
|
+
*
|
31
|
+
* We want it to return true if isConnected is not a property,
|
32
|
+
* otherwise we would remove these elements and would not update.
|
33
|
+
*
|
34
|
+
* Better leak in Edge than to be useless.
|
35
|
+
*/
|
36
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
37
|
+
const cleanupElements = debounce((map) => {
|
38
|
+
for (let key of map.keys()) {
|
39
|
+
map.set(key, map.get(key).filter(isConnected));
|
40
|
+
}
|
41
|
+
}, 2000);
|
42
|
+
const stencilSubscription = () => {
|
43
|
+
if (typeof index.getRenderingRef !== 'function') {
|
44
|
+
// If we are not in a stencil project, we do nothing.
|
45
|
+
// This function is not really exported by @stencil/core.
|
46
|
+
return {};
|
47
|
+
}
|
48
|
+
const elmsToUpdate = new Map();
|
49
|
+
return {
|
50
|
+
dispose: () => elmsToUpdate.clear(),
|
51
|
+
get: (propName) => {
|
52
|
+
const elm = index.getRenderingRef();
|
53
|
+
if (elm) {
|
54
|
+
appendToMap(elmsToUpdate, propName, elm);
|
55
|
+
}
|
56
|
+
},
|
57
|
+
set: (propName) => {
|
58
|
+
const elements = elmsToUpdate.get(propName);
|
59
|
+
if (elements) {
|
60
|
+
elmsToUpdate.set(propName, elements.filter(index.forceUpdate));
|
61
|
+
}
|
62
|
+
cleanupElements(elmsToUpdate);
|
63
|
+
},
|
64
|
+
reset: () => {
|
65
|
+
elmsToUpdate.forEach((elms) => elms.forEach(index.forceUpdate));
|
66
|
+
cleanupElements(elmsToUpdate);
|
67
|
+
},
|
68
|
+
};
|
69
|
+
};
|
70
|
+
|
71
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
72
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
73
|
+
const unwrappedState = unwrap(defaultState);
|
74
|
+
let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
|
75
|
+
const handlers = {
|
76
|
+
dispose: [],
|
77
|
+
get: [],
|
78
|
+
set: [],
|
79
|
+
reset: [],
|
80
|
+
};
|
81
|
+
const reset = () => {
|
82
|
+
var _a;
|
83
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
84
|
+
// otherwise, the state won't be properly reset
|
85
|
+
states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
|
86
|
+
handlers.reset.forEach((cb) => cb());
|
87
|
+
};
|
88
|
+
const dispose = () => {
|
89
|
+
// Call first dispose as resetting the state would
|
90
|
+
// cause less updates ;)
|
91
|
+
handlers.dispose.forEach((cb) => cb());
|
92
|
+
reset();
|
93
|
+
};
|
94
|
+
const get = (propName) => {
|
95
|
+
handlers.get.forEach((cb) => cb(propName));
|
96
|
+
return states.get(propName);
|
97
|
+
};
|
98
|
+
const set = (propName, value) => {
|
99
|
+
const oldValue = states.get(propName);
|
100
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
101
|
+
states.set(propName, value);
|
102
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
103
|
+
}
|
104
|
+
};
|
105
|
+
const state = (typeof Proxy === 'undefined'
|
106
|
+
? {}
|
107
|
+
: new Proxy(unwrappedState, {
|
108
|
+
get(_, propName) {
|
109
|
+
return get(propName);
|
110
|
+
},
|
111
|
+
ownKeys(_) {
|
112
|
+
return Array.from(states.keys());
|
113
|
+
},
|
114
|
+
getOwnPropertyDescriptor() {
|
115
|
+
return {
|
116
|
+
enumerable: true,
|
117
|
+
configurable: true,
|
118
|
+
};
|
119
|
+
},
|
120
|
+
has(_, propName) {
|
121
|
+
return states.has(propName);
|
122
|
+
},
|
123
|
+
set(_, propName, value) {
|
124
|
+
set(propName, value);
|
125
|
+
return true;
|
126
|
+
},
|
127
|
+
}));
|
128
|
+
const on = (eventName, callback) => {
|
129
|
+
handlers[eventName].push(callback);
|
130
|
+
return () => {
|
131
|
+
removeFromArray(handlers[eventName], callback);
|
132
|
+
};
|
133
|
+
};
|
134
|
+
const onChange = (propName, cb) => {
|
135
|
+
const unSet = on('set', (key, newValue) => {
|
136
|
+
if (key === propName) {
|
137
|
+
cb(newValue);
|
138
|
+
}
|
139
|
+
});
|
140
|
+
// We need to unwrap the defaultState because it might be a function.
|
141
|
+
// Otherwise we might not be sending the right reset value.
|
142
|
+
const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
|
143
|
+
return () => {
|
144
|
+
unSet();
|
145
|
+
unReset();
|
146
|
+
};
|
147
|
+
};
|
148
|
+
const use = (...subscriptions) => {
|
149
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
150
|
+
if (subscription.set) {
|
151
|
+
unsubs.push(on('set', subscription.set));
|
152
|
+
}
|
153
|
+
if (subscription.get) {
|
154
|
+
unsubs.push(on('get', subscription.get));
|
155
|
+
}
|
156
|
+
if (subscription.reset) {
|
157
|
+
unsubs.push(on('reset', subscription.reset));
|
158
|
+
}
|
159
|
+
if (subscription.dispose) {
|
160
|
+
unsubs.push(on('dispose', subscription.dispose));
|
161
|
+
}
|
162
|
+
return unsubs;
|
163
|
+
}, []);
|
164
|
+
return () => unsubs.forEach((unsub) => unsub());
|
165
|
+
};
|
166
|
+
const forceUpdate = (key) => {
|
167
|
+
const oldValue = states.get(key);
|
168
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
169
|
+
};
|
170
|
+
return {
|
171
|
+
state,
|
172
|
+
get,
|
173
|
+
set,
|
174
|
+
on,
|
175
|
+
onChange,
|
176
|
+
use,
|
177
|
+
dispose,
|
178
|
+
reset,
|
179
|
+
forceUpdate,
|
180
|
+
};
|
181
|
+
};
|
182
|
+
const removeFromArray = (array, item) => {
|
183
|
+
const index = array.indexOf(item);
|
184
|
+
if (index >= 0) {
|
185
|
+
array[index] = array[array.length - 1];
|
186
|
+
array.length--;
|
187
|
+
}
|
188
|
+
};
|
189
|
+
|
190
|
+
const createStore = (defaultState, shouldUpdate) => {
|
191
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
192
|
+
map.use(stencilSubscription());
|
193
|
+
return map;
|
194
|
+
};
|
195
|
+
|
196
|
+
const { state, onChange, } = createStore({
|
197
|
+
step: 1,
|
198
|
+
checkoutStep: 1,
|
199
|
+
checkoutEdit: false,
|
200
|
+
selectedCategory: null,
|
201
|
+
selectedService: null,
|
202
|
+
selectedProduct: null,
|
203
|
+
cart: [],
|
204
|
+
business: 'undefined',
|
205
|
+
options: null,
|
206
|
+
rut: true,
|
207
|
+
rot: true,
|
208
|
+
green: true,
|
209
|
+
token: null,
|
210
|
+
user: null,
|
211
|
+
modal: null,
|
212
|
+
rutOptions: null,
|
213
|
+
rotOptions: null,
|
214
|
+
greenOptions: null,
|
215
|
+
customer: null,
|
216
|
+
selectedCustomerCategory: null,
|
217
|
+
parentCategory: null,
|
218
|
+
creditSafeUser: null,
|
219
|
+
checkoutInvoice: false,
|
220
|
+
maleri: false,
|
221
|
+
sources: null,
|
222
|
+
});
|
223
|
+
onChange('cart', cart => {
|
224
|
+
window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));
|
225
|
+
});
|
226
|
+
onChange('user', user => {
|
227
|
+
window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));
|
228
|
+
});
|
229
|
+
onChange('creditSafeUser', user => {
|
230
|
+
window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));
|
231
|
+
});
|
232
|
+
onChange('selectedProduct', product => {
|
233
|
+
if (!state.customer || !product)
|
234
|
+
return;
|
235
|
+
const categories = [...state.customer.categories, ...state.customer.categories.map(c => { var _a; return (_a = c.sub_categories) !== null && _a !== void 0 ? _a : []; })].flat();
|
236
|
+
const category = categories.find(c => c && c.id === product.category);
|
237
|
+
if (category) {
|
238
|
+
state.parentCategory = category;
|
239
|
+
return;
|
240
|
+
}
|
241
|
+
state.parentCategory = null;
|
242
|
+
});
|
243
|
+
onChange('selectedCustomerCategory', category => {
|
244
|
+
if (!state.customer || !category)
|
245
|
+
return;
|
246
|
+
if (category.parent) {
|
247
|
+
const parent = state.customer.categories.find(c => c.id === category.parent);
|
248
|
+
if (parent) {
|
249
|
+
state.parentCategory = parent;
|
250
|
+
return;
|
251
|
+
}
|
252
|
+
}
|
253
|
+
state.parentCategory = null;
|
254
|
+
});
|
255
|
+
|
256
|
+
exports.state = state;
|
257
|
+
|
258
|
+
//# sourceMappingURL=index-4695c475.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"index-4695c475.js","mappings":";;;;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,KAAK;AACL,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,KAAK;AACL,CAAC,CAAC;AACF,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KA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,CAAC,OAAO;IAAE,OAAO;EACxC,MAAM,UAAU,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,cAAI,OAAA,MAAA,CAAC,CAAC,cAAc,mCAAI,EAAE,CAAA,EAAA,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EACxH,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;EACtE,IAAI,QAAQ,EAAE;IACZ,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC;IAChC,OAAO;GACR;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE,QAAQ;EAC3C,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,QAAQ;IAAE,OAAO;EACzC,IAAK,QAAgC,CAAC,MAAM,EAAE;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAM,QAAgC,CAAC,MAAM,CAAC,CAAC;IACtG,IAAI,MAAM,EAAE;MACV,KAAK,CAAC,cAAc,GAAG,MAAM,CAAC;MAC9B,OAAO;KACR;GACF;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC;;;;","names":["getRenderingRef","forceUpdate"],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/index.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { OnChangeHandler } from '@stencil/store/dist/types';\nimport { Business, CartItem, Category, Customer, CustomerCategory, CustomerSubCategory, GreenOptions, Product, RotOptions, RutOptions, Service, User, WpOptions } from '../types';\nimport { CreditSafeUser } from '../types/felixtypes';\n\ntype StateType = {\n step: number;\n selectedCategory: Category | null;\n selectedService: Service | null;\n selectedProduct: Product | null;\n cart: Array<CartItem>;\n business: Business | 'undefined';\n options: WpOptions | null;\n rut: boolean;\n rot: boolean;\n green: boolean;\n token: string | null;\n checkoutStep: number;\n checkoutEdit: boolean;\n user: User | null;\n creditSafeUser: CreditSafeUser | null;\n modal: {\n title?: string;\n text: string[];\n } | null;\n rutOptions: RutOptions | null;\n rotOptions: RotOptions | null;\n greenOptions: GreenOptions | null;\n customer: Customer | null;\n selectedCustomerCategory: CustomerCategory | CustomerSubCategory | null;\n parentCategory: CustomerCategory | CustomerSubCategory;\n checkoutInvoice: boolean;\n maleri: boolean;\n};\n\nconst {\n state,\n onChange,\n}: {\n state: StateType;\n onChange: OnChangeHandler<StateType>;\n} = createStore({\n step: 1,\n checkoutStep: 1,\n checkoutEdit: false,\n selectedCategory: null,\n selectedService: null,\n selectedProduct: null,\n cart: [],\n business: 'undefined',\n options: null,\n rut: true,\n rot: true,\n green: true,\n token: null,\n user: null,\n modal: null,\n rutOptions: null,\n rotOptions: null,\n greenOptions: null,\n customer: null,\n selectedCustomerCategory: null,\n parentCategory: null,\n creditSafeUser: null,\n checkoutInvoice: false,\n maleri: false,\n sources: null,\n});\n\nonChange('cart', cart => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));\n});\n\nonChange('user', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));\n});\n\nonChange('creditSafeUser', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));\n});\n\nonChange('selectedProduct', product => {\n if (!state.customer || !product) return;\n const categories = [...state.customer.categories, ...state.customer.categories.map(c => c.sub_categories ?? [])].flat();\n const category = categories.find(c => c && c.id === product.category);\n if (category) {\n state.parentCategory = category;\n return;\n }\n state.parentCategory = null;\n});\n\nonChange('selectedCustomerCategory', category => {\n if (!state.customer || !category) return;\n if ((category as CustomerSubCategory).parent) {\n const parent = state.customer.categories.find(c => c.id === (category as CustomerSubCategory).parent);\n if (parent) {\n state.parentCategory = parent;\n return;\n }\n }\n state.parentCategory = null;\n});\n\nexport default state;\n"],"version":3}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
// Match slug with partner slug in wp admin
|
4
|
+
// Dont forget to add the partners url to cors for creditsafe
|
5
|
+
// https://bitbucket.org/afonso-sweden/creditsafe-lookup/src/main/api/index.ts
|
6
|
+
exports.Business = void 0;
|
7
|
+
(function (Business) {
|
8
|
+
Business["kund"] = "kund";
|
9
|
+
Business["byggmax"] = "byggmax";
|
10
|
+
Business["skanska"] = "skanska";
|
11
|
+
Business["string"] = "string-furniture";
|
12
|
+
Business["hornbach"] = "hornbach";
|
13
|
+
Business["forebygg"] = "forebygg";
|
14
|
+
Business["doro"] = "doro";
|
15
|
+
Business["elfa"] = "elfa";
|
16
|
+
Business["kbygg"] = "k-bygg";
|
17
|
+
Business["norrgavel"] = "norrgavel";
|
18
|
+
Business["fargvaruhuset"] = "fargvaruhuset";
|
19
|
+
Business["zaptec"] = "zaptec";
|
20
|
+
Business["tesla"] = "tesla";
|
21
|
+
Business["klint"] = "klint";
|
22
|
+
Business["flyttsmart"] = "flyttsmart";
|
23
|
+
Business["lg"] = "lg";
|
24
|
+
Business["sparfonster"] = "sparfonster";
|
25
|
+
Business["power"] = "power";
|
26
|
+
Business["traningspartner"] = "traningspartner";
|
27
|
+
Business["superfront"] = "superfront";
|
28
|
+
Business["inet"] = "inet";
|
29
|
+
})(exports.Business || (exports.Business = {}));
|
30
|
+
exports.WidgetStyle = void 0;
|
31
|
+
(function (WidgetStyle) {
|
32
|
+
WidgetStyle["standard"] = "standard";
|
33
|
+
WidgetStyle["alternative"] = "alternative";
|
34
|
+
WidgetStyle["alternative_2"] = "alternative_2";
|
35
|
+
WidgetStyle["alternative_3"] = "alternative_3";
|
36
|
+
})(exports.WidgetStyle || (exports.WidgetStyle = {}));
|
37
|
+
var TopCategory;
|
38
|
+
(function (TopCategory) {
|
39
|
+
TopCategory["byggmax"] = "category/bygg";
|
40
|
+
})(TopCategory || (TopCategory = {}));
|
41
|
+
|
42
|
+
//# sourceMappingURL=index-8054ce93.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"index-8054ce93.js","mappings":";;AAAA;AACA;AACA;AAEYA;AAAZ,WAAY,QAAQ;EAClB,yBAAa,CAAA;EACb,+BAAmB,CAAA;EACnB,+BAAmB,CAAA;EACnB,uCAA2B,CAAA;EAC3B,iCAAqB,CAAA;EACrB,iCAAqB,CAAA;EACrB,yBAAa,CAAA;EACb,yBAAa,CAAA;EACb,4BAAgB,CAAA;EAChB,mCAAuB,CAAA;EACvB,2CAA+B,CAAA;EAC/B,6BAAiB,CAAA;EACjB,2BAAe,CAAA;EACf,2BAAe,CAAA;EACf,qCAAyB,CAAA;EACzB,qBAAS,CAAA;EACT,uCAA2B,CAAA;EAC3B,2BAAe,CAAA;EACf,+CAAmC,CAAA;EACnC,qCAAyB,CAAA;EACzB,yBAAa,CAAA;AACf,CAAC,EAtBWA,gBAAQ,KAARA,gBAAQ,QAsBnB;AAmMWC;AAAZ,WAAY,WAAW;EACrB,oCAAqB,CAAA;EACrB,0CAA2B,CAAA;EAC3B,8CAA+B,CAAA;EAC/B,8CAA+B,CAAA;AACjC,CAAC,EALWA,mBAAW,KAAXA,mBAAW,QAKtB;AAED,IAAY,WAEX;AAFD,WAAY,WAAW;EACrB,wCAAyB,CAAA;AAC3B,CAAC,EAFW,WAAW,KAAX,WAAW;;","names":["Business","WidgetStyle"],"sources":["./src/types/index.ts"],"sourcesContent":["// Match slug with partner slug in wp admin\n// Dont forget to add the partners url to cors for creditsafe\n// https://bitbucket.org/afonso-sweden/creditsafe-lookup/src/main/api/index.ts\n\nexport enum Business {\n kund = 'kund',\n byggmax = 'byggmax',\n skanska = 'skanska',\n string = 'string-furniture',\n hornbach = 'hornbach',\n forebygg = 'forebygg',\n doro = 'doro',\n elfa = 'elfa',\n kbygg = 'k-bygg',\n norrgavel = 'norrgavel',\n fargvaruhuset = 'fargvaruhuset',\n zaptec = 'zaptec',\n tesla = 'tesla',\n klint = 'klint',\n flyttsmart = 'flyttsmart',\n lg = 'lg',\n sparfonster = 'sparfonster',\n power = 'power',\n traningspartner = 'traningspartner',\n superfront = 'superfront',\n inet = 'inet',\n}\n\ntype Icon = {\n url: string;\n};\n\ninterface Customer {\n ID: number;\n post_title: string;\n post_name: string;\n post_type: string;\n filter: string;\n categories: CustomerCategory[];\n logo?: Icon;\n partner_url?: string;\n at_hemfixarna: boolean;\n info_title: string;\n widget_title?: string;\n info_text: string;\n checkout_title: string;\n checkout_trust_badges: { text: string }[];\n trust_badges: { text: string }[];\n source?: Source;\n password_protected: boolean;\n}\n\ninterface CustomerCategory {\n id: string;\n name: string;\n widget_title?: string;\n icon: string;\n show_products: boolean;\n products: { fields: Product }[] | false;\n sub_categories: CustomerSubCategory[] | false;\n add_painting: boolean;\n}\n\ninterface CustomerSubCategory {\n id: string;\n name: string;\n widget_title?: string;\n icon: string;\n products: { fields: Product }[];\n parent: string;\n add_painting: boolean;\n}\n\ninterface Part {\n ID: number;\n post_author: number;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0 | 1;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: number;\n filter: string;\n price: number;\n title: string;\n}\n\ninterface Product {\n ID: number;\n post_author: string;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n price: number;\n icon?: Icon | string;\n parts?: Array<Part>;\n list: Array<{ bullet: string }>;\n terms: string;\n terms_checkout: string;\n terms_show_checkbox: boolean;\n rut: boolean;\n rot: boolean;\n green: boolean;\n hide_start_fee: boolean;\n description: string;\n category: string;\n title: string;\n invoice: string;\n invoice_price: string;\n invoice_description: string;\n}\n\ninterface Service {\n ID: 41857;\n icon?: Icon | string;\n post_author: 34419;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: 'service';\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n products: Array<Product>;\n}\n\ninterface Category {\n count: number;\n description: string;\n name: string;\n icon?: Icon | string;\n parent: 0 | 1;\n slug: string;\n taxonomy: 'service_cat';\n term_group: 0 | 1;\n term_id: number;\n term_order: string;\n term_taxonomy_id: number;\n sub_cats?: Array<Category>;\n services?: Array<Service>;\n}\n\ninterface WpOptions {\n link: { title: string; url: string };\n trust: { trust_badge: string }[];\n thank_you_image: string;\n start_fee: number;\n terms: string;\n maleri_title: string;\n maleri_text: string;\n}\ninterface CartPart {\n id: number;\n amount: number;\n price: number;\n name: string;\n}\n\ninterface CartItem {\n id: number;\n price: number;\n name: string;\n amount: number;\n parts: CartPart[];\n rut: boolean;\n rot: boolean;\n green: boolean;\n start_fee: boolean;\n terms_checkout: string;\n icon?: Icon | string;\n}\n\nexport enum WidgetStyle {\n standard = 'standard',\n alternative = 'alternative',\n alternative_2 = 'alternative_2',\n alternative_3 = 'alternative_3',\n}\n\nexport enum TopCategory {\n byggmax = 'category/bygg',\n}\n\ninterface User {\n email: string;\n phone: string;\n ssn: string;\n firstName: string;\n lastName: string;\n street: string;\n zip: string;\n town: string;\n}\n\ninterface RutOptions {\n rut_start_fee_heading: string;\n rut_start_fee_text: string;\n rut_start_fee_text_secondary: string;\n}\n\ninterface RotOptions {\n rot_start_fee_heading: string;\n rot_start_fee_text: string;\n rot_start_fee_text_secondary: string;\n}\n\ninterface GreenOptions {\n green_start_fee_heading: string;\n green_start_fee_text: string;\n green_start_fee_text_secondary: string;\n}\n\ninterface SubSource {\n 'recordId': string;\n 'So_SubSource::Sus01_Name': string;\n 'So_SubSource::_id': string;\n 'So_SubSource::_id_Source': string;\n 'modId': string;\n}\n\ninterface FieldData {\n _id: string;\n So01_Name: string;\n So457_Aktiv_ac: number;\n So40_WebSubSource: string | number;\n So39_WebSource: number;\n rec_id: number;\n}\n\ninterface Source {\n fieldData: FieldData;\n sub_sources: SubSource[];\n}\n\ninterface SourcesRespone {\n dataInfo: {\n database: string;\n layout: string;\n table: string;\n totalRecordCount: number;\n foundCount: number;\n returnedCount: number;\n };\n data: Source[];\n}\n\nexport type {\n CartItem,\n CartPart,\n Category,\n Customer,\n CustomerCategory,\n CustomerSubCategory,\n GreenOptions,\n Icon,\n Part,\n Product,\n RotOptions,\n RutOptions,\n Service,\n Source,\n SourcesRespone,\n User,\n WpOptions,\n};\n"],"version":3}
|