hemfixarna-web-components 1.3.6 → 1.3.8

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.
Files changed (64) hide show
  1. package/dist/cjs/{hemfixarna-address_23.cjs.entry.js → hemfixarna-address_24.cjs.entry.js} +49 -29
  2. package/dist/{esm/hemfixarna-address_23.entry.js.map → cjs/hemfixarna-address_24.cjs.entry.js.map} +1 -1
  3. package/dist/cjs/hemfixarna-components.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/assets/elfa.png +0 -0
  6. package/dist/collection/collection-manifest.json +9 -8
  7. package/dist/collection/components/{hemfixarna-byggmax → customers/hemfixarna-byggmax}/hemfixarna-byggmax.js +8 -8
  8. package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js.map +1 -0
  9. package/dist/collection/components/{hemfixarna-doro → customers/hemfixarna-doro}/hemfixarna-doro.js +8 -8
  10. package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js.map +1 -0
  11. package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js +142 -0
  12. package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js.map +1 -0
  13. package/dist/collection/components/{hemfixarna-forebygg → customers/hemfixarna-forebygg}/hemfixarna-forebygg.js +8 -8
  14. package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js.map +1 -0
  15. package/dist/collection/components/{hemfixarna-hornbach → customers/hemfixarna-hornbach}/hemfixarna-hornbach.js +8 -8
  16. package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js.map +1 -0
  17. package/dist/collection/components/{hemfixarna-kund → customers/hemfixarna-kund}/hemfixarna-kund.js +8 -8
  18. package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js.map +1 -0
  19. package/dist/collection/components/{hemfixarna-skanska → customers/hemfixarna-skanska}/hemfixarna-skanska.js +8 -8
  20. package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js.map +1 -0
  21. package/dist/collection/components/{hemfixarna-string → customers/hemfixarna-string}/hemfixarna-string-furniture.js +8 -8
  22. package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js.map +1 -0
  23. package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string.css +0 -0
  24. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +2 -2
  25. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
  26. package/dist/collection/components/hemfixarna-component/hemfixarna.css +34 -5
  27. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js +1 -1
  28. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +1 -1
  29. package/dist/collection/types/index.js +1 -0
  30. package/dist/collection/types/index.js.map +1 -1
  31. package/dist/esm/{hemfixarna-address_23.entry.js → hemfixarna-address_24.entry.js} +46 -27
  32. package/dist/{cjs/hemfixarna-address_23.cjs.entry.js.map → esm/hemfixarna-address_24.entry.js.map} +1 -1
  33. package/dist/esm/hemfixarna-components.js +1 -1
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/hemfixarna-components/assets/elfa.png +0 -0
  36. package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
  37. package/dist/hemfixarna-components/p-ffa06bf9.entry.js +2 -0
  38. package/dist/types/components/{hemfixarna-byggmax → customers/hemfixarna-byggmax}/hemfixarna-byggmax.d.ts +2 -2
  39. package/dist/types/components/{hemfixarna-doro → customers/hemfixarna-doro}/hemfixarna-doro.d.ts +2 -2
  40. package/dist/types/components/customers/hemfixarna-elfa/hemfixarna-elfa.d.ts +10 -0
  41. package/dist/types/components/{hemfixarna-forebygg → customers/hemfixarna-forebygg}/hemfixarna-forebygg.d.ts +2 -2
  42. package/dist/types/components/{hemfixarna-hornbach → customers/hemfixarna-hornbach}/hemfixarna-hornbach.d.ts +2 -2
  43. package/dist/types/components/{hemfixarna-kund → customers/hemfixarna-kund}/hemfixarna-kund.d.ts +2 -2
  44. package/dist/types/components/{hemfixarna-skanska → customers/hemfixarna-skanska}/hemfixarna-skanska.d.ts +2 -2
  45. package/dist/types/components/{hemfixarna-string → customers/hemfixarna-string}/hemfixarna-string-furniture.d.ts +2 -2
  46. package/dist/types/components/hemfixarna-demo/hemfixarna-demo.d.ts +1 -1
  47. package/dist/types/components.d.ts +39 -14
  48. package/dist/types/types/index.d.ts +2 -1
  49. package/package.json +1 -1
  50. package/dist/collection/components/hemfixarna-byggmax/hemfixarna-byggmax.js.map +0 -1
  51. package/dist/collection/components/hemfixarna-doro/hemfixarna-doro.js.map +0 -1
  52. package/dist/collection/components/hemfixarna-forebygg/hemfixarna-forebygg.js.map +0 -1
  53. package/dist/collection/components/hemfixarna-hornbach/hemfixarna-hornbach.js.map +0 -1
  54. package/dist/collection/components/hemfixarna-kund/hemfixarna-kund.js.map +0 -1
  55. package/dist/collection/components/hemfixarna-skanska/hemfixarna-skanska.js.map +0 -1
  56. package/dist/collection/components/hemfixarna-string/hemfixarna-string-furniture.js.map +0 -1
  57. package/dist/hemfixarna-components/p-7ad71b65.entry.js +0 -2
  58. /package/dist/collection/components/{hemfixarna-byggmax → customers/hemfixarna-byggmax}/hemfixarna-byggmax.css +0 -0
  59. /package/dist/collection/components/{hemfixarna-doro → customers/hemfixarna-doro}/hemfixarna-doro.css +0 -0
  60. /package/dist/collection/components/{hemfixarna-forebygg/hemfixarna-forebygg.css → customers/hemfixarna-elfa/hemfixarna-elfa.css} +0 -0
  61. /package/dist/collection/components/{hemfixarna-hornbach/hemfixarna-hornbach.css → customers/hemfixarna-forebygg/hemfixarna-forebygg.css} +0 -0
  62. /package/dist/collection/components/{hemfixarna-skanska/hemfixarna-skanska.css → customers/hemfixarna-hornbach/hemfixarna-hornbach.css} +0 -0
  63. /package/dist/collection/components/{hemfixarna-string/hemfixarna-string.css → customers/hemfixarna-skanska/hemfixarna-skanska.css} +0 -0
  64. /package/dist/hemfixarna-components/{p-7ad71b65.entry.js.map → p-ffa06bf9.entry.js.map} +0 -0
