hemfixarna-web-components 1.7.1 → 1.7.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.
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js +55 -47
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js.map +1 -1
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js +2 -1
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js.map +1 -1
- package/dist/cjs/hemfixarna-category.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-components.cjs.js +1 -1
- package/dist/cjs/hemfixarna-service.cjs.entry.js +1 -1
- package/dist/cjs/{index-4695c475.js → index-6af772cf.js} +8 -1
- package/dist/cjs/index-6af772cf.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js +19 -1
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js.map +1 -1
- package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js +12 -37
- package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +52 -6
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna.css +20 -0
- package/dist/collection/components/hemfixarna-contact/hemfixarna-contact.js +6 -1
- package/dist/collection/components/hemfixarna-contact/hemfixarna-contact.js.map +1 -1
- package/dist/collection/store/index.js +7 -0
- package/dist/collection/store/index.js.map +1 -1
- package/dist/esm/hemfixarna-address_15.entry.js +55 -47
- package/dist/esm/hemfixarna-address_15.entry.js.map +1 -1
- package/dist/esm/hemfixarna-byggmax.entry.js +2 -1
- package/dist/esm/hemfixarna-byggmax.entry.js.map +1 -1
- package/dist/esm/hemfixarna-category.entry.js +1 -1
- package/dist/esm/hemfixarna-components.js +1 -1
- package/dist/esm/hemfixarna-service.entry.js +1 -1
- package/dist/esm/{index-113a6b21.js → index-8282f88e.js} +8 -1
- package/dist/esm/index-8282f88e.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
- package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
- package/dist/hemfixarna-components/p-8cc96dd9.entry.js +2 -0
- package/dist/hemfixarna-components/p-a63a6a56.entry.js +2 -0
- package/dist/hemfixarna-components/p-a63a6a56.entry.js.map +1 -0
- package/dist/hemfixarna-components/{p-a3d759d9.js → p-b397b966.js} +2 -2
- package/dist/hemfixarna-components/p-b397b966.js.map +1 -0
- package/dist/hemfixarna-components/{p-12dbf4e6.entry.js → p-e8800c3b.entry.js} +2 -2
- package/dist/hemfixarna-components/p-fb43b148.entry.js +2 -0
- package/dist/hemfixarna-components/p-fb43b148.entry.js.map +1 -0
- package/dist/types/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.d.ts +1 -0
- package/dist/types/components/hemfixarna-checkout/hemfixarna-checkout.d.ts +0 -4
- package/dist/types/components/hemfixarna-component/hemfixarna-component.d.ts +3 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/types/store/index.d.ts +2 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/index-4695c475.js.map +0 -1
- package/dist/esm/index-113a6b21.js.map +0 -1
- package/dist/hemfixarna-components/p-7c122f15.entry.js +0 -2
- package/dist/hemfixarna-components/p-9b1e6bc2.entry.js +0 -2
- package/dist/hemfixarna-components/p-9b1e6bc2.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-9df46508.entry.js +0 -2
- package/dist/hemfixarna-components/p-9df46508.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-a3d759d9.js.map +0 -1
- /package/dist/hemfixarna-components/{p-7c122f15.entry.js.map → p-8cc96dd9.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-12dbf4e6.entry.js.map → p-e8800c3b.entry.js.map} +0 -0
@@ -10,9 +10,10 @@ const MyComponent = class {
|
|
10
10
|
this.widgetStyle = WidgetStyle.standard;
|
11
11
|
this.buttonColor = undefined;
|
12
12
|
this.buttonBg = undefined;
|
13
|
+
this.slug = undefined;
|
13
14
|
}
|
14
15
|
render() {
|
15
|
-
return (h("hemfixarna-component", { id: this.id, business: Business.byggmax, widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor }));
|
16
|
+
return (h("hemfixarna-component", { slug: this.slug, id: this.id, business: Business.byggmax, widgetStyle: this.widgetStyle, buttonBg: this.buttonBg, buttonColor: this.buttonColor }));
|
16
17
|
}
|
17
18
|
};
|
18
19
|
MyComponent.style = hemfixarnaByggmaxCss;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"hemfixarna-byggmax.entry.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG,EAAE;;MCQlB,WAAW;;;;uBAEc,WAAW,CAAC,QAAQ
|
1
|
+
{"file":"hemfixarna-byggmax.entry.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG,EAAE;;MCQlB,WAAW;;;;uBAEc,WAAW,CAAC,QAAQ;;;;;EAKxD,MAAM;IACJ,QACE,4BACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAC1B,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,GACP,EACxB;GACH;;;;;;","names":[],"sources":["./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.scss?tag=hemfixarna-byggmax&encapsulation=shadow","./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.tsx"],"sourcesContent":["","import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-byggmax',\n styleUrl: 'hemfixarna-byggmax.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n @Prop() slug?: string;\n\n render() {\n return (\n <hemfixarna-component\n slug={this.slug}\n id={this.id}\n business={Business.byggmax}\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n ></hemfixarna-component>\n );\n }\n}\n"],"version":3}
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
17
17
|
};
|
18
18
|
|
19
19
|
patchBrowser().then(options => {
|
20
|
-
return bootstrapLazy([["hemfixarna-address_15",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32],"loggedIn":[32],"loginError":[32]}],[1,"hemfixarna-component",{"id":[1],"business":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"product":[32],"proppedProduct":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"closeModal":[16]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSubSource":[32],"partnerOrderId":[32],"
|
20
|
+
return bootstrapLazy([["hemfixarna-address_15",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32],"loggedIn":[32],"loginError":[32]}],[1,"hemfixarna-component",{"id":[1],"slug":[1],"business":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"product":[32],"proppedProduct":[32],"loginSourceError":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"closeModal":[16]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSubSource":[32],"partnerOrderId":[32],"sellerID":[32],"RefferalID":[32]}],[0,"hemfixarna-contact",{"vertical":[4]}],[0,"hemfixarna-invoice",{"formError":[32],"displayImages":[32],"formImages":[32],"formState":[32]}],[0,"hemfixarna-address",{"street":[32],"streetError":[32],"zip":[32],"zipError":[32],"town":[32],"townError":[32]}],[0,"hemfixarna-getuser",{"email":[32],"emailError":[32],"phone":[32],"phoneError":[32],"ssn":[32],"ssnError":[32]}],[0,"hemfixarna-orderrows",{"cart":[4]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info"]]],["hemfixarna-byggmax",[[1,"hemfixarna-byggmax",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"slug":[1]}]]],["hemfixarna-doro",[[1,"hemfixarna-doro",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-elfa",[[1,"hemfixarna-elfa",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-fargvaruhuset",[[1,"hemfixarna-fargvaruhuset",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-flyttsmart",[[1,"hemfixarna-flyttsmart",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-forebygg",[[1,"hemfixarna-forebygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-hornbach",[[1,"hemfixarna-hornbach",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kbygg",[[1,"hemfixarna-kbygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-klint",[[1,"hemfixarna-klint",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kund",[[1,"hemfixarna-kund",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-norrgavel",[[1,"hemfixarna-norrgavel",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-power",[[1,"hemfixarna-power",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-skanska",[[1,"hemfixarna-skanska",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-sparfonster",[[1,"hemfixarna-sparfonster",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-string-furniture",[[1,"hemfixarna-string-furniture",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-superfront",[[1,"hemfixarna-superfront",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-tesla",[[1,"hemfixarna-tesla",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-traningspartner",[[1,"hemfixarna-traningspartner",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-zaptec",[[1,"hemfixarna-zaptec",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-category",[[0,"hemfixarna-category"]]],["hemfixarna-service",[[0,"hemfixarna-service"]]]], options);
|
21
21
|
});
|
22
22
|
|
23
23
|
//# sourceMappingURL=hemfixarna-components.js.map
|
@@ -217,6 +217,8 @@ const { state, onChange, } = createStore({
|
|
217
217
|
checkoutInvoice: false,
|
218
218
|
maleri: false,
|
219
219
|
sources: null,
|
220
|
+
selectSource: false,
|
221
|
+
showSourcePasswordPrompt: false,
|
220
222
|
});
|
221
223
|
onChange('cart', cart => {
|
222
224
|
window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));
|
@@ -227,6 +229,11 @@ onChange('user', user => {
|
|
227
229
|
onChange('creditSafeUser', user => {
|
228
230
|
window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));
|
229
231
|
});
|
232
|
+
onChange('selectSource', selectSource => {
|
233
|
+
if (selectSource) {
|
234
|
+
localStorage.setItem('select_source', 'true');
|
235
|
+
}
|
236
|
+
});
|
230
237
|
onChange('selectedProduct', product => {
|
231
238
|
if (!state.customer || !product)
|
232
239
|
return;
|
@@ -253,4 +260,4 @@ onChange('selectedCustomerCategory', category => {
|
|
253
260
|
|
254
261
|
export { state as s };
|
255
262
|
|
256
|
-
//# sourceMappingURL=index-
|
263
|
+
//# sourceMappingURL=index-8282f88e.js.map
|
@@ -0,0 +1 @@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CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE,QAAQ;EAC3C,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,QAAQ;IAAE,OAAO;EACzC,IAAK,QAAgC,CAAC,MAAM,EAAE;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAM,QAAgC,CAAC,MAAM,CAAC,CAAC;IACtG,IAAI,MAAM,EAAE;MACV,KAAK,CAAC,cAAc,GAAG,MAAM,CAAC;MAC9B,OAAO;KACR;GACF;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC;;;;","names":[],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/index.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { OnChangeHandler } from '@stencil/store/dist/types';\nimport { Business, CartItem, Category, Customer, CustomerCategory, CustomerSubCategory, GreenOptions, Product, RotOptions, RutOptions, Service, User, WpOptions } from '../types';\nimport { CreditSafeUser } from '../types/felixtypes';\n\ntype StateType = {\n step: number;\n selectedCategory: Category | null;\n selectedService: Service | null;\n selectedProduct: Product | null;\n cart: Array<CartItem>;\n business: Business | 'undefined';\n options: WpOptions | null;\n rut: boolean;\n rot: boolean;\n green: boolean;\n token: string | null;\n checkoutStep: number;\n checkoutEdit: boolean;\n user: User | null;\n creditSafeUser: CreditSafeUser | null;\n modal: {\n title?: string;\n text: string[];\n } | null;\n rutOptions: RutOptions | null;\n rotOptions: RotOptions | null;\n greenOptions: GreenOptions | null;\n customer: Customer | null;\n selectedCustomerCategory: CustomerCategory | CustomerSubCategory | null;\n parentCategory: CustomerCategory | CustomerSubCategory;\n checkoutInvoice: boolean;\n maleri: boolean;\n selectSource: boolean;\n showSourcePasswordPrompt: boolean;\n};\n\nconst {\n state,\n onChange,\n}: {\n state: StateType;\n onChange: OnChangeHandler<StateType>;\n} = createStore({\n step: 1,\n checkoutStep: 1,\n checkoutEdit: false,\n selectedCategory: null,\n selectedService: null,\n selectedProduct: null,\n cart: [],\n business: 'undefined',\n options: null,\n rut: true,\n rot: true,\n green: true,\n token: null,\n user: null,\n modal: null,\n rutOptions: null,\n rotOptions: null,\n greenOptions: null,\n customer: null,\n selectedCustomerCategory: null,\n parentCategory: null,\n creditSafeUser: null,\n checkoutInvoice: false,\n maleri: false,\n sources: null,\n selectSource: false,\n showSourcePasswordPrompt: false,\n});\n\nonChange('cart', cart => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));\n});\n\nonChange('user', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));\n});\n\nonChange('creditSafeUser', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));\n});\n\nonChange('selectSource', selectSource => {\n if (selectSource) {\n localStorage.setItem('select_source', 'true');\n }\n});\n\nonChange('selectedProduct', product => {\n if (!state.customer || !product) return;\n const categories = [...state.customer.categories, ...state.customer.categories.map(c => c.sub_categories ?? [])].flat();\n const category = categories.find(c => c && c.id === product.category);\n if (category) {\n state.parentCategory = category;\n return;\n }\n state.parentCategory = null;\n});\n\nonChange('selectedCustomerCategory', category => {\n if (!state.customer || !category) return;\n if ((category as CustomerSubCategory).parent) {\n const parent = state.customer.categories.find(c => c.id === (category as CustomerSubCategory).parent);\n if (parent) {\n state.parentCategory = parent;\n return;\n }\n }\n state.parentCategory = null;\n});\n\nexport default state;\n"],"version":3}
|
package/dist/esm/loader.js
CHANGED
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
13
13
|
return patchEsm().then(() => {
|
14
|
-
return bootstrapLazy([["hemfixarna-address_15",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32],"loggedIn":[32],"loginError":[32]}],[1,"hemfixarna-component",{"id":[1],"business":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"product":[32],"proppedProduct":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"closeModal":[16]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSubSource":[32],"partnerOrderId":[32],"
|
14
|
+
return bootstrapLazy([["hemfixarna-address_15",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32],"loggedIn":[32],"loginError":[32]}],[1,"hemfixarna-component",{"id":[1],"slug":[1],"business":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"product":[32],"proppedProduct":[32],"loginSourceError":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"closeModal":[16]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSubSource":[32],"partnerOrderId":[32],"sellerID":[32],"RefferalID":[32]}],[0,"hemfixarna-contact",{"vertical":[4]}],[0,"hemfixarna-invoice",{"formError":[32],"displayImages":[32],"formImages":[32],"formState":[32]}],[0,"hemfixarna-address",{"street":[32],"streetError":[32],"zip":[32],"zipError":[32],"town":[32],"townError":[32]}],[0,"hemfixarna-getuser",{"email":[32],"emailError":[32],"phone":[32],"phoneError":[32],"ssn":[32],"ssnError":[32]}],[0,"hemfixarna-orderrows",{"cart":[4]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info"]]],["hemfixarna-byggmax",[[1,"hemfixarna-byggmax",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"slug":[1]}]]],["hemfixarna-doro",[[1,"hemfixarna-doro",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-elfa",[[1,"hemfixarna-elfa",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-fargvaruhuset",[[1,"hemfixarna-fargvaruhuset",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-flyttsmart",[[1,"hemfixarna-flyttsmart",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-forebygg",[[1,"hemfixarna-forebygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-hornbach",[[1,"hemfixarna-hornbach",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kbygg",[[1,"hemfixarna-kbygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-klint",[[1,"hemfixarna-klint",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kund",[[1,"hemfixarna-kund",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-norrgavel",[[1,"hemfixarna-norrgavel",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-power",[[1,"hemfixarna-power",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-skanska",[[1,"hemfixarna-skanska",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-sparfonster",[[1,"hemfixarna-sparfonster",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-string-furniture",[[1,"hemfixarna-string-furniture",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-superfront",[[1,"hemfixarna-superfront",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-tesla",[[1,"hemfixarna-tesla",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-traningspartner",[[1,"hemfixarna-traningspartner",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-zaptec",[[1,"hemfixarna-zaptec",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-category",[[0,"hemfixarna-category"]]],["hemfixarna-service",[[0,"hemfixarna-service"]]]], options);
|
15
15
|
});
|
16
16
|
};
|
17
17
|
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{p as t,b as o}from"./p-32a8152b.js";export{s as setNonce}from"./p-32a8152b.js";const e=()=>{const o=import.meta.url;const e={};if(o!==""){e.resourcesUrl=new URL(".",o).href}return t(e)};e().then((t=>o([["p-
|
1
|
+
import{p as t,b as o}from"./p-32a8152b.js";export{s as setNonce}from"./p-32a8152b.js";const e=()=>{const o=import.meta.url;const e={};if(o!==""){e.resourcesUrl=new URL(".",o).href}return t(e)};e().then((t=>o([["p-fb43b148",[[1,"hemfixarna-demo",{selectedSlug:[32],selectedID:[32],tooltipText:[32],tree:[32],customer:[32],widgetStyle:[32],buttonBg:[32],buttonColor:[32],partner:[32],colorAccessibility:[32],loggedIn:[32],loginError:[32]}],[1,"hemfixarna-component",{id:[1],slug:[1],business:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"],modal:[32],showModal:[32],product:[32],proppedProduct:[32],loginSourceError:[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{amount:[32],hideDescription:[32]}],[0,"hemfixarna-start",{tree:[16],slug:[1]}],[0,"hemfixarna-breadcrumbs",{closeModal:[16]}],[0,"hemfixarna-checkout",{date:[32],dateError:[32],generalError:[32],loading:[32],enteredPin:[32],selectedSubSource:[32],partnerOrderId:[32],sellerID:[32],RefferalID:[32]}],[0,"hemfixarna-contact",{vertical:[4]}],[0,"hemfixarna-invoice",{formError:[32],displayImages:[32],formImages:[32],formState:[32]}],[0,"hemfixarna-address",{street:[32],streetError:[32],zip:[32],zipError:[32],town:[32],townError:[32]}],[0,"hemfixarna-getuser",{email:[32],emailError:[32],phone:[32],phoneError:[32],ssn:[32],ssnError:[32]}],[0,"hemfixarna-orderrows",{cart:[4]}],[0,"hemfixarna-box",{post:[16],category:[16],icon:[1],postTitle:[1,"post-title"]}],[0,"hemfixarna-info"]]],["p-a63a6a56",[[1,"hemfixarna-byggmax",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"],slug:[1]}]]],["p-6c1d21dd",[[1,"hemfixarna-doro",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-53afbc10",[[1,"hemfixarna-elfa",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-cb1634e8",[[1,"hemfixarna-fargvaruhuset",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-b6bc1537",[[1,"hemfixarna-flyttsmart",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-53f0abfa",[[1,"hemfixarna-forebygg",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-61b4597f",[[1,"hemfixarna-hornbach",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-dfcefa54",[[1,"hemfixarna-kbygg",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-8d509bf1",[[1,"hemfixarna-klint",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-e0aad0ff",[[1,"hemfixarna-kund",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-ae3fc85c",[[1,"hemfixarna-norrgavel",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-1f875c7a",[[1,"hemfixarna-power",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-8356796a",[[1,"hemfixarna-skanska",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-8f0a688c",[[1,"hemfixarna-sparfonster",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-3acd1346",[[1,"hemfixarna-string-furniture",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-edac9f21",[[1,"hemfixarna-superfront",{id:[1],loadFromQuery:[1,"load-from-query"],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-dabad8a7",[[1,"hemfixarna-tesla",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-1b80999e",[[1,"hemfixarna-traningspartner",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-6f6601b8",[[1,"hemfixarna-zaptec",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-8cc96dd9",[[0,"hemfixarna-category"]]],["p-e8800c3b",[[0,"hemfixarna-service"]]]],t)));
|
2
2
|
//# sourceMappingURL=hemfixarna-components.esm.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","selectedSlug","selectedID","tooltipText","tree","customer","widgetStyle","buttonBg","buttonColor","partner","colorAccessibility","loggedIn","loginError","id","business","modal","showModal","product","proppedProduct","amount","hideDescription","slug","closeModal","date","dateError","generalError","loading","enteredPin","selectedSubSource","partnerOrderId","showSources","sellerID","RefferalID","vertical","formError","displayImages","formImages","formState","street","streetError","zip","zipError","town","townError","email","emailError","phone","phoneError","ssn","ssnError","cart","post","category","icon","postTitle","loadFromQuery"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.2.1 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAmBA,MAAMA,EAAe,KAkCjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BH,IAAeQ,MAAKC,GAEXC,EAAc,qCAAqC,CAACC,aAAC,KAAAC,WAAA,KAAAC,YAAA,KAAAC,KAAA,KAAAC,SAAA,KAAAC,YAAA,KAAAC,SAAA,KAAAC,YAAA,KAAAC,QAAA,KAAAC,mBAAA,KAAAC,SAAA,KAAAC,WAAA,kCAAAC,GAAA,IAAAC,SAAA,IAAAR,YAAA,mBAAAE,YAAA,mBAAAD,SAAA,gBAAAQ,MAAA,KAAAC,UAAA,KAAAC,QAAA,KAAAC,eAAA,yGAAAC,OAAA,KAAAC,gBAAA,8BAAAhB,KAAA,KAAAiB,KAAA,mCAAAC,WAAA,iCAAAC,KAAA,KAAAC,UAAA,KAAAC,aAAA,KAAAC,QAAA,KAAAC,WAAA,KAAAC,kBAAA,KAAAC,eAAA,KAAAC,YAAA,KAAAC,SAAA,KAAAC,WAAA,gCAAAC,SAAA,+BAAAC,UAAA,KAAAC,cAAA,KAAAC,WAAA,KAAAC,UAAA,gCAAAC,OAAA,KAAAC,YAAA,KAAAC,IAAA,KAAAC,SAAA,KAAAC,KAAA,KAA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AAA,mBAAAD,SAAA,0GAAAR"}
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","selectedSlug","selectedID","tooltipText","tree","customer","widgetStyle","buttonBg","buttonColor","partner","colorAccessibility","loggedIn","loginError","id","slug","business","modal","showModal","product","proppedProduct","loginSourceError","amount","hideDescription","closeModal","date","dateError","generalError","loading","enteredPin","selectedSubSource","partnerOrderId","sellerID","RefferalID","vertical","formError","displayImages","formImages","formState","street","streetError","zip","zipError","town","townError","email","emailError","phone","phoneError","ssn","ssnError","cart","post","category","icon","postTitle","loadFromQuery"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.2.1 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAmBA,MAAMA,EAAe,KAkCjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BH,IAAeQ,MAAKC,GAEXC,EAAc,qCAAqC,CAACC,aAAC,KAAAC,WAAA,KAAAC,YAAA,KAAAC,KAAA,KAAAC,SAAA,KAAAC,YAAA,KAAAC,SAAA,KAAAC,YAAA,KAAAC,QAAA,KAAAC,mBAAA,KAAAC,SAAA,KAAAC,WAAA,kCAAAC,GAAA,IAAAC,KAAA,IAAAC,SAAA,IAAAT,YAAA,mBAAAE,YAAA,mBAAAD,SAAA,gBAAAS,MAAA,KAAAC,UAAA,KAAAC,QAAA,KAAAC,eAAA,KAAAC,iBAAA,yGAAAC,OAAA,KAAAC,gBAAA,8BAAAlB,KAAA,KAAAU,KAAA,mCAAAS,WAAA,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AM,GAAA,IAAAP,YAAA,mBAAAE,YAAA,mBAAAD,SAAA,+DAAAM,GAAA,IAAA0C,cAAA,sBAAAjD,YAAA,mBAAAE,YAAA,mBAAAD,SAAA,0DAAAM,GAAA,IAAAP,YAAA,mBAAAE,YAAA,mBAAAD,SAAA,oEAAAM,GAAA,IAAAP,YAAA,mBAAAE,YAAA,mBAAAD,SAAA,2DAAAM,GAAA,IAAAP,YAAA,mBAAAE,YAAA,mBAAAD,SAAA,0GAAAR"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r,h as e}from"./p-32a8152b.js";import{s as a}from"./p-b397b966.js";const s=class{constructor(e){r(this,e)}setSelectedService(r){a.selectedService=r;a.step=3}render(){return e("div",null,e("h2",null,a.selectedCategory.name),e("div",{class:"hemfixarna_categories--wrapper"},e("div",null,e("ul",{class:"hemfixarna_categories"},a.selectedCategory.services.sort(((r,e)=>r.post_title<e.post_title?-1:1)).map((r=>{var a;return e("hemfixarna-box",{post:r,icon:(a=r.icon.url)!==null&&a!==void 0?a:r.icon,postTitle:r.post_title})})))),e("hemfixarna-info",null)))}};export{s as hemfixarna_category};
|
2
|
+
//# sourceMappingURL=p-8cc96dd9.entry.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as s,h as t}from"./p-32a8152b.js";import{W as i,B as n}from"./p-cfdc93e9.js";const e="";const o=class{constructor(t){s(this,t);this.id=undefined;this.widgetStyle=i.standard;this.buttonColor=undefined;this.buttonBg=undefined;this.slug=undefined}render(){return t("hemfixarna-component",{slug:this.slug,id:this.id,business:n.byggmax,widgetStyle:this.widgetStyle,buttonBg:this.buttonBg,buttonColor:this.buttonColor})}};o.style=e;export{o as hemfixarna_byggmax};
|
2
|
+
//# sourceMappingURL=p-a63a6a56.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["hemfixarnaByggmaxCss","MyComponent","WidgetStyle","standard","render","h","slug","this","id","business","Business","byggmax","widgetStyle","buttonBg","buttonColor"],"sources":["./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.scss?tag=hemfixarna-byggmax&encapsulation=shadow","./src/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.tsx"],"sourcesContent":[null,"import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-byggmax',\n styleUrl: 'hemfixarna-byggmax.scss',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n @Prop() slug?: string;\n\n render() {\n return (\n <hemfixarna-component\n slug={this.slug}\n id={this.id}\n business={Business.byggmax}\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n ></hemfixarna-component>\n );\n }\n}\n"],"mappings":"sFAAA,MAAMA,EAAuB,G,MCQhBC,EAAW,M,4DAEcC,EAAYC,S,uEAKhDC,SACE,OACEC,EAAA,wBACEC,KAAMC,KAAKD,KACXE,GAAID,KAAKC,GACTC,SAAUC,EAASC,QACnBC,YAAaL,KAAKK,YAClBC,SAAUN,KAAKM,SACfC,YAAaP,KAAKO,a"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{c as e,f as t}from"./p-32a8152b.js";const n=(e,t,n)=>{const r=e.get(t);if(!r){e.set(t,[n])}else if(!r.includes(n)){r.push(n)}};const r=(e,t)=>{let n;return(...r)=>{if(n){clearTimeout(n)}n=setTimeout((()=>{n=0;e(...r)}),t)}};const s=e=>!("isConnected"in e)||e.isConnected;const o=r((e=>{for(let t of e.keys()){e.set(t,e.get(t).filter(s))}}),2e3);const
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{c as e,f as t}from"./p-32a8152b.js";const n=(e,t,n)=>{const r=e.get(t);if(!r){e.set(t,[n])}else if(!r.includes(n)){r.push(n)}};const r=(e,t)=>{let n;return(...r)=>{if(n){clearTimeout(n)}n=setTimeout((()=>{n=0;e(...r)}),t)}};const s=e=>!("isConnected"in e)||e.isConnected;const o=r((e=>{for(let t of e.keys()){e.set(t,e.get(t).filter(s))}}),2e3);const c=()=>{if(typeof e!=="function"){return{}}const r=new Map;return{dispose:()=>r.clear(),get:t=>{const s=e();if(s){n(r,t,s)}},set:e=>{const n=r.get(e);if(n){r.set(e,n.filter(t))}o(r)},reset:()=>{r.forEach((e=>e.forEach(t)));o(r)}}};const u=e=>typeof e==="function"?e():e;const l=(e,t=((e,t)=>e!==t))=>{const n=u(e);let r=new Map(Object.entries(n!==null&&n!==void 0?n:{}));const s={dispose:[],get:[],set:[],reset:[]};const o=()=>{var t;r=new Map(Object.entries((t=u(e))!==null&&t!==void 0?t:{}));s.reset.forEach((e=>e()))};const c=()=>{s.dispose.forEach((e=>e()));o()};const l=e=>{s.get.forEach((t=>t(e)));return r.get(e)};const a=(e,n)=>{const o=r.get(e);if(t(n,o,e)){r.set(e,n);s.set.forEach((t=>t(e,n,o)))}};const f=typeof Proxy==="undefined"?{}:new Proxy(n,{get(e,t){return l(t)},ownKeys(e){return Array.from(r.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(e,t){return r.has(t)},set(e,t,n){a(t,n);return true}});const d=(e,t)=>{s[e].push(t);return()=>{i(s[e],t)}};const p=(t,n)=>{const r=d("set",((e,r)=>{if(e===t){n(r)}}));const s=d("reset",(()=>n(u(e)[t])));return()=>{r();s()}};const g=(...e)=>{const t=e.reduce(((e,t)=>{if(t.set){e.push(d("set",t.set))}if(t.get){e.push(d("get",t.get))}if(t.reset){e.push(d("reset",t.reset))}if(t.dispose){e.push(d("dispose",t.dispose))}return e}),[]);return()=>t.forEach((e=>e()))};const m=e=>{const t=r.get(e);s.set.forEach((n=>n(e,t,t)))};return{state:f,get:l,set:a,on:d,onChange:p,use:g,dispose:c,reset:o,forceUpdate:m}};const i=(e,t)=>{const n=e.indexOf(t);if(n>=0){e[n]=e[e.length-1];e.length--}};const a=(e,t)=>{const n=l(e,t);n.use(c());return n};const{state:f,onChange:d}=a({step:1,checkoutStep:1,checkoutEdit:false,selectedCategory:null,selectedService:null,selectedProduct:null,cart:[],business:"undefined",options:null,rut:true,rot:true,green:true,token:null,user:null,modal:null,rutOptions:null,rotOptions:null,greenOptions:null,customer:null,selectedCustomerCategory:null,parentCategory:null,creditSafeUser:null,checkoutInvoice:false,maleri:false,sources:null,selectSource:false,showSourcePasswordPrompt:false});d("cart",(e=>{window.sessionStorage.setItem(`hemfixarna-${f.business}-cart`,JSON.stringify(e))}));d("user",(e=>{window.sessionStorage.setItem(`hemfixarna-${f.business}-user`,JSON.stringify(e))}));d("creditSafeUser",(e=>{window.sessionStorage.setItem(`hemfixarna-${f.business}-creditSafeUser`,JSON.stringify(e))}));d("selectSource",(e=>{if(e){localStorage.setItem("select_source","true")}}));d("selectedProduct",(e=>{if(!f.customer||!e)return;const t=[...f.customer.categories,...f.customer.categories.map((e=>{var t;return(t=e.sub_categories)!==null&&t!==void 0?t:[]}))].flat();const n=t.find((t=>t&&t.id===e.category));if(n){f.parentCategory=n;return}f.parentCategory=null}));d("selectedCustomerCategory",(e=>{if(!f.customer||!e)return;if(e.parent){const t=f.customer.categories.find((t=>t.id===e.parent));if(t){f.parentCategory=t;return}}f.parentCategory=null}));export{f as s};
|
2
|
+
//# sourceMappingURL=p-b397b966.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","_a","cb","oldValue","state","Proxy","_","ownKeys","Array","from","getOwnPropertyDescriptor","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore","step","checkoutStep","checkoutEdit","selectedCategory","selectedService","selectedProduct","cart","business","options","rut","rot","green","token","user","modal","rutOptions","rotOptions","greenOptions","customer","selectedCustomerCategory","parentCategory","creditSafeUser","checkoutInvoice","maleri","sources","selectSource","showSourcePasswordPrompt","window","sessionStorage","setItem","JSON","stringify","localStorage","product","categories","c","sub_categories","flat","category","find","id","parent"],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/index.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { OnChangeHandler } from '@stencil/store/dist/types';\nimport { Business, CartItem, Category, Customer, CustomerCategory, CustomerSubCategory, GreenOptions, Product, RotOptions, RutOptions, Service, User, WpOptions } from '../types';\nimport { CreditSafeUser } from '../types/felixtypes';\n\ntype StateType = {\n step: number;\n selectedCategory: Category | null;\n selectedService: Service | null;\n selectedProduct: Product | null;\n cart: Array<CartItem>;\n business: Business | 'undefined';\n options: WpOptions | null;\n rut: boolean;\n rot: boolean;\n green: boolean;\n token: string | null;\n checkoutStep: number;\n checkoutEdit: boolean;\n user: User | null;\n creditSafeUser: CreditSafeUser | null;\n modal: {\n title?: string;\n text: string[];\n } | null;\n rutOptions: RutOptions | null;\n rotOptions: RotOptions | null;\n greenOptions: GreenOptions | null;\n customer: Customer | null;\n selectedCustomerCategory: CustomerCategory | CustomerSubCategory | null;\n parentCategory: CustomerCategory | CustomerSubCategory;\n checkoutInvoice: boolean;\n maleri: boolean;\n selectSource: boolean;\n showSourcePasswordPrompt: boolean;\n};\n\nconst {\n state,\n onChange,\n}: {\n state: StateType;\n onChange: OnChangeHandler<StateType>;\n} = createStore({\n step: 1,\n checkoutStep: 1,\n checkoutEdit: false,\n selectedCategory: null,\n selectedService: null,\n selectedProduct: null,\n cart: [],\n business: 'undefined',\n options: null,\n rut: true,\n rot: true,\n green: true,\n token: null,\n user: null,\n modal: null,\n rutOptions: null,\n rotOptions: null,\n greenOptions: null,\n customer: null,\n selectedCustomerCategory: null,\n parentCategory: null,\n creditSafeUser: null,\n checkoutInvoice: false,\n maleri: false,\n sources: null,\n selectSource: false,\n showSourcePasswordPrompt: false,\n});\n\nonChange('cart', cart => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));\n});\n\nonChange('user', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));\n});\n\nonChange('creditSafeUser', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));\n});\n\nonChange('selectSource', selectSource => {\n if (selectSource) {\n localStorage.setItem('select_source', 'true');\n }\n});\n\nonChange('selectedProduct', product => {\n if (!state.customer || !product) return;\n const categories = [...state.customer.categories, ...state.customer.categories.map(c => c.sub_categories ?? [])].flat();\n const category = categories.find(c => c && c.id === product.category);\n if (category) {\n state.parentCategory = category;\n return;\n }\n state.parentCategory = null;\n});\n\nonChange('selectedCustomerCategory', category => {\n if (!state.customer || !category) return;\n if ((category as CustomerSubCategory).parent) {\n const parent = state.customer.categories.find(c => c.id === (category as CustomerSubCategory).parent);\n if (parent) {\n state.parentCategory = parent;\n return;\n }\n }\n state.parentCategory = null;\n});\n\nexport default state;\n"],"mappings":"2CAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,GAC3B,MACS,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,EACnB,GAEA,MAAMM,EAAW,CAACC,EAAIC,KAClB,IAAIC,EACJ,MAAO,IAAIC,KAC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AAeC,QAAQ,cAAc3D,EAAMqC,gBAAiBuB,KAAKC,UAAUzB,GAAM,IAG1FtB,EAAS,QAAQ6B,IACfc,OAAOC,eAAeC,QAAQ,cAAc3D,EAAMqC,gBAAiBuB,KAAKC,UAAUlB,GAAM,IAG1F7B,EAAS,kBAAkB6B,IACzBc,OAAOC,eAAeC,QAAQ,cAAc3D,EAAMqC,0BAA2BuB,KAAKC,UAAUlB,GAAM,IAGpG7B,EAAS,gBAAgByC,IACvB,GAAIA,EAAc,CAChBO,aAAaH,QAAQ,gBAAiB,O,KAI1C7C,EAAS,mBAAmBiD,IAC1B,IAAK/D,EAAMgD,WAAae,EAAS,OACjC,MAAMC,EAAa,IAAIhE,EAAMgD,SAASgB,cAAehE,EAAMgD,SAASgB,WAAWhH,KAAIiH,IAAC,IAAApE,EAAI,OAAAA,EAAAoE,EAAEC,kBAAc,MAAArE,SAAA,EAAAA,EAAI,EAAE,KAAGsE,OACjH,MAAMC,EAAWJ,EAAWK,MAAKJ,GAAKA,GAAKA,EAAEK,KAAOP,EAAQK,WAC5D,GAAIA,EAAU,CACZpE,EAAMkD,eAAiBkB,EACvB,M,CAEFpE,EAAMkD,eAAiB,IAAI,IAG7BpC,EAAS,4BAA4BsD,IACnC,IAAKpE,EAAMgD,WAAaoB,EAAU,OAClC,GAAKA,EAAiCG,OAAQ,CAC5C,MAAMA,EAASvE,EAAMgD,SAASgB,WAAWK,MAAKJ,GAAKA,EAAEK,KAAQF,EAAiCG,SAC9F,GAAIA,EAAQ,CACVvE,EAAMkD,eAAiBqB,EACvB,M,EAGJvE,EAAMkD,eAAiB,IAAI,W"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r,h as a}from"./p-32a8152b.js";import{s}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r,h as a}from"./p-32a8152b.js";import{s}from"./p-b397b966.js";const e=class{constructor(a){r(this,a)}render(){return a("div",null,a("h2",null,s.selectedService.post_title),a("div",{class:"hemfixarna_categories--wrapper"},a("div",null,a("ul",{class:"hemfixarna_categories"},s.selectedService.products.sort(((r,a)=>r.post_title<a.post_title?-1:1)).map((r=>{var s;return a("hemfixarna-box",{post:r,icon:(s=r.icon.url)!==null&&s!==void 0?s:r.icon,postTitle:r.title})})))),a("hemfixarna-info",null)))}};export{e as hemfixarna_service};
|
2
|
+
//# sourceMappingURL=p-e8800c3b.entry.js.map
|