hemfixarna-web-components 1.4.1 → 1.4.3

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 (39) hide show
  1. package/dist/cjs/{hemfixarna-address_26.cjs.entry.js → hemfixarna-address_29.cjs.entry.js} +119 -62
  2. package/dist/{esm/hemfixarna-address_26.entry.js.map → cjs/hemfixarna-address_29.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/tesla.svg +1 -0
  6. package/dist/collection/assets/zaptec.svg +1 -0
  7. package/dist/collection/collection-manifest.json +3 -0
  8. package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js +132 -0
  9. package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js.map +1 -0
  10. package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js +132 -0
  11. package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js.map +1 -0
  12. package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js +132 -0
  13. package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js.map +1 -0
  14. package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +1 -1
  15. package/dist/collection/components/hemfixarna-component/hemfixarna.css +7 -0
  16. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js +9 -4
  17. package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +1 -1
  18. package/dist/collection/types/index.js +3 -0
  19. package/dist/collection/types/index.js.map +1 -1
  20. package/dist/collection/utils/types.js +5 -1
  21. package/dist/collection/utils/types.js.map +1 -1
  22. package/dist/esm/{hemfixarna-address_26.entry.js → hemfixarna-address_29.entry.js} +106 -52
  23. package/dist/{cjs/hemfixarna-address_26.cjs.entry.js.map → esm/hemfixarna-address_29.entry.js.map} +1 -1
  24. package/dist/esm/hemfixarna-components.js +1 -1
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/hemfixarna-components/assets/tesla.svg +1 -0
  27. package/dist/hemfixarna-components/assets/zaptec.svg +1 -0
  28. package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
  29. package/dist/hemfixarna-components/p-5856205c.entry.js +2 -0
  30. package/dist/types/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.d.ts +10 -0
  31. package/dist/types/components/customers/hemfixarna-tesla/hemfixarna-tesla.d.ts +10 -0
  32. package/dist/types/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.d.ts +10 -0
  33. package/dist/types/components/hemfixarna-demo/hemfixarna-demo.d.ts +2 -1
  34. package/dist/types/components.d.ts +75 -0
  35. package/dist/types/types/index.d.ts +4 -1
  36. package/dist/types/utils/types.d.ts +3 -2
  37. package/package.json +1 -1
  38. package/dist/hemfixarna-components/p-f317cc3b.entry.js +0 -2
  39. /package/dist/hemfixarna-components/{p-f317cc3b.entry.js.map → p-5856205c.entry.js.map} +0 -0
@@ -0,0 +1,132 @@
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 = undefined;
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, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.fargvaruhuset, isDemo: this.isDemo }));
14
+ }
15
+ static get is() { return "hemfixarna-fargvaruhuset"; }
16
+ static get encapsulation() { return "shadow"; }
17
+ static get properties() {
18
+ return {
19
+ "id": {
20
+ "type": "string",
21
+ "mutable": false,
22
+ "complexType": {
23
+ "original": "string",
24
+ "resolved": "string",
25
+ "references": {}
26
+ },
27
+ "required": false,
28
+ "optional": true,
29
+ "docs": {
30
+ "tags": [],
31
+ "text": ""
32
+ },
33
+ "attribute": "id",
34
+ "reflect": false
35
+ },
36
+ "loadFromQuery": {
37
+ "type": "string",
38
+ "mutable": false,
39
+ "complexType": {
40
+ "original": "string",
41
+ "resolved": "string",
42
+ "references": {}
43
+ },
44
+ "required": false,
45
+ "optional": true,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": ""
49
+ },
50
+ "attribute": "load-from-query",
51
+ "reflect": false,
52
+ "defaultValue": "undefined"
53
+ },
54
+ "widgetStyle": {
55
+ "type": "string",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "WidgetStyle",
59
+ "resolved": "WidgetStyle.alternative | WidgetStyle.alternative_2 | WidgetStyle.alternative_3 | WidgetStyle.standard",
60
+ "references": {
61
+ "WidgetStyle": {
62
+ "location": "import",
63
+ "path": "../../../types"
64
+ }
65
+ }
66
+ },
67
+ "required": false,
68
+ "optional": true,
69
+ "docs": {
70
+ "tags": [],
71
+ "text": ""
72
+ },
73
+ "attribute": "widget-style",
74
+ "reflect": false,
75
+ "defaultValue": "WidgetStyle.standard"
76
+ },
77
+ "buttonColor": {
78
+ "type": "string",
79
+ "mutable": false,
80
+ "complexType": {
81
+ "original": "string",
82
+ "resolved": "string",
83
+ "references": {}
84
+ },
85
+ "required": false,
86
+ "optional": true,
87
+ "docs": {
88
+ "tags": [],
89
+ "text": ""
90
+ },
91
+ "attribute": "button-color",
92
+ "reflect": false
93
+ },
94
+ "buttonBg": {
95
+ "type": "string",
96
+ "mutable": false,
97
+ "complexType": {
98
+ "original": "string",
99
+ "resolved": "string",
100
+ "references": {}
101
+ },
102
+ "required": false,
103
+ "optional": true,
104
+ "docs": {
105
+ "tags": [],
106
+ "text": ""
107
+ },
108
+ "attribute": "button-bg",
109
+ "reflect": false
110
+ },
111
+ "isDemo": {
112
+ "type": "boolean",
113
+ "mutable": false,
114
+ "complexType": {
115
+ "original": "boolean",
116
+ "resolved": "boolean",
117
+ "references": {}
118
+ },
119
+ "required": false,
120
+ "optional": true,
121
+ "docs": {
122
+ "tags": [],
123
+ "text": ""
124
+ },
125
+ "attribute": "is-demo",
126
+ "reflect": false,
127
+ "defaultValue": "false"
128
+ }
129
+ };
130
+ }
131
+ }
132
+ //# sourceMappingURL=hemfixarna-fargvaruhuset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-fargvaruhuset.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.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;;;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,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAC1C,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,aAAa,EAChC,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-fargvaruhuset',\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 @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 loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.fargvaruhuset}\n isDemo={this.isDemo}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -0,0 +1,132 @@
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.isDemo = false;
8
+ this.widgetStyle = WidgetStyle.standard;
9
+ this.buttonColor = undefined;
10
+ this.buttonBg = undefined;
11
+ }
12
+ render() {
13
+ return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, nav: { url: 'https://www.tesla.com/sv_se/home-charging', logo: 'assets/tesla.svg' }, isDemo: this.isDemo, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.tesla }));
14
+ }
15
+ static get is() { return "hemfixarna-tesla"; }
16
+ static get encapsulation() { return "shadow"; }
17
+ static get properties() {
18
+ return {
19
+ "id": {
20
+ "type": "string",
21
+ "mutable": false,
22
+ "complexType": {
23
+ "original": "string",
24
+ "resolved": "string",
25
+ "references": {}
26
+ },
27
+ "required": false,
28
+ "optional": true,
29
+ "docs": {
30
+ "tags": [],
31
+ "text": ""
32
+ },
33
+ "attribute": "id",
34
+ "reflect": false
35
+ },
36
+ "loadFromQuery": {
37
+ "type": "string",
38
+ "mutable": false,
39
+ "complexType": {
40
+ "original": "string",
41
+ "resolved": "string",
42
+ "references": {}
43
+ },
44
+ "required": false,
45
+ "optional": true,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": ""
49
+ },
50
+ "attribute": "load-from-query",
51
+ "reflect": false,
52
+ "defaultValue": "'true'"
53
+ },
54
+ "isDemo": {
55
+ "type": "boolean",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "boolean",
59
+ "resolved": "boolean",
60
+ "references": {}
61
+ },
62
+ "required": false,
63
+ "optional": true,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": ""
67
+ },
68
+ "attribute": "is-demo",
69
+ "reflect": false,
70
+ "defaultValue": "false"
71
+ },
72
+ "widgetStyle": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "WidgetStyle",
77
+ "resolved": "WidgetStyle.alternative | WidgetStyle.alternative_2 | WidgetStyle.alternative_3 | WidgetStyle.standard",
78
+ "references": {
79
+ "WidgetStyle": {
80
+ "location": "import",
81
+ "path": "../../../types"
82
+ }
83
+ }
84
+ },
85
+ "required": false,
86
+ "optional": true,
87
+ "docs": {
88
+ "tags": [],
89
+ "text": ""
90
+ },
91
+ "attribute": "widget-style",
92
+ "reflect": false,
93
+ "defaultValue": "WidgetStyle.standard"
94
+ },
95
+ "buttonColor": {
96
+ "type": "string",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "string",
100
+ "resolved": "string",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": true,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": ""
108
+ },
109
+ "attribute": "button-color",
110
+ "reflect": false
111
+ },
112
+ "buttonBg": {
113
+ "type": "string",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "string",
117
+ "resolved": "string",
118
+ "references": {}
119
+ },
120
+ "required": false,
121
+ "optional": true,
122
+ "docs": {
123
+ "tags": [],
124
+ "text": ""
125
+ },
126
+ "attribute": "button-bg",
127
+ "reflect": false
128
+ }
129
+ };
130
+ }
131
+ }
132
+ //# sourceMappingURL=hemfixarna-tesla.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-tesla.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-tesla/hemfixarna-tesla.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,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,2CAA2C,EAAE,IAAI,EAAE,kBAAkB,EAAE,EACnF,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,KAAK,GACF,CACzB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","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() 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.tesla.com/sv_se/home-charging', logo: 'assets/tesla.svg' }}\n isDemo={this.isDemo}\n loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.tesla}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -0,0 +1,132 @@
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.isDemo = false;
8
+ this.widgetStyle = WidgetStyle.standard;
9
+ this.buttonColor = undefined;
10
+ this.buttonBg = undefined;
11
+ }
12
+ render() {
13
+ return (h("hemfixarna-component", { widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor, nav: { url: 'https://www.zaptec.com/sv/laddningslosningar/zaptec-go', logo: 'assets/zaptec.svg' }, isDemo: this.isDemo, loadFromQuery: Boolean(this.loadFromQuery), id: this.id, business: Business.zaptec }));
14
+ }
15
+ static get is() { return "hemfixarna-zaptec"; }
16
+ static get encapsulation() { return "shadow"; }
17
+ static get properties() {
18
+ return {
19
+ "id": {
20
+ "type": "string",
21
+ "mutable": false,
22
+ "complexType": {
23
+ "original": "string",
24
+ "resolved": "string",
25
+ "references": {}
26
+ },
27
+ "required": false,
28
+ "optional": true,
29
+ "docs": {
30
+ "tags": [],
31
+ "text": ""
32
+ },
33
+ "attribute": "id",
34
+ "reflect": false
35
+ },
36
+ "loadFromQuery": {
37
+ "type": "string",
38
+ "mutable": false,
39
+ "complexType": {
40
+ "original": "string",
41
+ "resolved": "string",
42
+ "references": {}
43
+ },
44
+ "required": false,
45
+ "optional": true,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": ""
49
+ },
50
+ "attribute": "load-from-query",
51
+ "reflect": false,
52
+ "defaultValue": "'true'"
53
+ },
54
+ "isDemo": {
55
+ "type": "boolean",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "boolean",
59
+ "resolved": "boolean",
60
+ "references": {}
61
+ },
62
+ "required": false,
63
+ "optional": true,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": ""
67
+ },
68
+ "attribute": "is-demo",
69
+ "reflect": false,
70
+ "defaultValue": "false"
71
+ },
72
+ "widgetStyle": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "WidgetStyle",
77
+ "resolved": "WidgetStyle.alternative | WidgetStyle.alternative_2 | WidgetStyle.alternative_3 | WidgetStyle.standard",
78
+ "references": {
79
+ "WidgetStyle": {
80
+ "location": "import",
81
+ "path": "../../../types"
82
+ }
83
+ }
84
+ },
85
+ "required": false,
86
+ "optional": true,
87
+ "docs": {
88
+ "tags": [],
89
+ "text": ""
90
+ },
91
+ "attribute": "widget-style",
92
+ "reflect": false,
93
+ "defaultValue": "WidgetStyle.standard"
94
+ },
95
+ "buttonColor": {
96
+ "type": "string",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "string",
100
+ "resolved": "string",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": true,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": ""
108
+ },
109
+ "attribute": "button-color",
110
+ "reflect": false
111
+ },
112
+ "buttonBg": {
113
+ "type": "string",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "string",
117
+ "resolved": "string",
118
+ "references": {}
119
+ },
120
+ "required": false,
121
+ "optional": true,
122
+ "docs": {
123
+ "tags": [],
124
+ "text": ""
125
+ },
126
+ "attribute": "button-bg",
127
+ "reflect": false
128
+ }
129
+ };
130
+ }
131
+ }
132
+ //# sourceMappingURL=hemfixarna-zaptec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hemfixarna-zaptec.js","sourceRoot":"","sources":["../../../../src/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.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,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,wDAAwD,EAAE,IAAI,EAAE,mBAAmB,EAAE,EACjG,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,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-zaptec',\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.zaptec.com/sv/laddningslosningar/zaptec-go', logo: 'assets/zaptec.svg' }}\n isDemo={this.isDemo}\n loadFromQuery={Boolean(this.loadFromQuery)}\n id={this.id}\n business={Business.zaptec}\n ></hemfixarna-component>\n );\n }\n}\n"]}
@@ -282,7 +282,7 @@ export class HemfixarnaComponent {
282
282
  "mutable": false,
283
283
  "complexType": {
284
284
  "original": "Business",
285
- "resolved": "Business.byggmax | Business.doro | Business.elfa | Business.forebygg | Business.hornbach | Business.kbygg | Business.kund | Business.norrgavel | Business.skanska | Business.string",
285
+ "resolved": "Business.byggmax | Business.doro | Business.elfa | Business.fargvaruhuset | Business.forebygg | Business.hornbach | Business.kbygg | Business.kund | Business.norrgavel | Business.skanska | Business.string | Business.tesla | Business.zaptec",
286
286
  "references": {
287
287
  "Business": {
288
288
  "location": "import",
@@ -114,6 +114,13 @@
114
114
  :host .hemfixarna_partnerlogo {
115
115
  max-height: 50px;
116
116
  min-height: 45px;
117
+ object-fit: contain;
118
+ max-width: 150px;
119
+ }
120
+ @media (min-width: 769px) {
121
+ :host .hemfixarna_partnerlogo {
122
+ max-width: 200px;
123
+ }
117
124
  }
118
125
  :host .hemfixarna_nav {
119
126
  position: absolute;
@@ -1,6 +1,7 @@
1
1
  import { getAssetPath, h } from '@stencil/core';
2
2
  import { Business, TopCategory, WidgetStyle } from '../../types';
3
3
  import { getCustomer, getTaxonomy } from '../../utils/api';
4
+ import { isBusiness } from '../../utils/types';
4
5
  export class MyComponent {
5
6
  constructor() {
6
7
  this.debounce = null;
@@ -13,6 +14,7 @@ export class MyComponent {
13
14
  this.widgetStyle = WidgetStyle.standard;
14
15
  this.buttonBg = '';
15
16
  this.buttonColor = '';
17
+ this.partner = undefined;
16
18
  this.colorAccessibility = undefined;
17
19
  }
18
20
  debouncedFunction() {
@@ -37,7 +39,6 @@ export class MyComponent {
37
39
  })
38
40
  .then(response => response.json())
39
41
  .then(json => {
40
- console.log(json);
41
42
  if (json && (json)) {
42
43
  this.colorAccessibility = json;
43
44
  }
@@ -67,6 +68,7 @@ export class MyComponent {
67
68
  }
68
69
  }
69
70
  async componentWillLoad() {
71
+ var _a;
70
72
  if (process.env.FORCE_OLD_TREE) {
71
73
  const tree = await getTaxonomy(this.getTopLevelCategory());
72
74
  if ((tree === null || tree === void 0 ? void 0 : tree.code) === 'not_found') {
@@ -77,14 +79,16 @@ export class MyComponent {
77
79
  }
78
80
  }
79
81
  else {
80
- const customer = await getCustomer(process.env.BUSINESS);
82
+ const partner = window.location.pathname.replace('/', '');
83
+ this.partner = isBusiness(partner) ? partner : (_a = process.env.BUSINESS) !== null && _a !== void 0 ? _a : Business.kund;
84
+ const customer = await getCustomer(this.partner);
81
85
  if (customer.code !== 'not_found' && customer) {
82
86
  this.customer = customer;
83
87
  }
84
88
  }
85
89
  }
86
90
  getExample() {
87
- return `<hemfixarna-${process.env.BUSINESS}${this.selectedSlug ? ` slug="${this.selectedSlug}" ` : ''}${this.selectedID ? ` id="${this.selectedID}" ` : ''} ${this.widgetStyle === WidgetStyle.standard ? '' : `widgetStyle="${this.widgetStyle}"`} ${this.buttonColor.length ? `button-color="${this.buttonColor}"` : ''} ${this.buttonBg.length ? `button-bg="${this.buttonBg}"` : ''}></hemfixarna-${process.env.BUSINESS}>`;
91
+ return `<hemfixarna-${this.partner}${this.selectedSlug ? ` slug="${this.selectedSlug}" ` : ''}${this.selectedID ? ` id="${this.selectedID}" ` : ''} ${this.widgetStyle === WidgetStyle.standard ? '' : `widget-style="${this.widgetStyle}"`} ${this.buttonColor.length ? `button-color="${this.buttonColor}"` : ''} ${this.buttonBg.length ? `button-bg="${this.buttonBg}"` : ''}></hemfixarna-${this.partner}>`;
88
92
  }
89
93
  copyExample() {
90
94
  navigator.clipboard.writeText(this.getExample());
@@ -114,7 +118,7 @@ export class MyComponent {
114
118
  }
115
119
  render() {
116
120
  const copy = getAssetPath(`./assets/copy.png`);
117
- return (h("div", null, h("div", null, h("div", { onClick: () => this.copyExample(), class: "hemfixarna_example" }, h("p", null, this.getExample()), h("img", { src: copy, height: 20 }), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText)), process.env.BUSINESS === Business.byggmax && (h("hemfixarna-byggmax", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, forceOldTree: Boolean(process.env.FORCE_OLD_TREE), slug: this.selectedSlug, id: this.selectedID })), process.env.BUSINESS === Business.skanska && (h("hemfixarna-skanska", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), process.env.BUSINESS === Business.string && (h("hemfixarna-string-furniture", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), process.env.BUSINESS === Business.hornbach && (h("hemfixarna-hornbach", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), process.env.BUSINESS === Business.forebygg && (h("hemfixarna-forebygg", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), process.env.BUSINESS === Business.doro && (h("hemfixarna-doro", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), process.env.BUSINESS === Business.elfa && (h("hemfixarna-elfa", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), process.env.BUSINESS === Business.kbygg && (h("hemfixarna-kbygg", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), process.env.BUSINESS === Business.norrgavel && (h("hemfixarna-norrgavel", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), process.env.BUSINESS === Business.kund && (h("hemfixarna-kund", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), h("div", { class: "hemfixarna_install" }, h("div", { onClick: () => this.copyCdn(), class: "hemfixarna_example" }, h("p", null, this.cdnLink), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText), h("img", { src: copy, height: 20 }))), h("div", { class: "hemfixarna_widgetstyles" }, h("h5", null, "Widget styles"), h("div", null, Object.values(WidgetStyle).map(style => (h("label", { key: style }, h("input", { type: "radio", value: style, checked: this.widgetStyle === style, onChange: () => (this.widgetStyle = style) }), style)))), h("div", null, h("div", null, h("h5", null, "Button background color"), h("input", { type: "text", value: this.buttonBg, onInput: e => (this.buttonBg = e.target.value) })), h("div", null, h("h5", null, "Button text color"), h("input", { type: "text", value: this.buttonColor, onInput: e => (this.buttonColor = e.target.value) })))), h("span", null, "Write an hexa code no # needed"), this.colorAccessibility ? (h("div", null, h("h5", null, "Tillg\u00E4nglighetsrapport"), h("div", null, h("strong", null, "Liten text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.small) } }, this.colorAccessibility.small), h("br", null), h("strong", null, "Fet text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.bold) } }, this.colorAccessibility.bold), h("br", null), h("strong", null, "Stor text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.large) } }, this.colorAccessibility.large), h("br", null), h("strong", null, "Kontrastf\u00F6rh\u00E5llande:"), " ", this.colorAccessibility.contrast))) : null), h("ul", { class: "hemfixarna_categories" }, this.customer ? (h("div", null, this.showMaleri() ? (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, "M\u00E5leriverktyget"), h("span", null, "maleri")), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText('maleri') }, "Kopiera slug"), h("button", { onClick: () => (this.selectedID = 'maleri') }, "Ladda m\u00E5leri"))))) : null, this.customer.categories.map(c => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, c.name), h("span", null, `c-${c.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${c.id}`) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = `c-${c.id}`) }, "Ladda kategori"))), c.show_products && c.products ? (h("ul", null, c.products.map(p => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, h("div", null, h("p", null, p.fields.post_title), h("span", null, p.fields.ID)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt")))))))) : (h("ul", null, c.sub_categories &&
121
+ return (h("div", null, h("div", null, h("div", { onClick: () => this.copyExample(), class: "hemfixarna_example" }, h("p", null, this.getExample()), h("img", { src: copy, height: 20 }), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText)), this.partner === Business.byggmax && (h("hemfixarna-byggmax", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, forceOldTree: Boolean(process.env.FORCE_OLD_TREE), slug: this.selectedSlug, id: this.selectedID })), this.partner === Business.skanska && h("hemfixarna-skanska", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), this.partner === Business.string && (h("hemfixarna-string-furniture", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.hornbach && (h("hemfixarna-hornbach", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.zaptec && (h("hemfixarna-zaptec", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.tesla && (h("hemfixarna-tesla", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.forebygg && (h("hemfixarna-forebygg", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.doro && h("hemfixarna-doro", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), this.partner === Business.elfa && h("hemfixarna-elfa", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), this.partner === Business.kbygg && (h("hemfixarna-kbygg", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.fargvaruhuset && (h("hemfixarna-fargvaruhuset", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.norrgavel && (h("hemfixarna-norrgavel", { isDemo: true, buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), this.partner === Business.kund && h("hemfixarna-kund", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID }), h("div", { class: "hemfixarna_install" }, h("div", { onClick: () => this.copyCdn(), class: "hemfixarna_example" }, h("p", null, this.cdnLink), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText), h("img", { src: copy, height: 20 }))), h("div", { class: "hemfixarna_widgetstyles" }, h("h5", null, "Widget styles"), h("div", null, Object.values(WidgetStyle).map(style => (h("label", { key: style }, h("input", { type: "radio", value: style, checked: this.widgetStyle === style, onChange: () => (this.widgetStyle = style) }), style)))), h("div", null, h("div", null, h("h5", null, "Button background color"), h("input", { type: "text", value: this.buttonBg, onInput: e => (this.buttonBg = e.target.value) })), h("div", null, h("h5", null, "Button text color"), h("input", { type: "text", value: this.buttonColor, onInput: e => (this.buttonColor = e.target.value) })))), h("span", null, "Write an hexa code no # needed"), this.colorAccessibility ? (h("div", null, h("h5", null, "Tillg\u00E4nglighetsrapport"), h("div", null, h("strong", null, "Liten text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.small) } }, this.colorAccessibility.small), h("br", null), h("strong", null, "Fet text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.bold) } }, this.colorAccessibility.bold), h("br", null), h("strong", null, "Stor text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.large) } }, this.colorAccessibility.large), h("br", null), h("strong", null, "Kontrastf\u00F6rh\u00E5llande:"), " ", this.colorAccessibility.contrast))) : null), h("ul", { class: "hemfixarna_categories" }, this.customer ? (h("div", null, this.showMaleri() ? (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, "M\u00E5leriverktyget"), h("span", null, "maleri")), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText('maleri') }, "Kopiera slug"), h("button", { onClick: () => (this.selectedID = 'maleri') }, "Ladda m\u00E5leri"))))) : null, this.customer.categories.map(c => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, c.name), h("span", null, `c-${c.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${c.id}`) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = `c-${c.id}`) }, "Ladda kategori"))), c.show_products && c.products ? (h("ul", null, c.products.map(p => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, h("div", null, h("p", null, p.fields.post_title), h("span", null, p.fields.ID)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt")))))))) : (h("ul", null, c.sub_categories &&
118
122
  c.sub_categories.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.name), h("span", null, `c-${sc.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${sc.id}`) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = `c-${sc.id}`) }, "Ladda kategori"))), h("ul", null, sc.products.map(p => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, h("div", null, h("p", null, p.fields.post_title), h("span", null, p.fields.ID)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt"))))))))))))))))) : this.tree ? (h("div", null, this.tree.sub_cats.map(c => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, c.name), h("span", null, `category/${c.slug}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`category/${c.slug}`) }, "Kopiera slug"), h("button", { onClick: () => (this.selectedSlug = `category/${c.slug}`) }, "Ladda kategori"))), h("ul", null, c.services.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.post_title), h("span", null, `service/${sc.post_name}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`service/${sc.post_name}`) }, "Kopiera slug"), h("button", { onClick: () => (this.selectedSlug = `service/${sc.post_name}`) }, "Ladda kategori"))), h("ul", null, sc.products.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.post_title), h("span", null, `product/${sc.post_name}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`product/${sc.post_name}`) }, "Kopiera slug"), h("button", { onClick: () => (this.selectedSlug = `product/${sc.post_name}`) }, "Ladda produkt")))))))))))))))) : null)));
119
123
  }
120
124
  static get is() { return "hemfixarna-demo"; }
@@ -139,6 +143,7 @@ export class MyComponent {
139
143
  "widgetStyle": {},
140
144
  "buttonBg": {},
141
145
  "buttonColor": {},
146
+ "partner": {},
142
147
  "colorAccessibility": {}
143
148
  };
144
149
  }