@@ -0,0 +1,142 @@
1
+ import { h } from '@stencil/core';
2
+ import { Business, WidgetStyle } from '../../../types';
3
+ export class MyComponent {
4
+ constructor() {
5
+ this.id = undefined;
6
+ this.loadFromQuery = 'true';
7
+ this.widgetStyle = WidgetStyle.standard;
8
+ this.buttonColor = undefined;
9
+ this.buttonBg = undefined;
10
+ this.isDemo = false;
11
+ }
12
+ render() {
13
+ return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, nav: { url: 'https://elfa.com', logo: 'assets/elfa.png' }, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.elfa, isDemo: this.isDemo }));
14
+ }
15
+ static get is() { return "hemfixarna-elfa"; }
16
+ static get encapsulation() { return "shadow"; }
17
+ static get originalStyleUrls() {
18
+ return {
19
+ "$": ["hemfixarna-elfa.scss"]
20
+ };
21
+ }
22
+ static get styleUrls() {
23
+ return {
24
+ "$": ["hemfixarna-elfa.css"]
25
+ };
26
+ }
27
+ static get properties() {
28
+ return {
29
+ "id": {
30
+ "type": "string",
31
+ "mutable": false,
32
+ "complexType": {
33
+ "original": "string",
34
+ "resolved": "string",
35
+ "references": {}
36
+ },
37
+ "required": false,
38
+ "optional": true,
39
+ "docs": {
40
+ "tags": [],
41
+ "text": ""
42
+ },
43
+ "attribute": "id",
44
+ "reflect": false
45
+ },
46
+ "loadFromQuery": {
47
+ "type": "string",
48
+ "mutable": false,
49
+ "complexType": {
50
+ "original": "string",
51
+ "resolved": "string",
52
+ "references": {}
53
+ },
54
+ "required": false,
55
+ "optional": true,
56
+ "docs": {
57
+ "tags": [],
58
+ "text": ""
59
+ },
60
+ "attribute": "load-from-query",
61
+ "reflect": false,
62
+ "defaultValue": "'true'"
63
+ },
64
+ "widgetStyle": {
65
+ "type": "string",
66
+ "mutable": false,
67
+ "complexType": {
68
+ "original": "WidgetStyle",
69
+ "resolved": "WidgetStyle.alternative | WidgetStyle.alternative_2 | WidgetStyle.alternative_3 | WidgetStyle.standard",
70
+ "references": {
71
+ "WidgetStyle": {
72
+ "location": "import",
73
+ "path": "../../../types"
74
+ }
75
+ }
76
+ },
77
+ "required": false,
78
+ "optional": true,
79
+ "docs": {
80
+ "tags": [],
81
+ "text": ""
82
+ },
83
+ "attribute": "widget-style",
84
+ "reflect": false,
85
+ "defaultValue": "WidgetStyle.standard"
86
+ },
87
+ "buttonColor": {
88
+ "type": "string",
89
+ "mutable": false,
90
+ "complexType": {
91
+ "original": "string",
92
+ "resolved": "string",
93
+ "references": {}
94
+ },
95
+ "required": false,
96
+ "optional": true,
97
+ "docs": {
98
+ "tags": [],
99
+ "text": ""
100
+ },
101
+ "attribute": "button-color",
102
+ "reflect": false
103
+ },
104
+ "buttonBg": {
105
+ "type": "string",
106
+ "mutable": false,
107
+ "complexType": {
108
+ "original": "string",
109
+ "resolved": "string",
110
+ "references": {}
111
+ },
112
+ "required": false,
113
+ "optional": true,
114
+ "docs": {
115
+ "tags": [],
116
+ "text": ""
117
+ },
118
+ "attribute": "button-bg",
119
+ "reflect": false
120
+ },
121
+ "isDemo": {
122
+ "type": "boolean",
123
+ "mutable": false,
124
+ "complexType": {
125
+ "original": "boolean",
126
+ "resolved": "boolean",
127
+ "references": {}
128
+ },
129
+ "required": false,
130
+ "optional": true,
131
+ "docs": {
132
+ "tags": [],
133
+ "text": ""
134
+ },
135
+ "attribute": "is-demo",
136
+ "reflect": false,
137
+ "defaultValue": "false"
138
+ }
139
+ };
140
+ }
141
+ }
142
+ //# sourceMappingURL=hemfixarna-elfa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-elfa.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-elfa/hemfixarna-elfa.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOvD,MAAM,OAAO,WAAW;;;yBAEW,MAAM;uBACH,WAAW,CAAC,QAAQ;;;kBAG7B,KAAK;;EAEhC,MAAM;IACJ,OAAO,CACL,4BACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,GAAG,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,iBAAiB,EAAE,EACzD,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAC1C,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,IAAI,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,GACG,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-elfa',\n styleUrl: 'hemfixarna-elfa.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() loadFromQuery?: string = 'true';\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n @Prop() isDemo?: boolean = false;\n\n render() {\n return (\n <hemfixarna-component\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n nav={{ url: 'https://elfa.com', logo: 'assets/elfa.png' }}\n loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.elfa}\n isDemo={this.isDemo}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -1,15 +1,15 @@
1
1
  import { h } from '@stencil/core';
