hemfixarna-web-components 1.3.5 → 1.3.6
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_22.cjs.entry.js → hemfixarna-address_23.cjs.entry.js} +173 -24
- package/dist/cjs/{hemfixarna-address_22.cjs.entry.js.map → hemfixarna-address_23.cjs.entry.js.map} +1 -1
- package/dist/cjs/hemfixarna-components.cjs.js +2 -2
- package/dist/cjs/{index-d9e286dc.js → index-83c1daf2.js} +5 -1
- package/dist/{esm/index-9863db6c.js.map → cjs/index-83c1daf2.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/drag-drop.svg +3 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/hemfixarna-box/hemfixarna-box.js +1 -1
- package/dist/collection/components/hemfixarna-box/hemfixarna-box.js.map +1 -1
- package/dist/collection/components/hemfixarna-category.tsx/hemfixarna-category.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +4 -4
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.css +76 -0
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js +164 -0
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +1 -0
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js +1 -1
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +1 -1
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.js +3 -3
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.js.map +1 -1
- package/dist/collection/components/hemfixarna-service/hemfixarna-service.js +1 -1
- package/dist/collection/components/hemfixarna-service/hemfixarna-service.js.map +1 -1
- package/dist/collection/components/hemfixarna-start/hemfixarna-start.js.map +1 -1
- package/dist/collection/store/index.js +1 -0
- package/dist/collection/store/index.js.map +1 -1
- package/dist/collection/types/index.js.map +1 -1
- package/dist/esm/{hemfixarna-address_22.entry.js → hemfixarna-address_23.entry.js} +173 -25
- package/dist/esm/{hemfixarna-address_22.entry.js.map → hemfixarna-address_23.entry.js.map} +1 -1
- package/dist/esm/hemfixarna-components.js +3 -3
- package/dist/esm/{index-9863db6c.js → index-1fd61928.js} +5 -1
- package/dist/{cjs/index-d9e286dc.js.map → esm/index-1fd61928.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/hemfixarna-components/assets/drag-drop.svg +3 -0
- package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
- package/dist/hemfixarna-components/{p-62a7c1a2.js → p-33d37833.js} +3 -3
- package/dist/hemfixarna-components/p-7ad71b65.entry.js +2 -0
- package/dist/types/components/hemfixarna-invoice/hemfixarna-invoice.d.ts +17 -0
- package/dist/types/components.d.ts +13 -0
- package/dist/types/store/index.d.ts +1 -0
- package/dist/types/types/index.d.ts +4 -0
- package/package.json +1 -1
- package/dist/hemfixarna-components/p-d5da3c5b.entry.js +0 -2
- /package/dist/hemfixarna-components/{p-62a7c1a2.js.map → p-33d37833.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-d5da3c5b.entry.js.map → p-7ad71b65.entry.js.map} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hemfixarna-service.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-service/hemfixarna-service.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;
|
1
|
+
{"version":3,"file":"hemfixarna-service.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-service/hemfixarna-service.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,aAAa,CAAC;AAOhC,MAAM,OAAO,iBAAiB;EAC5B,MAAM;IACJ,OAAO,CACL;MACE,cAAK,KAAK,CAAC,eAAe,CAAC,UAAU,CAAM;MAC3C,WAAK,KAAK,EAAC,gCAAgC;QACzC;UACE,UAAI,KAAK,EAAC,uBAAuB,IAC9B,KAAK,CAAC,eAAe,CAAC,QAAQ;aAC5B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACtD,GAAG,CAAC,CAAC,CAAC,EAAE;;YAAC,OAAA,CACR,sBAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAC,CAAC,CAAC,IAAa,CAAC,GAAG,mCAAK,CAAC,CAAC,IAAe,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,GAAmB,CACjH,CAAA;WAAA,CAAC,CACD,CACD;QACN,uBAAiB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,GAAI,CAC1C,CACF,CACP,CAAC;EACJ,CAAC;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\nimport state from '../../store';\nimport { Icon } from '../../types';\n\n@Component({\n tag: 'hemfixarna-service',\n shadow: false,\n})\nexport class HemfixarnaService {\n render() {\n return (\n <div>\n <h2>{state.selectedService.post_title}</h2>\n <div class=\"hemfixarna_categories--wrapper\">\n <div>\n <ul class=\"hemfixarna_categories\">\n {state.selectedService.products\n .sort((a, b) => (a.post_title < b.post_title ? -1 : 1))\n .map(p => (\n <hemfixarna-box post={p} icon={(p.icon as Icon).url ?? (p.icon as string)} postTitle={p.title}></hemfixarna-box>\n ))}\n </ul>\n </div>\n <hemfixarna-info list={state.options.trust} />\n </div>\n </div>\n );\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hemfixarna-start.js","sourceRoot":"","sources":["../../../src/components/hemfixarna-start/hemfixarna-start.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAA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gB,QAAQ,EAAE,CAAC,GAAmB,CAAC,CACnF;QACL,uBAAiB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,GAAI,CAC1C,CACF,CACP,CAAC,CAAC,CAAC,CACF;MACE,mCAAsB;MACtB,WAAK,KAAK,EAAC,gCAAgC;QACzC,UAAI,KAAK,EAAC,uBAAuB,IAC9B,IAAI,CAAC,IAAI,CAAC,QAAQ;WAChB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;WAC1C,GAAG,CAAC,CAAC,CAAC,EAAE;;UAAC,OAAA,CACR,sBAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAC,CAAC,CAAC,IAAa,CAAC,GAAG,mCAAK,CAAC,CAAC,IAAe,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,GAAmB,CAChH,CAAA;SAAA,CAAC,CACD;QACL,uBAAiB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,GAAI,CAC1C,CACF,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport state from '../../store';\nimport { Category, CustomerCategory, CustomerSubCategory, Icon } from '../../types';\n\n@Component({\n tag: 'hemfixarna-start',\n shadow: false,\n})\nexport class HemfixarnaGrid {\n @Prop() tree?: Category;\n @Prop() slug?: string;\n\n isMainCategory(category: CustomerCategory | CustomerSubCategory): category is CustomerCategory {\n return (category as CustomerCategory).show_products !== undefined;\n }\n\n render() {\n return state.customer ? (\n <div>\n <h2>{state.selectedCustomerCategory ? state.selectedCustomerCategory.name : 'Alla tjänster'}</h2>\n <div class=\"hemfixarna_categories--wrapper\">\n <ul class=\"hemfixarna_categories\">\n {state.selectedCustomerCategory\n ? this.isMainCategory(state.selectedCustomerCategory) && state.selectedCustomerCategory.sub_categories && !state.selectedCustomerCategory.show_products\n ? state.selectedCustomerCategory.sub_categories.map(c => <hemfixarna-box category={c}></hemfixarna-box>)\n : state.selectedCustomerCategory.products\n ? state.selectedCustomerCategory.products.map(c => <hemfixarna-box category={c.fields}></hemfixarna-box>)\n : null\n : state.customer.categories.map(c => <hemfixarna-box category={c}></hemfixarna-box>)}\n </ul>\n <hemfixarna-info list={state.options.trust} />\n </div>\n </div>\n ) : (\n <div>\n <h2>Alla tjänster</h2>\n <div class=\"hemfixarna_categories--wrapper\">\n <ul class=\"hemfixarna_categories\">\n {this.tree.sub_cats\n .sort((a, b) => (a.name < b.name ? -1 : 1))\n .map(c => (\n <hemfixarna-box post={c} icon={(c.icon as Icon).url ?? (c.icon as string)} postTitle={c.name}></hemfixarna-box>\n ))}\n </ul>\n <hemfixarna-info list={state.options.trust} />\n </div>\n </div>\n );\n }\n}\n"]}
|
@@ -20,6 +20,7 @@ const { state, onChange, } = createStore({
|
|
20
20
|
selectedCustomerCategory: null,
|
21
21
|
parentCategory: null,
|
22
22
|
creditSafeUser: null,
|
23
|
+
checkoutInvoice: false,
|
23
24
|
});
|
24
25
|
onChange('cart', cart => {
|
25
26
|
window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAgC7C,MAAM,EACJ,KAAK,EACL,QAAQ,GACT,GAGG,WAAW,CAAC;EACd,IAAI,EAAE,CAAC;EACP,YAAY,EAAE,CAAC;EACf,YAAY,EAAE,KAA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AQ,CAAC,UAAU,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,cAAc,mCAAI,EAAE,CAAA,EAAA,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EACxH,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;EACtE,IAAI,QAAQ,EAAE;IACZ,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC;IAChC,OAAO;GACR;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE,QAAQ,CAAC,EAAE;EAC9C,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,CAAC,EAAE,CAAC,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,CAAC;AAEH,eAAe,KAAK,CAAC","sourcesContent":["import { createStore } from '@stencil/store';\nimport { OnChangeHandler } from '@stencil/store/dist/types';\nimport { Business, CartItem, Category, Customer, CustomerCategory, CustomerSubCategory, 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 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 customer: Customer | null;\n selectedCustomerCategory: CustomerCategory | CustomerSubCategory | null;\n parentCategory: CustomerCategory | CustomerSubCategory;\n checkoutInvoice: 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 token: null,\n user: null,\n modal: null,\n rutOptions: null,\n rotOptions: null,\n customer: null,\n selectedCustomerCategory: null,\n parentCategory: null,\n creditSafeUser: null,\n checkoutInvoice: 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('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"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AA8KA,MAAM,CAAN,IAAY,QAQX;AARD,WAAY,QAAQ;EAClB,yBAAa,CAAA;EACb,+BAAmB,CAAA;EACnB,+BAAmB,CAAA;EACnB,uCAA2B,CAAA;EAC3B,iCAAqB,CAAA;EACrB,iCAAqB,CAAA;EACrB,yBAAa,CAAA;AACf,CAAC,EARW,QAAQ,KAAR,QAAQ,QAQnB;AAED,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;EACrB,oCAAqB,CAAA;EACrB,0CAA2B,CAAA;EAC3B,8CAA+B,CAAA;EAC/B,8CAA+B,CAAA;AACjC,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MAAM,CAAN,IAAY,WAEX;AAFD,WAAY,WAAW;EACrB,wCAAyB,CAAA;AAC3B,CAAC,EAFW,WAAW,KAAX,WAAW,QAEtB","sourcesContent":["type Icon = {\n url: string;\n};\n\ninterface Customer {\n ID: number;\n post_title: 'Byggmax';\n post_name: 'byggmax';\n post_type: 'customer';\n filter: 'raw';\n categories: CustomerCategory[];\n}\n\ninterface CustomerCategory {\n id: string;\n name: string;\n icon: string;\n show_products: boolean;\n products: { fields: Product }[] | false;\n sub_categories: CustomerSubCategory[] | false;\n}\n\ninterface CustomerSubCategory {\n id: string;\n name: string;\n icon: string;\n products: { fields: Product }[];\n parent: string;\n}\n\ninterface Part {\n ID: number;\n post_author: number;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0 | 1;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: number;\n filter: string;\n price: number;\n title: string;\n}\n\ninterface Product {\n ID: number;\n post_author: string;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n price: number;\n icon?: Icon | string;\n parts?: Array<Part>;\n list: Array<{ bullet: string }>;\n terms: string;\n terms_checkout: string;\n terms_show_checkbox: boolean;\n rut: boolean;\n rot: boolean;\n hide_start_fee: boolean;\n description: string;\n category: string;\n title: string;\n invoice: string;\n invoice_price: string;\n invoice_description: string;\n}\n\ninterface Service {\n ID: 41857;\n icon?: Icon | string;\n post_author: 34419;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: 'service';\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n products: Array<Product>;\n}\n\ninterface Category {\n count: number;\n description: string;\n name: string;\n icon?: Icon | string;\n parent: 0 | 1;\n slug: string;\n taxonomy: 'service_cat';\n term_group: 0 | 1;\n term_id: number;\n term_order: string;\n term_taxonomy_id: number;\n sub_cats?: Array<Category>;\n services?: Array<Service>;\n}\n\ninterface WpOptions {\n link: { title: string; url: string };\n trust: { trust_badge: string }[];\n thank_you_image: string;\n start_fee: number;\n terms: string;\n}\ninterface CartPart {\n id: number;\n amount: number;\n price: number;\n name: string;\n}\n\ninterface CartItem {\n id: number;\n price: number;\n name: string;\n amount: number;\n parts: CartPart[];\n rut: boolean;\n rot: boolean;\n start_fee: boolean;\n terms_checkout: string;\n icon?: Icon | string;\n}\n\nexport enum Business {\n kund = 'kund',\n byggmax = 'byggmax',\n skanska = 'skanska',\n string = 'string-furniture',\n hornbach = 'hornbach',\n forebygg = 'forebygg',\n doro = 'doro',\n}\n\nexport enum WidgetStyle {\n standard = 'standard',\n alternative = 'alternative',\n alternative_2 = 'alternative_2',\n alternative_3 = 'alternative_3',\n}\n\nexport enum TopCategory {\n byggmax = 'category/bygg',\n}\n\ninterface User {\n email: string;\n phone: string;\n ssn: string;\n firstName: string;\n lastName: string;\n street: string;\n zip: string;\n town: string;\n}\n\ninterface RutOptions {\n rut_start_fee_heading: string;\n rut_start_fee_text: string;\n rut_start_fee_text_secondary: string;\n}\n\ninterface RotOptions {\n rot_start_fee_heading: string;\n rot_start_fee_text: string;\n rot_start_fee_text_secondary: string;\n}\n\nexport type { CartItem, CartPart, Category, Customer, CustomerCategory, CustomerSubCategory, Icon, Part, Product, RotOptions, RutOptions, Service, User, WpOptions };\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { g as getRenderingRef, f as forceUpdate, r as registerInstance, h, a as getElement, F as Fragment, c as getAssetPath } from './index-
|
1
|
+
import { g as getRenderingRef, f as forceUpdate, r as registerInstance, h, a as getElement, F as Fragment, c as getAssetPath } from './index-1fd61928.js';
|
2
2
|
|
3
3
|
const appendToMap = (map, propName, value) => {
|
4
4
|
const items = map.get(propName);
|
@@ -212,6 +212,7 @@ const { state, onChange, } = createStore({
|
|
212
212
|
selectedCustomerCategory: null,
|
213
213
|
parentCategory: null,
|
214
214
|
creditSafeUser: null,
|
215
|
+
checkoutInvoice: false,
|
215
216
|
});
|
216
217
|
onChange('cart', cart => {
|
217
218
|
window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));
|
@@ -458,7 +459,7 @@ const HemfixarnaBox = class {
|
|
458
459
|
scrollToTop(el);
|
459
460
|
}
|
460
461
|
render() {
|
461
|
-
return this.category ? (h(Fragment, null, isProduct(this.category) ? (h("li", { onClick: () => this.setProduct() }, h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.post_name }), h("div", null, h("p", null, this.category.
|
462
|
+
return this.category ? (h(Fragment, null, isProduct(this.category) ? (h("li", { onClick: () => this.setProduct() }, h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.post_name }), h("div", null, h("p", null, this.category.title), !this.category.invoice ? h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.category), "kr") : null))) : (h("li", { onClick: () => (state.selectedCustomerCategory = this.category) }, h("img", { class: "hemfixarna_logo", height: 82, src: this.category.icon, alt: this.category.name }), h("div", null, h("p", null, this.category.name)))))) : (h("li", { onClick: () => this.setTaxonomy(this.post) }, this.post.icon && h("img", { class: "hemfixarna_logo", height: 82, src: this.icon, alt: this.postTitle }), h("div", null, h("p", null, this.postTitle), state.step === 3 && h("p", { class: "price" }, "Fr\u00E5n ", getProductPrice(this.post), "kr"))));
|
462
463
|
}
|
463
464
|
get el() { return getElement(this); }
|
464
465
|
};
|
@@ -588,7 +589,7 @@ const HemfixarnaCategory = class {
|
|
588
589
|
}
|
589
590
|
};
|
590
591
|
|
591
|
-
const base$
|
592
|
+
const base$2 = `${"https://hemfixarna.se"}/wp-json/headless` ;
|
592
593
|
async function fetchWithType(request, options) {
|
593
594
|
const response = await fetch(request, options);
|
594
595
|
const body = await response.json();
|
@@ -601,7 +602,7 @@ const getTaxonomy = async (endpoint) => {
|
|
601
602
|
const type = endpoint.split('/')[0];
|
602
603
|
const slug = endpoint.split('/')[1];
|
603
604
|
try {
|
604
|
-
const res = await fetch(`${base$
|
605
|
+
const res = await fetch(`${base$2}/${type}/${slug}`);
|
605
606
|
return await res.json();
|
606
607
|
}
|
607
608
|
catch (error) {
|
@@ -610,7 +611,7 @@ const getTaxonomy = async (endpoint) => {
|
|
610
611
|
};
|
611
612
|
const getCustomer = async (slug) => {
|
612
613
|
try {
|
613
|
-
const res = await fetch(`${base$
|
614
|
+
const res = await fetch(`${base$2}/customer/${slug}`);
|
614
615
|
return await res.json();
|
615
616
|
}
|
616
617
|
catch (error) {
|
@@ -619,7 +620,7 @@ const getCustomer = async (slug) => {
|
|
619
620
|
};
|
620
621
|
const getOptions = async () => {
|
621
622
|
try {
|
622
|
-
const res = await fetch(`${base$
|
623
|
+
const res = await fetch(`${base$2}/webcoptions`);
|
623
624
|
return (await res.json());
|
624
625
|
}
|
625
626
|
catch (error) {
|
@@ -628,7 +629,7 @@ const getOptions = async () => {
|
|
628
629
|
};
|
629
630
|
const getRut = async () => {
|
630
631
|
try {
|
631
|
-
const data = await fetchWithType(`${base$
|
632
|
+
const data = await fetchWithType(`${base$2}/rut`);
|
632
633
|
return data;
|
633
634
|
}
|
634
635
|
catch (error) {
|
@@ -637,7 +638,7 @@ const getRut = async () => {
|
|
637
638
|
};
|
638
639
|
const getRot = async () => {
|
639
640
|
try {
|
640
|
-
const res = await fetch(`${base$
|
641
|
+
const res = await fetch(`${base$2}/rot`);
|
641
642
|
return (await res.json());
|
642
643
|
}
|
643
644
|
catch (error) {
|
@@ -659,7 +660,7 @@ const getRot = async () => {
|
|
659
660
|
// }
|
660
661
|
const postOrder = async (data) => {
|
661
662
|
try {
|
662
|
-
const res = await fetch(`${base$
|
663
|
+
const res = await fetch(`${base$2}/weborder`, {
|
663
664
|
method: 'POST',
|
664
665
|
body: JSON.stringify(data),
|
665
666
|
headers: {
|
@@ -673,10 +674,10 @@ const postOrder = async (data) => {
|
|
673
674
|
}
|
674
675
|
};
|
675
676
|
|
676
|
-
const base = `${"https://hemfixarna.se"}/wp-json/felix` ;
|
677
|
+
const base$1 = `${"https://hemfixarna.se"}/wp-json/felix` ;
|
677
678
|
const postPerson = async (felixOrder) => {
|
678
679
|
try {
|
679
|
-
return await fetchWithType(`${base}/createperson`, {
|
680
|
+
return await fetchWithType(`${base$1}/createperson`, {
|
680
681
|
method: 'POST',
|
681
682
|
body: JSON.stringify(felixOrder),
|
682
683
|
headers: {
|
@@ -1012,14 +1013,14 @@ const HemfixarnaComponent = class {
|
|
1012
1013
|
return state.cart.reduce((acc, curr) => acc + curr.amount, 0);
|
1013
1014
|
}
|
1014
1015
|
render() {
|
1015
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
1016
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
1016
1017
|
const logo = getAssetPath(`./assets/hemfixarna.svg`);
|
1017
1018
|
const monteringLogo = getAssetPath(`./assets/montering.svg`);
|
1018
1019
|
const navBackground = ((_a = this.nav) === null || _a === void 0 ? void 0 : _a.background) ? getAssetPath(this.nav.background) : '';
|
1019
1020
|
const navLogo = ((_b = this.nav) === null || _b === void 0 ? void 0 : _b.logo) ? getAssetPath(this.nav.logo) : '';
|
1020
|
-
return (h("div", { class: `hemfixarna ${this.loadFromQuery ? 'hemfixarna_standalone' : ''}` }, this.loadFromQuery && !this.isDemo && this.nav ? (h("nav", { class: "hemfixarna_nav" }, h("div", null, h("div", { class: "hemfixarna_nav--logos" }, h("a", { href: this.nav.url, target: "_blank" }, h("img", { src: navLogo, alt: `${this.business} logo` })), h("a", { href: "https://hemfixarna.se/", target: "_blank" }, h("p", null, "I samarbete med:"), h("img", { src: logo, alt: "hemfixarna_logo", width: 104 }))), h("div", { class: "hemfixarna_nav--links" }, h("a", { href: this.nav.url, target: "_blank" }, "Till ", this.business), h("a", { href: "https://www.hemfixarna.se/", target: "_blank" }, "Till Hemfixarna")), h("img", { src: navBackground, alt: "nav_background" })))) : null, !this.loadFromQuery || this.isDemo ? (h("div", { class: `hemfixarna_box hemfixarna_box--${this.widgetStyle}` }, [WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) ? h("img", { src: monteringLogo, alt: "montering logo", width: 32, height: 32 }) : null, h("div", null, h("div", null, h("p", { onClick: () => this.openModal(), class: `pointer ${[WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) && state.selectedProduct ? 'underline' : ''}` }, ((_c = this.product) === null || _c === void 0 ? void 0 : _c.post_title) || ((_d = this.proppedProduct) === null || _d === void 0 ? void 0 : _d.post_title) || (h("span", null, "Montering", h("wbr", null), "/Installation ", (_f = (_e = state.selectedCustomerCategory) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : 'på plats', " - ", h("strong", { class: "underline" }, "se priser h\u00E4r"))), (this.product && ((_g = this.slug) === null || _g === void 0 ? void 0 : _g.includes('product'))) || this.proppedProduct ? (h("span", null, ' från', " ", h("strong", null, getProductPriceWithRotAndRut(this.proppedProduct || this.product), "kr"))) : null)), this.widgetStyle === WidgetStyle.standard ? h("img", { src: logo, width: 104 }) : null, this.widgetStyle === WidgetStyle.alternative ? (h("span", { class: "p-s" }, "Utf\u00F6rs av ", h("strong", null, "Hemfixarna"))) : null), [WidgetStyle.standard, WidgetStyle.alternative].includes(this.widgetStyle) ? (h("button", { onClick: () => this.openModal(), class: "hemfixarna_btn", style: {
|
1021
|
-
color: ((
|
1022
|
-
backgroundColor: ((
|
1021
|
+
return (h("div", { class: `hemfixarna ${this.loadFromQuery ? 'hemfixarna_standalone' : ''}` }, this.loadFromQuery && !this.isDemo && this.nav ? (h("nav", { class: "hemfixarna_nav" }, h("div", null, h("div", { class: "hemfixarna_nav--logos" }, h("a", { href: this.nav.url, target: "_blank" }, h("img", { src: navLogo, alt: `${this.business} logo` })), h("a", { href: "https://hemfixarna.se/", target: "_blank" }, h("p", null, "I samarbete med:"), h("img", { src: logo, alt: "hemfixarna_logo", width: 104 }))), h("div", { class: "hemfixarna_nav--links" }, h("a", { href: this.nav.url, target: "_blank" }, "Till ", this.business), h("a", { href: "https://www.hemfixarna.se/", target: "_blank" }, "Till Hemfixarna")), h("img", { src: navBackground, alt: "nav_background" })))) : null, !this.loadFromQuery || this.isDemo ? (h("div", { class: `hemfixarna_box hemfixarna_box--${this.widgetStyle}` }, [WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) ? h("img", { src: monteringLogo, alt: "montering logo", width: 32, height: 32 }) : null, h("div", null, h("div", null, h("p", { onClick: () => this.openModal(), class: `pointer ${[WidgetStyle.alternative_2, WidgetStyle.alternative_3].includes(this.widgetStyle) && state.selectedProduct ? 'underline' : ''}` }, ((_c = this.product) === null || _c === void 0 ? void 0 : _c.post_title) || ((_d = this.proppedProduct) === null || _d === void 0 ? void 0 : _d.post_title) || (h("span", null, "Montering", h("wbr", null), "/Installation ", (_f = (_e = state.selectedCustomerCategory) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : 'på plats', " - ", h("strong", { class: "underline" }, "se priser h\u00E4r"))), (this.product && ((_g = this.slug) === null || _g === void 0 ? void 0 : _g.includes('product'))) || (this.proppedProduct && !((_h = this.product) === null || _h === void 0 ? void 0 : _h.invoice) && !((_j = this.proppedProduct) === null || _j === void 0 ? void 0 : _j.invoice)) ? (h("span", null, ' från', " ", h("strong", null, getProductPriceWithRotAndRut(this.proppedProduct || this.product), "kr"))) : null, ((_k = this.product) === null || _k === void 0 ? void 0 : _k.invoice) || ((_l = this.proppedProduct) === null || _l === void 0 ? void 0 : _l.invoice) ? (h("span", null, ' - ', h("strong", { class: "underling" }, "se priser h\u00E4r"))) : null)), this.widgetStyle === WidgetStyle.standard ? h("img", { src: logo, width: 104 }) : null, this.widgetStyle === WidgetStyle.alternative ? (h("span", { class: "p-s" }, "Utf\u00F6rs av ", h("strong", null, "Hemfixarna"))) : null), [WidgetStyle.standard, WidgetStyle.alternative].includes(this.widgetStyle) ? (h("button", { onClick: () => this.openModal(), class: "hemfixarna_btn", style: {
|
1022
|
+
color: ((_m = this.buttonColor) === null || _m === void 0 ? void 0 : _m.startsWith('#')) || !((_o = this.buttonColor) === null || _o === void 0 ? void 0 : _o.length) ? this.buttonColor : `#${this.buttonColor}`,
|
1023
|
+
backgroundColor: ((_p = this.buttonBg) === null || _p === void 0 ? void 0 : _p.startsWith('#')) || !((_q = this.buttonBg) === null || _q === void 0 ? void 0 : _q.length) ? this.buttonBg : `#${this.buttonBg}`,
|
1023
1024
|
} }, "Best\u00E4ll h\u00E4r", this.getCartLength() > 0 && h("span", null, this.getCartLength()))) : null, WidgetStyle.alternative_2 === this.widgetStyle ? (h("div", { class: "hemfixarna_altbtn" }, h("strong", { class: "p-s" }, "Utf\u00F6rs av"), h("img", { src: logo, alt: "hemfixarna logo", width: 98 }))) : null)) : null, this.modal && (h("div", null, h("div", { class: `hemfixarna_modal ${this.showModal ? 'hemfixarna_modal--open' : ''}` }, state.modal && (h("div", { class: "hemfixarna_infomodal" }, state.modal.title && h("h2", null, state.modal.title), state.modal.text.map((t) => (h("p", { innerHTML: t }))), h("div", null, h("button", { onClick: () => (state.modal = null) }, "St\u00E4ng")))), (this.tree || state.customer) && (h("hemfixarna-breadcrumbs", { isDemo: this.isDemo, loadFromQuery: this.loadFromQuery, closeModal: () => this.closeModal(), tree: this.tree })), !state.customer || this.slugIsOldFormat(this.slug) ? (h("div", { class: `hemfixarna_content hemfixarna_content--${state.step}` }, state.step === 1 && this.tree && h("hemfixarna-start", { tree: this.tree }), state.step === 2 && state.selectedCategory && h("hemfixarna-category", null), state.step === 3 && state.selectedService && h("hemfixarna-service", null), state.step === 4 && state.selectedProduct && h("hemfixarna-product", null), state.step === 5 && h("hemfixarna-cart", { tree: this.tree }), state.step === 6 && h("hemfixarna-order", { tree: this.tree }))) : (h("div", { class: `hemfixarna_content hemfixarna_content--${state.step}` }, state.step < 4 && h("hemfixarna-start", null), state.step === 4 && state.selectedProduct && h("hemfixarna-product", null), state.step === 5 && h("hemfixarna-cart", { tree: this.tree }), state.step === 6 && h("hemfixarna-order", { tree: this.tree })))), !this.isDemo ? h("div", { class: `hemfixarna_backdrop ${this.showModal ? 'hemfixarna_backdrop--open' : ''}` }) : null))));
|
1024
1025
|
}
|
1025
1026
|
static get assetsDirs() { return ["assets"]; }
|
@@ -1078,7 +1079,7 @@ const MyComponent$6 = class {
|
|
1078
1079
|
// Your color accessibility logic here
|
1079
1080
|
}
|
1080
1081
|
getTopLevelCategory() {
|
1081
|
-
switch ("
|
1082
|
+
switch ("kund") {
|
1082
1083
|
case Business.byggmax:
|
1083
1084
|
return TopCategory.byggmax;
|
1084
1085
|
default:
|
@@ -1108,14 +1109,14 @@ const MyComponent$6 = class {
|
|
1108
1109
|
}
|
1109
1110
|
}
|
1110
1111
|
else {
|
1111
|
-
const customer = await getCustomer("
|
1112
|
+
const customer = await getCustomer("kund");
|
1112
1113
|
if (customer.code !== 'not_found' && customer) {
|
1113
1114
|
this.customer = customer;
|
1114
1115
|
}
|
1115
1116
|
}
|
1116
1117
|
}
|
1117
1118
|
getExample() {
|
1118
|
-
return `<hemfixarna-${"
|
1119
|
+
return `<hemfixarna-${"kund"}${this.selectedSlug ? ` slug="${this.selectedSlug}" ` : ''}${this.selectedID ? ` id="${this.selectedID}" ` : ''} ${this.widgetStyle === WidgetStyle.standard ? '' : `widgetStyle="${this.widgetStyle}"`} ${this.buttonColor.length ? `buttonColor="${this.buttonColor}"` : ''} ${this.buttonBg.length ? `buttonBg="${this.buttonBg}"` : ''}></hemfixarna-${"kund"}>`;
|
1119
1120
|
}
|
1120
1121
|
copyExample() {
|
1121
1122
|
navigator.clipboard.writeText(this.getExample());
|
@@ -1140,7 +1141,7 @@ const MyComponent$6 = class {
|
|
1140
1141
|
}
|
1141
1142
|
render() {
|
1142
1143
|
const copy = getAssetPath(`./assets/copy.png`);
|
1143
|
-
return (h("div", null, h("div", null, h("div", { onClick: () => this.copyExample(), class: "hemfixarna_example" }, h("p", null, this.getExample()), h("img", { src: copy, height: 20 }), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText)), "
|
1144
|
+
return (h("div", null, h("div", null, h("div", { onClick: () => this.copyExample(), class: "hemfixarna_example" }, h("p", null, this.getExample()), h("img", { src: copy, height: 20 }), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText)), "kund" === Business.byggmax && (h("hemfixarna-byggmax", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, forceOldTree: Boolean(process.env.FORCE_OLD_TREE), slug: this.selectedSlug, id: this.selectedID })), "kund" === Business.skanska && (h("hemfixarna-skanska", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.string && (h("hemfixarna-string-furniture", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.hornbach && (h("hemfixarna-hornbach", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.forebygg && (h("hemfixarna-forebygg", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.doro && (h("hemfixarna-doro", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), "kund" === Business.kund && (h("hemfixarna-kund", { buttonColor: this.buttonColor, buttonBg: this.buttonBg, widgetStyle: this.widgetStyle, id: this.selectedID })), h("div", { class: "hemfixarna_install" }, h("div", { onClick: () => this.copyCdn(), class: "hemfixarna_example" }, h("p", null, this.cdnLink), h("span", { class: "hemfixarna_example--tooltip" }, this.tooltipText), h("img", { src: copy, height: 20 }))), h("div", { class: "hemfixarna_widgetstyles" }, h("h5", null, "Widget styles"), h("div", null, Object.values(WidgetStyle).map(style => (h("label", { key: style }, h("input", { type: "radio", value: style, checked: this.widgetStyle === style, onChange: () => (this.widgetStyle = style) }), style)))), h("div", null, h("div", null, h("h5", null, "Button background color"), h("input", { type: "text", value: this.buttonBg, onInput: e => (this.buttonBg = e.target.value) })), h("div", null, h("h5", null, "Button text color"), h("input", { type: "text", value: this.buttonColor, onInput: e => (this.buttonColor = e.target.value) })))), h("span", null, "Write an hexa code no # needed"), this.colorAccessibility ? (h("div", null, h("h5", null, "Tillg\u00E4nglighetsrapport"), h("div", null, h("strong", null, "Liten text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.small) } }, this.colorAccessibility.small), h("br", null), h("strong", null, "Fet text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.bold) } }, this.colorAccessibility.bold), h("br", null), h("strong", null, "Stor text:"), h("span", { style: { color: this.getColor(this.colorAccessibility.large) } }, this.colorAccessibility.large), h("br", null), h("strong", null, "Kontrastf\u00F6rh\u00E5llande:"), " ", this.colorAccessibility.contrast))) : null), h("ul", { class: "hemfixarna_categories" }, this.customer ? (h("div", null, this.customer.categories.map(c => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, c.name), h("span", null, `c-${c.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${c.id}`) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = `c-${c.id}`) }, "Ladda kategori"))), c.show_products && c.products ? (h("ul", null, c.products.map(p => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, h("div", null, h("p", null, p.fields.post_title), h("span", null, p.fields.ID)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt")))))))) : (h("ul", null, c.sub_categories &&
|
1144
1145
|
c.sub_categories.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.name), h("span", null, `c-${sc.id}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`c-${sc.id}`) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = `c-${sc.id}`) }, "Ladda kategori"))), h("ul", null, sc.products.map(p => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_product--label" }, h("div", null, h("p", null, p.fields.post_title), h("span", null, p.fields.ID)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(String(p.fields.ID)) }, "Kopiera ID"), h("button", { onClick: () => (this.selectedID = String(p.fields.ID)) }, "Ladda produkt"))))))))))))))))) : this.tree ? (h("div", null, this.tree.sub_cats.map(c => (h("li", null, h("div", { class: "hemfixarna_categories--label hemfixarna_categories--label--big" }, h("div", null, h("p", null, c.name), h("span", null, `category/${c.slug}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`category/${c.slug}`) }, "Kopiera slug"), h("button", { onClick: () => (this.selectedSlug = `category/${c.slug}`) }, "Ladda kategori"))), h("ul", null, c.services.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.post_title), h("span", null, `service/${sc.post_name}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`service/${sc.post_name}`) }, "Kopiera slug"), h("button", { onClick: () => (this.selectedSlug = `service/${sc.post_name}`) }, "Ladda kategori"))), h("ul", null, sc.products.map(sc => (h("li", null, h("div", { class: "hemfixarna_categories--label" }, h("div", null, h("p", null, sc.post_title), h("span", null, `product/${sc.post_name}`)), h("div", null, h("button", { onClick: () => navigator.clipboard.writeText(`product/${sc.post_name}`) }, "Kopiera slug"), h("button", { onClick: () => (this.selectedSlug = `product/${sc.post_name}`) }, "Ladda kategori")))))))))))))))) : null)));
|
1145
1146
|
}
|
1146
1147
|
static get watchers() { return {
|
@@ -1946,6 +1947,153 @@ const HemfixarnaInfo = class {
|
|
1946
1947
|
}
|
1947
1948
|
};
|
1948
1949
|
|
1950
|
+
const hemfixarnaInvoiceCss = ":host .invoice{gap:16px;display:grid}:host .invoice form>span{text-align:center;padding:16px 0}:host .invoice img{right:unset;left:unset;position:initial;transform:none}:host .invoice label{cursor:pointer;font-size:14px;display:flex;align-items:flex-start;padding:16px 0}:host .invoice label input{margin:0 5px 0 0;accent-color:#ea662c}:host .invoice-preview{display:flex;gap:4px}:host .invoice-preview div{position:relative}:host .invoice-preview div button{position:absolute;top:0;right:0;padding:0}:host .invoice-preview div button img{width:24px;height:24px}:host .invoice-preview div>img{width:100px;height:80px;object-fit:cover}:host .invoice input[type=email],:host .invoice input[type=tel],:host .invoice textarea{padding:16px;border:1px solid #fcd9c9;font-size:16px}:host .invoice textarea{resize:none;height:200px;font-family:\"Inter\", sans-serif}:host .invoice div:has(>input[type=file]){display:flex;align-items:center;justify-content:center;cursor:pointer;background:#fff;border:1px solid #fcd9c9;padding:32px 16px;gap:16px}:host .invoice div:has(>input[type=file]) span{color:#000;font-size:12px}:host .invoice input[type=file]{display:none}";
|
1951
|
+
|
1952
|
+
const base = `${"https://hemfixarna.se"}/wp-json/headless` ;
|
1953
|
+
const HemfixarnaInvoice = class {
|
1954
|
+
constructor(hostRef) {
|
1955
|
+
registerInstance(this, hostRef);
|
1956
|
+
this.formError = null;
|
1957
|
+
this.displayImages = [];
|
1958
|
+
this.formImages = [];
|
1959
|
+
this.formState = 'initial';
|
1960
|
+
}
|
1961
|
+
isValidEmail(email) {
|
1962
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
1963
|
+
return emailRegex.test(email);
|
1964
|
+
}
|
1965
|
+
componentDidRender() {
|
1966
|
+
const form = this.el.querySelector('form');
|
1967
|
+
if (form) {
|
1968
|
+
form.addEventListener('input', () => {
|
1969
|
+
this.formError = null;
|
1970
|
+
});
|
1971
|
+
}
|
1972
|
+
}
|
1973
|
+
disconnectedCallback() {
|
1974
|
+
const form = this.el.querySelector('form');
|
1975
|
+
if (form) {
|
1976
|
+
form.removeEventListener('input', () => {
|
1977
|
+
this.formError = null;
|
1978
|
+
});
|
1979
|
+
}
|
1980
|
+
}
|
1981
|
+
async submit(e) {
|
1982
|
+
var _a;
|
1983
|
+
e.preventDefault();
|
1984
|
+
this.formState = 'loading';
|
1985
|
+
this.formError = null;
|
1986
|
+
const form = e.currentTarget.elements;
|
1987
|
+
const values = {
|
1988
|
+
description: form.descriptionInput.value.length ? form.descriptionInput.value : null,
|
1989
|
+
email: form.emailInput.value.length ? form.emailInput.value : null,
|
1990
|
+
tel: form.telInput.value.length ? form.telInput.value : null,
|
1991
|
+
terms: (_a = form.termsInput) === null || _a === void 0 ? void 0 : _a.checked,
|
1992
|
+
};
|
1993
|
+
if (!values.description) {
|
1994
|
+
this.formError = 'Vänligen fyll i formulärtexten';
|
1995
|
+
this.formState = 'initial';
|
1996
|
+
return;
|
1997
|
+
}
|
1998
|
+
if (!values.email || !this.isValidEmail(values.email)) {
|
1999
|
+
this.formError = 'Vänligen ange en giltig e-postadress';
|
2000
|
+
this.formState = 'initial';
|
2001
|
+
return;
|
2002
|
+
}
|
2003
|
+
if (!values.tel) {
|
2004
|
+
this.formError = 'Vänligen ange ditt telefonnummer';
|
2005
|
+
this.formState = 'initial';
|
2006
|
+
return;
|
2007
|
+
}
|
2008
|
+
if (state.selectedProduct.terms_show_checkbox && !values.terms) {
|
2009
|
+
this.formError = 'Vänligen acceptera villkoren';
|
2010
|
+
this.formState = 'initial';
|
2011
|
+
return;
|
2012
|
+
}
|
2013
|
+
const formData = new FormData();
|
2014
|
+
formData.append('text', values.description);
|
2015
|
+
formData.append('email', values.email);
|
2016
|
+
formData.append('tel', values.tel);
|
2017
|
+
formData.append('customer', state.business);
|
2018
|
+
this.formImages.forEach(file => {
|
2019
|
+
formData.append('images[]', file);
|
2020
|
+
});
|
2021
|
+
formData.append('product', JSON.stringify({
|
2022
|
+
title: state.selectedProduct.post_title,
|
2023
|
+
amount: 1,
|
2024
|
+
has_rut: state.selectedProduct.rut,
|
2025
|
+
has_rot: state.selectedProduct.rot,
|
2026
|
+
ID: state.selectedProduct.ID,
|
2027
|
+
parts: [],
|
2028
|
+
}));
|
2029
|
+
try {
|
2030
|
+
const res = await fetch(`${base}/saveinvoiceproduct`, {
|
2031
|
+
method: 'POST',
|
2032
|
+
body: formData,
|
2033
|
+
});
|
2034
|
+
const { response } = await res.json();
|
2035
|
+
if (response.code === 200) {
|
2036
|
+
state.checkoutInvoice = true;
|
2037
|
+
state.step = 6;
|
2038
|
+
}
|
2039
|
+
else {
|
2040
|
+
this.formError = 'Vi kan inte ta emot din beställning just nu';
|
2041
|
+
this.formState = 'initial';
|
2042
|
+
}
|
2043
|
+
}
|
2044
|
+
catch (error) {
|
2045
|
+
this.formError = 'Vi kan inte ta emot din beställning just nu';
|
2046
|
+
this.formState = 'initial';
|
2047
|
+
}
|
2048
|
+
}
|
2049
|
+
handleImageDrop(e) {
|
2050
|
+
e.preventDefault();
|
2051
|
+
const files = e.dataTransfer.files;
|
2052
|
+
for (let i = 0; i < files.length; i++) {
|
2053
|
+
const file = files[i];
|
2054
|
+
if (file.type.startsWith('image/')) {
|
2055
|
+
const reader = new FileReader();
|
2056
|
+
reader.onload = () => {
|
2057
|
+
this.displayImages = [...this.displayImages, reader.result];
|
2058
|
+
this.formImages = [...this.formImages, file];
|
2059
|
+
};
|
2060
|
+
reader.readAsDataURL(file);
|
2061
|
+
}
|
2062
|
+
}
|
2063
|
+
}
|
2064
|
+
handleFileInputChange(e) {
|
2065
|
+
e.preventDefault();
|
2066
|
+
const files = e.target.files;
|
2067
|
+
for (let i = 0; i < files.length; i++) {
|
2068
|
+
const file = files[i];
|
2069
|
+
if (file.type.startsWith('image/')) {
|
2070
|
+
const reader = new FileReader();
|
2071
|
+
reader.onload = () => {
|
2072
|
+
this.displayImages = [...this.displayImages, reader.result];
|
2073
|
+
this.formImages = [...this.formImages, file];
|
2074
|
+
};
|
2075
|
+
reader.readAsDataURL(file);
|
2076
|
+
}
|
2077
|
+
}
|
2078
|
+
}
|
2079
|
+
handleImageClick() {
|
2080
|
+
this.el.querySelector('.hemfixarna-file-upload').click();
|
2081
|
+
}
|
2082
|
+
preventDragOver(e) {
|
2083
|
+
e.preventDefault();
|
2084
|
+
}
|
2085
|
+
removeImage(index) {
|
2086
|
+
this.displayImages = this.displayImages.filter((_, i) => i !== index);
|
2087
|
+
this.formImages = this.formImages.filter((_, i) => i !== index);
|
2088
|
+
}
|
2089
|
+
render() {
|
2090
|
+
const upload = getAssetPath(`./assets/drag-drop.svg`);
|
2091
|
+
return (h("div", { class: "invoice" }, h("p", null, state.selectedProduct.invoice_description), h("form", { onSubmit: e => this.submit(e) }, h("textarea", { name: "descriptionInput", placeholder: "Beskriv ditt \u00E4rende" }), h("div", { role: "button", "aria-label": "upload image", onDragOver: e => this.preventDragOver(e), onDrop: e => this.handleImageDrop(e), onClick: () => this.handleImageClick() }, h("img", { src: upload, alt: "hemfixarna_logo", width: 24 }), h("div", null, h("p", null, "Bifoga ev bilder"), h("span", null, "(dra bilder hit)")), h("input", { onChange: e => this.handleFileInputChange(e), class: "hemfixarna-file-upload", accept: "image/*", type: "file", multiple: true, name: "fileInput" })), h("div", { class: "invoice-preview" }, this.displayImages.map((img, i) => (h("div", { key: i }, h("img", { src: img, alt: "uploaded image" }), h("button", { onClick: () => this.removeImage(i) }, h("img", { src: getAssetPath(`./assets/close.svg`), alt: "close" })))))), h("input", { placeholder: "E-post", type: "email", name: "emailInput" }), h("input", { placeholder: "Telefonnummer", type: "tel", name: "telInput" }), state.selectedProduct.terms_show_checkbox ? (h("label", null, h("input", { type: "checkbox", name: "termsInput" }), state.selectedProduct.terms)) : null, this.formError ? h("span", null, this.formError) : null, h("input", { type: "submit", value: this.formState === 'loading' ? 'Skickar' : 'Kontakta mig' }))));
|
2092
|
+
}
|
2093
|
+
get el() { return getElement(this); }
|
2094
|
+
};
|
2095
|
+
HemfixarnaInvoice.style = hemfixarnaInvoiceCss;
|
2096
|
+
|
1949
2097
|
const MyComponent$2 = class {
|
1950
2098
|
constructor(hostRef) {
|
1951
2099
|
registerInstance(this, hostRef);
|
@@ -1964,7 +2112,7 @@ const HemfixarnaOrder = class {
|
|
1964
2112
|
constructor(hostRef) {
|
1965
2113
|
registerInstance(this, hostRef);
|
1966
2114
|
this.render = () => {
|
1967
|
-
return (h("div", { style: { background: `url(${state.options.thank_you_image})` }, class: "hemfixarna_order" }, h("div", null), h("div", null, h("h2", null,
|
2115
|
+
return (h("div", { style: { background: `url(${state.options.thank_you_image})` }, class: "hemfixarna_order" }, h("div", null), h("div", null, h("h2", null, state.checkoutInvoice ? 'Tack för din förfrågan' : 'Tack för din bokning'), state.checkoutInvoice ? h("p", null, "Vi \u00E5terkommer inom kort till dig p\u00E5 angivet telefonnummer eller epost") : null, state.checkoutInvoice ? h("div", null) : h("hemfixarna-orderrows", { tree: this.tree, cart: false }), h("span", { onClick: () => this.resetShop() }, h("button", null, "G\u00F6r en ny bokning")), h("hemfixarna-info", { list: [
|
1968
2116
|
{ trust_badge: 'Du kommer bli kontaktad av en Hemfixare för bokning av tid.' },
|
1969
2117
|
{ trust_badge: 'När jobbet är klart kommer du få en faktura med RUT/ROT-avdrag.' },
|
1970
2118
|
] }))));
|
@@ -2145,11 +2293,11 @@ const HemfixarnaProduct = class {
|
|
2145
2293
|
const checked = getAssetPath(`./assets/checked.svg`);
|
2146
2294
|
const plus = getAssetPath(`./assets/plus.svg`);
|
2147
2295
|
const minus = getAssetPath(`./assets/minus.svg`);
|
2148
|
-
return (h("div", { class: "hemfixarna_product" }, h("div", { class: "hemfixarna_product--top" }, state.selectedProduct.icon && (h("img", { width: 80, src: (_a = state.selectedProduct.icon.url) !== null && _a !== void 0 ? _a : state.selectedProduct.icon, alt: state.selectedProduct.post_title })), h("div", null, h("h1", null, state.selectedProduct.post_title), h("h2", null,
|
2296
|
+
return (h("div", { class: "hemfixarna_product" }, h("div", { class: "hemfixarna_product--top" }, state.selectedProduct.icon && (h("img", { width: 80, src: (_a = state.selectedProduct.icon.url) !== null && _a !== void 0 ? _a : state.selectedProduct.icon, alt: state.selectedProduct.post_title })), h("div", null, h("h1", null, state.selectedProduct.post_title), !state.selectedProduct.invoice ? h("h2", null, getProductPrice(state.selectedProduct), " kr/st") : h("h2", null, state.selectedProduct.invoice_price))), h("div", { class: "hemfixarna_product--grid" }, h("div", { class: "hemfixarna_product--left" }, ((_b = state.selectedProduct.list) === null || _b === void 0 ? void 0 : _b.length) && (h("ul", { class: "hemfixarna_features" }, state.selectedProduct.list.map(l => (h("li", { key: l.bullet }, h("img", { src: checked, alt: "checked" }), h("p", null, l.bullet)))))), state.selectedProduct.description && (h("p", { onClick: () => (this.hideDescription = false), class: `hemfixarna_description ${this.hideDescription ? 'hemfixarna_description--hidden' : ''}`, innerHTML: state.selectedProduct.description }))), h("div", { class: "hemfixarna_product--right" }, state.selectedProduct.invoice ? (h("hemfixarna-invoice", null)) : (h(Fragment, null, h("ul", null, h("li", { class: "hemfixarna_product--item" }, h("div", null, h("p", null, "Antal ", state.selectedProduct.post_title), h("p", { class: "hemfixarna_product--price" }, getProductPrice(state.selectedProduct), "kr/st")), h("div", { class: "hemfixarna_counter" }, h("img", { class: `${this.getAmount() === 0 ? 'disabled' : ''}`, src: minus, onClick: () => this.removeProduct() }), h("span", null, this.getAmount()), h("img", { src: plus, onClick: () => this.addProduct() }))), ((_c = state.selectedProduct.parts) === null || _c === void 0 ? void 0 : _c.length) &&
|
2149
2297
|
state.selectedProduct.parts.map(p => {
|
2150
2298
|
var _a;
|
2151
2299
|
return (h("li", { class: "hemfixarna_part" }, h("div", null, h("p", null, (_a = p.title) !== null && _a !== void 0 ? _a : p.post_title), h("p", { class: "hemfixarna_product--price" }, getPartPrice(p, state.selectedProduct), "kr/st")), h("div", { class: "hemfixarna_counter" }, h("img", { class: `${this.getPartAmount(p.ID) === 0 ? 'disabled' : ''}`, src: minus, onClick: () => this.removePart(p) }), h("span", null, this.getPartAmount(p.ID)), h("img", { class: `${this.getAmount() === 0 ? 'disabled' : ''}`, src: plus, onClick: () => this.addPart(p) }))));
|
2152
|
-
})), h("h4", { class: "hemfixarna_product--total" }, "Totalt ", this.getTotalPrice(), " kr"), h("button", { onClick: () => this.goToCart(), class: `hemfixarna_buy ${this.getAmount() === 0 ? 'disabled' : ''}` }, "Forts\u00E4tt"), !state.selectedProduct.hide_start_fee && (state.selectedProduct.rot || state.selectedProduct.rut) && state.rutOptions && state.rotOptions && (h("p", { class: "hemfixarna_terms" }, h("strong", null, state.selectedProduct.rot ? state.rotOptions.rot_start_fee_heading : state.rutOptions.rut_start_fee_heading), h("br", null), h("span", { innerHTML: state.selectedProduct.rot ? state.rotOptions.rot_start_fee_text : state.rutOptions.rut_start_fee_text }))), state.options && h("hemfixarna-info", { list: state.options.trust })))));
|
2300
|
+
})), h("h4", { class: "hemfixarna_product--total" }, "Totalt ", this.getTotalPrice(), " kr"), h("button", { onClick: () => this.goToCart(), class: `hemfixarna_buy ${this.getAmount() === 0 ? 'disabled' : ''}` }, "Forts\u00E4tt"))), !state.selectedProduct.hide_start_fee && (state.selectedProduct.rot || state.selectedProduct.rut) && state.rutOptions && state.rotOptions && (h("p", { class: "hemfixarna_terms" }, h("strong", null, state.selectedProduct.rot ? state.rotOptions.rot_start_fee_heading : state.rutOptions.rut_start_fee_heading), h("br", null), h("span", { innerHTML: state.selectedProduct.rot ? state.rotOptions.rot_start_fee_text : state.rutOptions.rut_start_fee_text }))), state.options && h("hemfixarna-info", { list: state.options.trust })))));
|
2153
2301
|
}
|
2154
2302
|
get el() { return getElement(this); }
|
2155
2303
|
};
|
@@ -2163,7 +2311,7 @@ const HemfixarnaService = class {
|
|
2163
2311
|
.sort((a, b) => (a.post_title < b.post_title ? -1 : 1))
|
2164
2312
|
.map(p => {
|
2165
2313
|
var _a;
|
2166
|
-
return (h("hemfixarna-box", { post: p, icon: (_a = p.icon.url) !== null && _a !== void 0 ? _a : p.icon, postTitle: p.
|
2314
|
+
return (h("hemfixarna-box", { post: p, icon: (_a = p.icon.url) !== null && _a !== void 0 ? _a : p.icon, postTitle: p.title }));
|
2167
2315
|
}))), h("hemfixarna-info", { list: state.options.trust }))));
|
2168
2316
|
}
|
2169
2317
|
};
|
@@ -2228,6 +2376,6 @@ const MyComponent = class {
|
|
2228
2376
|
};
|
2229
2377
|
MyComponent.style = hemfixarnaStringCss;
|
2230
2378
|
|
2231
|
-
export { HemfixarnaAddress as hemfixarna_address, HemfixarnaBox as hemfixarna_box, HemfixarnaBreadcrumbs as hemfixarna_breadcrumbs, MyComponent$7 as hemfixarna_byggmax, HemfixarnaCart as hemfixarna_cart, HemfixarnaCategory as hemfixarna_category, HemfixarnaCheckout as hemfixarna_checkout, HemfixarnaComponent as hemfixarna_component, MyComponent$6 as hemfixarna_demo, MyComponent$5 as hemfixarna_doro, MyComponent$4 as hemfixarna_forebygg, HemfixarnaGetuser as hemfixarna_getuser, MyComponent$3 as hemfixarna_hornbach, HemfixarnaInfo as hemfixarna_info, MyComponent$2 as hemfixarna_kund, HemfixarnaOrder as hemfixarna_order, HemfixarnaOrderrows as hemfixarna_orderrows, HemfixarnaProduct as hemfixarna_product, HemfixarnaService as hemfixarna_service, MyComponent$1 as hemfixarna_skanska, HemfixarnaGrid as hemfixarna_start, MyComponent as hemfixarna_string_furniture };
|
2379
|
+
export { HemfixarnaAddress as hemfixarna_address, HemfixarnaBox as hemfixarna_box, HemfixarnaBreadcrumbs as hemfixarna_breadcrumbs, MyComponent$7 as hemfixarna_byggmax, HemfixarnaCart as hemfixarna_cart, HemfixarnaCategory as hemfixarna_category, HemfixarnaCheckout as hemfixarna_checkout, HemfixarnaComponent as hemfixarna_component, MyComponent$6 as hemfixarna_demo, MyComponent$5 as hemfixarna_doro, MyComponent$4 as hemfixarna_forebygg, HemfixarnaGetuser as hemfixarna_getuser, MyComponent$3 as hemfixarna_hornbach, HemfixarnaInfo as hemfixarna_info, HemfixarnaInvoice as hemfixarna_invoice, MyComponent$2 as hemfixarna_kund, HemfixarnaOrder as hemfixarna_order, HemfixarnaOrderrows as hemfixarna_orderrows, HemfixarnaProduct as hemfixarna_product, HemfixarnaService as hemfixarna_service, MyComponent$1 as hemfixarna_skanska, HemfixarnaGrid as hemfixarna_start, MyComponent as hemfixarna_string_furniture };
|
2232
2380
|
|
2233
|
-
//# sourceMappingURL=hemfixarna-
|
2381
|
+
//# sourceMappingURL=hemfixarna-address_23.entry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"hemfixarna-address.hemfixarna-box.hemfixarna-breadcrumbs.hemfixarna-byggmax.hemfixarna-cart.hemfixarna-category.hemfixarna-checkout.hemfixarna-component.hemfixarna-demo.hemfixarna-doro.hemfixarna-forebygg.hemfixarna-getuser.hemfixarna-hornbach.hemfixarna-info.hemfixarna-kund.hemfixarna-order.hemfixarna-orderrows.hemfixarna-product.hemfixarna-service.hemfixarna-skanska.hemfixarna-start.hemfixarna-string-furniture.entry.js","mappings":"
|
1
|
+
{"file":"hemfixarna-address.hemfixarna-box.hemfixarna-breadcrumbs.hemfixarna-byggmax.hemfixarna-cart.hemfixarna-category.hemfixarna-checkout.hemfixarna-component.hemfixarna-demo.hemfixarna-doro.hemfixarna-forebygg.hemfixarna-getuser.hemfixarna-hornbach.hemfixarna-info.hemfixarna-invoice.hemfixarna-kund.hemfixarna-order.hemfixarna-orderrows.hemfixarna-product.hemfixarna-service.hemfixarna-skanska.hemfixarna-start.hemfixarna-string-furniture.entry.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
2
|
-
export { s as setNonce } from './index-
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-1fd61928.js';
|
2
|
+
export { s as setNonce } from './index-1fd61928.js';
|
3
3
|
|
4
4
|
/*
|
5
5
|
Stencil Client Patch Browser v3.2.1 | MIT Licensed | https://stenciljs.com
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
17
17
|
};
|
18
18
|
|
19
19
|
patchBrowser().then(options => {
|
20
|
-
return bootstrapLazy([["hemfixarna-
|
20
|
+
return bootstrapLazy([["hemfixarna-address_23",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"colorAccessibility":[32]}],[1,"hemfixarna-byggmax",{"slug":[1],"id":[1],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"load-from-query"],"customer":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"tree":[32]}],[1,"hemfixarna-doro",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-forebygg",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-hornbach",{"id":[1],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-kund",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-skanska",{"id":[1],"customer":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-string-furniture",{"id":[1],"loadFromQuery":[4,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}],[1,"hemfixarna-component",{"slug":[1],"id":[1],"business":[1],"topCategory":[1,"top-category"],"forceOldTree":[4,"force-old-tree"],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"],"widgetStyle":[1,"widget-style"],"nav":[16],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"tree":[32],"product":[32],"proppedProduct":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart",{"tree":[16]}],[0,"hemfixarna-category"],[0,"hemfixarna-order",{"tree":[16]}],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-service"],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"tree":[16],"closeModal":[16],"loadFromQuery":[4,"load-from-query"],"isDemo":[4,"is-demo"]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32]}],[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],"tree":[16]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info",{"list":[16]}]]]], options);
|
21
21
|
});
|
22
22
|
|
23
23
|
//# sourceMappingURL=hemfixarna-components.js.map
|
@@ -1016,7 +1016,11 @@ const postUpdateComponent = (hostRef) => {
|
|
1016
1016
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
1017
1017
|
const elm = hostRef.$hostElement$;
|
1018
1018
|
const endPostUpdate = createTime('postUpdate', tagName);
|
1019
|
+
const instance = hostRef.$lazyInstance$ ;
|
1019
1020
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
1021
|
+
{
|
1022
|
+
safeCall(instance, 'componentDidRender');
|
1023
|
+
}
|
1020
1024
|
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
1021
1025
|
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
1022
1026
|
{
|
@@ -1618,4 +1622,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1618
1622
|
|
1619
1623
|
export { Fragment as F, getElement as a, bootstrapLazy as b, getAssetPath as c, forceUpdate as f, getRenderingRef as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
1620
1624
|
|
1621
|
-
//# sourceMappingURL=index-
|
1625
|
+
//# sourceMappingURL=index-1fd61928.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"index-
|
1
|
+
{"file":"index-1fd61928.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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