hemfixarna-web-components 0.3.0 → 0.3.1

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 (81) hide show
  1. package/dist/hemfixarna-components/api-3228fe30.js +28 -0
  2. package/dist/hemfixarna-components/api-3228fe30.js.map +1 -0
  3. package/dist/hemfixarna-components/app-globals-0f993ce5.js.map +1 -1
  4. package/dist/hemfixarna-components/assets/back.svg +3 -0
  5. package/dist/hemfixarna-components/assets/cart.svg +10 -0
  6. package/dist/hemfixarna-components/assets/checked.svg +10 -0
  7. package/dist/hemfixarna-components/assets/close.svg +5 -0
  8. package/dist/hemfixarna-components/assets/date.svg +6 -0
  9. package/dist/hemfixarna-components/assets/down.svg +3 -0
  10. package/dist/hemfixarna-components/assets/info.svg +5 -0
  11. package/dist/hemfixarna-components/assets/minus.svg +4 -0
  12. package/dist/hemfixarna-components/assets/plus.svg +5 -0
  13. package/dist/hemfixarna-components/calc-a9ece205.js +85 -0
  14. package/dist/hemfixarna-components/calc-a9ece205.js.map +1 -0
  15. package/dist/hemfixarna-components/css-shim-62d2171c.js.map +1 -1
  16. package/dist/hemfixarna-components/dom-46a68c9b.js.map +1 -1
  17. package/dist/hemfixarna-components/hemfixarna-address.entry.js +52 -0
  18. package/dist/hemfixarna-components/hemfixarna-address.entry.js.map +1 -0
  19. package/dist/hemfixarna-components/hemfixarna-box.entry.js +35 -0
  20. package/dist/hemfixarna-components/hemfixarna-box.entry.js.map +1 -0
  21. package/dist/hemfixarna-components/hemfixarna-breadcrumbs.entry.js +40 -0
  22. package/dist/hemfixarna-components/hemfixarna-breadcrumbs.entry.js.map +1 -0
  23. package/dist/hemfixarna-components/hemfixarna-byggmax.entry.js +3 -35
  24. package/dist/hemfixarna-components/hemfixarna-byggmax.entry.js.map +1 -1
  25. package/dist/hemfixarna-components/hemfixarna-cart.entry.js +82 -0
  26. package/dist/hemfixarna-components/hemfixarna-cart.entry.js.map +1 -0
  27. package/dist/hemfixarna-components/hemfixarna-category.entry.js +21 -0
  28. package/dist/hemfixarna-components/hemfixarna-category.entry.js.map +1 -0
  29. package/dist/hemfixarna-components/hemfixarna-checkout.entry.js +54 -0
  30. package/dist/hemfixarna-components/hemfixarna-checkout.entry.js.map +1 -0
  31. package/dist/hemfixarna-components/hemfixarna-component.entry.js +133 -0
  32. package/dist/hemfixarna-components/hemfixarna-component.entry.js.map +1 -0
  33. package/dist/hemfixarna-components/hemfixarna-components.esm.js +3 -3
  34. package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
  35. package/dist/hemfixarna-components/{my-component.entry.js → hemfixarna-demo.entry.js} +19 -15
  36. package/dist/hemfixarna-components/hemfixarna-demo.entry.js.map +1 -0
  37. package/dist/hemfixarna-components/hemfixarna-getuser.entry.js +410 -0
  38. package/dist/hemfixarna-components/hemfixarna-getuser.entry.js.map +1 -0
  39. package/dist/hemfixarna-components/hemfixarna-info.entry.js +25 -0
  40. package/dist/hemfixarna-components/hemfixarna-info.entry.js.map +1 -0
  41. package/dist/hemfixarna-components/hemfixarna-order.entry.js +24 -0
  42. package/dist/hemfixarna-components/hemfixarna-order.entry.js.map +1 -0
  43. package/dist/hemfixarna-components/hemfixarna-product.entry.js +121 -0
  44. package/dist/hemfixarna-components/hemfixarna-product.entry.js.map +1 -0
  45. package/dist/hemfixarna-components/hemfixarna-service.entry.js +9 -139
  46. package/dist/hemfixarna-components/hemfixarna-service.entry.js.map +1 -1
  47. package/dist/hemfixarna-components/hemfixarna-start.entry.js +18 -0
  48. package/dist/hemfixarna-components/hemfixarna-start.entry.js.map +1 -0
  49. package/dist/hemfixarna-components/index-2bf8566c.js +12 -0
  50. package/dist/hemfixarna-components/index-2bf8566c.js.map +1 -0
  51. package/dist/hemfixarna-components/{index-06272934.js → index-59ed730c.js} +3 -3
  52. package/dist/hemfixarna-components/index-59ed730c.js.map +1 -0
  53. package/dist/hemfixarna-components/index-75ed3bb8.js +216 -0
  54. package/dist/hemfixarna-components/index-75ed3bb8.js.map +1 -0
  55. package/dist/hemfixarna-components/shadow-css-05e0c1f4.js.map +1 -1
  56. package/dist/types/components/hemfixarna-address/hemfixarna-address.d.ts +13 -0
  57. package/dist/types/components/hemfixarna-box/hemfixarna-box.d.ts +8 -0
  58. package/dist/types/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.d.ts +9 -0
  59. package/dist/types/components/hemfixarna-byggmax/hemfixarna-byggmax.d.ts +1 -7
  60. package/dist/types/components/hemfixarna-cart/hemfixarna-cart.d.ts +13 -0
  61. package/dist/types/components/hemfixarna-category.tsx/hemfixarna-category.d.ts +5 -0
  62. package/dist/types/components/hemfixarna-checkout/hemfixarna-checkout.d.ts +10 -0
  63. package/dist/types/components/hemfixarna-component/hemfixarna-component.d.ts +19 -0
  64. package/dist/types/components/{my-component/my-component.d.ts → hemfixarna-demo/hemfixarna-demo.d.ts} +2 -1
  65. package/dist/types/components/hemfixarna-getuser/hemfixarna-getuser.d.ts +14 -0
  66. package/dist/types/components/hemfixarna-info/hemfixarna-info.d.ts +13 -0
  67. package/dist/types/components/hemfixarna-order/hemfixarna-order.d.ts +4 -0
  68. package/dist/types/components/hemfixarna-product/hemfixarna-product.d.ts +13 -0
  69. package/dist/types/components/hemfixarna-service/hemfixarna-service.d.ts +2 -39
  70. package/dist/types/components/hemfixarna-start/hemfixarna-start.d.ts +5 -0
  71. package/dist/types/components.d.ts +189 -21
  72. package/dist/types/store/index.d.ts +26 -0
  73. package/dist/types/types/index.d.ts +41 -1
  74. package/dist/types/utils/api.d.ts +4 -2
  75. package/dist/types/utils/calc.d.ts +18 -0
  76. package/dist/types/utils/felixFunctions.d.ts +21 -0
  77. package/package.json +10 -2
  78. package/dist/hemfixarna-components/api-609888bb.js +0 -18
  79. package/dist/hemfixarna-components/api-609888bb.js.map +0 -1
  80. package/dist/hemfixarna-components/index-06272934.js.map +0 -1
  81. package/dist/hemfixarna-components/my-component.entry.js.map +0 -1