2
- import { Business, WidgetStyle } from '../../types';
2
+ import { Business, WidgetStyle } from '../../../types';
3
3
  export class MyComponent {
4
4
  constructor() {
5
5
  this.id = undefined;
6
- this.loadFromQuery = false;
6
+ this.loadFromQuery = undefined;
7
7
  this.widgetStyle = WidgetStyle.standard;
8
8
  this.buttonColor = undefined;
9
9
  this.buttonBg = undefined;
10
10
  }
11
11
  render() {
12
- return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.forebygg }));
12
+ return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.forebygg }));
13
13
  }
14
14
  static get is() { return "hemfixarna-forebygg"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -43,11 +43,11 @@ export class MyComponent {
43
43
  "reflect": false
44
44
  },
45
45
  "loadFromQuery": {
46
- "type": "boolean",
46
+ "type": "string",
47
47
  "mutable": false,
48
48
  "complexType": {
49
- "original": "boolean",
50
- "resolved": "boolean",
49
+ "original": "string",
50
+ "resolved": "string",
51
51
  "references": {}
52
52
  },
53
53
  "required": false,
@@ -58,7 +58,7 @@ export class MyComponent {
58
58
  },
59
59
  "attribute": "load-from-query",
60
60
  "reflect": false,
61
- "defaultValue": "false"
61
+ "defaultValue": "undefined"
62
62
  },
63
63
  "widgetStyle": {
64
64
  "type": "string",
@@ -69,7 +69,7 @@ export class MyComponent {
69
69
  "references": {
70
70
  "WidgetStyle": {
71
71
  "location": "import",
72
- "path": "../../types"
72
+ "path": "../../../types"
73
73
  }
74
74
  }
75
75
  },
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-forebygg.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOvD,MAAM,OAAO,WAAW;;;yBAEW,SAAS;uBACN,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,OAAO,CACL,4BACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAC1C,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GACL,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-forebygg',\n styleUrl: 'hemfixarna-forebygg.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() 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 loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.forebygg}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -1,16 +1,16 @@
1
1
  import { h } from '@stencil/core';
2
- import { Business, WidgetStyle } from '../../types';
2
+ import { Business, WidgetStyle } from '../../../types';
3
3
  export class MyComponent {
4
4
  constructor() {
5
5
  this.id = undefined;
6
- this.loadFromQuery = true;
6
+ this.loadFromQuery = 'true';
7
7
  this.isDemo = false;
8
8
  this.widgetStyle = WidgetStyle.standard;
9
9
  this.buttonColor = undefined;
10
10
  this.buttonBg = undefined;
11
11
  }
12
12
  render() {
13
- return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, nav: { url: 'https://www.hornbach.se/', logo: 'assets/hornbach/logo.svg', background: './assets/hornbach/nav.jpg' }, isDemo: this.isDemo, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.hornbach }));
13
+ return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, nav: { url: 'https://www.hornbach.se/', logo: 'assets/hornbach/logo.svg', background: './assets/hornbach/nav.jpg' }, isDemo: this.isDemo, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.hornbach }));
14
14
  }
