@foxy.io/elements 1.14.0-beta.10 → 1.14.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  5. package/dist/cdn/foxy-attribute-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-form.js +1 -1
  7. package/dist/cdn/foxy-cancellation-form.js +1 -1
  8. package/dist/cdn/foxy-collection-page.js +1 -1
  9. package/dist/cdn/foxy-collection-pages.js +1 -1
  10. package/dist/cdn/foxy-custom-field-card.js +1 -1
  11. package/dist/cdn/foxy-custom-field-form.js +1 -1
  12. package/dist/cdn/foxy-customer-card.js +1 -1
  13. package/dist/cdn/foxy-customer-form.js +1 -1
  14. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  15. package/dist/cdn/foxy-customer-portal.js +18 -15
  16. package/dist/cdn/foxy-customer.js +1 -1
  17. package/dist/cdn/foxy-customers-table.js +1 -1
  18. package/dist/cdn/foxy-discount-card.js +1 -1
  19. package/dist/cdn/foxy-donation.js +1 -1
  20. package/dist/cdn/foxy-email-template-form.js +1 -1
  21. package/dist/cdn/foxy-error-entry-card.js +1 -1
  22. package/dist/cdn/foxy-form-dialog.js +1 -1
  23. package/dist/cdn/foxy-i18n.js +1 -1
  24. package/dist/cdn/foxy-items-form.js +1 -1
  25. package/dist/cdn/foxy-payment-card.js +1 -1
  26. package/dist/cdn/foxy-payment-method-card.js +1 -1
  27. package/dist/cdn/foxy-query-builder.js +1 -1
  28. package/dist/cdn/foxy-sign-in-form.js +1 -1
  29. package/dist/cdn/foxy-spinner.js +1 -1
  30. package/dist/cdn/foxy-subscription-card.js +1 -1
  31. package/dist/cdn/foxy-subscription-form.js +2 -2
  32. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  33. package/dist/cdn/foxy-table.js +1 -1
  34. package/dist/cdn/foxy-tax-card.js +1 -1
  35. package/dist/cdn/foxy-tax-form.js +1 -1
  36. package/dist/cdn/foxy-template-config-form.js +1 -1
  37. package/dist/cdn/foxy-template-form.js +1 -1
  38. package/dist/cdn/foxy-transaction-card.js +1 -1
  39. package/dist/cdn/foxy-transactions-table.js +1 -1
  40. package/dist/cdn/foxy-user-form.js +1 -1
  41. package/dist/cdn/foxy-users-table.js +1 -1
  42. package/dist/cdn/{shared-4ba926ca.js → shared-05956f55.js} +1 -1
  43. package/dist/cdn/{shared-7007dedb.js → shared-05b473a7.js} +1 -1
  44. package/dist/cdn/{shared-da787055.js → shared-1177fd2a.js} +1 -1
  45. package/dist/cdn/{shared-c5ae5d33.js → shared-2b685624.js} +1 -1
  46. package/dist/cdn/{shared-d01035c5.js → shared-4168c6cd.js} +1 -1
  47. package/dist/cdn/{shared-d05c93a5.js → shared-5d1314d7.js} +1 -1
  48. package/dist/cdn/{shared-0f9809ab.js → shared-70631d0a.js} +1 -1
  49. package/dist/cdn/{shared-ca7c3b9a.js → shared-775b37f9.js} +1 -1
  50. package/dist/cdn/{shared-a3d2c48e.js → shared-8730c141.js} +1 -1
  51. package/dist/cdn/{shared-5d94bacb.js → shared-93f23978.js} +1 -1
  52. package/dist/cdn/{shared-007c4e34.js → shared-a94b7271.js} +1 -1
  53. package/dist/cdn/{shared-daf6b763.js → shared-bda600d6.js} +1 -1
  54. package/dist/cdn/{shared-b24377bf.js → shared-d3167239.js} +1 -1
  55. package/dist/cdn/shared-e36452b9.js +1 -0
  56. package/dist/cdn/{shared-31d03530.js → shared-f968379d.js} +7 -7
  57. package/dist/cdn/{shared-00070cc4.js → shared-fbeb1de3.js} +1 -1
  58. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.d.ts +1 -0
  59. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js +17 -8
  60. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js.map +1 -1
  61. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +11 -3
  62. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
  63. package/dist/elements/public/ItemsForm/private/Picture.d.ts +1 -0
  64. package/dist/elements/public/ItemsForm/private/Picture.js +2 -0
  65. package/dist/elements/public/ItemsForm/private/Picture.js.map +1 -1
  66. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +12 -4
  67. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
  68. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +20 -13
  69. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
  70. package/dist/mixins/themeable.js +10 -8
  71. package/dist/mixins/themeable.js.map +1 -1
  72. package/package.json +1 -1
  73. package/dist/cdn/shared-fe8a7aa2.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateConfigForm.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateConfigForm/TemplateConfigForm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,sCAAmC;AAEpD,OAAO,EAAuB,iBAAiB,EAAE,gCAA6B;AAE9E,OAAO,EAAqB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,2CAAwC;AAC3D,OAAO,EAAE,MAAM,EAAE,uCAAoC;AACrD,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,aAAa,EAAE,2BAAwB;AAChD,OAAO,EAAE,KAAK,EAAE,qCAAkC;AAClD,OAAO,EAAE,cAAc,EAAE,4CAAyC;AAElE,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAG7D,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,QAAQ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CAAC;;KAErD,CAAC;IACJ,CAAC;IAEO,cAAc,CAAC,IAAwB;QAC7C,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC;;;;;kBAKlC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC;wBACjB,IAAI,CAAC,CAAC,CAAC,2BAA2B,CAAC;mBACxC,IAAI,CAAC,oBAAoB,CAAC,MAAM;sBAC7B,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;sBACjE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;mBAChD,CAAC,GAAgB,EAAE,EAAE;YAC5B,MAAM,MAAM,GAAG,GAAG,CAAC,aAAgC,CAAC;YACpD,MAAM,SAAS,GAA+C;gBAC5D,GAAG,IAAI,CAAC,oBAAoB;gBAC5B,MAAM,EAAE,MAAM,CAAC,KAAK;aACrB,CAAC;YAEF,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;QACpF,CAAC;;;;UAID,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC;;KAE9C,CAAC;IACJ,CAAC;CACF","sourcesContent":["import * as logos from '../PaymentMethodCard/logos';\n\nimport { CheckboxChangeEvent, ChoiceChangeEvent } from '../../private/events';\nimport { Data, TemplateConfigJSON, Templates } from './types';\nimport { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { TemplateResult, html } from 'lit-html';\n\nimport { Checkbox } from '../../private/Checkbox/Checkbox';\nimport { Choice } from '../../private/Choice/Choice';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { CountriesList } from './CountriesList';\nimport { Group } from '../../private/Group/Group';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { PropertyDeclarations } from 'lit-element';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { TextAreaElement } from '@vaadin/vaadin-text-field/vaadin-text-area';\nimport { TextFieldElement } from '@vaadin/vaadin-text-field/vaadin-text-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { getDefaultJSON } from './defaults';\nimport { live } from 'lit-html/directives/live';\n\nconst NS = 'template-config-form';\nconst Base = ScopedElementsMixin(\n ResponsiveMixin(ConfigurableMixin(ThemeableMixin(TranslatableMixin(NucleonElement, NS))))\n);\n\n/**\n * Form element for creating or editing template configs (`fx:template_config`).\n *\n * @slot cart-type:before\n * @slot cart-type:after\n *\n * @slot foxycomplete:before\n * @slot foxycomplete:after\n *\n * @slot locations:before\n * @slot locations:after\n *\n * @slot hidden-fields:before\n * @slot hidden-fields:after\n *\n * @slot cards:before\n * @slot cards:after\n *\n * @slot checkout-type:before\n * @slot checkout-type:after\n *\n * @slot consent:before\n * @slot consent:after\n *\n * @slot fields:before\n * @slot fields:after\n *\n * @slot google-analytics:before\n * @slot google-analytics:after\n *\n * @slot segment-io:before\n * @slot segment-io:after\n *\n * @slot troubleshooting:before\n * @slot troubleshooting:after\n *\n * @slot custom-config:before\n * @slot custom-config:after\n *\n * @slot header:before\n * @slot header:after\n *\n * @slot custom-fields:before\n * @slot custom-fields:after\n *\n * @slot footer:before\n * @slot footer:after\n *\n * @element foxy-template-config-form\n * @since 1.14.0\n */\nexport class TemplateConfigForm extends Base<Data> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'vaadin-text-area': customElements.get('vaadin-text-area'),\n 'iron-icon': customElements.get('iron-icon'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n 'x-countries-list': CountriesList,\n 'x-checkbox': Checkbox,\n 'x-choice': Choice,\n 'x-group': Group,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n __addHiddenFieldInputValue: { attribute: false },\n countries: { type: String },\n regions: { type: String },\n };\n }\n\n templates: Templates = {};\n\n /** URI of the `fx:countries` hAPI resource. */\n countries = '';\n\n /** URI of the `fx:regions` hAPI resource. */\n regions = '';\n\n private __addHiddenFieldInputValue = '';\n\n render(): TemplateResult {\n const hidden = this.hiddenSelector;\n const json: TemplateConfigJSON = this.form.json ? JSON.parse(this.form.json) : getDefaultJSON();\n\n return html`\n <div class=\"relative\" aria-busy=${this.in('busy')} aria-live=\"polite\">\n <div\n class=${classMap({\n 'space-y-l transition-opacity': true,\n 'opacity-50': !this.in('idle'),\n })}\n >\n ${hidden.matches('cart-type', true) ? '' : this.__renderCartType(json)}\n ${hidden.matches('foxycomplete', true) ? '' : this.__renderFoxycomplete(json)}\n ${hidden.matches('locations', true) ? '' : this.__renderLocations(json)}\n ${hidden.matches('hidden-fields', true) ? '' : this.__renderHiddenFields(json)}\n ${hidden.matches('cards', true) ? '' : this.__renderCards(json)}\n ${hidden.matches('checkout-type', true) ? '' : this.__renderCheckoutType(json)}\n ${hidden.matches('consent', true) ? '' : this.__renderConsent(json)}\n ${hidden.matches('fields', true) ? '' : this.__renderFields(json)}\n ${hidden.matches('google-analytics', true) ? '' : this.__renderGoogleAnalytics(json)}\n ${hidden.matches('segment-io', true) ? '' : this.__renderSegmentIo(json)}\n ${hidden.matches('troubleshooting', true) ? '' : this.__renderTroubleshooting(json)}\n ${hidden.matches('custom-config', true) ? '' : this.__renderCustomConfig(json)}\n ${hidden.matches('header', true) ? '' : this.__renderHeader(json)}\n ${hidden.matches('custom-fields', true) ? '' : this.__renderCustomFields(json)}\n ${hidden.matches('footer', true) ? '' : this.__renderFooter(json)}\n </div>\n\n <div\n class=${classMap({\n 'transition duration-500 ease-in-out absolute inset-0 flex': true,\n 'opacity-0 pointer-events-none': this.in('idle'),\n })}\n >\n <foxy-spinner\n layout=\"vertical\"\n class=\"m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l\"\n state=${this.in('fail') ? 'error' : 'busy'}\n lang=${this.lang}\n ns=\"${this.ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n\n private __renderCartType(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const items = ['default', 'fullpage', 'custom'];\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('cart-type', true);\n\n return html`\n <div data-testid=\"cart-type\">\n ${this.renderTemplateOrSlot('cart-type:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"cart_type\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n data-testid=\"cart-type-choice\"\n .value=${json.cart_type}\n .items=${items}\n ?disabled=${isDisabled}\n ?readonly=${this.readonlySelector.matches('cart-type', true)}\n @change=${(evt: ChoiceChangeEvent) => {\n this.edit({ json: JSON.stringify({ ...json, cart_type: evt.detail }) });\n }}\n >\n ${items.map(item => {\n return html`\n <div slot=\"${item}-label\" class=\"grid leading-s py-s\">\n <foxy-i18n lang=${lang} key=\"cart_type_${item}\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"cart_type_${item}_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n `;\n })}\n </x-choice>\n </x-group>\n\n ${this.renderTemplateOrSlot('cart-type:after')}\n </div>\n `;\n }\n\n private __renderFoxycomplete(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const isDisabled = this.disabledSelector.matches('foxycomplete', true);\n const isReadonly = this.readonlySelector.matches('foxycomplete', true);\n const items = ['combobox', 'search', 'disabled'];\n const value =\n json.foxycomplete.usage === 'none'\n ? 'disabled'\n : json.foxycomplete.show_combobox\n ? 'combobox'\n : 'search';\n\n const renderFlagsCheckbox = () => html`\n <x-checkbox\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${json.foxycomplete.show_flags}\n @change=${(evt: CheckboxChangeEvent) => {\n const newConfig: TemplateConfigJSON['foxycomplete'] = {\n ...json.foxycomplete,\n show_flags: evt.detail,\n };\n\n this.edit({ json: JSON.stringify({ ...json, foxycomplete: newConfig }) });\n }}\n >\n <foxy-i18n lang=${lang} key=\"show_country_flags\" ns=${ns}></foxy-i18n>\n </x-checkbox>\n `;\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('foxycomplete:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"foxycomplete\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n .value=${value}\n .items=${items}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: Event) => {\n if (!(evt instanceof ChoiceChangeEvent)) return;\n\n const newConfig: TemplateConfigJSON['foxycomplete'] = {\n ...json.foxycomplete,\n usage: evt.detail === 'disabled' ? 'none' : 'required',\n show_combobox: evt.detail === 'combobox',\n };\n\n this.edit({ json: JSON.stringify({ ...json, foxycomplete: newConfig }) });\n }}\n >\n ${items.map(item => {\n return html`\n <div slot=\"${item}-label\" class=\"grid leading-s py-s\">\n <foxy-i18n lang=${lang} key=\"foxycomplete_${item}\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"foxycomplete_${item}_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n `;\n })}\n\n <div slot=\"combobox\" class=\"space-y-m pb-s\" ?hidden=${value !== 'combobox'}>\n <div class=\"grid grid-cols-2 gap-m\" style=\"max-width: 16rem\">\n ${['open', 'close'].map(action => {\n const field = action === 'open' ? 'combobox_open' : 'combobox_close';\n\n return html`\n <vaadin-text-field\n label=${this.t(`${action}_icon`)}\n .value=${json.foxycomplete[field]}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @input=${(evt: CustomEvent) => {\n const target = evt.currentTarget as TextFieldElement;\n const newConfig: TemplateConfigJSON['foxycomplete'] = {\n ...json.foxycomplete,\n [field]: target.value,\n };\n\n this.edit({ json: JSON.stringify({ ...json, foxycomplete: newConfig }) });\n }}\n >\n </vaadin-text-field>\n `;\n })}\n </div>\n\n ${renderFlagsCheckbox()}\n </div>\n\n <div slot=\"search\" class=\"pb-s\" ?hidden=${value !== 'search'}>\n ${renderFlagsCheckbox()}\n </div>\n </x-choice>\n\n <div class=\"border-t border-contrast-10 p-m\">\n <x-checkbox\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${json.postal_code_lookup.usage === 'enabled'}\n @change=${(evt: CheckboxChangeEvent) => {\n const newConfig: TemplateConfigJSON['postal_code_lookup'] = {\n usage: evt.detail ? 'enabled' : 'none',\n };\n\n this.edit({ json: JSON.stringify({ ...json, postal_code_lookup: newConfig }) });\n }}\n >\n <foxy-i18n lang=${lang} key=\"enable_postcode_lookup\" ns=${ns}></foxy-i18n>\n </x-checkbox>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('foxycomplete:after')}\n </div>\n `;\n }\n\n private __renderLocations(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const config = json.location_filtering;\n const isDisabled = this.disabledSelector.matches('locations', true);\n const isReadonly = this.readonlySelector.matches('locations', true);\n\n const shippingChoice = config.shipping_filter_type === 'blacklist' ? 'block' : 'allow';\n const billingChoice =\n config.usage === 'both'\n ? 'copy'\n : config.billing_filter_type === 'blacklist'\n ? 'block'\n : 'allow';\n\n const normalize = () => {\n if (config.usage === 'both') {\n config.billing_filter_type = config.shipping_filter_type;\n config.billing_filter_values = config.shipping_filter_values;\n } else {\n const hasBillingFilters = Object.keys(config.billing_filter_values).length > 0;\n const hasShippingFilters = Object.keys(config.shipping_filter_values).length > 0;\n\n if (!hasBillingFilters && !hasShippingFilters) {\n config.usage = 'none';\n } else if (hasBillingFilters && !hasShippingFilters) {\n config.usage = 'billing';\n } else if (hasShippingFilters && !hasBillingFilters) {\n config.usage = 'shipping';\n } else {\n config.usage = 'independent';\n }\n }\n };\n\n return html`\n ${this.renderTemplateOrSlot('locations:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"location_plural\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"grid sm-grid-cols-2 bg-contrast-10\" style=\"gap: 1px\">\n <x-group class=\"bg-base pt-m\">\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : 'text-tertiary'}\n slot=\"header\"\n lang=${lang}\n key=\"shipping\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n .items=${['allow', 'block']}\n .value=${shippingChoice}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: ChoiceChangeEvent) => {\n if (config.usage !== 'both') config.usage = 'independent';\n config.shipping_filter_type = evt.detail === 'block' ? 'blacklist' : 'whitelist';\n normalize();\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n slot=\"allow-label\" lang=${lang} key=\"allowlist\" ns=${ns}></foxy-i18n>\n <foxy-i18n slot=\"block-label\" lang=${lang} key=\"blocklist\" ns=${ns}></foxy-i18n>\n\n <x-countries-list\n countries=${JSON.stringify(config.shipping_filter_values)}\n regions=${this.regions}\n class=\"mb-m\"\n href=${this.countries}\n slot=${shippingChoice}\n lang=${lang}\n ns=${ns}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @update:countries=${(evt: CustomEvent) => {\n config.shipping_filter_values = (evt.currentTarget as CountriesList).countries;\n normalize();\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </x-countries-list>\n </x-choice>\n </x-group>\n\n <x-group class=\"bg-base pt-m\">\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : 'text-tertiary'}\n slot=\"header\"\n lang=${lang}\n key=\"billing\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n .items=${['allow', 'block', 'copy']}\n .value=${billingChoice}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: ChoiceChangeEvent) => {\n if (evt.detail === 'copy') {\n config.usage = 'both';\n } else {\n config.usage = 'independent';\n config.billing_filter_type = evt.detail === 'block' ? 'blacklist' : 'whitelist';\n }\n\n normalize();\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n slot=\"allow-label\" lang=${lang} key=\"allowlist\" ns=${ns}></foxy-i18n>\n <foxy-i18n slot=\"block-label\" lang=${lang} key=\"blocklist\" ns=${ns}></foxy-i18n>\n <foxy-i18n slot=\"copy-label\" lang=${lang} key=\"same_as_shipping\" ns=${ns}></foxy-i18n>\n\n <x-countries-list\n countries=${JSON.stringify(config.billing_filter_values)}\n regions=${this.regions}\n class=\"mb-m\"\n href=${this.countries}\n slot=${billingChoice}\n lang=${lang}\n ns=${ns}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?hidden=${billingChoice === 'copy'}\n @update:countries=${(evt: CustomEvent) => {\n config.billing_filter_values = (evt.currentTarget as CountriesList).countries;\n normalize();\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </x-countries-list>\n </x-choice>\n </x-group>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('locations:after')}\n `;\n }\n\n private __renderHiddenFields(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const suggestions = [] as string[];\n const fields = [] as string[];\n const config = json.cart_display_config;\n const isDisabled = this.disabledSelector.matches('hidden-fields', true);\n const isReadonly = this.readonlySelector.matches('hidden-fields', true);\n\n type FieldName = keyof Omit<\n TemplateConfigJSON['cart_display_config'],\n 'hidden_product_options' | 'usage'\n >;\n\n for (const key in config) {\n if (!key.startsWith('show_')) continue;\n const field = key.substring(5);\n suggestions.push(field);\n if (config.usage === 'required' && !config[key as FieldName]) fields.push(field);\n }\n\n if (config.usage === 'required') {\n fields.push(...config.hidden_product_options);\n }\n\n const addField = () => {\n config.usage = 'required';\n\n if (suggestions.includes(this.__addHiddenFieldInputValue)) {\n config[`show_${this.__addHiddenFieldInputValue}` as FieldName] = false;\n } else if (!config.hidden_product_options.includes(this.__addHiddenFieldInputValue)) {\n config.hidden_product_options.push(this.__addHiddenFieldInputValue);\n }\n\n this.edit({ json: JSON.stringify(json) });\n this.__addHiddenFieldInputValue = '';\n };\n\n const radius = 'calc(var(--lumo-border-radius-l) / 1.2)';\n const inputRadius = fields.length === 0 ? [radius] : ['0', '0', radius, radius];\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('hidden-fields:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"hidden_fields\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"divide-y divide-contrast-10\">\n ${fields.map(field => {\n return html`\n <div\n class=${classMap({\n 'h-m ml-m pr-xs flex items-center justify-between': true,\n 'text-secondary': isReadonly,\n 'text-disabled': isDisabled,\n })}\n >\n ${suggestions.includes(field)\n ? html`<foxy-i18n lang=${lang} key=${field} ns=${ns}></foxy-i18n>`\n : html`<span>${field}</span>`}\n\n <button\n class=${classMap({\n 'w-xs h-xs rounded-full transition-colors': true,\n 'hover-bg-error-10 hover-text-error': !isDisabled,\n 'focus-outline-none focus-ring-2 ring-inset ring-error-50': !isDisabled,\n 'cursor-default': isDisabled,\n 'flex': !isReadonly,\n 'hidden': isReadonly,\n })}\n ?disabled=${isDisabled}\n @click=${() => {\n if (typeof config[`show_${field}` as FieldName] === 'boolean') {\n config[`show_${field}` as FieldName] = true;\n } else {\n config.hidden_product_options = config.hidden_product_options.filter(\n option => option !== field\n );\n }\n\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <iron-icon icon=\"icons:close\" class=\"icon-inline text-m m-auto\"></iron-icon>\n </button>\n </div>\n `;\n })}\n </div>\n\n <div\n style=\"border-radius: ${inputRadius.join(' ')}\"\n class=${classMap({\n 'h-m flex items-center ring-inset ring-primary-50 focus-within-ring-2': true,\n 'border-t border-contrast-10': fields.length > 0,\n 'flex': !isReadonly,\n 'hidden': isReadonly,\n })}\n >\n <input\n placeholder=${this.t('add_field')}\n class=\"w-full bg-transparent appearance-none h-m px-m focus-outline-none\"\n list=\"hidden-fields-list\"\n .value=${live(this.__addHiddenFieldInputValue)}\n ?disabled=${isDisabled}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && addField()}\n @input=${(evt: InputEvent) => {\n this.__addHiddenFieldInputValue = (evt.currentTarget as HTMLInputElement).value;\n }}\n />\n\n <datalist id=\"hidden-fields-list\">\n ${suggestions\n .filter(suggestion => !fields.includes(suggestion))\n .map(\n suggestion => html`<option value=${suggestion}>${this.t(suggestion)}</option>`\n )}\n </datalist>\n\n <button\n aria-label=${this.t('add_field')}\n class=${classMap({\n 'w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50': true,\n 'flex items-center justify-center rounded-full transition-colors': true,\n 'bg-contrast-5 text-disabled cursor-default': !this.__addHiddenFieldInputValue,\n 'bg-success-10 text-success cursor-pointer': !!this.__addHiddenFieldInputValue,\n 'hover-bg-success hover-text-success-contrast': !!this.__addHiddenFieldInputValue,\n 'focus-outline-none focus-ring-2': !!this.__addHiddenFieldInputValue,\n })}\n ?disabled=${!this.__addHiddenFieldInputValue}\n @click=${addField}\n >\n <iron-icon icon=\"icons:add\" class=\"icon-inline text-m\"></iron-icon>\n </button>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('hidden-fields:after')}\n </div>\n `;\n }\n\n private __renderCards(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const isDisabled = this.disabledSelector.matches('cards', true);\n const isReadonly = this.readonlySelector.matches('cards', true);\n const config = json.supported_payment_cards as string[];\n\n let skipForSaved: boolean;\n let skipForSSO: boolean;\n\n if (json.csc_requirements === 'all_cards') {\n skipForSaved = false;\n skipForSSO = false;\n } else if (json.csc_requirements === 'sso_only') {\n skipForSaved = true;\n skipForSSO = false;\n } else {\n skipForSaved = true;\n skipForSSO = true;\n }\n\n const typeToName: Record<string, string> = {\n amex: 'American Express',\n diners: 'Diners Club',\n discover: 'Discover',\n jcb: 'JCB',\n maestro: 'Maestro',\n mastercard: 'Mastercard',\n unionpay: 'UnionPay',\n visa: 'Visa',\n };\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('cards:before')}\n\n <div class=\"space-y-xs\">\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"supported_cards\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"flex flex-wrap m-xs p-s\">\n ${Object.entries(logos).map(([type, logo]) => {\n if (!typeToName[type]) return;\n const isChecked = config.includes(type);\n\n return html`\n <div\n class=${classMap({\n 'm-xs rounded': true,\n 'opacity-50 cursor-default': isDisabled,\n 'cursor-pointer ring-primary-50 focus-within-ring-2': !isDisabled,\n })}\n >\n <label\n class=${classMap({\n 'overflow-hidden transition-colors flex rounded border': true,\n 'border-primary bg-primary-10 text-primary': isChecked && !isReadonly,\n 'border-contrast bg-contrast-5 text-secondary': isChecked && isReadonly,\n 'hover-text-body': isChecked && !isDisabled && !isReadonly,\n 'border-contrast-10': !isChecked,\n 'hover-border-primary': !isChecked && !isDisabled && !isReadonly,\n 'hover-text-primary': !isChecked && !isDisabled && !isReadonly,\n })}\n >\n <div class=\"h-s\">${logo}</div>\n\n <div class=\"text-s font-medium mx-s my-auto leading-none\">\n ${typeToName[type]}\n </div>\n\n <input\n type=\"checkbox\"\n class=\"sr-only\"\n ?disabled=${isDisabled}\n ?checked=${isChecked}\n @change=${(evt: Event) => {\n if (isReadonly) return evt.preventDefault();\n evt.stopPropagation();\n\n if (isChecked) {\n config.splice(config.indexOf(type), 1);\n } else {\n config.push(type);\n }\n\n this.edit({ json: JSON.stringify(json) });\n }}\n />\n </label>\n </div>\n `;\n })}\n </div>\n\n <div class=\"flex flex-wrap p-s border-t border-contrast-10\">\n <x-checkbox\n class=\"m-s\"\n ?disabled=${isDisabled || json.csc_requirements === 'new_cards_only'}\n ?readonly=${isReadonly}\n ?checked=${skipForSaved}\n @change=${(evt: CheckboxChangeEvent) => {\n json.csc_requirements = evt.detail ? 'sso_only' : 'all_cards';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n class=\"leading-s block\" lang=${lang} key=\"skip_csc_for_saved\" ns=${ns}>\n </foxy-i18n>\n </x-checkbox>\n\n <x-checkbox\n class=\"m-s\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${skipForSSO}\n @change=${(evt: CheckboxChangeEvent) => {\n json.csc_requirements = evt.detail\n ? 'new_cards_only'\n : skipForSaved\n ? 'sso_only'\n : 'all_cards';\n\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n class=\"leading-s block\" lang=${lang} key=\"skip_csc_for_sso\" ns=${ns}>\n </foxy-i18n>\n </x-checkbox>\n </div>\n </x-group>\n\n <foxy-i18n\n class=\"text-xs leading-s block ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"supported_cards_disclaimer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n\n ${this.renderTemplateOrSlot('cards:after')}\n </div>\n `;\n }\n\n private __renderCheckoutType(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('checkout-type', true);\n const isReadonly = this.readonlySelector.matches('checkout-type', true);\n\n return html`\n <div data-testid=\"checkout-type\">\n ${this.renderTemplateOrSlot('checkout-type:before')}\n\n <div class=\"space-y-xs\">\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"checkout_type\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n data-testid=\"checkout-type-choice\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n .items=${['default_account', 'default_guest', 'guest_only', 'account_only']}\n .value=${json.checkout_type}\n .getText=${(item: string) => this.t(`checkout_type_${item}`)}\n @change=${(evt: ChoiceChangeEvent) => {\n json.checkout_type = evt.detail as TemplateConfigJSON['checkout_type'];\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </x-choice>\n </x-group>\n\n <foxy-i18n\n class=\"text-xs leading-s block ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"checkout_type_helper_text\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n\n ${this.renderTemplateOrSlot('checkout-type:after')}\n </div>\n `;\n }\n\n private __renderConsent(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const tosConfig = json.tos_checkbox_settings;\n const mailConfig = json.newsletter_subscribe;\n const sdtaConfig = json.eu_secure_data_transfer_consent;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('consent', true);\n const isReadonly = this.readonlySelector.matches('consent', true);\n const dividerStyle = 'margin-left: calc(1.125rem + (var(--lumo-space-m) * 2))';\n\n return html`\n <div data-testid=\"consent\">\n ${this.renderTemplateOrSlot('consent:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"consent\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-checkbox\n data-testid=\"consent-tos-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${tosConfig.usage === 'required' || tosConfig.usage === 'optional'}\n class=\"m-m\"\n @change=${(evt: CheckboxChangeEvent) => {\n tosConfig.initial_state = evt.detail ? tosConfig.initial_state : 'unchecked';\n tosConfig.is_hidden = false;\n tosConfig.usage = evt.detail ? 'required' : 'none';\n tosConfig.url = evt.detail ? tosConfig.url : '';\n\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"display_tos_link\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"display_tos_link_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n\n <div slot=\"content\" ?hidden=${tosConfig.usage === 'none'}>\n <vaadin-text-field\n data-testid=\"consent-tos-field\"\n label=${this.t('location_url')}\n class=\"w-full mt-m\"\n placeholder=\"https://example.com/path/to/tos\"\n clear-button-visible\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n .value=${tosConfig.url}\n @input=${(evt: CustomEvent) => {\n tosConfig.url = (evt.currentTarget as TextFieldElement).value;\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </vaadin-text-field>\n\n <div class=\"flex flex-wrap -mx-s -mb-s mt-s\">\n <x-checkbox\n data-testid=\"consent-tos-require-check\"\n class=\"m-s\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${tosConfig.usage === 'required'}\n @change=${(evt: CheckboxChangeEvent) => {\n tosConfig.usage = evt.detail ? 'required' : 'optional';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n class=\"leading-s block\" lang=${lang} key=\"require_consent\" ns=${ns}>\n </foxy-i18n>\n </x-checkbox>\n\n <x-checkbox\n data-testid=\"consent-tos-state-check\"\n class=\"m-s\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${tosConfig.initial_state === 'checked'}\n @change=${(evt: CheckboxChangeEvent) => {\n tosConfig.initial_state = evt.detail ? 'checked' : 'unchecked';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n class=\"leading-s block\" lang=${lang} key=\"checked_by_default\" ns=${ns}>\n </foxy-i18n>\n </x-checkbox>\n </div>\n </div>\n </x-checkbox>\n\n <div style=${dividerStyle} class=\"border-b border-contrast-10\"></div>\n\n <x-checkbox\n data-testid=\"consent-mail-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${mailConfig.usage === 'required'}\n class=\"m-m\"\n @change=${(evt: CheckboxChangeEvent) => {\n mailConfig.usage = evt.detail ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"newsletter_subscribe\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"newsletter_subscribe_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n </x-checkbox>\n\n <div style=${dividerStyle} class=\"border-b border-contrast-10\"></div>\n\n <x-checkbox\n data-testid=\"consent-sdta-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${sdtaConfig.usage === 'required'}\n class=\"m-m\"\n @change=${(evt: CheckboxChangeEvent) => {\n sdtaConfig.usage = evt.detail ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"display_sdta\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"display_sdta_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n </x-checkbox>\n </x-group>\n\n ${this.renderTemplateOrSlot('consent:after')}\n </div>\n `;\n }\n\n private __renderFields(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('fields', true);\n const isReadonly = this.readonlySelector.matches('fields', true);\n const config = json.custom_checkout_field_requirements;\n const options = {\n cart_controls: ['enabled', 'disabled'],\n coupon_entry: ['enabled', 'disabled'],\n billing_first_name: ['default', 'optional', 'required', 'hidden'],\n billing_last_name: ['default', 'optional', 'required', 'hidden'],\n billing_company: ['default', 'optional', 'required', 'hidden'],\n billing_tax_id: ['default', 'optional', 'required', 'hidden'],\n billing_phone: ['default', 'optional', 'required', 'hidden'],\n billing_address1: ['default', 'optional', 'required', 'hidden'],\n billing_address2: ['default', 'optional', 'required', 'hidden'],\n billing_city: ['default', 'optional', 'required', 'hidden'],\n billing_region: ['default', 'optional', 'required', 'hidden'],\n billing_postal_code: ['default', 'optional', 'required', 'hidden'],\n billing_country: ['default', 'optional', 'required', 'hidden'],\n };\n\n return html`\n <div data-testid=\"fields\">\n ${this.renderTemplateOrSlot('fields:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"field_plural\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"bg-contrast-10 grid grid-cols-1 md-grid-cols-2\" style=\"gap: 1px\">\n ${Object.entries(options).map(([property, values]) => {\n return html`\n <label\n class=${classMap({\n 'flex items-center pl-m bg-base': true,\n 'text-secondary': isReadonly,\n 'text-disabled': isDisabled,\n })}\n >\n <foxy-i18n\n class=\"flex-1\"\n lang=${lang}\n key=${property.replace('billing_', '')}\n ns=${ns}\n >\n </foxy-i18n>\n\n <div\n class=${classMap({\n 'flex items-center text-right font-medium h-s px-s m-xs': isReadonly,\n 'hidden': !isReadonly,\n })}\n >\n ${this.t(\n values.find(\n value => (config as Record<string, string>)[property] === value\n ) as string\n )}\n </div>\n\n <div\n class=${classMap({\n 'px-s m-xs flex items-center rounded leading-none': true,\n 'ring-primary-50 ring-inset focus-within-ring-2': !isDisabled,\n 'hover-text-primary': !isDisabled,\n 'cursor-pointer': !isDisabled,\n 'cursor-default': isDisabled,\n 'flex': !isReadonly,\n 'hidden': isReadonly,\n })}\n >\n <select\n data-testid=\"fields-${property}\"\n class=${classMap({\n 'h-s mr-xs text-right appearance-none bg-transparent font-medium': true,\n 'focus-outline-none cursor-pointer': !isDisabled,\n 'cursor-default': isDisabled,\n })}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: Event) => {\n const select = evt.currentTarget as HTMLSelectElement;\n const value = select.options[select.options.selectedIndex].value;\n (config as Record<string, string>)[property] = value;\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n ${values.map(value => {\n return html`\n <option\n value=${value}\n ?selected=${(config as Record<string, string>)[property] === value}\n >\n ${this.t(value)}\n </option>\n `;\n })}\n </select>\n\n <iron-icon\n class=\"pointer-events-none icon-inline text-xl\"\n icon=\"icons:expand-more\"\n >\n </iron-icon>\n </div>\n </label>\n `;\n })}\n\n <div class=\"bg-base hidden md-block\"></div>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('fields:after')}\n </div>\n `;\n }\n\n private __renderGoogleAnalytics(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const config = json.analytics_config;\n const sioConfig = config.segment_io;\n const gaConfig = config.google_analytics;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('google-analytics', true);\n const isReadonly = this.readonlySelector.matches('google-analytics', true);\n\n return html`\n <div data-testid=\"google-analytics\">\n ${this.renderTemplateOrSlot('google-analytics:before')}\n\n <x-group frame>\n <span class=${isDisabled ? 'text-disabled' : ''} slot=\"header\">Google Analytics</span>\n\n <div class=\"p-m space-y-m\">\n <vaadin-text-field\n data-testid=\"google-analytics-field\"\n class=\"w-full\"\n label=${this.t('ga_account_id')}\n placeholder=\"UA-1234567-1\"\n helper-text=${this.t('ga_account_id_explainer')}\n .value=${live(gaConfig.account_id)}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n clear-button-visible\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n gaConfig.account_id = (evt.currentTarget as TextFieldElement).value;\n gaConfig.usage = gaConfig.account_id ? 'required' : 'none';\n config.usage = gaConfig.account_id || sioConfig.account_id ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </vaadin-text-field>\n\n <x-checkbox\n data-testid=\"google-analytics-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${gaConfig.include_on_site}\n @change=${(evt: CheckboxChangeEvent) => {\n gaConfig.include_on_site = evt.detail;\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"ga_include_on_site\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"ga_include_on_site_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n </x-checkbox>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('google-analytics:after')}\n </div>\n `;\n }\n\n private __renderSegmentIo(json: TemplateConfigJSON) {\n const config = json.analytics_config;\n const sioConfig = config.segment_io;\n const gaConfig = config.google_analytics;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('segment-io', true);\n const isReadonly = this.readonlySelector.matches('segment-io', true);\n\n return html`\n <div data-testid=\"segment-io\">\n ${this.renderTemplateOrSlot('segment-io:before')}\n\n <x-group frame>\n <span class=${isDisabled ? 'text-disabled' : ''} slot=\"header\">Segment.io</span>\n\n <div class=\"p-m\">\n <vaadin-text-field\n data-testid=\"segment-io-field\"\n class=\"w-full\"\n label=${this.t('sio_account_id')}\n placeholder=\"MY-WRITE-KEY\"\n helper-text=${this.t('sio_account_id_explainer')}\n .value=${live(sioConfig.account_id)}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n clear-button-visible\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n sioConfig.account_id = (evt.currentTarget as TextFieldElement).value;\n sioConfig.usage = sioConfig.account_id ? 'required' : 'none';\n config.usage = gaConfig.account_id || sioConfig.account_id ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </vaadin-text-field>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('segment-io:after')}\n </div>\n `;\n }\n\n private __renderTroubleshooting(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const config = json.debug;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('troubleshooting', true);\n const isReadonly = this.readonlySelector.matches('troubleshooting', true);\n\n return html`\n <div data-testid=\"troubleshooting\">\n ${this.renderTemplateOrSlot('troubleshooting:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"troubleshooting\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"p-m space-y-m\">\n <x-checkbox\n data-testid=\"troubleshooting-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${config.usage === 'required'}\n @change=${(evt: CheckboxChangeEvent) => {\n config.usage = evt.detail ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"troubleshooting_debug\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"troubleshooting_debug_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n </x-checkbox>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('troubleshooting:after')}\n </div>\n `;\n }\n\n private __renderCustomConfig(json: TemplateConfigJSON) {\n return html`\n <div data-testid=\"custom-config\">\n ${this.renderTemplateOrSlot('custom-config:before')}\n\n <vaadin-text-area\n data-testid=\"custom-config-field\"\n class=\"w-full\"\n label=${this.t('custom_config')}\n placeholder='{ \"key\": \"value\" }'\n helper-text=${this.t('custom_config_helper_text')}\n .value=${json.custom_config ? JSON.stringify(json.custom_config, null, 2) : ''}\n ?disabled=${!this.in('idle') || this.disabledSelector.matches('custom-config', true)}\n ?readonly=${this.readonlySelector.matches('custom-config', true)}\n @input=${(evt: CustomEvent) => {\n const input = evt.currentTarget as TextAreaElement;\n\n try {\n json.custom_config = input.value ? JSON.parse(input.value) : '';\n this.edit({ json: JSON.stringify(json) });\n input.invalid = false;\n } catch {\n input.invalid = true;\n }\n }}\n >\n </vaadin-text-area>\n\n ${this.renderTemplateOrSlot('custom-config:after')}\n </div>\n `;\n }\n\n private __renderHeader(json: TemplateConfigJSON) {\n return html`\n <div data-testid=\"header\">\n ${this.renderTemplateOrSlot('header:before')}\n\n <vaadin-text-area\n data-testid=\"header-field\"\n class=\"w-full\"\n label=${this.t('custom_header')}\n helper-text=${this.t('custom_header_helper_text')}\n .value=${json.custom_script_values.header}\n ?disabled=${!this.in('idle') || this.disabledSelector.matches('header', true)}\n ?readonly=${this.readonlySelector.matches('header', true)}\n @input=${(evt: CustomEvent) => {\n const target = evt.currentTarget as TextAreaElement;\n const newConfig: TemplateConfigJSON['custom_script_values'] = {\n ...json.custom_script_values,\n header: target.value,\n };\n\n this.edit({ json: JSON.stringify({ ...json, custom_script_values: newConfig }) });\n }}\n >\n </vaadin-text-area>\n\n ${this.renderTemplateOrSlot('header:after')}\n </div>\n `;\n }\n\n private __renderCustomFields(json: TemplateConfigJSON) {\n return html`\n <div data-testid=\"custom-fields\">\n ${this.renderTemplateOrSlot('custom-fields:before')}\n\n <vaadin-text-area\n data-testid=\"custom-fields-field\"\n class=\"w-full\"\n label=${this.t('custom_fields')}\n helper-text=${this.t('custom_fields_helper_text')}\n .value=${json.custom_script_values.checkout_fields}\n ?disabled=${!this.in('idle') || this.disabledSelector.matches('custom-fields', true)}\n ?readonly=${this.readonlySelector.matches('custom-fields', true)}\n @input=${(evt: CustomEvent) => {\n const newValue = (evt.currentTarget as TextAreaElement).value;\n json.custom_script_values.checkout_fields = newValue;\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </vaadin-text-area>\n\n ${this.renderTemplateOrSlot('custom-fields:after')}\n </div>\n `;\n }\n\n private __renderFooter(json: TemplateConfigJSON) {\n return html`\n <div data-testid=\"footer\">\n ${this.renderTemplateOrSlot('footer:before')}\n\n <vaadin-text-area\n data-testid=\"footer-field\"\n class=\"w-full\"\n label=${this.t('custom_footer')}\n helper-text=${this.t('custom_footer_helper_text')}\n .value=${json.custom_script_values.footer}\n ?disabled=${!this.in('idle') || this.disabledSelector.matches('footer', true)}\n ?readonly=${this.readonlySelector.matches('footer', true)}\n @input=${(evt: CustomEvent) => {\n const target = evt.currentTarget as TextAreaElement;\n const newConfig: TemplateConfigJSON['custom_script_values'] = {\n ...json.custom_script_values,\n footer: target.value,\n };\n\n this.edit({ json: JSON.stringify({ ...json, custom_script_values: newConfig }) });\n }}\n >\n </vaadin-text-area>\n\n ${this.renderTemplateOrSlot('footer:after')}\n </div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"TemplateConfigForm.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateConfigForm/TemplateConfigForm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,sCAAmC;AAEpD,OAAO,EAAuB,iBAAiB,EAAE,gCAA6B;AAE9E,OAAO,EAAqB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,2CAAwC;AAC3D,OAAO,EAAE,MAAM,EAAE,uCAAoC;AACrD,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,aAAa,EAAE,2BAAwB;AAChD,OAAO,EAAE,KAAK,EAAE,qCAAkC;AAClD,OAAO,EAAE,cAAc,EAAE,4CAAyC;AAElE,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAG7D,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,QAAQ,EAAE,oCAAiC;AACpD,OAAO,EAAE,cAAc,EAAE,sBAAmB;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,MAAM,EAAE,GAAG,sBAAsB,CAAC;AAClC,MAAM,IAAI,GAAG,mBAAmB,CAC9B,e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CAAC;IACJ,CAAC;IAEO,cAAc,CAAC,IAAwB;QAC7C,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC;;;;;kBAKlC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC;wBACjB,IAAI,CAAC,CAAC,CAAC,2BAA2B,CAAC;mBACxC,IAAI,CAAC,oBAAoB,CAAC,MAAM;sBAC7B,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;sBACjE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;mBAChD,CAAC,GAAgB,EAAE,EAAE;YAC5B,MAAM,MAAM,GAAG,GAAG,CAAC,aAAgC,CAAC;YACpD,MAAM,SAAS,GAA+C;gBAC5D,GAAG,IAAI,CAAC,oBAAoB;gBAC5B,MAAM,EAAE,MAAM,CAAC,KAAK;aACrB,CAAC;YAEF,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;QACpF,CAAC;;;;UAID,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC;;KAE9C,CAAC;IACJ,CAAC;CACF","sourcesContent":["import * as logos from '../PaymentMethodCard/logos';\n\nimport { CheckboxChangeEvent, ChoiceChangeEvent } from '../../private/events';\nimport { Data, TemplateConfigJSON, Templates } from './types';\nimport { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { TemplateResult, html } from 'lit-html';\n\nimport { Checkbox } from '../../private/Checkbox/Checkbox';\nimport { Choice } from '../../private/Choice/Choice';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { CountriesList } from './CountriesList';\nimport { Group } from '../../private/Group/Group';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { PropertyDeclarations } from 'lit-element';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { TextAreaElement } from '@vaadin/vaadin-text-field/vaadin-text-area';\nimport { TextFieldElement } from '@vaadin/vaadin-text-field/vaadin-text-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { getDefaultJSON } from './defaults';\nimport { live } from 'lit-html/directives/live';\n\nconst NS = 'template-config-form';\nconst Base = ScopedElementsMixin(\n ResponsiveMixin(ConfigurableMixin(ThemeableMixin(TranslatableMixin(NucleonElement, NS))))\n);\n\n/**\n * Form element for creating or editing template configs (`fx:template_config`).\n *\n * @slot cart-type:before\n * @slot cart-type:after\n *\n * @slot foxycomplete:before\n * @slot foxycomplete:after\n *\n * @slot locations:before\n * @slot locations:after\n *\n * @slot hidden-fields:before\n * @slot hidden-fields:after\n *\n * @slot cards:before\n * @slot cards:after\n *\n * @slot checkout-type:before\n * @slot checkout-type:after\n *\n * @slot consent:before\n * @slot consent:after\n *\n * @slot fields:before\n * @slot fields:after\n *\n * @slot google-analytics:before\n * @slot google-analytics:after\n *\n * @slot segment-io:before\n * @slot segment-io:after\n *\n * @slot troubleshooting:before\n * @slot troubleshooting:after\n *\n * @slot custom-config:before\n * @slot custom-config:after\n *\n * @slot header:before\n * @slot header:after\n *\n * @slot custom-fields:before\n * @slot custom-fields:after\n *\n * @slot footer:before\n * @slot footer:after\n *\n * @element foxy-template-config-form\n * @since 1.14.0\n */\nexport class TemplateConfigForm extends Base<Data> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'vaadin-text-area': customElements.get('vaadin-text-area'),\n 'iron-icon': customElements.get('iron-icon'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n 'x-countries-list': CountriesList,\n 'x-checkbox': Checkbox,\n 'x-choice': Choice,\n 'x-group': Group,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n __addHiddenFieldInputValue: { attribute: false },\n countries: { type: String },\n regions: { type: String },\n };\n }\n\n templates: Templates = {};\n\n /** URI of the `fx:countries` hAPI resource. */\n countries = '';\n\n /** URI of the `fx:regions` hAPI resource. */\n regions = '';\n\n private __addHiddenFieldInputValue = '';\n\n render(): TemplateResult {\n const hidden = this.hiddenSelector;\n const json: TemplateConfigJSON = this.form.json ? JSON.parse(this.form.json) : getDefaultJSON();\n\n return html`\n <div class=\"relative\" aria-busy=${this.in('busy')} aria-live=\"polite\">\n <div\n class=${classMap({\n 'space-y-l transition-opacity': true,\n 'opacity-50': !this.in('idle'),\n })}\n >\n ${hidden.matches('cart-type', true) ? '' : this.__renderCartType(json)}\n ${hidden.matches('foxycomplete', true) ? '' : this.__renderFoxycomplete(json)}\n ${hidden.matches('locations', true) ? '' : this.__renderLocations(json)}\n ${hidden.matches('hidden-fields', true) ? '' : this.__renderHiddenFields(json)}\n ${hidden.matches('cards', true) ? '' : this.__renderCards(json)}\n ${hidden.matches('checkout-type', true) ? '' : this.__renderCheckoutType(json)}\n ${hidden.matches('consent', true) ? '' : this.__renderConsent(json)}\n ${hidden.matches('fields', true) ? '' : this.__renderFields(json)}\n ${hidden.matches('google-analytics', true) ? '' : this.__renderGoogleAnalytics(json)}\n ${hidden.matches('segment-io', true) ? '' : this.__renderSegmentIo(json)}\n ${hidden.matches('troubleshooting', true) ? '' : this.__renderTroubleshooting(json)}\n ${hidden.matches('custom-config', true) ? '' : this.__renderCustomConfig(json)}\n ${hidden.matches('header', true) ? '' : this.__renderHeader(json)}\n ${hidden.matches('custom-fields', true) ? '' : this.__renderCustomFields(json)}\n ${hidden.matches('footer', true) ? '' : this.__renderFooter(json)}\n </div>\n\n <div\n class=${classMap({\n 'transition duration-500 ease-in-out absolute inset-0 flex': true,\n 'opacity-0 pointer-events-none': this.in('idle'),\n })}\n >\n <foxy-spinner\n layout=\"vertical\"\n class=\"m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l\"\n state=${this.in('fail') ? 'error' : 'busy'}\n lang=${this.lang}\n ns=\"${this.ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n\n private __renderCartType(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const items = ['default', 'fullpage', 'custom'];\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('cart-type', true);\n\n return html`\n <div data-testid=\"cart-type\">\n ${this.renderTemplateOrSlot('cart-type:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"cart_type\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n data-testid=\"cart-type-choice\"\n .value=${json.cart_type}\n .items=${items}\n ?disabled=${isDisabled}\n ?readonly=${this.readonlySelector.matches('cart-type', true)}\n @change=${(evt: ChoiceChangeEvent) => {\n this.edit({ json: JSON.stringify({ ...json, cart_type: evt.detail }) });\n }}\n >\n ${items.map(item => {\n return html`\n <div slot=\"${item}-label\" class=\"grid leading-s py-s\">\n <foxy-i18n lang=${lang} key=\"cart_type_${item}\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"cart_type_${item}_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n `;\n })}\n </x-choice>\n </x-group>\n\n ${this.renderTemplateOrSlot('cart-type:after')}\n </div>\n `;\n }\n\n private __renderFoxycomplete(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const isDisabled = this.disabledSelector.matches('foxycomplete', true);\n const isReadonly = this.readonlySelector.matches('foxycomplete', true);\n const items = ['combobox', 'search', 'disabled'];\n const value =\n json.foxycomplete.usage === 'none'\n ? 'disabled'\n : json.foxycomplete.show_combobox\n ? 'combobox'\n : 'search';\n\n const renderFlagsCheckbox = () => html`\n <x-checkbox\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${json.foxycomplete.show_flags}\n @change=${(evt: CheckboxChangeEvent) => {\n const newConfig: TemplateConfigJSON['foxycomplete'] = {\n ...json.foxycomplete,\n show_flags: evt.detail,\n };\n\n this.edit({ json: JSON.stringify({ ...json, foxycomplete: newConfig }) });\n }}\n >\n <foxy-i18n lang=${lang} key=\"show_country_flags\" ns=${ns}></foxy-i18n>\n </x-checkbox>\n `;\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('foxycomplete:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"foxycomplete\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n .value=${value}\n .items=${items}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: Event) => {\n if (!(evt instanceof ChoiceChangeEvent)) return;\n\n const newConfig: TemplateConfigJSON['foxycomplete'] = {\n ...json.foxycomplete,\n usage: evt.detail === 'disabled' ? 'none' : 'required',\n show_combobox: evt.detail === 'combobox',\n };\n\n this.edit({ json: JSON.stringify({ ...json, foxycomplete: newConfig }) });\n }}\n >\n ${items.map(item => {\n return html`\n <div slot=\"${item}-label\" class=\"grid leading-s py-s\">\n <foxy-i18n lang=${lang} key=\"foxycomplete_${item}\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"foxycomplete_${item}_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n `;\n })}\n\n <div slot=\"combobox\" class=\"space-y-m pb-s\" ?hidden=${value !== 'combobox'}>\n <div class=\"grid grid-cols-2 gap-m\" style=\"max-width: 16rem\">\n ${['open', 'close'].map(action => {\n const field = action === 'open' ? 'combobox_open' : 'combobox_close';\n\n return html`\n <vaadin-text-field\n label=${this.t(`${action}_icon`)}\n .value=${json.foxycomplete[field]}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @input=${(evt: CustomEvent) => {\n const target = evt.currentTarget as TextFieldElement;\n const newConfig: TemplateConfigJSON['foxycomplete'] = {\n ...json.foxycomplete,\n [field]: target.value,\n };\n\n this.edit({ json: JSON.stringify({ ...json, foxycomplete: newConfig }) });\n }}\n >\n </vaadin-text-field>\n `;\n })}\n </div>\n\n ${renderFlagsCheckbox()}\n </div>\n\n <div slot=\"search\" class=\"pb-s\" ?hidden=${value !== 'search'}>\n ${renderFlagsCheckbox()}\n </div>\n </x-choice>\n\n <div class=\"border-t border-contrast-10 p-m\">\n <x-checkbox\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${json.postal_code_lookup.usage === 'enabled'}\n @change=${(evt: CheckboxChangeEvent) => {\n const newConfig: TemplateConfigJSON['postal_code_lookup'] = {\n usage: evt.detail ? 'enabled' : 'none',\n };\n\n this.edit({ json: JSON.stringify({ ...json, postal_code_lookup: newConfig }) });\n }}\n >\n <foxy-i18n lang=${lang} key=\"enable_postcode_lookup\" ns=${ns}></foxy-i18n>\n </x-checkbox>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('foxycomplete:after')}\n </div>\n `;\n }\n\n private __renderLocations(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const config = json.location_filtering;\n const isDisabled = this.disabledSelector.matches('locations', true);\n const isReadonly = this.readonlySelector.matches('locations', true);\n\n const shippingChoice = config.shipping_filter_type === 'blacklist' ? 'block' : 'allow';\n const billingChoice =\n config.usage === 'both'\n ? 'copy'\n : config.billing_filter_type === 'blacklist'\n ? 'block'\n : 'allow';\n\n const normalize = () => {\n if (config.usage === 'both') {\n config.billing_filter_type = config.shipping_filter_type;\n config.billing_filter_values = config.shipping_filter_values;\n } else {\n const hasBillingFilters = Object.keys(config.billing_filter_values).length > 0;\n const hasShippingFilters = Object.keys(config.shipping_filter_values).length > 0;\n\n if (!hasBillingFilters && !hasShippingFilters) {\n config.usage = 'none';\n } else if (hasBillingFilters && !hasShippingFilters) {\n config.usage = 'billing';\n } else if (hasShippingFilters && !hasBillingFilters) {\n config.usage = 'shipping';\n } else {\n config.usage = 'independent';\n }\n }\n };\n\n return html`\n ${this.renderTemplateOrSlot('locations:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"location_plural\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"grid sm-grid-cols-2 bg-contrast-10\" style=\"gap: 1px\">\n <x-group class=\"bg-base pt-m\">\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : 'text-tertiary'}\n slot=\"header\"\n lang=${lang}\n key=\"shipping\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n .items=${['allow', 'block']}\n .value=${shippingChoice}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: ChoiceChangeEvent) => {\n if (config.usage !== 'both') config.usage = 'independent';\n config.shipping_filter_type = evt.detail === 'block' ? 'blacklist' : 'whitelist';\n normalize();\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n slot=\"allow-label\" lang=${lang} key=\"allowlist\" ns=${ns}></foxy-i18n>\n <foxy-i18n slot=\"block-label\" lang=${lang} key=\"blocklist\" ns=${ns}></foxy-i18n>\n\n <x-countries-list\n countries=${JSON.stringify(config.shipping_filter_values)}\n regions=${this.regions}\n class=\"mb-m\"\n href=${this.countries}\n slot=${shippingChoice}\n lang=${lang}\n ns=${ns}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @update:countries=${(evt: CustomEvent) => {\n config.shipping_filter_values = (evt.currentTarget as CountriesList).countries;\n normalize();\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </x-countries-list>\n </x-choice>\n </x-group>\n\n <x-group class=\"bg-base pt-m\">\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : 'text-tertiary'}\n slot=\"header\"\n lang=${lang}\n key=\"billing\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n .items=${['allow', 'block', 'copy']}\n .value=${billingChoice}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: ChoiceChangeEvent) => {\n if (evt.detail === 'copy') {\n config.usage = 'both';\n } else {\n config.usage = 'independent';\n config.billing_filter_type = evt.detail === 'block' ? 'blacklist' : 'whitelist';\n }\n\n normalize();\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n slot=\"allow-label\" lang=${lang} key=\"allowlist\" ns=${ns}></foxy-i18n>\n <foxy-i18n slot=\"block-label\" lang=${lang} key=\"blocklist\" ns=${ns}></foxy-i18n>\n <foxy-i18n slot=\"copy-label\" lang=${lang} key=\"same_as_shipping\" ns=${ns}></foxy-i18n>\n\n <x-countries-list\n countries=${JSON.stringify(config.billing_filter_values)}\n regions=${this.regions}\n class=\"mb-m\"\n href=${this.countries}\n slot=${billingChoice}\n lang=${lang}\n ns=${ns}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?hidden=${billingChoice === 'copy'}\n @update:countries=${(evt: CustomEvent) => {\n config.billing_filter_values = (evt.currentTarget as CountriesList).countries;\n normalize();\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </x-countries-list>\n </x-choice>\n </x-group>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('locations:after')}\n `;\n }\n\n private __renderHiddenFields(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const suggestions = [] as string[];\n const fields = [] as string[];\n const config = json.cart_display_config;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('hidden-fields', true);\n const isReadonly = this.readonlySelector.matches('hidden-fields', true);\n\n type FieldName = keyof Omit<\n TemplateConfigJSON['cart_display_config'],\n 'hidden_product_options' | 'usage'\n >;\n\n for (const key in config) {\n if (!key.startsWith('show_')) continue;\n const field = key.substring(5);\n suggestions.push(field);\n if (config.usage === 'required' && !config[key as FieldName]) fields.push(field);\n }\n\n if (config.usage === 'required') {\n fields.push(...config.hidden_product_options);\n }\n\n const addField = () => {\n config.usage = 'required';\n\n if (suggestions.includes(this.__addHiddenFieldInputValue)) {\n config[`show_${this.__addHiddenFieldInputValue}` as FieldName] = false;\n } else if (!config.hidden_product_options.includes(this.__addHiddenFieldInputValue)) {\n config.hidden_product_options.push(this.__addHiddenFieldInputValue);\n }\n\n this.edit({ json: JSON.stringify(json) });\n this.__addHiddenFieldInputValue = '';\n };\n\n const radius = 'calc(var(--lumo-border-radius-l) / 1.2)';\n const inputRadius = fields.length === 0 ? [radius] : ['0', '0', radius, radius];\n const isAddButtonDisabled = isDisabled || !this.__addHiddenFieldInputValue;\n\n return html`\n <div data-testid=\"hidden-fields\">\n ${this.renderTemplateOrSlot('hidden-fields:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"hidden_fields\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"divide-y divide-contrast-10\" data-testid=\"hidden-fields-list\">\n ${fields.map(field => {\n return html`\n <div\n class=${classMap({\n 'h-m ml-m pr-xs flex items-center justify-between': true,\n 'text-secondary': isReadonly,\n 'text-disabled': isDisabled,\n })}\n >\n ${suggestions.includes(field)\n ? html`<foxy-i18n lang=${lang} key=${field} ns=${ns}></foxy-i18n>`\n : html`<span>${field}</span>`}\n\n <button\n aria-label=${this.t('delete')}\n class=${classMap({\n 'w-xs h-xs rounded-full transition-colors': true,\n 'hover-bg-error-10 hover-text-error': !isDisabled,\n 'focus-outline-none focus-ring-2 ring-inset ring-error-50': !isDisabled,\n 'cursor-default': isDisabled,\n 'flex': !isReadonly,\n 'hidden': isReadonly,\n })}\n ?disabled=${isDisabled}\n @click=${() => {\n if (typeof config[`show_${field}` as FieldName] === 'boolean') {\n config[`show_${field}` as FieldName] = true;\n } else {\n config.hidden_product_options = config.hidden_product_options.filter(\n option => option !== field\n );\n }\n\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <iron-icon icon=\"icons:close\" class=\"icon-inline text-m m-auto\"></iron-icon>\n </button>\n </div>\n `;\n })}\n </div>\n\n <div\n data-testid=\"hidden-fields-new\"\n style=\"border-radius: ${inputRadius.join(' ')}\"\n class=${classMap({\n 'h-m flex items-center ring-inset ring-primary-50 focus-within-ring-2': true,\n 'border-t border-contrast-10': fields.length > 0,\n 'flex': !isReadonly,\n 'hidden': isReadonly,\n })}\n >\n <input\n placeholder=${this.t('add_field')}\n class=\"w-full bg-transparent appearance-none h-m px-m focus-outline-none\"\n list=\"hidden-fields-list\"\n .value=${live(this.__addHiddenFieldInputValue)}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && addField()}\n @input=${(evt: InputEvent) => {\n this.__addHiddenFieldInputValue = (evt.currentTarget as HTMLInputElement).value;\n }}\n />\n\n <datalist id=\"hidden-fields-list\">\n ${suggestions\n .filter(suggestion => !fields.includes(suggestion))\n .map(\n suggestion => html`<option value=${suggestion}>${this.t(suggestion)}</option>`\n )}\n </datalist>\n\n <button\n aria-label=${this.t('add_field')}\n class=${classMap({\n 'w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50': true,\n 'flex items-center justify-center rounded-full transition-colors': true,\n 'bg-contrast-5 text-disabled cursor-default': isAddButtonDisabled,\n 'bg-success-10 text-success cursor-pointer': !isAddButtonDisabled,\n 'hover-bg-success hover-text-success-contrast': !isAddButtonDisabled,\n 'focus-outline-none focus-ring-2': !isAddButtonDisabled,\n })}\n ?disabled=${isAddButtonDisabled}\n @click=${addField}\n >\n <iron-icon icon=\"icons:add\" class=\"icon-inline text-m\"></iron-icon>\n </button>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('hidden-fields:after')}\n </div>\n `;\n }\n\n private __renderCards(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('cards', true);\n const isReadonly = this.readonlySelector.matches('cards', true);\n const config = json.supported_payment_cards as string[];\n\n let skipForSaved: boolean;\n let skipForSSO: boolean;\n\n if (json.csc_requirements === 'all_cards') {\n skipForSaved = false;\n skipForSSO = false;\n } else if (json.csc_requirements === 'sso_only') {\n skipForSaved = true;\n skipForSSO = false;\n } else {\n skipForSaved = true;\n skipForSSO = true;\n }\n\n const typeToName: Record<string, string> = {\n amex: 'American Express',\n diners: 'Diners Club',\n discover: 'Discover',\n jcb: 'JCB',\n maestro: 'Maestro',\n mastercard: 'Mastercard',\n unionpay: 'UnionPay',\n visa: 'Visa',\n };\n\n return html`\n <div data-testid=\"cards\">\n ${this.renderTemplateOrSlot('cards:before')}\n\n <div class=\"space-y-xs\">\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"supported_cards\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"flex flex-wrap m-xs p-s\">\n ${Object.entries(logos).map(([type, logo]) => {\n if (!typeToName[type]) return;\n const isChecked = config.includes(type);\n\n return html`\n <div\n class=${classMap({\n 'm-xs rounded': true,\n 'opacity-50 cursor-default': isDisabled,\n 'cursor-pointer ring-primary-50 focus-within-ring-2': !isDisabled,\n })}\n >\n <label\n class=${classMap({\n 'overflow-hidden transition-colors flex rounded border': true,\n 'border-primary bg-primary-10 text-primary': isChecked && !isReadonly,\n 'border-contrast bg-contrast-5 text-secondary': isChecked && isReadonly,\n 'hover-text-body': isChecked && !isDisabled && !isReadonly,\n 'border-contrast-10': !isChecked,\n 'hover-border-primary': !isChecked && !isDisabled && !isReadonly,\n 'hover-text-primary': !isChecked && !isDisabled && !isReadonly,\n })}\n >\n <div class=\"h-s\">${logo}</div>\n\n <div class=\"text-s font-medium mx-s my-auto leading-none\">\n ${typeToName[type]}\n </div>\n\n <input\n type=\"checkbox\"\n class=\"sr-only\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${isChecked}\n @change=${(evt: Event) => {\n if (isReadonly) return evt.preventDefault();\n evt.stopPropagation();\n\n if ((evt.currentTarget as HTMLInputElement).checked) {\n config.push(type);\n } else {\n config.splice(config.indexOf(type), 1);\n }\n\n this.edit({ json: JSON.stringify(json) });\n }}\n />\n </label>\n </div>\n `;\n })}\n </div>\n\n <div class=\"flex flex-wrap p-s border-t border-contrast-10\">\n <x-checkbox\n data-testid=\"cards-saved-check\"\n class=\"m-s\"\n ?disabled=${isDisabled || json.csc_requirements === 'new_cards_only'}\n ?readonly=${isReadonly}\n ?checked=${skipForSaved}\n @change=${(evt: CheckboxChangeEvent) => {\n json.csc_requirements = evt.detail ? 'sso_only' : 'all_cards';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n class=\"leading-s block\" lang=${lang} key=\"skip_csc_for_saved\" ns=${ns}>\n </foxy-i18n>\n </x-checkbox>\n\n <x-checkbox\n data-testid=\"cards-sso-check\"\n class=\"m-s\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${skipForSSO}\n @change=${(evt: CheckboxChangeEvent) => {\n json.csc_requirements = evt.detail\n ? 'new_cards_only'\n : skipForSaved\n ? 'sso_only'\n : 'all_cards';\n\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n class=\"leading-s block\" lang=${lang} key=\"skip_csc_for_sso\" ns=${ns}>\n </foxy-i18n>\n </x-checkbox>\n </div>\n </x-group>\n\n <foxy-i18n\n class=\"text-xs leading-s block ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"supported_cards_disclaimer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n\n ${this.renderTemplateOrSlot('cards:after')}\n </div>\n `;\n }\n\n private __renderCheckoutType(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('checkout-type', true);\n const isReadonly = this.readonlySelector.matches('checkout-type', true);\n\n return html`\n <div data-testid=\"checkout-type\">\n ${this.renderTemplateOrSlot('checkout-type:before')}\n\n <div class=\"space-y-xs\">\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"checkout_type\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-choice\n data-testid=\"checkout-type-choice\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n .items=${['default_account', 'default_guest', 'guest_only', 'account_only']}\n .value=${json.checkout_type}\n .getText=${(item: string) => this.t(`checkout_type_${item}`)}\n @change=${(evt: ChoiceChangeEvent) => {\n json.checkout_type = evt.detail as TemplateConfigJSON['checkout_type'];\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </x-choice>\n </x-group>\n\n <foxy-i18n\n class=\"text-xs leading-s block ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"checkout_type_helper_text\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n\n ${this.renderTemplateOrSlot('checkout-type:after')}\n </div>\n `;\n }\n\n private __renderConsent(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const tosConfig = json.tos_checkbox_settings;\n const mailConfig = json.newsletter_subscribe;\n const sdtaConfig = json.eu_secure_data_transfer_consent;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('consent', true);\n const isReadonly = this.readonlySelector.matches('consent', true);\n const dividerStyle = 'margin-left: calc(1.125rem + (var(--lumo-space-m) * 2))';\n\n return html`\n <div data-testid=\"consent\">\n ${this.renderTemplateOrSlot('consent:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"consent\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <x-checkbox\n data-testid=\"consent-tos-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${tosConfig.usage === 'required' || tosConfig.usage === 'optional'}\n class=\"m-m\"\n @change=${(evt: CheckboxChangeEvent) => {\n tosConfig.initial_state = evt.detail ? tosConfig.initial_state : 'unchecked';\n tosConfig.is_hidden = false;\n tosConfig.usage = evt.detail ? 'required' : 'none';\n tosConfig.url = evt.detail ? tosConfig.url : '';\n\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"display_tos_link\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"display_tos_link_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n\n <div slot=\"content\" ?hidden=${tosConfig.usage === 'none'}>\n <vaadin-text-field\n data-testid=\"consent-tos-field\"\n label=${this.t('location_url')}\n class=\"w-full mt-m\"\n placeholder=\"https://example.com/path/to/tos\"\n clear-button-visible\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n .value=${tosConfig.url}\n @input=${(evt: CustomEvent) => {\n tosConfig.url = (evt.currentTarget as TextFieldElement).value;\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </vaadin-text-field>\n\n <div class=\"flex flex-wrap -mx-s -mb-s mt-s\">\n <x-checkbox\n data-testid=\"consent-tos-require-check\"\n class=\"m-s\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${tosConfig.usage === 'required'}\n @change=${(evt: CheckboxChangeEvent) => {\n tosConfig.usage = evt.detail ? 'required' : 'optional';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n class=\"leading-s block\" lang=${lang} key=\"require_consent\" ns=${ns}>\n </foxy-i18n>\n </x-checkbox>\n\n <x-checkbox\n data-testid=\"consent-tos-state-check\"\n class=\"m-s\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${tosConfig.initial_state === 'checked'}\n @change=${(evt: CheckboxChangeEvent) => {\n tosConfig.initial_state = evt.detail ? 'checked' : 'unchecked';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <foxy-i18n class=\"leading-s block\" lang=${lang} key=\"checked_by_default\" ns=${ns}>\n </foxy-i18n>\n </x-checkbox>\n </div>\n </div>\n </x-checkbox>\n\n <div style=${dividerStyle} class=\"border-b border-contrast-10\"></div>\n\n <x-checkbox\n data-testid=\"consent-mail-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${mailConfig.usage === 'required'}\n class=\"m-m\"\n @change=${(evt: CheckboxChangeEvent) => {\n mailConfig.usage = evt.detail ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"newsletter_subscribe\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"newsletter_subscribe_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n </x-checkbox>\n\n <div style=${dividerStyle} class=\"border-b border-contrast-10\"></div>\n\n <x-checkbox\n data-testid=\"consent-sdta-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${sdtaConfig.usage === 'required'}\n class=\"m-m\"\n @change=${(evt: CheckboxChangeEvent) => {\n sdtaConfig.usage = evt.detail ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"display_sdta\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"display_sdta_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n </x-checkbox>\n </x-group>\n\n ${this.renderTemplateOrSlot('consent:after')}\n </div>\n `;\n }\n\n private __renderFields(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('fields', true);\n const isReadonly = this.readonlySelector.matches('fields', true);\n const config = json.custom_checkout_field_requirements;\n const options = {\n cart_controls: ['enabled', 'disabled'],\n coupon_entry: ['enabled', 'disabled'],\n billing_first_name: ['default', 'optional', 'required', 'hidden'],\n billing_last_name: ['default', 'optional', 'required', 'hidden'],\n billing_company: ['default', 'optional', 'required', 'hidden'],\n billing_tax_id: ['default', 'optional', 'required', 'hidden'],\n billing_phone: ['default', 'optional', 'required', 'hidden'],\n billing_address1: ['default', 'optional', 'required', 'hidden'],\n billing_address2: ['default', 'optional', 'required', 'hidden'],\n billing_city: ['default', 'optional', 'required', 'hidden'],\n billing_region: ['default', 'optional', 'required', 'hidden'],\n billing_postal_code: ['default', 'optional', 'required', 'hidden'],\n billing_country: ['default', 'optional', 'required', 'hidden'],\n };\n\n return html`\n <div data-testid=\"fields\">\n ${this.renderTemplateOrSlot('fields:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"field_plural\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"bg-contrast-10 grid grid-cols-1 md-grid-cols-2\" style=\"gap: 1px\">\n ${Object.entries(options).map(([property, values]) => {\n return html`\n <label\n class=${classMap({\n 'flex items-center pl-m bg-base': true,\n 'text-secondary': isReadonly,\n 'text-disabled': isDisabled,\n })}\n >\n <foxy-i18n\n class=\"flex-1\"\n lang=${lang}\n key=${property.replace('billing_', '')}\n ns=${ns}\n >\n </foxy-i18n>\n\n <div\n class=${classMap({\n 'flex items-center text-right font-medium h-s px-s m-xs': isReadonly,\n 'hidden': !isReadonly,\n })}\n >\n ${this.t(\n values.find(\n value => (config as Record<string, string>)[property] === value\n ) as string\n )}\n </div>\n\n <div\n class=${classMap({\n 'px-s m-xs flex items-center rounded leading-none': true,\n 'ring-primary-50 ring-inset focus-within-ring-2': !isDisabled,\n 'hover-text-primary': !isDisabled,\n 'cursor-pointer': !isDisabled,\n 'cursor-default': isDisabled,\n 'flex': !isReadonly,\n 'hidden': isReadonly,\n })}\n >\n <select\n data-testid=\"fields-${property}\"\n class=${classMap({\n 'h-s mr-xs text-right appearance-none bg-transparent font-medium': true,\n 'focus-outline-none cursor-pointer': !isDisabled,\n 'cursor-default': isDisabled,\n })}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: Event) => {\n const select = evt.currentTarget as HTMLSelectElement;\n const value = select.options[select.options.selectedIndex].value;\n (config as Record<string, string>)[property] = value;\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n ${values.map(value => {\n return html`\n <option\n value=${value}\n ?selected=${(config as Record<string, string>)[property] === value}\n >\n ${this.t(value)}\n </option>\n `;\n })}\n </select>\n\n <iron-icon\n class=\"pointer-events-none icon-inline text-xl\"\n icon=\"icons:expand-more\"\n >\n </iron-icon>\n </div>\n </label>\n `;\n })}\n\n <div class=\"bg-base hidden md-block\"></div>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('fields:after')}\n </div>\n `;\n }\n\n private __renderGoogleAnalytics(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const config = json.analytics_config;\n const sioConfig = config.segment_io;\n const gaConfig = config.google_analytics;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('google-analytics', true);\n const isReadonly = this.readonlySelector.matches('google-analytics', true);\n\n return html`\n <div data-testid=\"google-analytics\">\n ${this.renderTemplateOrSlot('google-analytics:before')}\n\n <x-group frame>\n <span class=${isDisabled ? 'text-disabled' : ''} slot=\"header\">Google Analytics</span>\n\n <div class=\"p-m space-y-m\">\n <vaadin-text-field\n data-testid=\"google-analytics-field\"\n class=\"w-full\"\n label=${this.t('ga_account_id')}\n placeholder=\"UA-1234567-1\"\n helper-text=${this.t('ga_account_id_explainer')}\n .value=${live(gaConfig.account_id)}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n clear-button-visible\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n gaConfig.account_id = (evt.currentTarget as TextFieldElement).value;\n gaConfig.usage = gaConfig.account_id ? 'required' : 'none';\n config.usage = gaConfig.account_id || sioConfig.account_id ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </vaadin-text-field>\n\n <x-checkbox\n data-testid=\"google-analytics-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${gaConfig.include_on_site}\n @change=${(evt: CheckboxChangeEvent) => {\n gaConfig.include_on_site = evt.detail;\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"ga_include_on_site\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"ga_include_on_site_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n </x-checkbox>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('google-analytics:after')}\n </div>\n `;\n }\n\n private __renderSegmentIo(json: TemplateConfigJSON) {\n const config = json.analytics_config;\n const sioConfig = config.segment_io;\n const gaConfig = config.google_analytics;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('segment-io', true);\n const isReadonly = this.readonlySelector.matches('segment-io', true);\n\n return html`\n <div data-testid=\"segment-io\">\n ${this.renderTemplateOrSlot('segment-io:before')}\n\n <x-group frame>\n <span class=${isDisabled ? 'text-disabled' : ''} slot=\"header\">Segment.io</span>\n\n <div class=\"p-m\">\n <vaadin-text-field\n data-testid=\"segment-io-field\"\n class=\"w-full\"\n label=${this.t('sio_account_id')}\n placeholder=\"MY-WRITE-KEY\"\n helper-text=${this.t('sio_account_id_explainer')}\n .value=${live(sioConfig.account_id)}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n clear-button-visible\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n sioConfig.account_id = (evt.currentTarget as TextFieldElement).value;\n sioConfig.usage = sioConfig.account_id ? 'required' : 'none';\n config.usage = gaConfig.account_id || sioConfig.account_id ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </vaadin-text-field>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('segment-io:after')}\n </div>\n `;\n }\n\n private __renderTroubleshooting(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const config = json.debug;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('troubleshooting', true);\n const isReadonly = this.readonlySelector.matches('troubleshooting', true);\n\n return html`\n <div data-testid=\"troubleshooting\">\n ${this.renderTemplateOrSlot('troubleshooting:before')}\n\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : ''}\n slot=\"header\"\n lang=${lang}\n key=\"troubleshooting\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <div class=\"p-m space-y-m\">\n <x-checkbox\n data-testid=\"troubleshooting-check\"\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${config.usage === 'required'}\n @change=${(evt: CheckboxChangeEvent) => {\n config.usage = evt.detail ? 'required' : 'none';\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${lang} key=\"troubleshooting_debug\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"troubleshooting_debug_explainer\"\n ns=${ns}\n >\n </foxy-i18n>\n </div>\n </x-checkbox>\n </div>\n </x-group>\n\n ${this.renderTemplateOrSlot('troubleshooting:after')}\n </div>\n `;\n }\n\n private __renderCustomConfig(json: TemplateConfigJSON) {\n return html`\n <div data-testid=\"custom-config\">\n ${this.renderTemplateOrSlot('custom-config:before')}\n\n <vaadin-text-area\n data-testid=\"custom-config-field\"\n class=\"w-full\"\n label=${this.t('custom_config')}\n placeholder='{ \"key\": \"value\" }'\n helper-text=${this.t('custom_config_helper_text')}\n .value=${json.custom_config ? JSON.stringify(json.custom_config, null, 2) : ''}\n ?disabled=${!this.in('idle') || this.disabledSelector.matches('custom-config', true)}\n ?readonly=${this.readonlySelector.matches('custom-config', true)}\n @input=${(evt: CustomEvent) => {\n const input = evt.currentTarget as TextAreaElement;\n\n try {\n json.custom_config = input.value ? JSON.parse(input.value) : '';\n this.edit({ json: JSON.stringify(json) });\n input.invalid = false;\n } catch {\n input.invalid = true;\n }\n }}\n >\n </vaadin-text-area>\n\n ${this.renderTemplateOrSlot('custom-config:after')}\n </div>\n `;\n }\n\n private __renderHeader(json: TemplateConfigJSON) {\n return html`\n <div data-testid=\"header\">\n ${this.renderTemplateOrSlot('header:before')}\n\n <vaadin-text-area\n data-testid=\"header-field\"\n class=\"w-full\"\n label=${this.t('custom_header')}\n helper-text=${this.t('custom_header_helper_text')}\n .value=${json.custom_script_values.header}\n ?disabled=${!this.in('idle') || this.disabledSelector.matches('header', true)}\n ?readonly=${this.readonlySelector.matches('header', true)}\n @input=${(evt: CustomEvent) => {\n const target = evt.currentTarget as TextAreaElement;\n const newConfig: TemplateConfigJSON['custom_script_values'] = {\n ...json.custom_script_values,\n header: target.value,\n };\n\n this.edit({ json: JSON.stringify({ ...json, custom_script_values: newConfig }) });\n }}\n >\n </vaadin-text-area>\n\n ${this.renderTemplateOrSlot('header:after')}\n </div>\n `;\n }\n\n private __renderCustomFields(json: TemplateConfigJSON) {\n return html`\n <div data-testid=\"custom-fields\">\n ${this.renderTemplateOrSlot('custom-fields:before')}\n\n <vaadin-text-area\n data-testid=\"custom-fields-field\"\n class=\"w-full\"\n label=${this.t('custom_fields')}\n helper-text=${this.t('custom_fields_helper_text')}\n .value=${json.custom_script_values.checkout_fields}\n ?disabled=${!this.in('idle') || this.disabledSelector.matches('custom-fields', true)}\n ?readonly=${this.readonlySelector.matches('custom-fields', true)}\n @input=${(evt: CustomEvent) => {\n const newValue = (evt.currentTarget as TextAreaElement).value;\n json.custom_script_values.checkout_fields = newValue;\n this.edit({ json: JSON.stringify(json) });\n }}\n >\n </vaadin-text-area>\n\n ${this.renderTemplateOrSlot('custom-fields:after')}\n </div>\n `;\n }\n\n private __renderFooter(json: TemplateConfigJSON) {\n return html`\n <div data-testid=\"footer\">\n ${this.renderTemplateOrSlot('footer:before')}\n\n <vaadin-text-area\n data-testid=\"footer-field\"\n class=\"w-full\"\n label=${this.t('custom_footer')}\n helper-text=${this.t('custom_footer_helper_text')}\n .value=${json.custom_script_values.footer}\n ?disabled=${!this.in('idle') || this.disabledSelector.matches('footer', true)}\n ?readonly=${this.readonlySelector.matches('footer', true)}\n @input=${(evt: CustomEvent) => {\n const target = evt.currentTarget as TextAreaElement;\n const newConfig: TemplateConfigJSON['custom_script_values'] = {\n ...json.custom_script_values,\n footer: target.value,\n };\n\n this.edit({ json: JSON.stringify({ ...json, custom_script_values: newConfig }) });\n }}\n >\n </vaadin-text-area>\n\n ${this.renderTemplateOrSlot('footer:after')}\n </div>\n `;\n }\n}\n"]}
@@ -1027,6 +1027,12 @@ input::-webkit-date-and-time-value{
1027
1027
  cursor: text;
1028
1028
  }
1029
1029
 
1030
+ @media (hover: hover) {
1031
+ .hover-cursor-pointer:hover {
1032
+ cursor: pointer;
1033
+ }
1034
+ }
1035
+
1030
1036
  .disabled-cursor-default:disabled {
1031
1037
  cursor: default;
1032
1038
  }
@@ -1749,10 +1755,6 @@ input::-webkit-date-and-time-value{
1749
1755
  }
1750
1756
  }
1751
1757
 
1752
- .focus-text-primary:focus {
1753
- color: var(--lumo-primary-text-color, hsl(214, 90%, 52%));
1754
- }
1755
-
1756
1758
  .focus-text-body:focus {
1757
1759
  color: var(--lumo-body-text-color, hsla(214, 40%, 16%, 0.94));
1758
1760
  }
@@ -1910,12 +1912,12 @@ input::-webkit-date-and-time-value{
1910
1912
  --tw-ring-color: var(--lumo-primary-color-50pct, hsla(214, 90%, 52%, 0.5));
1911
1913
  }
1912
1914
 
1913
- .ring-offset-4 {
1914
- --tw-ring-offset-width: 4px;
1915
+ .ring-offset-2 {
1916
+ --tw-ring-offset-width: 2px;
1915
1917
  }
1916
1918
 
1917
- .focus-ring-offset-2:focus {
1918
- --tw-ring-offset-width: 2px;
1919
+ .ring-offset-4 {
1920
+ --tw-ring-offset-width: 4px;
1919
1921
  }
1920
1922
 
1921
1923
  .ring-offset-base {
@@ -1 +1 @@
1
- {"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;YAEjC,OAAO;gBACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAqHF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAgB,SAAU,SAAQ,mBAAmB,CACzD,eAAe,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAC5C;CAAG","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-combo-box::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-button {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n .appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n\n .appearance-none::-webkit-calendar-picker-indicator,\n .appearance-none::-webkit-outer-spin-button,\n .appearance-none::-webkit-inner-spin-button,\n .appearance-none::-webkit-list-button {\n opacity: 0 !important;\n width: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n input::-webkit-date-and-time-value {\n text-align: inherit !important;\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
1
+ {"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;YAEjC,OAAO;gBACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-combo-box::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-button {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n .appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n\n .appearance-none::-webkit-calendar-picker-indicator,\n .appearance-none::-webkit-outer-spin-button,\n .appearance-none::-webkit-inner-spin-button,\n .appearance-none::-webkit-list-button {\n opacity: 0 !important;\n width: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n input::-webkit-date-and-time-value {\n text-align: inherit !important;\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foxy.io/elements",
3
3
  "type": "module",
4
- "version": "1.14.0-beta.10",
4
+ "version": "1.14.0-beta.11",
5
5
  "description": "E-commerce web components by Foxy.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1 +0,0 @@
1
- import{L as t,_ as e,j as i,h as s}from"./shared-63eaded9.js";import"./shared-0ced76a0.js";import{p as r}from"./shared-87ca7818.js";import"./shared-46ee137f.js";import"./shared-df573cea.js";import"./shared-f0a83bd6.js";import{b as a,S as n,c as o}from"./shared-d01035c5.js";import"./shared-31d03530.js";import"./shared-4ba926ca.js";import{I as c,D as l}from"./shared-a3d2c48e.js";import{E as d}from"./shared-5d94bacb.js";import"./shared-ec861f31.js";import"./shared-bb824ab4.js";import"./foxy-i18n.js";import"./shared-60126eee.js";import{s as h}from"./shared-b0f0e8b5.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends t{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return e(e({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}let v,b,w,x,q,I,$,E,S=t=>t;class D extends(n(t)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return e(e({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=S`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=h({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,c,l,d]=this.data;return s(b||(b=S` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,c?s(x||(x=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,l?s(q||(q=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,e,t>102?s(I||(I=S`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s($||($=S`<div class="m-auto text-xxxl">+${0}</div>`),t-3),d?s(E||(E=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,d):"",i,e,i,e)}}let k,C,A=t=>t;class N extends D{static get scopedElements(){return{"x-pic":f}}}class P extends D{static get scopedElements(){return{"x-pic":N}}}class j extends(n(t)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":P}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=h({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(k||(k=A`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(C||(C=A`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class F extends o{static get properties(){return e(e({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let T,O,B,L,R,z,V,M=t=>t;class Q extends F{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=Q.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(T||(T=M`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":d,"x-preview":j,"x-i18n":c}}static get properties(){return e(e({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(O||(O=M`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(B||(B=M` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(L||(L=M` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(R||(R=M` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(z||(z=M`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(V||(V=M` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=Q.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return Q.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}Q.__existingIds=[];let W,J,U,X,H,G,K=t=>t;class Y extends F{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");Y.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":d,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":l,"x-item":Q}}static get properties(){return e(e({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>Y.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>Y.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!Y.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(Y.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(J||(J=K` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(U||(U=K` ${0}`),[...this.__data.entries()].map((([t,e])=>s(X||(X=K`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(H||(H=K` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(G||(G=K` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(W||(W=K`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!Y.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(Y.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",Y),customElements.define("foxy-item",Q);export{Y as I,j as P,Q as a};