@@ -1,151 +1,21 @@
1
- import { r as registerInstance, g as getAssetPath, h, e as getElement } from './index-06272934.js';
1
+ import { r as registerInstance, h } from './index-59ed730c.js';
2
+ import { s as state } from './index-75ed3bb8.js';
2
3
 
3
- const hemfixarnaCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); :host{font-family:\"Inter\", sans-serif}:host .hemfixarna{width:100%}:host .hemfixarna_counter span{padding:0 0.5rem}:host .hemfixarna_counter button{background:#474444;border-radius:100%;color:#fff}:host .hemfixarna_terms{font-size:10px}:host .hemfixarna_logo{position:absolute;left:1rem;top:50%;transform:translateY(-50%);pointer-events:none}:host .hemfixarna_box{padding:2rem;display:flex;align-items:center;justify-content:space-between;max-width:500px;background:#fffaf2;border:1px solid #b7b7b7;width:100%;box-sizing:border-box;border-radius:0.25rem}:host .hemfixarna_btn{background:#e9d7ca;border:none;border-radius:60px;padding:0.5rem 1rem;font-weight:600;letter-spacing:0.5px;line-height:20px;font-size:15px;color:#474444}:host .hemfixarna_modal{position:fixed;padding:2rem;background:#fffaf2;top:50%;left:50%;z-index:1000;transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);transform:translate(-50%, -50%) scale(0.7);opacity:0;height:50%;width:80%;max-width:700px;display:grid;grid-template-rows:20px auto;gap:0.5rem}:host .hemfixarna_modal--open{opacity:1;transform:translate(-50%, -50%) scale(1)}:host .hemfixarna_backdrop{z-index:999;position:fixed;background:#474444;top:0;left:0;bottom:0;right:0;opacity:0;transition:transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host .hemfixarna_backdrop--open{opacity:0.3}:host .hemfixarna_content{height:100%;overflow:auto}:host .hemfixarna_content ul{display:grid;gap:1px;background:#b7b7b7}:host .hemfixarna_content li{position:relative;background:#fff}:host .hemfixarna_content li>button{padding:1rem;height:100%;width:100%}:host .hemfixarna_crumbs{display:flex;align-items:center}:host .hemfixarna_crumbs li{padding-right:0.5rem}:host .hemfixarna_crumbs li:after{content:\"/\"}:host .hemfixarna_product{display:grid;gap:1rem;padding:1rem 0}:host .hemfixarna_product--grid{display:grid;grid-template-columns:1fr 1fr}:host .hemfixarna_product--grid>div{display:grid;gap:1rem}:host .hemfixarna_product--grid li,:host .hemfixarna_product--grid ul{background:none}:host .hemfixarna_product p,:host .hemfixarna_product h4{margin:0}:host .hemfixarna_product--top{display:grid;grid-template-columns:60px auto;gap:1rem}:host .hemfixarna_product--top h4{margin-bottom:0.5rem}:host h5,:host p{margin:0}:host button,:host a{cursor:pointer;background:none;border:none}:host ul{list-style:none;margin:0;padding:0}";
4
-
5
- const MyComponent = class {
4
+ const HemfixarnaService = class {
6
5
  constructor(hostRef) {
7
6
  registerInstance(this, hostRef);
8
- this.modal = false;
9
- this.showModal = false;
10
- this.selectedCategory = undefined;
11
- this.selectedService = undefined;
12
- this.selectedProduct = undefined;
13
- this.amount = 1;
14
- this.selectedParts = [];
15
- this.cart = [];
16
- this.step = 1;
17
- this.tree = undefined;
18
- this.taxonomy = undefined;
19
- }
20
- // Handle initial state
21
- componentWillLoad() {
22
- this.setTaxonomy();
23
- }
24
- setStartingState() {
25
- this.setTaxonomy();
26
- }
27
- setTaxonomy() {
28
- var _a, _b, _c;
29
- if (this.taxonomy) {
30
- if (((_a = this.taxonomy) === null || _a === void 0 ? void 0 : _a.taxonomy) === 'service_cat') {
31
- this.selectedCategory = this.taxonomy;
32
- this.step = 2;
33
- }
34
- else if (((_b = this.taxonomy) === null || _b === void 0 ? void 0 : _b.post_type) === 'service') {
35
- this.selectedService = this.taxonomy;
36
- this.selectedCategory = this.tree.sub_cats.find(c => c.services.find(s => s.ID === this.taxonomy.ID));
37
- this.step = 3;
38
- }
39
- else if (((_c = this.taxonomy) === null || _c === void 0 ? void 0 : _c.post_type) === 'ikea_product') {
40
- this.selectedProduct = this.taxonomy;
41
- this.selectedService = this.tree.sub_cats
42
- .map(c => c.services)
43
- .flat()
44
- .find(s => s.products.find(p => p.ID === this.selectedProduct.ID));
45
- this.selectedCategory = this.tree.sub_cats.find(c => c.services.find(s => s.ID === this.selectedService.ID));
46
- this.step = 4;
47
- }
48
- }
49
- }
50
- // Open close modal && click outside event
51
- openModal() {
52
- this.modal = true;
53
- setTimeout(() => {
54
- this.showModal = true;
55
- }, 50);
56
- }
57
- closeModal() {
58
- this.showModal = false;
59
- setTimeout(() => {
60
- this.modal = false;
61
- }, 200);
62
- }
63
- handleClick(e) {
64
- const el = this.el.shadowRoot.querySelector('.hemfixarna_modal');
65
- if (el) {
66
- const isClickInside = el.contains(e.composedPath()[0]);
67
- if (!isClickInside) {
68
- this.closeModal();
69
- }
70
- }
71
- }
72
- // Handle step (routing)
73
- setDefaultState() {
74
- this.setStep(1);
75
- }
76
- setSelectedCategory(category) {
77
- this.selectedCategory = category;
78
- this.setStep(2);
79
- }
80
- setSelectedService(service) {
81
- this.selectedService = service;
82
- this.setStep(3);
83
7
  }
84
8
  setSelectedProduct(product) {
85
- this.selectedProduct = product;
86
- this.setStep(4);
87
- }
88
- setStep(step) {
89
- this.selectedParts = [];
90
- this.amount = 1;
91
- if (step < 4) {
92
- this.selectedProduct = null;
93
- }
94
- if (step < 3) {
95
- this.selectedService = null;
96
- }
97
- if (step < 2) {
98
- this.selectedCategory = null;
99
- }
100
- this.step = step;
101
- }
102
- //Handle cart and parts
103
- addPart(id) {
104
- const part = this.selectedParts.find(sp => sp.id === id);
105
- if (part) {
106
- part.amount++;
107
- this.selectedParts = [...this.selectedParts];
108
- }
109
- else {
110
- this.selectedParts = [...this.selectedParts, { id, amount: 1 }];
111
- }
112
- }
113
- removePart(id) {
114
- const part = this.selectedParts.find(sp => sp.id === id);
115
- if (part && part.amount > 1) {
116
- part.amount--;
117
- this.selectedParts = [...this.selectedParts];
118
- }
119
- else {
120
- this.selectedParts = this.selectedParts.filter(sp => sp.id !== id);
121
- }
122
- }
123
- addProduct() {
124
- this.amount++;
125
- }
126
- removeProduct() {
127
- if (this.amount > 1) {
128
- this.amount--;
129
- }
130
- }
131
- addToCart() {
132
- this.cart = [...this.cart.filter(cartitem => cartitem.id !== this.selectedProduct.ID), { id: this.selectedProduct.ID, amount: this.amount, parts: this.selectedParts }];
133
- window.sessionStorage.setItem(`hemfixarna-${"byggmax"}-cart`, JSON.stringify(this.cart));
9
+ state.selectedProduct = product;
10
+ state.step = 4;
134
11
  }
135
12
  render() {
136
- var _a, _b, _c;
137
- const logo = getAssetPath(`./assets/hemfixarna.svg`);
138
- return (h("div", { class: "hemfixarna" }, h("div", { class: "hemfixarna_box" }, h("div", null, h("img", { src: logo, width: 100 }), ((_a = this.taxonomy) === null || _a === void 0 ? void 0 : _a.post_type) === 'ikea_product' ? (h("div", null, h("h5", null, this.taxonomy.post_title), h("p", null, "Pris fr\u00E5n: ", this.taxonomy.price, "kr"))) : null), h("button", { onClick: () => this.openModal(), class: "hemfixarna_btn" }, "Best\u00E4ll montering")), this.modal && (h("div", null, h("div", { class: `hemfixarna_modal ${this.showModal ? 'hemfixarna_modal--open' : ''}` }, this.tree && (h("ul", { class: "hemfixarna_crumbs" }, h("li", null, h("button", { onClick: () => this.setDefaultState() }, this.tree.name)), this.selectedCategory && this.step > 1 && (h("li", null, h("button", { onClick: () => this.setSelectedCategory(this.selectedCategory) }, this.selectedCategory.name))), this.selectedService && this.step > 2 && (h("li", null, h("button", { onClick: () => this.setSelectedService(this.selectedService) }, this.selectedService.post_title))), this.selectedProduct && this.step > 3 && (h("li", null, h("button", { onClick: () => this.setSelectedProduct(this.selectedProduct) }, this.selectedProduct.post_title))))), h("div", { class: "hemfixarna_content" }, this.step === 1 && this.tree && (h("div", null, h("ul", null, this.tree.sub_cats.map(c => (h("li", null, c.icon && h("img", { class: "hemfixarna_logo", height: 30, src: c.icon, alt: c.name }), h("button", { onClick: () => this.setSelectedCategory(c) }, c.name))))))), this.step === 2 && this.selectedCategory && (h("div", null, h("ul", null, this.selectedCategory.services.map(s => (h("li", null, s.icon && h("img", { class: "hemfixarna_logo", height: 30, src: s.icon.url, alt: s.post_title }), h("button", { onClick: () => this.setSelectedService(s) }, s.post_title))))))), this.step === 3 && this.selectedService && (h("div", null, h("ul", null, this.selectedService.products.map(p => (h("li", null, p.icon && h("img", { class: "hemfixarna_logo", height: 30, src: p.icon, alt: p.post_title }), h("button", { onClick: () => this.setSelectedProduct(p) }, p.post_title))))))), this.step === 4 && this.selectedProduct && (h("div", { class: "hemfixarna_product" }, h("div", { class: "hemfixarna_product--top" }, this.selectedProduct.icon && h("img", { width: 60, src: this.selectedProduct.icon, alt: this.selectedProduct.post_title }), h("div", null, h("h4", null, this.selectedProduct.post_title), h("p", null, "Fr\u00E5n: ", this.selectedProduct.price, " kr"))), h("div", { class: "hemfixarna_product--grid" }, h("div", null, h("h4", null, "Ing\u00E5r alltid"), ((_b = this.selectedProduct.list) === null || _b === void 0 ? void 0 : _b.length) && (h("ul", null, this.selectedProduct.list.map(l => (h("li", { key: l.bullet }, l.bullet))))), h("p", { class: "hemfixarna_terms", innerHTML: this.selectedProduct.terms })), h("div", null, h("div", null, h("ul", null, h("li", null, h("p", null, "Antal ", this.selectedProduct.post_title), h("div", { class: "hemfixarna_counter" }, h("button", { onClick: () => this.removeProduct() }, "-"), h("span", null, this.amount), h("button", { onClick: () => this.addProduct() }, "+"))), ((_c = this.selectedProduct.parts) === null || _c === void 0 ? void 0 : _c.length) &&
139
- this.selectedProduct.parts.map(p => (h("li", { class: "hemfixarna_part" }, h("p", null, p.post_title), h("div", { class: "hemfixarna_counter" }, h("button", { onClick: () => this.removePart(p.ID) }, "-"), h("span", null, this.selectedParts.find(sp => sp.id === p.ID) ? this.selectedParts.find(sp => sp.id === p.ID).amount : 0), h("button", { onClick: () => this.addPart(p.ID) }, "+"))))))), h("div", null, h("button", { onClick: () => this.addToCart(), class: "hemfixarna_btn" }, "L\u00E4gg till")))))))), h("div", { class: `hemfixarna_backdrop ${this.showModal ? 'hemfixarna_backdrop--open' : ''}` })))));
13
+ return (h("div", null, h("h2", null, state.selectedService.post_title), h("div", { class: "hemfixarna_categories--wrapper" }, h("div", null, h("ul", { class: "hemfixarna_categories" }, state.selectedService.products
14
+ .sort((a, b) => (a.post_title < b.post_title ? -1 : 1))
15
+ .map(p => (h("hemfixarna-box", { post: p, icon: p.icon, postTitle: p.post_title }))))), h("hemfixarna-info", { list: state.options.trust }))));
140
16
  }
141
- static get assetsDirs() { return ["assets"]; }
142
- get el() { return getElement(this); }
143
- static get watchers() { return {
144
- "taxonomy": ["setStartingState"]
145
- }; }
146
17
  };
147
- MyComponent.style = hemfixarnaCss;
148
18
 
149
- export { MyComponent as hemfixarna_service };
19
+ export { HemfixarnaService as hemfixarna_service };
150
20
 
151
21
  //# sourceMappingURL=hemfixarna-service.entry.js.map
@@ -1 +1 @@
1
- {"file":"hemfixarna-service.entry.esm.js","mappings":";;AAAA,MAAM,aAAa,GAAG,89EAA89E;;MCSv+E,WAAW;;;iBACI,KAAK;qBACD,KAAK;;;;kBAIT,CAAC;yBACqC,EAAE;gBACmC,EAAE;gBAC/E,CAAC;;;;;EAOzB,iBAAiB;IACf,IAAI,CAAC,WAAW,EAAE,CAAC;GACpB;EAGD,gBAAgB;IACd,IAAI,CAAC,WAAW,EAAE,CAAC;GACpB;EAED,WAAW;;IACT,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,IAAI,CAAA,MAAC,IAAI,CAAC,QAAqB,0CAAE,QAAQ,MAAK,aAAa,EAAE;QAC3D,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAoB,CAAC;QAClD,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;OACf;WAAM,IAAI,CAAA,MAAC,IAAI,CAAC,QAAoB,0CAAE,SAAS,MAAK,SAAS,EAAE;QAC9D,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAmB,CAAC;QAChD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,C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AY,EACvD,gBAAO,IAAI,CAAC,MAAM,CAAQ,EAC1B,cAAQ,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,QAAY,CAChD,CACH,EACJ,CAAA,MAAA,IAAI,CAAC,eAAe,CAAC,KAAK,0CAAE,MAAM;MACjC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAC9B,UAAI,KAAK,EAAC,iBAAiB,IACzB,aAAI,CAAC,CAAC,UAAU,CAAK,EACrB,WAAK,KAAK,EAAC,oBAAoB,IAC7B,cAAQ,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,QAAY,EACxD,gBAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAQ,EACvH,cAAQ,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,QAAY,CACjD,CACH,CACN,CAAC,CACD,CACD,EACN,eACE,cAAQ,OAAO,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE,KAAK,EAAC,gBAAgB,qBAEtD,CACL,CACF,CACF,CACF,CACP,CAEG,CACF,EACN,WAAK,KAAK,EAAE,uBAAuB,IAAI,CAAC,SAAS,GAAG,2BAA2B,GAAG,EAAE,EAAE,GAAQ,CAC1F,CACP,CACG,EACN;GACH;;;;;;;;;;;","names":[],"sources":["./src/components/hemfixarna-service/hemfixarna.scss?tag=hemfixarna-service&encapsulation=shadow","./src/components/hemfixarna-service/hemfixarna-service.tsx"],"sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');\n\n$yellow: #fffaf2;\n$grey: #b7b7b7;\n$brown: #e9d7ca;\n$black: #474444;\n$white: #fff;\n\n:host {\n font-family: 'Inter', sans-serif;\n .hemfixarna {\n width: 100%;\n &_counter {\n span {\n padding: 0 0.5rem;\n }\n button {\n background: $black;\n border-radius: 100%;\n color: $white;\n }\n }\n &_terms {\n font-size: 10px;\n }\n &_logo {\n position: absolute;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n }\n &_box {\n padding: 2rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n max-width: 500px;\n background: $yellow;\n border: 1px solid $grey;\n width: 100%;\n box-sizing: border-box;\n border-radius: 0.25rem;\n }\n &_btn {\n background: $brown;\n border: none;\n border-radius: 60px;\n padding: 0.5rem 1rem;\n font-weight: 600;\n letter-spacing: 0.5px;\n line-height: 20px;\n font-size: 15px;\n color: $black;\n }\n &_modal {\n position: fixed;\n padding: 2rem;\n background: $yellow;\n top: 50%;\n left: 50%;\n z-index: 1000;\n transition: 0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);\n transform: translate(-50%, -50%) scale(0.7);\n opacity: 0;\n height: 50%;\n width: 80%;\n max-width: 700px;\n display: grid;\n grid-template-rows: 20px auto;\n gap: 0.5rem;\n &--open {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n }\n &_backdrop {\n z-index: 999;\n position: fixed;\n background: $black;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n transition: transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946);\n &--open {\n opacity: 0.3;\n }\n }\n &_content {\n height: 100%;\n overflow: auto;\n ul {\n display: grid;\n gap: 1px;\n background: $grey;\n }\n li {\n position: relative;\n background: $white;\n > button {\n padding: 1rem;\n height: 100%;\n width: 100%;\n }\n }\n }\n &_crumbs {\n display: flex;\n align-items: center;\n li {\n padding-right: 0.5rem;\n &:after {\n content: '/';\n }\n }\n }\n &_product {\n display: grid;\n gap: 1rem;\n &--grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n > div {\n display: grid;\n gap: 1rem;\n }\n li,\n ul {\n background: none;\n }\n }\n padding: 1rem 0;\n p,\n h4 {\n margin: 0;\n }\n &--top {\n display: grid;\n grid-template-columns: 60px auto;\n gap: 1rem;\n h4 {\n margin-bottom: 0.5rem;\n }\n }\n }\n }\n h5,\n p {\n margin: 0;\n }\n button,\n a {\n cursor: pointer;\n background: none;\n border: none;\n }\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n}\n","import { Component, Prop, getAssetPath, h, State, Listen, Element, Watch } from '@stencil/core';\nimport { Category, Product, Service } from '../../types';\n\n@Component({\n tag: 'hemfixarna-service',\n styleUrl: 'hemfixarna.scss',\n shadow: true,\n assetsDirs: ['assets'],\n})\nexport class MyComponent {\n @State() modal: boolean = false;\n @State() showModal: boolean = false;\n @State() selectedCategory: Category | null;\n @State() selectedService: Service | null;\n @State() selectedProduct: Product | null;\n @State() amount: number = 1;\n @State() selectedParts: Array<{ id: number; amount: number }> = [];\n @State() cart: Array<{ id: number; amount: number; parts: Array<{ id: number; amount: number }> }> = [];\n @State() step: number = 1;\n @Element() private el: HTMLElement;\n\n @Prop() tree: Category | null;\n @Prop() taxonomy: Category | Service | Product | null;\n\n // Handle initial state\n componentWillLoad() {\n this.setTaxonomy();\n }\n\n @Watch('taxonomy')\n setStartingState() {\n this.setTaxonomy();\n }\n\n setTaxonomy() {\n if (this.taxonomy) {\n if ((this.taxonomy as Category)?.taxonomy === 'service_cat') {\n this.selectedCategory = this.taxonomy as Category;\n this.step = 2;\n } else if ((this.taxonomy as Service)?.post_type === 'service') {\n this.selectedService = this.taxonomy as Service;\n this.selectedCategory = this.tree.sub_cats.find(c => c.services.find(s => s.ID === (this.taxonomy as Service).ID));\n this.step = 3;\n } else if ((this.taxonomy as Product)?.post_type === 'ikea_product') {\n this.selectedProduct = this.taxonomy as Product;\n this.selectedService = this.tree.sub_cats\n .map(c => c.services)\n .flat()\n .find(s => s.products.find(p => p.ID === this.selectedProduct.ID));\n this.selectedCategory = this.tree.sub_cats.find(c => c.services.find(s => s.ID === this.selectedService.ID));\n this.step = 4;\n }\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 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 }\n\n // Handle step (routing)\n setDefaultState() {\n this.setStep(1);\n }\n setSelectedCategory(category: Category) {\n this.selectedCategory = category;\n this.setStep(2);\n }\n setSelectedService(service: Service) {\n this.selectedService = service;\n this.setStep(3);\n }\n setSelectedProduct(product: Product) {\n this.selectedProduct = product;\n this.setStep(4);\n }\n\n setStep(step: number) {\n this.selectedParts = [];\n this.amount = 1;\n if (step < 4) {\n this.selectedProduct = null;\n }\n if (step < 3) {\n this.selectedService = null;\n }\n if (step < 2) {\n this.selectedCategory = null;\n }\n this.step = step;\n }\n\n //Handle cart and parts\n addPart(id: number) {\n const part = this.selectedParts.find(sp => sp.id === id);\n if (part) {\n part.amount++;\n this.selectedParts = [...this.selectedParts];\n } else {\n this.selectedParts = [...this.selectedParts, { id, amount: 1 }];\n }\n }\n\n removePart(id: number) {\n const part = this.selectedParts.find(sp => sp.id === id);\n if (part && part.amount > 1) {\n part.amount--;\n this.selectedParts = [...this.selectedParts];\n } else {\n this.selectedParts = this.selectedParts.filter(sp => sp.id !== id);\n }\n }\n\n addProduct() {\n this.amount++;\n }\n\n removeProduct() {\n if (this.amount > 1) {\n this.amount--;\n }\n }\n\n addToCart() {\n this.cart = [...this.cart.filter(cartitem => cartitem.id !== this.selectedProduct.ID), { id: this.selectedProduct.ID, amount: this.amount, parts: this.selectedParts }];\n window.sessionStorage.setItem(`hemfixarna-${process.env.BUSINESS}-cart`, JSON.stringify(this.cart));\n }\n\n render() {\n const logo = getAssetPath(`./assets/hemfixarna.svg`);\n\n return (\n <div class=\"hemfixarna\">\n <div class=\"hemfixarna_box\">\n <div>\n <img src={logo} width={100} />\n {(this.taxonomy as Product)?.post_type === 'ikea_product' ? (\n <div>\n <h5>{(this.taxonomy as Product).post_title}</h5>\n <p>Pris från: {(this.taxonomy as Product).price}kr</p>\n </div>\n ) : null}\n </div>\n <button onClick={() => this.openModal()} class=\"hemfixarna_btn\">\n Beställ montering\n </button>\n </div>\n {this.modal && (\n <div>\n <div class={`hemfixarna_modal ${this.showModal ? 'hemfixarna_modal--open' : ''}`}>\n {/* // CRUMBS */}\n {this.tree && (\n <ul class=\"hemfixarna_crumbs\">\n <li>\n <button onClick={() => this.setDefaultState()}>{this.tree.name}</button>\n </li>\n {this.selectedCategory && this.step > 1 && (\n <li>\n <button onClick={() => this.setSelectedCategory(this.selectedCategory)}>{this.selectedCategory.name}</button>\n </li>\n )}\n {this.selectedService && this.step > 2 && (\n <li>\n <button onClick={() => this.setSelectedService(this.selectedService)}>{this.selectedService.post_title}</button>\n </li>\n )}\n {this.selectedProduct && this.step > 3 && (\n <li>\n <button onClick={() => this.setSelectedProduct(this.selectedProduct)}>{this.selectedProduct.post_title}</button>\n </li>\n )}\n </ul>\n )}\n <div class=\"hemfixarna_content\">\n {/* // IF AT TOP LEVEL (step 1) */}\n {this.step === 1 && this.tree && (\n <div>\n <ul>\n {this.tree.sub_cats.map(c => (\n <li>\n {c.icon && <img class=\"hemfixarna_logo\" height={30} src={c.icon} alt={c.name} />}\n <button onClick={() => this.setSelectedCategory(c)}>{c.name}</button>\n </li>\n ))}\n </ul>\n </div>\n )}\n {/* // IF SELECTED CATEGORY (step 2) */}\n {this.step === 2 && this.selectedCategory && (\n <div>\n <ul>\n {this.selectedCategory.services.map(s => (\n <li>\n {s.icon && <img class=\"hemfixarna_logo\" height={30} src={s.icon.url} alt={s.post_title} />}\n <button onClick={() => this.setSelectedService(s)}>{s.post_title}</button>\n </li>\n ))}\n </ul>\n </div>\n )}\n {/* // IF SELECTED SERVICE (step 3) */}\n {this.step === 3 && this.selectedService && (\n <div>\n <ul>\n {this.selectedService.products.map(p => (\n <li>\n {p.icon && <img class=\"hemfixarna_logo\" height={30} src={p.icon} alt={p.post_title} />}\n <button onClick={() => this.setSelectedProduct(p)}>{p.post_title}</button>\n </li>\n ))}\n </ul>\n </div>\n )}\n {/* // IF SELECTED PRODUCT (step 4) */}\n {this.step === 4 && this.selectedProduct && (\n <div class=\"hemfixarna_product\">\n <div class=\"hemfixarna_product--top\">\n {this.selectedProduct.icon && <img width={60} src={this.selectedProduct.icon} alt={this.selectedProduct.post_title} />}\n <div>\n <h4>{this.selectedProduct.post_title}</h4>\n <p>Från: {this.selectedProduct.price} kr</p>\n </div>\n </div>\n\n <div class=\"hemfixarna_product--grid\">\n <div>\n <h4>Ingår alltid</h4>\n {this.selectedProduct.list?.length && (\n <ul>\n {this.selectedProduct.list.map(l => (\n <li key={l.bullet}>{l.bullet}</li>\n ))}\n </ul>\n )}\n <p class=\"hemfixarna_terms\" innerHTML={this.selectedProduct.terms}></p>\n </div>\n <div>\n <div>\n <ul>\n <li>\n <p>Antal {this.selectedProduct.post_title}</p>\n <div class=\"hemfixarna_counter\">\n <button onClick={() => this.removeProduct()}>-</button>\n <span>{this.amount}</span>\n <button onClick={() => this.addProduct()}>+</button>\n </div>\n </li>\n {this.selectedProduct.parts?.length &&\n this.selectedProduct.parts.map(p => (\n <li class=\"hemfixarna_part\">\n <p>{p.post_title}</p>\n <div class=\"hemfixarna_counter\">\n <button onClick={() => this.removePart(p.ID)}>-</button>\n <span>{this.selectedParts.find(sp => sp.id === p.ID) ? this.selectedParts.find(sp => sp.id === p.ID).amount : 0}</span>\n <button onClick={() => this.addPart(p.ID)}>+</button>\n </div>\n </li>\n ))}\n </ul>\n </div>\n <div>\n <button onClick={() => this.addToCart()} class=\"hemfixarna_btn\">\n Lägg till\n </button>\n </div>\n </div>\n </div>\n </div>\n )}\n {/* // IF CHECKOUT (step 5) */}\n </div>\n </div>\n <div class={`hemfixarna_backdrop ${this.showModal ? 'hemfixarna_backdrop--open' : ''}`}></div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"hemfixarna-service.entry.esm.js","mappings":";;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,18 @@
1
+ import { r as registerInstance, h } from './index-59ed730c.js';
2
+ import { s as state } from './index-75ed3bb8.js';
3
+
4
+ const HemfixarnaGrid = class {
5
+ constructor(hostRef) {
6
+ registerInstance(this, hostRef);
7
+ this.tree = undefined;
8
+ }
9
+ render() {
10
+ return (h("div", null, h("h2", null, "Alla tj\u00E4nster"), h("div", { class: "hemfixarna_categories--wrapper" }, h("ul", { class: "hemfixarna_categories" }, this.tree.sub_cats
11
+ .sort((a, b) => (a.name < b.name ? -1 : 1))
12
+ .map(c => (h("hemfixarna-box", { post: c, icon: c.icon, postTitle: c.name })))), h("hemfixarna-info", { list: state.options.trust }))));
13
+ }
14
+ };
15
+
16
+ export { HemfixarnaGrid as hemfixarna_start };
17
+
18
+ //# sourceMappingURL=hemfixarna-start.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"hemfixarna-start.entry.esm.js","mappings":";;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,12 @@
1
+ var Business;
2
+ (function (Business) {
3
+ Business["byggmax"] = "byggmax";
4
+ })(Business || (Business = {}));
5
+ var TopCategory;
6
+ (function (TopCategory) {
7
+ TopCategory["byggmax"] = "category/bygg";
8
+ })(TopCategory || (TopCategory = {}));
9
+
10
+ export { Business as B, TopCategory as T };
11
+
12
+ //# sourceMappingURL=index-2bf8566c.js.map
@@ -0,0 +1 @@
1
+ {"file":"index-2bf8566c.js","mappings":";;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'hemfixarna-components';
2
- const BUILD = /* hemfixarna-components */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: false, cssAnnotations: true, cssVarShim: false, devTools: true, disconnectedCallback: false, dynamicImportShim: false, element: false, event: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: true, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: false, safari10: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* hemfixarna-components */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: false, cssAnnotations: true, cssVarShim: false, devTools: true, disconnectedCallback: false, dynamicImportShim: false, element: false, event: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: true, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: false, safari10: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
  const Env = /* hemfixarna-components */ {};
4
4
 
5
5
  /**
@@ -3392,6 +3392,6 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
3392
3392
  const readTask = /*@__PURE__*/ queueTask(queueDomReads, false);
3393
3393
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
3394
3394
 
3395
- export { BUILD as B, CSS as C, H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, consoleDevInfo as c, doc as d, getElement as e, getAssetPath as g, h, plt as p, registerInstance as r, setNonce as s, win as w };
3395
+ export { BUILD as B, CSS as C, Fragment as F, H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, consoleDevInfo as c, doc as d, getElement as e, getRenderingRef as f, getAssetPath as g, h, forceUpdate as i, plt as p, registerInstance as r, setNonce as s, win as w };
3396
3396
 
3397
- //# sourceMappingURL=index-06272934.js.map
3397
+ //# sourceMappingURL=index-59ed730c.js.map
@@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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,216 @@
1
+ import { f as getRenderingRef, i as forceUpdate } from './index-59ed730c.js';
2
+
3
+ const appendToMap = (map, propName, value) => {
4
+ const items = map.get(propName);
5
+ if (!items) {
6
+ map.set(propName, [value]);
7
+ }
8
+ else if (!items.includes(value)) {
9
+ items.push(value);
10
+ }
11
+ };
12
+ const debounce = (fn, ms) => {
13
+ let timeoutId;
14
+ return (...args) => {
15
+ if (timeoutId) {
16
+ clearTimeout(timeoutId);
17
+ }
18
+ timeoutId = setTimeout(() => {
19
+ timeoutId = 0;
20
+ fn(...args);
21
+ }, ms);
22
+ };
23
+ };
24
+
25
+ /**
26
+ * Check if a possible element isConnected.
27
+ * The property might not be there, so we check for it.
28
+ *
29
+ * We want it to return true if isConnected is not a property,
30
+ * otherwise we would remove these elements and would not update.
31
+ *
32
+ * Better leak in Edge than to be useless.
33
+ */
34
+ const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
35
+ const cleanupElements = debounce((map) => {
36
+ for (let key of map.keys()) {
37
+ map.set(key, map.get(key).filter(isConnected));
38
+ }
39
+ }, 2000);
40
+ const stencilSubscription = () => {
41
+ if (typeof getRenderingRef !== 'function') {
42
+ // If we are not in a stencil project, we do nothing.
43
+ // This function is not really exported by @stencil/core.
44
+ return {};
45
+ }
46
+ const elmsToUpdate = new Map();
47
+ return {
48
+ dispose: () => elmsToUpdate.clear(),
49
+ get: (propName) => {
50
+ const elm = getRenderingRef();
51
+ if (elm) {
52
+ appendToMap(elmsToUpdate, propName, elm);
53
+ }
54
+ },
55
+ set: (propName) => {
56
+ const elements = elmsToUpdate.get(propName);
57
+ if (elements) {
58
+ elmsToUpdate.set(propName, elements.filter(forceUpdate));
59
+ }
60
+ cleanupElements(elmsToUpdate);
61
+ },
62
+ reset: () => {
63
+ elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
64
+ cleanupElements(elmsToUpdate);
65
+ },
66
+ };
67
+ };
68
+
69
+ const unwrap = (val) => (typeof val === 'function' ? val() : val);
70
+ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
71
+ const unwrappedState = unwrap(defaultState);
72
+ let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
73
+ const handlers = {
74
+ dispose: [],
75
+ get: [],
76
+ set: [],
77
+ reset: [],
78
+ };
79
+ const reset = () => {
80
+ var _a;
81
+ // When resetting the state, the default state may be a function - unwrap it to invoke it.
82
+ // otherwise, the state won't be properly reset
83
+ states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
84
+ handlers.reset.forEach((cb) => cb());
85
+ };
86
+ const dispose = () => {
87
+ // Call first dispose as resetting the state would
88
+ // cause less updates ;)
89
+ handlers.dispose.forEach((cb) => cb());
90
+ reset();
91
+ };
92
+ const get = (propName) => {
93
+ handlers.get.forEach((cb) => cb(propName));
94
+ return states.get(propName);
95
+ };
96
+ const set = (propName, value) => {
97
+ const oldValue = states.get(propName);
98
+ if (shouldUpdate(value, oldValue, propName)) {
99
+ states.set(propName, value);
100
+ handlers.set.forEach((cb) => cb(propName, value, oldValue));
101
+ }
102
+ };
103
+ const state = (typeof Proxy === 'undefined'
104
+ ? {}
105
+ : new Proxy(unwrappedState, {
106
+ get(_, propName) {
107
+ return get(propName);
108
+ },
109
+ ownKeys(_) {
110
+ return Array.from(states.keys());
111
+ },
112
+ getOwnPropertyDescriptor() {
113
+ return {
114
+ enumerable: true,
115
+ configurable: true,
116
+ };
117
+ },
118
+ has(_, propName) {
119
+ return states.has(propName);
120
+ },
121
+ set(_, propName, value) {
122
+ set(propName, value);
123
+ return true;
124
+ },
125
+ }));
126
+ const on = (eventName, callback) => {
127
+ handlers[eventName].push(callback);
128
+ return () => {
129
+ removeFromArray(handlers[eventName], callback);
130
+ };
131
+ };
132
+ const onChange = (propName, cb) => {
133
+ const unSet = on('set', (key, newValue) => {
134
+ if (key === propName) {
135
+ cb(newValue);
136
+ }
137
+ });
138
+ // We need to unwrap the defaultState because it might be a function.
139
+ // Otherwise we might not be sending the right reset value.
140
+ const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
141
+ return () => {
142
+ unSet();
143
+ unReset();
144
+ };
145
+ };
146
+ const use = (...subscriptions) => {
147
+ const unsubs = subscriptions.reduce((unsubs, subscription) => {
148
+ if (subscription.set) {
149
+ unsubs.push(on('set', subscription.set));
150
+ }
151
+ if (subscription.get) {
152
+ unsubs.push(on('get', subscription.get));
153
+ }
154
+ if (subscription.reset) {
155
+ unsubs.push(on('reset', subscription.reset));
156
+ }
157
+ if (subscription.dispose) {
158
+ unsubs.push(on('dispose', subscription.dispose));
159
+ }
160
+ return unsubs;
161
+ }, []);
162
+ return () => unsubs.forEach((unsub) => unsub());
163
+ };
164
+ const forceUpdate = (key) => {
165
+ const oldValue = states.get(key);
166
+ handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
167
+ };
168
+ return {
169
+ state,
170
+ get,
171
+ set,
172
+ on,
173
+ onChange,
174
+ use,
175
+ dispose,
176
+ reset,
177
+ forceUpdate,
178
+ };
179
+ };
180
+ const removeFromArray = (array, item) => {
181
+ const index = array.indexOf(item);
182
+ if (index >= 0) {
183
+ array[index] = array[array.length - 1];
184
+ array.length--;
185
+ }
186
+ };
187
+
188
+ const createStore = (defaultState, shouldUpdate) => {
189
+ const map = createObservableMap(defaultState, shouldUpdate);
190
+ map.use(stencilSubscription());
191
+ return map;
192
+ };
193
+
194
+ const { state, onChange, } = createStore({
195
+ step: 1,
196
+ checkoutStep: 1,
197
+ checkoutEdit: false,
198
+ selectedCategory: null,
199
+ selectedService: null,
200
+ selectedProduct: null,
201
+ cart: [],
202
+ business: 'undefined',
203
+ options: null,
204
+ rut: true,
205
+ rot: true,
206
+ token: null,
207
+ user: null,
208
+ modal: null,
209
+ });
210
+ onChange('cart', cart => {
211
+ window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));
212
+ });
213
+
214
+ export { state as s };
215
+
216
+ //# sourceMappingURL=index-75ed3bb8.js.map
@@ -0,0 +1 @@
1
+ {"file":"index-75ed3bb8.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1 +1 @@
1
- {"file":"shadow-css-05e0c1f4.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,CAAC,QAAQ,KAAK;AACnC,IAAI,MAAM,YAAY,GAAG,EAAE,CAAC;AAC5B,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC;AAClB;AACA;AACA,IAAI,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK;AAC9D,QAAQ,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,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;AACL,IAAI,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,eAAe,KAAK;AACzD,QAAQ,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,WAAW,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;AAChG,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,OAAO,CAAC;AACnB;;;;","names":[],"sources":["./node_modules/@stencil/core/internal/client/shadow-css.js"],"sourcesContent":["/*\n Stencil Client Platform v3.2.1 | MIT Licensed | https://stenciljs.com\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n *\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts\n */\nconst safeSelector = (selector) => {\n const placeholders = [];\n let index = 0;\n // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n selector = selector.replace(/(\\[[^\\]]*\\])/g, (_, keep) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(keep);\n index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n const content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, (_, pseudo, exp) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(exp);\n index++;\n return pseudo + replaceBy;\n });\n const ss = {\n content,\n placeholders,\n };\n return ss;\n};\nconst restoreSafeSelector = (placeholders, content) => {\n return content.replace(/__ph-(\\d+)__/g, (_, index) => placeholders[+index]);\n};\nconst _polyfillHost = '-shadowcsshost';\nconst _polyfillSlotted = '-shadowcssslotted';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nconst _polyfillHostContext = '-shadowcsscontext';\nconst _parenSuffix = ')(?:\\\\((' + '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' + ')\\\\))?([^,{]*)';\nconst _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\nconst _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\nconst _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');\nconst _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nconst _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nconst _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];\nconst _selectorReSuffix = '([>\\\\s~+[.,{:][\\\\s\\\\S]*)?$';\nconst _polyfillHostRe = /-shadowcsshost/gim;\nconst _colonHostRe = /:host/gim;\nconst _colonSlottedRe = /::slotted/gim;\nconst _colonHostContextRe = /:host-context/gim;\nconst _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\nconst stripComments = (input) => {\n return input.replace(_commentRe, '');\n};\nconst _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\nconst extractCommentsWithHash = (input) => {\n return input.match(_commentWithHashRe) || [];\n};\nconst _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nconst _curlyRe = /([{}])/g;\nconst _selectorPartsRe = /(^.*?[^\\\\])??((:+)(.*)|$)/;\nconst OPEN_CURLY = '{';\nconst CLOSE_CURLY = '}';\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\nconst processRules = (input, ruleCallback) => {\n const inputWithEscapedBlocks = escapeBlocks(input);\n let nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {\n const selector = m[2];\n let content = '';\n let suffix = m[4];\n let contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n const cssRule = {\n selector,\n content,\n };\n const rule = ruleCallback(cssRule);\n return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n });\n};\nconst escapeBlocks = (input) => {\n const inputParts = input.split(_curlyRe);\n const resultParts = [];\n const escapedBlocks = [];\n let bracketCount = 0;\n let currentBlockParts = [];\n for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {\n const part = inputParts[partIndex];\n if (part === CLOSE_CURLY) {\n bracketCount--;\n }\n if (bracketCount > 0) {\n currentBlockParts.push(part);\n }\n else {\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n resultParts.push(part);\n }\n if (part === OPEN_CURLY) {\n bracketCount++;\n }\n }\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n const strEscapedBlocks = {\n escapedString: resultParts.join(''),\n blocks: escapedBlocks,\n };\n return strEscapedBlocks;\n};\nconst insertPolyfillHostInCssText = (selector) => {\n selector = selector\n .replace(_colonHostContextRe, _polyfillHostContext)\n .replace(_colonHostRe, _polyfillHost)\n .replace(_colonSlottedRe, _polyfillSlotted);\n return selector;\n};\nconst convertColonRule = (cssText, regExp, partReplacer) => {\n // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, (...m) => {\n if (m[2]) {\n const parts = m[2].split(',');\n const r = [];\n for (let i = 0; i < parts.length; i++) {\n const p = parts[i].trim();\n if (!p)\n break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n return r.join(',');\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n};\nconst colonHostPartReplacer = (host, part, suffix) => {\n return host + part.replace(_polyfillHost, '') + suffix;\n};\nconst convertColonHost = (cssText) => {\n return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);\n};\nconst colonHostContextPartReplacer = (host, part, suffix) => {\n if (part.indexOf(_polyfillHost) > -1) {\n return colonHostPartReplacer(host, part, suffix);\n }\n else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n};\nconst convertColonSlotted = (cssText, slotScopeId) => {\n const slotClass = '.' + slotScopeId + ' > ';\n const selectors = [];\n cssText = cssText.replace(_cssColonSlottedRe, (...m) => {\n if (m[2]) {\n const compound = m[2].trim();\n const suffix = m[3];\n const slottedSelector = slotClass + compound + suffix;\n let prefixSelector = '';\n for (let i = m[4] - 1; i >= 0; i--) {\n const char = m[5][i];\n if (char === '}' || char === ',') {\n break;\n }\n prefixSelector = char + prefixSelector;\n }\n const orgSelector = prefixSelector + slottedSelector;\n const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;\n if (orgSelector.trim() !== addedSelector.trim()) {\n const updatedSelector = `${addedSelector}, ${orgSelector}`;\n selectors.push({\n orgSelector,\n updatedSelector,\n });\n }\n return slottedSelector;\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n return {\n selectors,\n cssText,\n };\n};\nconst convertColonHostContext = (cssText) => {\n return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);\n};\nconst convertShadowDOMSelectors = (cssText) => {\n return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);\n};\nconst makeScopeMatcher = (scopeSelector) => {\n const lre = /\\[/g;\n const rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n};\nconst selectorNeedsScoping = (selector, scopeSelector) => {\n const re = makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n};\nconst injectScopingSelector = (selector, scopingSelector) => {\n return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {\n return before + scopingSelector + colon + after;\n });\n};\nconst applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n const replaceBy = `.${hostSelector}`;\n return selector\n .replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))\n .replace(_polyfillHostRe, replaceBy + ' ');\n }\n return scopeSelector + ' ' + selector;\n};\nconst applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {\n const isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);\n const className = '.' + scopeSelector;\n const _scopeSelectorPart = (p) => {\n let scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);\n }\n else {\n // remove :host since it should be unnecessary\n const t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n scopedP = injectScopingSelector(t, className);\n }\n }\n return scopedP;\n };\n const safeContent = safeSelector(selector);\n selector = safeContent.content;\n let scopedSelector = '';\n let startIndex = 0;\n let res;\n const sep = /( |>|\\+|~(?!=))\\s*/g;\n // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n let shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n const separator = res[1];\n const part = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n scopedSelector += `${scopedPart} ${separator} `;\n startIndex = sep.lastIndex;\n }\n const part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n // replace the placeholders with their original values\n return restoreSafeSelector(safeContent.placeholders, scopedSelector);\n};\nconst scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {\n return selector\n .split(',')\n .map((shallowPart) => {\n if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {\n return shallowPart.trim();\n }\n if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {\n return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();\n }\n else {\n return shallowPart.trim();\n }\n })\n .join(', ');\n};\nconst scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {\n return processRules(cssText, (rule) => {\n let selector = rule.selector;\n let content = rule.content;\n if (rule.selector[0] !== '@') {\n selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);\n }\n else if (rule.selector.startsWith('@media') ||\n rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') ||\n rule.selector.startsWith('@document')) {\n content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);\n }\n const cssRule = {\n selector: selector.replace(/\\s{2,}/g, ' ').trim(),\n content,\n };\n return cssRule;\n });\n};\nconst scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {\n cssText = insertPolyfillHostInCssText(cssText);\n cssText = convertColonHost(cssText);\n cssText = convertColonHostContext(cssText);\n const slotted = convertColonSlotted(cssText, slotScopeId);\n cssText = slotted.cssText;\n cssText = convertShadowDOMSelectors(cssText);\n if (scopeId) {\n cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);\n }\n cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);\n cssText = cssText.replace(/>\\s*\\*\\s+([^{, ]+)/gm, ' $1 ');\n return {\n cssText: cssText.trim(),\n slottedSelectors: slotted.selectors,\n };\n};\nconst scopeCss = (cssText, scopeId, commentOriginalSelector) => {\n const hostScopeId = scopeId + '-h';\n const slotScopeId = scopeId + '-s';\n const commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n const orgSelectors = [];\n if (commentOriginalSelector) {\n const processCommentedSelector = (rule) => {\n const placeholder = `/*!@___${orgSelectors.length}___*/`;\n const comment = `/*!@${rule.selector}*/`;\n orgSelectors.push({ placeholder, comment });\n rule.selector = placeholder + rule.selector;\n return rule;\n };\n cssText = processRules(cssText, (rule) => {\n if (rule.selector[0] !== '@') {\n return processCommentedSelector(rule);\n }\n else if (rule.selector.startsWith('@media') ||\n rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') ||\n rule.selector.startsWith('@document')) {\n rule.content = processRules(rule.content, processCommentedSelector);\n return rule;\n }\n return rule;\n });\n }\n const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);\n cssText = [scoped.cssText, ...commentsWithHash].join('\\n');\n if (commentOriginalSelector) {\n orgSelectors.forEach(({ placeholder, comment }) => {\n cssText = cssText.replace(placeholder, comment);\n });\n }\n scoped.slottedSelectors.forEach((slottedSelector) => {\n cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);\n });\n return cssText;\n};\n\nexport { scopeCss };\n"],"version":3}
1
+ {"file":"shadow-css-05e0c1f4.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,13 @@
1
+ export declare class HemfixarnaAddress {
2
+ street: string;
3
+ streetError: string | null;
4
+ zip: string;
5
+ zipError: string | null;
6
+ town: string;
7
+ townError: string | null;
8
+ handleSubmit: (e: Event) => void;
9
+ handleChangeStreet: (e: Event) => void;
10
+ handleChangeZip: (e: Event) => void;
11
+ handleChangeTown: (e: Event) => void;
12
+ render: () => any;
13
+ }
@@ -0,0 +1,8 @@
1
+ import { Category, Product, Service } from '../../types';
2
+ export declare class HemfixarnaBox {
3
+ post: Category | Product | Service;
4
+ icon: string;
5
+ postTitle: string;
6
+ setTaxonomy(taxonomy: Category | Service | Product): void;
7
+ render(): any;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { Category } from '../../types';
2
+ export declare class HemfixarnaBreadcrumbs {
3
+ tree: Category;
4
+ closeModal: () => void;
5
+ getCartLength(): number;
6
+ handleCartClick(): void;
7
+ handleHomePageClick(): void;
8
+ render(): any;
9
+ }