15
15
  static get is() { return "hemfixarna-hornbach"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -44,11 +44,11 @@ export class MyComponent {
44
44
  "reflect": false
45
45
  },
46
46
  "loadFromQuery": {
47
- "type": "boolean",
47
+ "type": "string",
48
48
  "mutable": false,
49
49
  "complexType": {
50
- "original": "boolean",
51
- "resolved": "boolean",
50
+ "original": "string",
51
+ "resolved": "string",
52
52
  "references": {}
53
53
  },
54
54
  "required": false,
@@ -59,7 +59,7 @@ export class MyComponent {
59
59
  },
60
60
  "attribute": "load-from-query",
61
61
  "reflect": false,
62
- "defaultValue": "true"
62
+ "defaultValue": "'true'"
63
63
  },
64
64
  "isDemo": {
65
65
  "type": "boolean",
@@ -88,7 +88,7 @@ export class MyComponent {
88
88
  "references": {
89
89
  "WidgetStyle": {
90
90
  "location": "import",
91
- "path": "../../types"
91
+ "path": "../../../types"
92
92
  }
93
93
  }
94
94
  },
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-hornbach.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOvD,MAAM,OAAO,WAAW;;;yBAEW,MAAM;kBACZ,KAAK;uBACI,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,OAAO,CACL,4BACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,GAAG,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAE,IAAI,EAAE,0BAA0B,EAAE,UAAU,EAAE,2BAA2B,EAAE,EACnH,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAC1C,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GACL,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-hornbach',\n styleUrl: 'hemfixarna-hornbach.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() loadFromQuery?: string = 'true';\n @Prop() isDemo?: boolean = false;\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 nav={{ url: 'https://www.hornbach.se/', logo: 'assets/hornbach/logo.svg', background: './assets/hornbach/nav.jpg' }}\n isDemo={this.isDemo}\n loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.hornbach}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -1,15 +1,15 @@
1
1
  import { h } from '@stencil/core';
2
- import { Business, WidgetStyle } from '../../types';
2
+ import { Business, WidgetStyle } from '../../../types';
3
3
  export class MyComponent {
4
4
  constructor() {
5
5
  this.id = undefined;
6
- this.loadFromQuery = false;
6
+ this.loadFromQuery = undefined;
7
7
  this.widgetStyle = WidgetStyle.standard;
8
8
  this.buttonColor = undefined;
9
9
  this.buttonBg = undefined;
10
10
  }
11
11
  render() {
12
- return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.kund }));
12
+ return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.kund }));
13
13
  }
14
14
  static get is() { return "hemfixarna-kund"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -33,11 +33,11 @@ export class MyComponent {
33
33
  "reflect": false
34
34
  },
35
35
  "loadFromQuery": {
36
- "type": "boolean",
36
+ "type": "string",
37
37
  "mutable": false,
38
38
  "complexType": {
39
- "original": "boolean",
40
- "resolved": "boolean",
39
+ "original": "string",
40
+ "resolved": "string",
41
41
  "references": {}
42
42
  },
43
43
  "required": false,
@@ -48,7 +48,7 @@ export class MyComponent {
48
48
  },
49
49
  "attribute": "load-from-query",
50
50
  "reflect": false,
51
- "defaultValue": "false"
51
+ "defaultValue": "undefined"
52
52
  },
53
53
  "widgetStyle": {
54
54
  "type": "string",
@@ -59,7 +59,7 @@ export class MyComponent {
59
59
  "references": {
60
60
  "WidgetStyle": {
61
61
  "location": "import",
62
- "path": "../../types"
62
+ "path": "../../../types"
63
63
  }
64
64
  }
65
65
  },
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-kund.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-kund/hemfixarna-kund.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMvD,MAAM,OAAO,WAAW;;;yBAEW,SAAS;uBACN,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,OAAO,CACL,4BACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAC1C,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,IAAI,GACD,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-kund',\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 loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.kund}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -1,16 +1,16 @@
1
1
  import { h } from '@stencil/core';
2
- import { Business, WidgetStyle } from '../../types';
2
+ import { Business, WidgetStyle } from '../../../types';
3
3
  export class MyComponent {
4
4
  constructor() {
5
5
  this.id = undefined;
6
6
  this.customer = undefined;
7
- this.loadFromQuery = false;
7
+ this.loadFromQuery = undefined;
8
8
  this.widgetStyle = WidgetStyle.standard;
9
9
  this.buttonColor = undefined;
10
10
  this.buttonBg = undefined;
11
11
  }
12
12
  render() {
13
- return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.skanska }));
13
+ return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.skanska }));
14
14
  }
15
15
  static get is() { return "hemfixarna-skanska"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -61,11 +61,11 @@ export class MyComponent {
61
61
  "reflect": false
62
62
  },
63
63
  "loadFromQuery": {
64
- "type": "boolean",
64
+ "type": "string",
65
65
  "mutable": false,
66
66
  "complexType": {
67
- "original": "boolean",
68
- "resolved": "boolean",
67
+ "original": "string",
68
+ "resolved": "string",
69
69
  "references": {}
70
70
  },
71
71
  "required": false,
@@ -76,7 +76,7 @@ export class MyComponent {
76
76
  },
77
77
  "attribute": "load-from-query",
78
78
  "reflect": false,
79
- "defaultValue": "false"
79
+ "defaultValue": "undefined"
80
80
  },
81
81
  "widgetStyle": {
82
82
  "type": "string",
@@ -87,7 +87,7 @@ export class MyComponent {
87
87
  "references": {
88
88
  "WidgetStyle": {
89
89
  "location": "import",
90
- "path": "../../types"
90
+ "path": "../../../types"
91
91
  }
92
92
  }
93
93
  },
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-skanska.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-skanska/hemfixarna-skanska.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOvD,MAAM,OAAO,WAAW;;;;yBAGW,SAAS;uBACN,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,OAAO,CACL,4BACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAC1C,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,OAAO,GACJ,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-skanska',\n styleUrl: 'hemfixarna-skanska.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() customer?: 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 loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.skanska}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -1,15 +1,15 @@
1
1
  import { h } from '@stencil/core';
2
- import { Business, WidgetStyle } from '../../types';
2
+ import { Business, WidgetStyle } from '../../../types';
3
3
  export class MyComponent {
4
4
  constructor() {
5
5
  this.id = undefined;
6
- this.loadFromQuery = false;
6
+ this.loadFromQuery = undefined;
7
7
  this.widgetStyle = WidgetStyle.standard;
8
8
  this.buttonColor = undefined;
9
9
  this.buttonBg = undefined;
10
10
  }
11
11
  render() {
12
- return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: this.loadFromQuery, id: this.id, business: Business.string }));
12
+ return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.string }));
13
13
  }
14
14
  static get is() { return "hemfixarna-string-furniture"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -43,11 +43,11 @@ export class MyComponent {
43
43
  "reflect": false
44
44
  },
45
45
  "loadFromQuery": {
46
- "type": "boolean",
46
+ "type": "string",
47
47
  "mutable": false,
48
48
  "complexType": {
49
- "original": "boolean",
50
- "resolved": "boolean",
49
+ "original": "string",
50
+ "resolved": "string",
51
51
  "references": {}
52
52
  },
53
53
  "required": false,
@@ -58,7 +58,7 @@ export class MyComponent {
58
58
  },
59
59
  "attribute": "load-from-query",
60
60
  "reflect": false,
61
- "defaultValue": "false"
61
+ "defaultValue": "undefined"
62
62
  },
63
63
  "widgetStyle": {
64
64
  "type": "string",
@@ -69,7 +69,7 @@ export class MyComponent {
69
69
  "references": {
70
70
  "WidgetStyle": {
71
71
  "location": "import",
72
- "path": "../../types"
72
+ "path": "../../../types"
73
73
  }
74
74
  }
75
75
  },
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-string-furniture.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-string/hemfixarna-string-furniture.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOvD,MAAM,OAAO,WAAW;;;yBAEW,SAAS;uBACN,WAAW,CAAC,QAAQ;;;;EAIxD,MAAM;IACJ,OAAO,CACL,4BACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAC1C,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,MAAM,GACH,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-string-furniture',\n styleUrl: 'hemfixarna-string.scss',\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 loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.string}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -213,7 +213,7 @@ export class HemfixarnaComponent {
213
213
  const monteringLogo = getAssetPath(`./assets/montering.svg`);
214
214
  const navBackground = ((_a = this.nav) === null || _a === void 0 ? void 0 : _a.background) ? getAssetPath(this.nav.background) : '';
215
215
  const navLogo = ((_b = this.nav) === null || _b === void 0 ? void 0 : _b.logo) ? getAssetPath(this.nav.logo) : '';
216
- return (h("div", { class: `hemfixarna ${this.loadFromQuery ? 'hemfixarna_standalone' : ''}` }, this.loadFromQuery && !this.isDemo && this.nav ? (h("nav", { class: "hemfixarna_nav" }, h("div", null, h("div", { class: "hemfixarna_nav--logos" }, h("a", { href: this.nav.url, target: "_blank" }, h("img", { src: navLogo, alt: `${this.business} logo` })), h("a", { href: "https://hemfixarna.se/", target: "_blank" }, h("p", null, "I samarbete med:"), h("img", { src: logo, alt: "hemfixarna_logo", width: 104 }))), h("div", { class: "hemfixarna_nav--links" }, h("a", { href: this.nav.url, target: "_blank" }, "Till ", this.business), h("a", { href: "https://www.hemfixarna.se/", target: "_blank" }, "Till Hemfixarna")), h("img", { src: navBackground, alt: "nav_background" })))) : null, !this.loadFromQuery || this.isDemo ? (h("div", { class: `hemfixarna_box hemfixarna_box--${this.widgetStyle}` }, [WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) ? h("img", { src: monteringLogo, alt: "montering logo", width: 32, height: 32 }) : null, h("div", null, h("div", null, h("p", { onClick: () => this.openModal(), class: `pointer ${[WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) && state.selectedProduct ? 'underline' : ''}` }, ((_c = this.product) === null || _c === void 0 ? void 0 : _c.post_title) || ((_d = this.proppedProduct) === null || _d === void 0 ? void 0 : _d.post_title) || (h("span", null, "Montering", h("wbr", null), "/Installation ", (_f = (_e = state.selectedCustomerCategory) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : 'på plats', " - ", h("strong", { class: "underline" }, "se priser h\u00E4r"))), (this.product && ((_g = this.slug) === null || _g === void 0 ? void 0 : _g.includes('product'))) || (this.proppedProduct && !((_h = this.product) === null || _h === void 0 ? void 0 : _h.invoice) && !((_j = this.proppedProduct) === null || _j === void 0 ? void 0 : _j.invoice)) ? (h("span", null, ' från', " ", h("strong", null, getProductPriceWithRotAndRut(this.proppedProduct || this.product), "kr"))) : null, ((_k = this.product) === null || _k === void 0 ? void 0 : _k.invoice) || ((_l = this.proppedProduct) === null || _l === void 0 ? void 0 : _l.invoice) ? (h("span", null, ' - ', h("strong", { class: "underling" }, "se priser h\u00E4r"))) : null)), this.widgetStyle === WidgetStyle.standard ? h("img", { src: logo, width: 104 }) : null, this.widgetStyle === WidgetStyle.alternative ? (h("span", { class: "p-s" }, "Utf\u00F6rs av ", h("strong", null, "Hemfixarna"))) : null), [WidgetStyle.standard, WidgetStyle.alternative].includes(this.widgetStyle) ? (h("button", { onClick: () => this.openModal(), class: "hemfixarna_btn", style: {
216
+ return (h("div", { class: `hemfixarna ${this.loadFromQuery ? 'hemfixarna_standalone' : ''}` }, this.loadFromQuery && !this.isDemo && this.nav ? (h("nav", { class: "hemfixarna_nav" }, h("div", null, h("div", { class: "hemfixarna_nav--logos" }, h("a", { href: this.nav.url, target: "_blank" }, h("img", { class: "hemfixarna_partnerlogo", src: navLogo, alt: `${this.business} logo` })), h("a", { href: "https://hemfixarna.se/", target: "_blank" }, h("p", null, "I samarbete med:"), h("img", { src: logo, alt: "hemfixarna_logo", width: 104 }))), h("div", { class: "hemfixarna_nav--links" }, h("a", { href: this.nav.url, target: "_blank" }, "Till ", this.business), h("a", { href: "https://www.hemfixarna.se/", target: "_blank" }, "Till Hemfixarna")), navBackground ? h("img", { src: navBackground, class: "nav_background", alt: "nav_background" }) : h("div", { class: "hemfixarna_navbg" })))) : null, !this.loadFromQuery || this.isDemo ? (h("div", { class: `hemfixarna_box hemfixarna_box--${this.widgetStyle}` }, [WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) ? h("img", { src: monteringLogo, alt: "montering logo", width: 32, height: 32 }) : null, h("div", null, h("div", null, h("p", { onClick: () => this.openModal(), class: `pointer ${[WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) && state.selectedProduct ? 'underline' : ''}` }, ((_c = this.product) === null || _c === void 0 ? void 0 : _c.post_title) || ((_d = this.proppedProduct) === null || _d === void 0 ? void 0 : _d.post_title) || (h("span", null, "Montering", h("wbr", null), "/Installation ", (_f = (_e = state.selectedCustomerCategory) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : 'på plats', " - ", h("strong", { class: "underline" }, "se priser h\u00E4r"))), (this.product && ((_g = this.slug) === null || _g === void 0 ? void 0 : _g.includes('product'))) || (this.proppedProduct && !((_h = this.product) === null || _h === void 0 ? void 0 : _h.invoice) && !((_j = this.proppedProduct) === null || _j === void 0 ? void 0 : _j.invoice)) ? (h("span", null, ' från', " ", h("strong", null, getProductPriceWithRotAndRut(this.proppedProduct || this.product), "kr"))) : null, ((_k = this.product) === null || _k === void 0 ? void 0 : _k.invoice) || ((_l = this.proppedProduct) === null || _l === void 0 ? void 0 : _l.invoice) ? (h("span", null, ' - ', h("strong", { class: "underling" }, "se priser h\u00E4r"))) : null)), this.widgetStyle === WidgetStyle.standard ? h("img", { src: logo, width: 104 }) : null, this.widgetStyle === WidgetStyle.alternative ? (h("span", { class: "p-s" }, "Utf\u00F6rs av ", h("strong", null, "Hemfixarna"))) : null), [WidgetStyle.standard, WidgetStyle.alternative].includes(this.widgetStyle) ? (h("button", { onClick: () => this.openModal(), class: "hemfixarna_btn", style: {
217
217
  color: ((_m = this.buttonColor) === null || _m === void 0 ? void 0 : _m.startsWith('#')) || !((_o = this.buttonColor) === null || _o === void 0 ? void 0 : _o.length) ? this.buttonColor : `#${this.buttonColor}`,
218
218
  backgroundColor: ((_p = this.buttonBg) === null || _p === void 0 ? void 0 : _p.startsWith('#')) || !((_q = this.buttonBg) === null || _q === void 0 ? void 0 : _q.length) ? this.buttonBg : `#${this.buttonBg}`,
219
219
  } }, "Best\u00E4ll h\u00E4r", this.getCartLength() > 0 && h("span", null, this.getCartLength()))) : null, WidgetStyle.alternative_2 === this.widgetStyle ? (h("div", { class: "hemfixarna_altbtn" }, h("strong", { class: "p-s" }, "Utf\u00F6rs av"), h("img", { src: logo, alt: "hemfixarna logo", width: 98 }))) : null)) : null, this.modal && (h("div", null, h("div", { class: `hemfixarna_modal ${this.showModal ? 'hemfixarna_modal--open' : ''}` }, state.modal && (h("div", { class: "hemfixarna_infomodal" }, state.modal.title && h("h2", null, state.modal.title), state.modal.text.map((t) => (h("p", { innerHTML: t }))), h("div", null, h("button", { onClick: () => (state.modal = null) }, "St\u00E4ng")))), (this.tree || state.customer) && (h("hemfixarna-breadcrumbs", { isDemo: this.isDemo, loadFromQuery: this.loadFromQuery, closeModal: () => this.closeModal(), tree: this.tree })), !state.customer || this.slugIsOldFormat(this.slug) ? (h("div", { class: `hemfixarna_content hemfixarna_content--${state.step}` }, state.step === 1 && this.tree && h("hemfixarna-start", { tree: this.tree }), state.step === 2 && state.selectedCategory && h("hemfixarna-category", null), state.step === 3 && state.selectedService && h("hemfixarna-service", null), state.step === 4 && state.selectedProduct && h("hemfixarna-product", null), state.step === 5 && h("hemfixarna-cart", { tree: this.tree }), state.step === 6 && h("hemfixarna-order", { tree: this.tree }))) : (h("div", { class: `hemfixarna_content hemfixarna_content--${state.step}` }, state.step < 4 && h("hemfixarna-start", null), state.step === 4 && state.selectedProduct && h("hemfixarna-product", null), state.step === 5 && h("hemfixarna-cart", { tree: this.tree }), state.step === 6 && h("hemfixarna-order", { tree: this.tree })))), !this.isDemo ? h("div", { class: `hemfixarna_backdrop ${this.showModal ? 'hemfixarna_backdrop--open' : ''}` }) : null))));
@@ -272,7 +272,7 @@ export class HemfixarnaComponent {
272
272
  "mutable": false,
273
273
  "complexType": {
274
274
  "original": "Business",
275
- "resolved": "Business.byggmax | Business.doro | Business.forebygg | Business.hornbach | Business.kund | Business.skanska | Business.string",
275
+ "resolved": "Business.byggmax | Business.doro | Business.elfa | Business.forebygg | Business.hornbach | Business.kund | Business.skanska | Business.string",
276
276
  "references": {
277
277
  "Business": {
278
278
  "location": "import",
@@ -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,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;A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AE;YAC/D,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,2BAAoB;YAEtC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,eAAe,IAAI,6BAAsB;YAEnE,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,uBAAiB,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;YAExD,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,wBAAkB,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CACtD,CACP,CACG;QACL,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,WAAK,KAAK,EAAE,uBAAuB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,EAAE,GAAQ,CAAC,CAAC,CAAC,IAAI,CACjH,CACP,CACG,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Listen, Prop, State, Watch, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { Business, Category, Product, Service, TopCategory, WidgetStyle } from '../../types';\nimport { getCustomer, 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 } = 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 this.loadCategoryOrProduct(id);\n }\n }\n\n async fetchNewTaxonomy(slug: string) {\n state.selectedCategory = null;\n state.selectedProduct = null;\n state.selectedService = 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] = 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 ]);\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 this.loadCategoryOrProduct(this.id);\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.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 const el = this.el.shadowRoot.querySelector('.hemfixarna_modal');\n if (el) {\n const isClickInside = el.contains(e.composedPath()[0] as HTMLInputElement);\n if (!isClickInside) {\n this.closeModal();\n }\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 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\">\n <div>\n <div class=\"hemfixarna_nav--logos\">\n <a href={this.nav.url} target=\"_blank\">\n <img src={navLogo} alt={`${this.business} logo`} />\n </a>\n <a href=\"https://hemfixarna.se/\" target=\"_blank\">\n <p>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 <img src={navBackground} alt=\"nav_background\" />\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) ? <img src={monteringLogo} alt=\"montering logo\" width={32} height={32} /> : 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.product?.post_title || this.proppedProduct?.post_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 {this.product?.invoice || this.proppedProduct?.invoice ? (\n <span>\n {' - '}\n <strong class=\"underling\">se priser här</strong>\n </span>\n ) : null}\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}`}>\n {state.step < 4 && <hemfixarna-start />}\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>\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,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAqD,WAAW,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAQjD,MAAM,OAAO,mBAAmB;;IA+E9B,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;IAuEF,uBAAkB,GAAG,GAAG,EAAE;MACxB,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Listen, Prop, State, Watch, getAssetPath, h } from '@stencil/core';\nimport state from '../../store';\nimport { Business, Category, Product, Service, TopCategory, WidgetStyle } from '../../types';\nimport { getCustomer, 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 } = 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 this.loadCategoryOrProduct(id);\n }\n }\n\n async fetchNewTaxonomy(slug: string) {\n state.selectedCategory = null;\n state.selectedProduct = null;\n state.selectedService = 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] = 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 ]);\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 this.loadCategoryOrProduct(this.id);\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.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 const el = this.el.shadowRoot.querySelector('.hemfixarna_modal');\n if (el) {\n const isClickInside = el.contains(e.composedPath()[0] as HTMLInputElement);\n if (!isClickInside) {\n this.closeModal();\n }\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 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\">\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>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\" /> : <div class=\"hemfixarna_navbg\" />}\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) ? <img src={monteringLogo} alt=\"montering logo\" width={32} height={32} /> : 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.product?.post_title || this.proppedProduct?.post_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 {this.product?.invoice || this.proppedProduct?.invoice ? (\n <span>\n {' - '}\n <strong class=\"underling\">se priser här</strong>\n </span>\n ) : null}\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}`}>\n {state.step < 4 && <hemfixarna-start />}\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>\n {!this.isDemo ? <div class={`hemfixarna_backdrop ${this.showModal ? 'hemfixarna_backdrop--open' : ''}`}></div> : null}\n </div>\n )}\n </div>\n );\n }\n}\n"]}