@foxy.io/elements 1.14.0-beta.3 → 1.14.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +9 -9
- package/dist/cdn/foxy-customer-portal.js +2 -2
- package/dist/cdn/foxy-customer.js +2 -2
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +4 -4
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +14 -0
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/{shared-14788132.js → shared-00563cb0.js} +1 -1
- package/dist/cdn/shared-09feabf8.js +1 -0
- package/dist/cdn/{shared-57522229.js → shared-0ba88744.js} +1 -1
- package/dist/cdn/shared-0ced76a0.js +358 -0
- package/dist/cdn/{shared-84df58e1.js → shared-16e28f3b.js} +1 -1
- package/dist/cdn/{shared-d196432b.js → shared-16f72e27.js} +1 -1
- package/dist/cdn/{shared-82dd0556.js → shared-1761daef.js} +1 -1
- package/dist/cdn/{shared-302d8a7b.js → shared-1bafffd0.js} +1 -1
- package/dist/cdn/{shared-3534b284.js → shared-200f613b.js} +1 -1
- package/dist/cdn/{shared-3e14c0d2.js → shared-218ba06e.js} +1 -1
- package/dist/cdn/{shared-acf49ecc.js → shared-34b2c1e2.js} +1 -1
- package/dist/cdn/{shared-2b2b56f6.js → shared-3f35fa81.js} +1 -1
- package/dist/cdn/{shared-b8349f79.js → shared-44cfc617.js} +1 -1
- package/dist/cdn/{shared-dd66b354.js → shared-4d3c7828.js} +1 -1
- package/dist/cdn/{shared-c7f352fa.js → shared-50c7a176.js} +1 -1
- package/dist/cdn/{shared-a4410f22.js → shared-593f7e2c.js} +1 -1
- package/dist/cdn/{shared-d19e2399.js → shared-59e44f29.js} +1 -1
- package/dist/cdn/{shared-d97a6ee5.js → shared-63eaded9.js} +3 -3
- package/dist/cdn/shared-691da586.js +1 -0
- package/dist/cdn/{shared-7fd12533.js → shared-6b7602c7.js} +1 -1
- package/dist/cdn/{shared-94c83b2b.js → shared-6d45a07b.js} +1 -1
- package/dist/cdn/{shared-2d99835c.js → shared-6ecbc785.js} +1 -1
- package/dist/cdn/{shared-bbc97ae0.js → shared-6f7f752e.js} +1 -1
- package/dist/cdn/shared-7629a1a5.js +314 -0
- package/dist/cdn/shared-8edee4e1.js +264 -0
- package/dist/cdn/{shared-652ef7fe.js → shared-9221e6b2.js} +1 -1
- package/dist/cdn/{shared-59a0cb0f.js → shared-94b0ae99.js} +1 -1
- package/dist/cdn/{shared-3553ff4d.js → shared-a46edf4b.js} +1 -1
- package/dist/cdn/{shared-72678c5d.js → shared-a6c047b1.js} +1 -1
- package/dist/cdn/shared-ace85f1b.js +1 -0
- package/dist/cdn/{shared-27d93838.js → shared-b0f0e8b5.js} +1 -1
- package/dist/cdn/{shared-8e38d64f.js → shared-b710881a.js} +2 -2
- package/dist/cdn/{shared-dce03b47.js → shared-bb824ab4.js} +1 -1
- package/dist/cdn/{shared-e969772e.js → shared-c66e9946.js} +1 -1
- package/dist/cdn/shared-d8852c42.js +1 -0
- package/dist/cdn/shared-df573cea.js +12 -0
- package/dist/cdn/{shared-fda14a3d.js → shared-e7f8ffe9.js} +1 -1
- package/dist/cdn/{shared-92442eb1.js → shared-ec861f31.js} +1 -1
- package/dist/cdn/{shared-a71bd9f0.js → shared-f0a83bd6.js} +1 -1
- package/dist/cdn/translations/shared/en.json +83 -1
- package/dist/elements/private/Checkbox/Checkbox.js +5 -1
- package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
- package/dist/elements/private/Choice/Choice.js +2 -2
- package/dist/elements/private/Choice/Choice.js.map +1 -1
- package/dist/elements/private/Group/Group.js +1 -1
- package/dist/elements/private/Group/Group.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +1 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +23 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js +129 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.d.ts +20 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js +125 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +34 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +1123 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/defaults.d.ts +2 -0
- package/dist/elements/public/TemplateConfigForm/defaults.js +95 -0
- package/dist/elements/public/TemplateConfigForm/defaults.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/index.d.ts +9 -0
- package/dist/elements/public/TemplateConfigForm/index.js +11 -0
- package/dist/elements/public/TemplateConfigForm/index.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/types.d.ts +116 -0
- package/dist/elements/public/TemplateConfigForm/types.js +2 -0
- package/dist/elements/public/TemplateConfigForm/types.js.map +1 -0
- package/dist/elements/public/TemplateForm/TemplateForm.js +1 -1
- package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
- package/dist/elements/public/index.d.ts +1 -0
- package/dist/elements/public/index.defined.d.ts +1 -0
- package/dist/elements/public/index.defined.js +1 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +1 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +72 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-04b77f79.js +0 -369
- package/dist/cdn/shared-1108653b.js +0 -577
- package/dist/cdn/shared-4ee97558.js +0 -1
- package/dist/cdn/shared-a0c2bbe0.js +0 -1
- package/dist/cdn/shared-a21a7562.js +0 -1
- package/dist/cdn/shared-bec929ac.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateConfigForm.js","sourceRoot":"","sources":["../../../../src/elements/public/Tem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BAAoB,CAAC,eAAe,GAAG,QAAQ,CAAC;YACrD,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5C,CAAC;;;;UAID,IAAI,CAAC,oBAAoB,CAAC,qBAAqB,CAAC;;KAErD,CAAC;IACJ,CAAC;IAEO,cAAc,CAAC,IAAwB;QAC7C,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC;;;;kBAIlC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC;wBACjB,IAAI,CAAC,CAAC,CAAC,2BAA2B,CAAC;mBACxC,IAAI,CAAC,oBAAoB,CAAC,MAAM;sBAC7B,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;sBAC7C,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 } 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\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 countries = '';\n\n regions = '';\n\n private __addHiddenFieldInputValue = '';\n\n render(): TemplateResult {\n const hidden = this.hiddenControls;\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\n return html`\n <div>\n ${this.renderTemplateOrSlot('cart-type:before')}\n\n <x-group frame>\n <foxy-i18n slot=\"header\" lang=${lang} key=\"cart_type\" ns=${ns}></foxy-i18n>\n\n <x-choice\n .value=${json.cart_type}\n .items=${items}\n ?disabled=${this.disabledSelector.matches('cart-type', true)}\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-secondary text-xs\"\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 class=\"leading-s block\" lang=${lang} key=\"show_country_flags\" ns=${ns}>\n </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 slot=\"header\" lang=${lang} key=\"foxycomplete\" ns=${ns}></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-secondary text-xs\"\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\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 slot=\"header\" lang=${lang} key=\"location_plural\" ns=${ns}></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 class=\"text-tertiary\" slot=\"header\" lang=${lang} key=\"shipping\" ns=${ns}>\n </foxy-i18n>\n\n <x-choice\n .items=${['allow', 'block']}\n .value=${shippingChoice}\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=${this.disabledSelector.matches('locations', true)}\n ?readonly=${this.readonlySelector.matches('locations', true)}\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 class=\"text-tertiary\" slot=\"header\" lang=${lang} key=\"billing\" ns=${ns}>\n </foxy-i18n>\n\n <x-choice\n .items=${['allow', 'block', 'copy']}\n .value=${billingChoice}\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=${this.disabledSelector.matches('locations', true)}\n ?readonly=${this.readonlySelector.matches('locations', true)}\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\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 slot=\"header\" lang=${lang} key=\"hidden_fields\" ns=${ns}></foxy-i18n>\n\n <div class=\"divide-y divide-contrast-10\">\n ${fields.map(\n field => html`\n <div class=\"h-m ml-m pr-xs flex items-center justify-between\">\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=\"flex w-xs h-xs items-center justify-center rounded-full transition-colors hover-bg-error-10 hover-text-error focus-outline-none focus-ring-2 focus-ring-inset focus-ring-error-50\"\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\"></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 })}\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 @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 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 slot=\"header\" lang=${lang} key=\"supported_cards\" ns=${ns}></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,\n 'hover-text-body': isChecked && !isDisabled,\n 'border-contrast-10': !isChecked,\n 'hover-border-primary hover-text-primary': !isChecked && !isDisabled,\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 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 ?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 ?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 text-secondary leading-s block\"\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\n return html`\n <div>\n ${this.renderTemplateOrSlot('checkout-type:before')}\n\n <div class=\"space-y-xs\">\n <x-group frame>\n <foxy-i18n slot=\"header\" lang=${lang} key=\"checkout_type\" ns=${ns}></foxy-i18n>\n\n <x-choice\n ?disabled=${this.disabledSelector.matches('checkout-type', true)}\n ?readonly=${this.readonlySelector.matches('checkout-type', true)}\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-secondary text-xs leading-s block\"\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.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>\n ${this.renderTemplateOrSlot('consent:before')}\n\n <x-group frame>\n <foxy-i18n slot=\"header\" lang=${lang} key=\"consent\" ns=${ns}></foxy-i18n>\n\n <x-checkbox\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 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 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 class=\"m-s\"\n ?disabled=${isDisabled}\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 class=\"m-s\"\n ?disabled=${isDisabled}\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 ?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 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 ?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 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:before')}\n </div>\n `;\n }\n\n private __renderFields(json: TemplateConfigJSON) {\n const { lang, ns } = this;\n const isDisabled = this.disabledSelector.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>\n ${this.renderTemplateOrSlot('fields:before')}\n\n <x-group frame>\n <foxy-i18n slot=\"header\" lang=${lang} key=\"field_plural\" ns=${ns}></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 class=\"flex items-center pl-m bg-base\">\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 'px-s m-xs flex items-center cursor-pointer rounded leading-none': true,\n 'ring-primary-50 ring-inset focus-within-ring-2': !isDisabled,\n 'hover-text-primary': !isDisabled,\n 'opacity-50': isDisabled,\n })}\n >\n <select\n class=\"h-s mr-xs text-right appearance-none bg-transparent cursor-pointer focus-outline-none font-medium\"\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.disabledSelector.matches('google-analytics', true);\n const isReadonly = this.readonlySelector.matches('google-analytics', true);\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('google-analytics:before')}\n\n <x-group frame>\n <span slot=\"header\">Google Analytics</span>\n\n <div class=\"p-m space-y-m\">\n <vaadin-text-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 }}\n >\n </vaadin-text-field>\n\n <x-checkbox\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 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.disabledSelector.matches('segment-io', true);\n const isReadonly = this.readonlySelector.matches('segment-io', true);\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('segment-io:before')}\n\n <x-group frame>\n <span slot=\"header\">Segment.io</span>\n\n <div class=\"p-m\">\n <vaadin-text-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 }}\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\n return html`\n <div>\n ${this.renderTemplateOrSlot('troubleshooting:before')}\n\n <x-group frame>\n <foxy-i18n slot=\"header\" lang=${lang} key=\"troubleshooting\" ns=${ns}></foxy-i18n>\n\n <div class=\"p-m space-y-m\">\n <x-checkbox\n ?disabled=${this.disabledSelector.matches('troubleshooting', true)}\n ?readonly=${this.readonlySelector.matches('troubleshooting', true)}\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 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>\n ${this.renderTemplateOrSlot('custom-config:before')}\n\n <vaadin-text-area\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.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>\n ${this.renderTemplateOrSlot('header:before')}\n\n <vaadin-text-area\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.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>\n ${this.renderTemplateOrSlot('custom-fields:before')}\n\n <vaadin-text-area\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.header}\n ?disabled=${this.disabledSelector.matches('header', true)}\n ?readonly=${this.readonlySelector.matches('header', 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>\n ${this.renderTemplateOrSlot('footer:before')}\n\n <vaadin-text-area\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.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"]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export const getDefaultJSON = () => ({
|
|
2
|
+
cart_type: 'default',
|
|
3
|
+
checkout_type: 'default_account',
|
|
4
|
+
csc_requirements: 'all_cards',
|
|
5
|
+
tos_checkbox_settings: {
|
|
6
|
+
usage: 'none',
|
|
7
|
+
initial_state: 'unchecked',
|
|
8
|
+
is_hidden: false,
|
|
9
|
+
url: '',
|
|
10
|
+
},
|
|
11
|
+
eu_secure_data_transfer_consent: {
|
|
12
|
+
usage: 'required',
|
|
13
|
+
},
|
|
14
|
+
newsletter_subscribe: {
|
|
15
|
+
usage: 'none',
|
|
16
|
+
},
|
|
17
|
+
analytics_config: {
|
|
18
|
+
usage: 'none',
|
|
19
|
+
google_analytics: {
|
|
20
|
+
usage: 'none',
|
|
21
|
+
account_id: '',
|
|
22
|
+
include_on_site: false,
|
|
23
|
+
},
|
|
24
|
+
segment_io: {
|
|
25
|
+
usage: 'none',
|
|
26
|
+
account_id: '',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
colors: {
|
|
30
|
+
usage: 'none',
|
|
31
|
+
primary: '4D4D4D',
|
|
32
|
+
secondary: 'FFFFFF',
|
|
33
|
+
tertiary: 'FFFFFF',
|
|
34
|
+
},
|
|
35
|
+
use_checkout_confirmation_window: {
|
|
36
|
+
usage: 'none',
|
|
37
|
+
},
|
|
38
|
+
supported_payment_cards: ['visa', 'mastercard', 'discover', 'amex'],
|
|
39
|
+
custom_checkout_field_requirements: {
|
|
40
|
+
cart_controls: 'enabled',
|
|
41
|
+
coupon_entry: 'enabled',
|
|
42
|
+
billing_first_name: 'required',
|
|
43
|
+
billing_last_name: 'required',
|
|
44
|
+
billing_company: 'optional',
|
|
45
|
+
billing_tax_id: 'hidden',
|
|
46
|
+
billing_phone: 'optional',
|
|
47
|
+
billing_address1: 'required',
|
|
48
|
+
billing_address2: 'optional',
|
|
49
|
+
billing_city: 'required',
|
|
50
|
+
billing_region: 'default',
|
|
51
|
+
billing_postal_code: 'required',
|
|
52
|
+
billing_country: 'required',
|
|
53
|
+
},
|
|
54
|
+
cart_display_config: {
|
|
55
|
+
usage: 'none',
|
|
56
|
+
show_product_weight: true,
|
|
57
|
+
show_product_category: true,
|
|
58
|
+
show_product_code: true,
|
|
59
|
+
show_product_options: true,
|
|
60
|
+
show_sub_frequency: true,
|
|
61
|
+
show_sub_startdate: true,
|
|
62
|
+
show_sub_nextdate: true,
|
|
63
|
+
show_sub_enddate: true,
|
|
64
|
+
hidden_product_options: [],
|
|
65
|
+
},
|
|
66
|
+
foxycomplete: {
|
|
67
|
+
usage: 'required',
|
|
68
|
+
show_combobox: true,
|
|
69
|
+
combobox_open: '\\u25bc',
|
|
70
|
+
combobox_close: '\\u25b2',
|
|
71
|
+
show_flags: true,
|
|
72
|
+
},
|
|
73
|
+
custom_script_values: {
|
|
74
|
+
header: '',
|
|
75
|
+
footer: '',
|
|
76
|
+
checkout_fields: '',
|
|
77
|
+
multiship_checkout_fields: '',
|
|
78
|
+
},
|
|
79
|
+
http_receipt: false,
|
|
80
|
+
custom_config: '',
|
|
81
|
+
debug: {
|
|
82
|
+
usage: 'none',
|
|
83
|
+
},
|
|
84
|
+
location_filtering: {
|
|
85
|
+
usage: 'none',
|
|
86
|
+
shipping_filter_type: 'blacklist',
|
|
87
|
+
billing_filter_type: 'blacklist',
|
|
88
|
+
shipping_filter_values: {},
|
|
89
|
+
billing_filter_values: {},
|
|
90
|
+
},
|
|
91
|
+
postal_code_lookup: {
|
|
92
|
+
usage: 'enabled',
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateConfigForm/defaults.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,GAAuB,EAAE,CAAC,CAAC;IACvD,SAAS,EAAE,SAAS;IACpB,aAAa,EAAE,iBAAiB;IAChC,gBAAgB,EAAE,WAAW;IAC7B,qBAAqB,EAAE;QACrB,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,WAAW;QAC1B,SAAS,E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AE;KAC3B;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,UAAU;QACjB,aAAa,EAAE,IAAI;QACnB,aAAa,EAAE,SAAS;QACxB,cAAc,EAAE,SAAS;QACzB,UAAU,EAAE,IAAI;KACjB;IACD,oBAAoB,EAAE;QACpB,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,EAAE;QACV,eAAe,EAAE,EAAE;QACnB,yBAAyB,EAAE,EAAE;KAC9B;IACD,YAAY,EAAE,KAAK;IACnB,aAAa,EAAE,EAAE;IACjB,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;KACd;IACD,kBAAkB,EAAE;QAClB,KAAK,EAAE,MAAM;QACb,oBAAoB,EAAE,WAAW;QACjC,mBAAmB,EAAE,WAAW;QAChC,sBAAsB,EAAE,EAAE;QAC1B,qBAAqB,EAAE,EAAE;KAC1B;IACD,kBAAkB,EAAE;QAClB,KAAK,EAAE,SAAS;KACjB;CACF,CAAC,CAAC","sourcesContent":["import { TemplateConfigJSON } from './types';\n\nexport const getDefaultJSON = (): TemplateConfigJSON => ({\n cart_type: 'default',\n checkout_type: 'default_account',\n csc_requirements: 'all_cards',\n tos_checkbox_settings: {\n usage: 'none',\n initial_state: 'unchecked',\n is_hidden: false,\n url: '',\n },\n eu_secure_data_transfer_consent: {\n usage: 'required',\n },\n newsletter_subscribe: {\n usage: 'none',\n },\n analytics_config: {\n usage: 'none',\n google_analytics: {\n usage: 'none',\n account_id: '',\n include_on_site: false,\n },\n segment_io: {\n usage: 'none',\n account_id: '',\n },\n },\n colors: {\n usage: 'none',\n primary: '4D4D4D',\n secondary: 'FFFFFF',\n tertiary: 'FFFFFF',\n },\n use_checkout_confirmation_window: {\n usage: 'none',\n },\n supported_payment_cards: ['visa', 'mastercard', 'discover', 'amex'],\n custom_checkout_field_requirements: {\n cart_controls: 'enabled',\n coupon_entry: 'enabled',\n billing_first_name: 'required',\n billing_last_name: 'required',\n billing_company: 'optional',\n billing_tax_id: 'hidden',\n billing_phone: 'optional',\n billing_address1: 'required',\n billing_address2: 'optional',\n billing_city: 'required',\n billing_region: 'default',\n billing_postal_code: 'required',\n billing_country: 'required',\n },\n cart_display_config: {\n usage: 'none',\n show_product_weight: true,\n show_product_category: true,\n show_product_code: true,\n show_product_options: true,\n show_sub_frequency: true,\n show_sub_startdate: true,\n show_sub_nextdate: true,\n show_sub_enddate: true,\n hidden_product_options: [],\n },\n foxycomplete: {\n usage: 'required',\n show_combobox: true,\n combobox_open: '\\\\u25bc',\n combobox_close: '\\\\u25b2',\n show_flags: true,\n },\n custom_script_values: {\n header: '',\n footer: '',\n checkout_fields: '',\n multiship_checkout_fields: '',\n },\n http_receipt: false,\n custom_config: '',\n debug: {\n usage: 'none',\n },\n location_filtering: {\n usage: 'none',\n shipping_filter_type: 'blacklist',\n billing_filter_type: 'blacklist',\n shipping_filter_values: {},\n billing_filter_values: {},\n },\n postal_code_lookup: {\n usage: 'enabled',\n },\n});\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '@polymer/iron-icons';
|
|
2
|
+
import '@polymer/iron-icon';
|
|
3
|
+
import '@vaadin/vaadin-text-field/vaadin-text-field';
|
|
4
|
+
import '@vaadin/vaadin-text-field/vaadin-text-area';
|
|
5
|
+
import '../../internal/InternalSandbox/index';
|
|
6
|
+
import '../Spinner/index';
|
|
7
|
+
import '../I18n/index';
|
|
8
|
+
import { TemplateConfigForm } from './TemplateConfigForm';
|
|
9
|
+
export { TemplateConfigForm };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '@polymer/iron-icons';
|
|
2
|
+
import '@polymer/iron-icon';
|
|
3
|
+
import '@vaadin/vaadin-text-field/vaadin-text-field';
|
|
4
|
+
import '@vaadin/vaadin-text-field/vaadin-text-area';
|
|
5
|
+
import "../../internal/InternalSandbox/index.js";
|
|
6
|
+
import "../Spinner/index.js";
|
|
7
|
+
import "../I18n/index.js";
|
|
8
|
+
import { TemplateConfigForm } from "./TemplateConfigForm.js";
|
|
9
|
+
customElements.define('foxy-template-config-form', TemplateConfigForm);
|
|
10
|
+
export { TemplateConfigForm };
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateConfigForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,6CAA6C,CAAC;AACrD,OAAO,4CAA4C,CAAC;AACpD,iDAA8C;AAC9C,6BAA0B;AAC1B,0BAAuB;AAEvB,OAAO,EAAE,kBAAkB,EAAE,gCAA6B;AAE1D,cAAc,CAAC,MAAM,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,CAAC","sourcesContent":["import '@polymer/iron-icons';\nimport '@polymer/iron-icon';\nimport '@vaadin/vaadin-text-field/vaadin-text-field';\nimport '@vaadin/vaadin-text-field/vaadin-text-area';\nimport '../../internal/InternalSandbox/index';\nimport '../Spinner/index';\nimport '../I18n/index';\n\nimport { TemplateConfigForm } from './TemplateConfigForm';\n\ncustomElements.define('foxy-template-config-form', TemplateConfigForm);\n\nexport { TemplateConfigForm };\n"]}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Rels } from '@foxy.io/sdk/backend';
|
|
2
|
+
import { Resource } from '@foxy.io/sdk/core';
|
|
3
|
+
export declare type Data = Resource<Rels.TemplateConfig>;
|
|
4
|
+
export declare type TemplateConfigJSON = {
|
|
5
|
+
/** Controls how your cart functions. */
|
|
6
|
+
cart_type: 'default' | 'fullpage' | 'custom';
|
|
7
|
+
/** Determines how you'd like customers to interact with your checkout regarding guest checkout or account checkout. The default value shows which option is shown first by default. */
|
|
8
|
+
checkout_type: 'default_account' | 'default_guest' | 'guest_only' | 'account_only';
|
|
9
|
+
/** Sets under what circumstances the card security code should be required. */
|
|
10
|
+
csc_requirements: 'all_cards' | 'sso_only' | 'new_cards_only';
|
|
11
|
+
/** Determines if you'd like a terms of service checkbox and url on your checkout. */
|
|
12
|
+
tos_checkbox_settings: {
|
|
13
|
+
usage: 'none' | 'required' | 'optional';
|
|
14
|
+
initial_state: 'checked' | 'unchecked';
|
|
15
|
+
is_hidden: boolean;
|
|
16
|
+
url: string;
|
|
17
|
+
};
|
|
18
|
+
/** Display a Secure Data Transfer agreement to EU customers. */
|
|
19
|
+
eu_secure_data_transfer_consent: {
|
|
20
|
+
usage: 'none' | 'required';
|
|
21
|
+
};
|
|
22
|
+
/** Display a newsletter subscribe checkbox on your checkout. */
|
|
23
|
+
newsletter_subscribe: {
|
|
24
|
+
usage: 'none' | 'required';
|
|
25
|
+
};
|
|
26
|
+
/** Determine if you'd like to use an analytics service. */
|
|
27
|
+
analytics_config: {
|
|
28
|
+
usage: 'none' | 'required';
|
|
29
|
+
google_analytics: {
|
|
30
|
+
usage: 'none' | 'required';
|
|
31
|
+
account_id: string;
|
|
32
|
+
include_on_site: boolean;
|
|
33
|
+
};
|
|
34
|
+
segment_io: {
|
|
35
|
+
usage: 'none' | 'required';
|
|
36
|
+
account_id: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/** Can be used to set some basic colors for your cart, checkout, and receipt templates. */
|
|
40
|
+
colors: {
|
|
41
|
+
usage: 'none' | 'required';
|
|
42
|
+
primary: string;
|
|
43
|
+
secondary: string;
|
|
44
|
+
tertiary: string;
|
|
45
|
+
};
|
|
46
|
+
/** Not currently implemented. */
|
|
47
|
+
use_checkout_confirmation_window: {
|
|
48
|
+
usage: 'none' | 'required';
|
|
49
|
+
};
|
|
50
|
+
/** Add the payment card types you support and want displayed on the checkout page. */
|
|
51
|
+
supported_payment_cards: ('visa' | 'mastercard' | 'discover' | 'amex' | 'dinersclub' | 'maestro' | 'laser')[];
|
|
52
|
+
/** Customize which fields should be required, option, hidden or default on the checkout page. */
|
|
53
|
+
custom_checkout_field_requirements: {
|
|
54
|
+
cart_controls: 'enabled' | 'disabled';
|
|
55
|
+
coupon_entry: 'enabled' | 'disabled';
|
|
56
|
+
billing_first_name: 'default' | 'optional' | 'required' | 'hidden';
|
|
57
|
+
billing_last_name: 'default' | 'optional' | 'required' | 'hidden';
|
|
58
|
+
billing_company: 'default' | 'optional' | 'required' | 'hidden';
|
|
59
|
+
billing_tax_id: 'default' | 'optional' | 'required' | 'hidden';
|
|
60
|
+
billing_phone: 'default' | 'optional' | 'required' | 'hidden';
|
|
61
|
+
billing_address1: 'default' | 'optional' | 'required' | 'hidden';
|
|
62
|
+
billing_address2: 'default' | 'optional' | 'required' | 'hidden';
|
|
63
|
+
billing_city: 'default' | 'optional' | 'required' | 'hidden';
|
|
64
|
+
billing_region: 'default' | 'optional' | 'required' | 'hidden';
|
|
65
|
+
billing_postal_code: 'default' | 'optional' | 'required' | 'hidden';
|
|
66
|
+
billing_country: 'default' | 'optional' | 'required' | 'hidden';
|
|
67
|
+
};
|
|
68
|
+
/** Customize which fields in the cart are shown or hidden. */
|
|
69
|
+
cart_display_config: {
|
|
70
|
+
usage: 'none' | 'required';
|
|
71
|
+
show_product_weight: boolean;
|
|
72
|
+
show_product_category: boolean;
|
|
73
|
+
show_product_code: boolean;
|
|
74
|
+
show_product_options: boolean;
|
|
75
|
+
show_sub_frequency: boolean;
|
|
76
|
+
show_sub_startdate: boolean;
|
|
77
|
+
show_sub_nextdate: boolean;
|
|
78
|
+
show_sub_enddate: boolean;
|
|
79
|
+
hidden_product_options: string[];
|
|
80
|
+
};
|
|
81
|
+
/** Allows you to customize and control the functionality of our find-as-you type system from countries and regions. */
|
|
82
|
+
foxycomplete: {
|
|
83
|
+
usage: 'none' | 'required';
|
|
84
|
+
show_combobox: boolean;
|
|
85
|
+
show_flags: boolean;
|
|
86
|
+
combobox_open: string;
|
|
87
|
+
combobox_close: string;
|
|
88
|
+
};
|
|
89
|
+
/** Custom HTML, css, and JavaScript for your cart, checkout and receipt templates. Twig is not allowed in the header template. */
|
|
90
|
+
custom_script_values: {
|
|
91
|
+
header: string;
|
|
92
|
+
footer: string;
|
|
93
|
+
checkout_fields: string;
|
|
94
|
+
multiship_checkout_fields: string;
|
|
95
|
+
};
|
|
96
|
+
/** @deprecated */
|
|
97
|
+
http_receipt: boolean;
|
|
98
|
+
/** A place where you can store your own custom JSON configuration data to be used by your Twig templates. */
|
|
99
|
+
custom_config: any;
|
|
100
|
+
/** Log debug info to browser console. */
|
|
101
|
+
debug: {
|
|
102
|
+
usage: 'none' | 'required';
|
|
103
|
+
};
|
|
104
|
+
/** This controls which countries and regions you want to allow on your cart and checkout pages. */
|
|
105
|
+
location_filtering: {
|
|
106
|
+
usage: 'none' | 'shipping' | 'billing' | 'both' | 'independent';
|
|
107
|
+
shipping_filter_type: 'blacklist' | 'whitelist';
|
|
108
|
+
billing_filter_type: 'blacklist' | 'whitelist';
|
|
109
|
+
shipping_filter_values: Record<string, '*' | string[]>;
|
|
110
|
+
billing_filter_values: Record<string, '*' | string[]>;
|
|
111
|
+
};
|
|
112
|
+
/** Enable postal code lookup on checkout. */
|
|
113
|
+
postal_code_lookup: {
|
|
114
|
+
usage: 'none' | 'enabled';
|
|
115
|
+
};
|
|
116
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateConfigForm/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Rels } from '@foxy.io/sdk/backend';\nimport { Resource } from '@foxy.io/sdk/core';\n\nexport type Data = Resource<Rels.TemplateConfig>;\n\nexport type TemplateConfigJSON = {\n /** Controls how your cart functions. */\n cart_type: 'default' | 'fullpage' | 'custom';\n\n /** Determines how you'd like customers to interact with your checkout regarding guest checkout or account checkout. The default value shows which option is shown first by default. */\n checkout_type: 'default_account' | 'default_guest' | 'guest_only' | 'account_only';\n\n /** Sets under what circumstances the card security code should be required. */\n csc_requirements: 'all_cards' | 'sso_only' | 'new_cards_only';\n\n /** Determines if you'd like a terms of service checkbox and url on your checkout. */\n tos_checkbox_settings: {\n usage: 'none' | 'required' | 'optional';\n initial_state: 'checked' | 'unchecked';\n is_hidden: boolean;\n url: string;\n };\n\n /** Display a Secure Data Transfer agreement to EU customers. */\n eu_secure_data_transfer_consent: {\n usage: 'none' | 'required';\n };\n\n /** Display a newsletter subscribe checkbox on your checkout. */\n newsletter_subscribe: {\n usage: 'none' | 'required';\n };\n\n /** Determine if you'd like to use an analytics service. */\n analytics_config: {\n usage: 'none' | 'required';\n google_analytics: {\n usage: 'none' | 'required';\n account_id: string;\n include_on_site: boolean;\n };\n segment_io: {\n usage: 'none' | 'required';\n account_id: string;\n };\n };\n\n /** Can be used to set some basic colors for your cart, checkout, and receipt templates. */\n colors: {\n usage: 'none' | 'required';\n primary: string;\n secondary: string;\n tertiary: string;\n };\n\n /** Not currently implemented. */\n use_checkout_confirmation_window: {\n usage: 'none' | 'required';\n };\n\n /** Add the payment card types you support and want displayed on the checkout page. */\n supported_payment_cards: (\n | 'visa'\n | 'mastercard'\n | 'discover'\n | 'amex'\n | 'dinersclub'\n | 'maestro'\n | 'laser'\n )[];\n\n /** Customize which fields should be required, option, hidden or default on the checkout page. */\n custom_checkout_field_requirements: {\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 /** Customize which fields in the cart are shown or hidden. */\n cart_display_config: {\n usage: 'none' | 'required';\n show_product_weight: boolean;\n show_product_category: boolean;\n show_product_code: boolean;\n show_product_options: boolean;\n show_sub_frequency: boolean;\n show_sub_startdate: boolean;\n show_sub_nextdate: boolean;\n show_sub_enddate: boolean;\n hidden_product_options: string[];\n };\n\n /** Allows you to customize and control the functionality of our find-as-you type system from countries and regions. */\n foxycomplete: {\n usage: 'none' | 'required';\n show_combobox: boolean;\n show_flags: boolean;\n combobox_open: string;\n combobox_close: string;\n };\n\n /** Custom HTML, css, and JavaScript for your cart, checkout and receipt templates. Twig is not allowed in the header template. */\n custom_script_values: {\n header: string;\n footer: string;\n checkout_fields: string;\n multiship_checkout_fields: string;\n };\n\n /** @deprecated */\n http_receipt: boolean;\n\n /** A place where you can store your own custom JSON configuration data to be used by your Twig templates. */\n custom_config: any;\n\n /** Log debug info to browser console. */\n debug: {\n usage: 'none' | 'required';\n };\n\n /** This controls which countries and regions you want to allow on your cart and checkout pages. */\n location_filtering: {\n usage: 'none' | 'shipping' | 'billing' | 'both' | 'independent';\n shipping_filter_type: 'blacklist' | 'whitelist';\n billing_filter_type: 'blacklist' | 'whitelist';\n shipping_filter_values: Record<string, '*' | string[]>;\n billing_filter_values: Record<string, '*' | string[]>;\n };\n\n /** Enable postal code lookup on checkout. */\n postal_code_lookup: {\n usage: 'none' | 'enabled';\n };\n};\n"]}
|
|
@@ -128,7 +128,7 @@ export class TemplateForm extends Base {
|
|
|
128
128
|
>
|
|
129
129
|
${['default', 'url', 'clipboard'].map(value => {
|
|
130
130
|
return html `
|
|
131
|
-
<div slot="${value}-label" class="py-s">
|
|
131
|
+
<div slot="${value}-label" class="py-s leading-s">
|
|
132
132
|
<foxy-i18n class="block" lang=${this.lang} key="template_${value}" ns=${this.ns}>
|
|
133
133
|
</foxy-i18n>
|
|
134
134
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateForm.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateForm/TemplateForm.ts"],"names":[],"mappings":"AAAA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C;QAC3C,CAAC;;;;;;kBAMO,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE;wBACxD,MAAM;sBACR,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,UAAU;mBAC5D,WAAW;;0BAEJ,EAAE,QAAQ,MAAM,SAAS,IAAI;;;UAG7C,IAAI,CAAC,oBAAoB,CAAC,GAAG,MAAM,QAAQ,CAAC;;KAEjD,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,OAAO;;QACnB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;QAE3B,IAAI;YACF,MAAM,GAAG,eAAG,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,UAAU,EAAE,IAAI,mCAAI,EAAE,CAAC;YACrD,MAAM,QAAQ,GAAG,MAAM,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAEjF,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;SACnD;QAAC,WAAM;YACN,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;SAC5B;IACH,CAAC;CACF","sourcesContent":["import { CSSResultArray, PropertyDeclarations, TemplateResult, css, html } from 'lit-element';\nimport { Choice, Group, PropertyTable } from '../../private/index';\nimport { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\n\nimport { ChoiceChangeEvent } from '../../private/events';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { Data } from './types';\nimport { DialogHideEvent } from '../../private/Dialog/DialogHideEvent';\nimport { InternalConfirmDialog } from '../../internal/InternalConfirmDialog/InternalConfirmDialog';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { TextAreaElement } from '@vaadin/vaadin-text-field/vaadin-text-area';\nimport { TextFieldElement } from '@vaadin/vaadin-text-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nconst NS = 'template-form';\nconst Base = ScopedElementsMixin(\n ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement, NS)))\n);\n\nexport class TemplateForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n __cacheState: { attribute: false },\n __contentChoice: { attribute: false },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n ...super.styles,\n css`\n #cached-content::part(input-field) {\n max-height: 15em;\n }\n `,\n ];\n }\n\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-internal-confirm-dialog': customElements.get('foxy-internal-confirm-dialog'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'vaadin-text-area': customElements.get('vaadin-text-area'),\n 'vaadin-button': customElements.get('vaadin-button'),\n 'x-property-table': PropertyTable,\n 'x-choice': Choice,\n 'x-group': Group,\n };\n }\n\n private __cacheState: 'idle' | 'busy' | 'fail' = 'idle';\n\n private __contentChoice: 'default' | 'url' | 'clipboard' = 'default';\n\n render(): TemplateResult {\n const { hiddenSelector, href, lang, ns } = this;\n const action = href ? 'delete' : 'create';\n const isBusy = this.in('busy');\n const isFail = this.in('fail');\n\n return html`\n <div class=\"space-y-m\">\n ${hiddenSelector.matches('description', true) ? '' : this.__renderDescription()}\n ${hiddenSelector.matches('content', true) ? '' : this.__renderContent()}\n ${hiddenSelector.matches('timestamps', true) || !href ? '' : this.__renderTimestamps()}\n ${hiddenSelector.matches(action) ? '' : this.__renderAction(action)}\n\n <div\n data-testid=\"spinner\"\n class=${classMap({\n 'transition duration-500 ease-in-out absolute inset-0 flex': true,\n 'opacity-0 pointer-events-none': !isBusy && !isFail,\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=${isFail ? 'error' : isBusy ? 'busy' : 'empty'}\n lang=${lang}\n ns=\"${ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n\n private __renderDescription() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('description:before')}\n\n <vaadin-text-field\n class=\"w-full mb-s\"\n label=${this.t('description')}\n .value=${this.form?.description ?? ''}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: CustomEvent) => {\n this.edit({ description: (evt.currentTarget as TextFieldElement).value });\n }}\n >\n </vaadin-text-field>\n\n ${this.renderTemplateOrSlot('description:after')}\n </div>\n `;\n }\n\n private __renderContent() {\n const contentChoice = this.form.content_url\n ? 'url'\n : this.form.content\n ? 'clipboard'\n : this.__contentChoice;\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('content:before')}\n\n <x-group frame>\n <foxy-i18n lang=${this.lang} slot=\"header\" key=\"template\" ns=${this.ns}></foxy-i18n>\n\n <x-choice\n data-testid=\"template-type\"\n .value=${contentChoice}\n .items=${['default', 'url', 'clipboard']}\n ?readonly=${this.readonlySelector.matches('content', true)}\n ?disabled=${this.in('busy') || this.disabledSelector.matches('content', true)}\n @change=${(evt: Event) => {\n if (evt instanceof ChoiceChangeEvent) {\n this.edit({ content: '', content_url: '' });\n this.__contentChoice = evt.detail as 'url' | 'clipboard' | 'default';\n }\n }}\n >\n ${['default', 'url', 'clipboard'].map(value => {\n return html`\n <div slot=\"${value}-label\" class=\"py-s\">\n <foxy-i18n class=\"block\" lang=${this.lang} key=\"template_${value}\" ns=${this.ns}>\n </foxy-i18n>\n\n <foxy-i18n\n class=\"block text-s opacity-70\"\n lang=${this.lang}\n key=\"template_${value}_explainer\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n `;\n })}\n\n <div slot=\"url\" ?hidden=${contentChoice !== 'url'}>\n <div class=\"flex items-center mt-0 mb-m\">\n <vaadin-text-field\n data-testid=\"content_url\"\n value=${ifDefined(this.form.content_url)}\n class=\"mr-s flex-grow\"\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextFieldElement).value;\n this.edit({ content: '', content_url: value });\n }}\n >\n </vaadin-text-field>\n\n ${this.form.content_url === this.data?.content_url\n ? html`\n <vaadin-button\n class=\"relative\"\n ?disabled=${this.__cacheState === 'busy'}\n @click=${this.__cache}\n >\n <foxy-i18n\n class=${classMap({\n 'relative transition-opacity': true,\n 'opacity-0': this.__cacheState !== 'idle',\n })}\n lang=${this.lang}\n key=\"cache\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <div\n class=${classMap({\n 'absolute inset-0 flex transition-opacity': true,\n 'opacity-0': this.__cacheState === 'idle',\n })}\n >\n <foxy-spinner\n layout=\"no-label\"\n class=\"m-auto\"\n state=${this.__cacheState === 'fail' ? 'error' : 'busy'}\n lang=${this.lang}\n ns=${this.ns}\n >\n </foxy-spinner>\n </div>\n </vaadin-button>\n `\n : ''}\n </div>\n </div>\n\n <div slot=\"clipboard\" ?hidden=${contentChoice !== 'clipboard'}>\n <vaadin-text-area\n id=\"cached-content\"\n data-testid=\"content\"\n class=\"w-full mb-m\"\n .value=${this.form.content}\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextAreaElement).value;\n this.edit({ content: value, content_url: '' });\n }}\n >\n </vaadin-text-area>\n </div>\n </x-choice>\n </x-group>\n\n ${this.renderTemplateOrSlot('content:after')}\n </div>\n `;\n }\n\n private __renderTimestamps() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('timestamps:before')}\n\n <x-property-table\n data-testid=\"timestamps\"\n .items=${(['date_modified', 'date_created'] as const).map(field => ({\n name: this.t(field),\n value: this.data?.[field]\n ? this.t('date', { value: new Date(this.data[field] as string) })\n : '',\n }))}\n >\n </x-property-table>\n\n ${this.renderTemplateOrSlot('timestamps:after')}\n </div>\n `;\n }\n\n private __renderAction(action: string) {\n const { disabledSelector, href, lang, ns } = this;\n\n const isTemplateValid = this.in({ idle: { template: { dirty: 'valid' } } });\n const isSnapshotValid = this.in({ idle: { snapshot: { dirty: 'valid' } } });\n const isDisabled = !this.in('idle') || disabledSelector.matches(action, true);\n const isValid = isTemplateValid || isSnapshotValid;\n\n const handleClick = (evt: Event) => {\n if (action === 'delete') {\n const confirm = this.renderRoot.querySelector('#confirm');\n (confirm as InternalConfirmDialog).show(evt.currentTarget as HTMLElement);\n } else {\n this.submit();\n }\n };\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${action}:before`)}\n\n <foxy-internal-confirm-dialog\n message=\"delete_prompt\"\n confirm=\"delete\"\n cancel=\"cancel\"\n header=\"delete\"\n theme=\"primary error\"\n lang=${lang}\n ns=${ns}\n id=\"confirm\"\n data-testid=\"confirm\"\n @hide=${(evt: DialogHideEvent) => {\n if (!evt.detail.cancelled) this.delete();\n }}\n >\n </foxy-internal-confirm-dialog>\n\n <vaadin-button\n class=\"w-full\"\n theme=${this.in('idle') ? `primary ${href ? 'error' : 'success'}` : ''}\n data-testid=${action}\n ?disabled=${(this.in({ idle: 'template' }) && !isValid) || isDisabled}\n @click=${handleClick}\n >\n <foxy-i18n ns=${ns} key=${action} lang=${lang}></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot(`${action}:after`)}\n </div>\n `;\n }\n\n private async __cache(): Promise<void> {\n this.__cacheState = 'busy';\n\n try {\n const url = this.data?._links['fx:cache'].href ?? '';\n const response = await new TemplateForm.API(this).fetch(url, { method: 'POST' });\n\n this.__cacheState = response.ok ? 'idle' : 'fail';\n } catch {\n this.__cacheState = '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EAAE;;;kBAGC,CAAC,GAAoB,EAAE,EAAE;YAC/B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS;gBAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3C,CAAC;;;;;;kBAMO,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE;wBACxD,MAAM;sBACR,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,UAAU;mBAC5D,WAAW;;0BAEJ,EAAE,QAAQ,MAAM,SAAS,IAAI;;;UAG7C,IAAI,CAAC,oBAAoB,CAAC,GAAG,MAAM,QAAQ,CAAC;;KAEjD,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,OAAO;;QACnB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;QAE3B,IAAI;YACF,MAAM,GAAG,eAAG,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,UAAU,EAAE,IAAI,mCAAI,EAAE,CAAC;YACrD,MAAM,QAAQ,GAAG,MAAM,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAEjF,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;SACnD;QAAC,WAAM;YACN,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;SAC5B;IACH,CAAC;CACF","sourcesContent":["import { CSSResultArray, PropertyDeclarations, TemplateResult, css, html } from 'lit-element';\nimport { Choice, Group, PropertyTable } from '../../private/index';\nimport { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\n\nimport { ChoiceChangeEvent } from '../../private/events';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { Data } from './types';\nimport { DialogHideEvent } from '../../private/Dialog/DialogHideEvent';\nimport { InternalConfirmDialog } from '../../internal/InternalConfirmDialog/InternalConfirmDialog';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { TextAreaElement } from '@vaadin/vaadin-text-field/vaadin-text-area';\nimport { TextFieldElement } from '@vaadin/vaadin-text-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nconst NS = 'template-form';\nconst Base = ScopedElementsMixin(\n ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement, NS)))\n);\n\nexport class TemplateForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n __cacheState: { attribute: false },\n __contentChoice: { attribute: false },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n ...super.styles,\n css`\n #cached-content::part(input-field) {\n max-height: 15em;\n }\n `,\n ];\n }\n\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-internal-confirm-dialog': customElements.get('foxy-internal-confirm-dialog'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'vaadin-text-area': customElements.get('vaadin-text-area'),\n 'vaadin-button': customElements.get('vaadin-button'),\n 'x-property-table': PropertyTable,\n 'x-choice': Choice,\n 'x-group': Group,\n };\n }\n\n private __cacheState: 'idle' | 'busy' | 'fail' = 'idle';\n\n private __contentChoice: 'default' | 'url' | 'clipboard' = 'default';\n\n render(): TemplateResult {\n const { hiddenSelector, href, lang, ns } = this;\n const action = href ? 'delete' : 'create';\n const isBusy = this.in('busy');\n const isFail = this.in('fail');\n\n return html`\n <div class=\"space-y-m\">\n ${hiddenSelector.matches('description', true) ? '' : this.__renderDescription()}\n ${hiddenSelector.matches('content', true) ? '' : this.__renderContent()}\n ${hiddenSelector.matches('timestamps', true) || !href ? '' : this.__renderTimestamps()}\n ${hiddenSelector.matches(action) ? '' : this.__renderAction(action)}\n\n <div\n data-testid=\"spinner\"\n class=${classMap({\n 'transition duration-500 ease-in-out absolute inset-0 flex': true,\n 'opacity-0 pointer-events-none': !isBusy && !isFail,\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=${isFail ? 'error' : isBusy ? 'busy' : 'empty'}\n lang=${lang}\n ns=\"${ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n\n private __renderDescription() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('description:before')}\n\n <vaadin-text-field\n class=\"w-full mb-s\"\n label=${this.t('description')}\n .value=${this.form?.description ?? ''}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: CustomEvent) => {\n this.edit({ description: (evt.currentTarget as TextFieldElement).value });\n }}\n >\n </vaadin-text-field>\n\n ${this.renderTemplateOrSlot('description:after')}\n </div>\n `;\n }\n\n private __renderContent() {\n const contentChoice = this.form.content_url\n ? 'url'\n : this.form.content\n ? 'clipboard'\n : this.__contentChoice;\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('content:before')}\n\n <x-group frame>\n <foxy-i18n lang=${this.lang} slot=\"header\" key=\"template\" ns=${this.ns}></foxy-i18n>\n\n <x-choice\n data-testid=\"template-type\"\n .value=${contentChoice}\n .items=${['default', 'url', 'clipboard']}\n ?readonly=${this.readonlySelector.matches('content', true)}\n ?disabled=${this.in('busy') || this.disabledSelector.matches('content', true)}\n @change=${(evt: Event) => {\n if (evt instanceof ChoiceChangeEvent) {\n this.edit({ content: '', content_url: '' });\n this.__contentChoice = evt.detail as 'url' | 'clipboard' | 'default';\n }\n }}\n >\n ${['default', 'url', 'clipboard'].map(value => {\n return html`\n <div slot=\"${value}-label\" class=\"py-s leading-s\">\n <foxy-i18n class=\"block\" lang=${this.lang} key=\"template_${value}\" ns=${this.ns}>\n </foxy-i18n>\n\n <foxy-i18n\n class=\"block text-s opacity-70\"\n lang=${this.lang}\n key=\"template_${value}_explainer\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n `;\n })}\n\n <div slot=\"url\" ?hidden=${contentChoice !== 'url'}>\n <div class=\"flex items-center mt-0 mb-m\">\n <vaadin-text-field\n data-testid=\"content_url\"\n value=${ifDefined(this.form.content_url)}\n class=\"mr-s flex-grow\"\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextFieldElement).value;\n this.edit({ content: '', content_url: value });\n }}\n >\n </vaadin-text-field>\n\n ${this.form.content_url === this.data?.content_url\n ? html`\n <vaadin-button\n class=\"relative\"\n ?disabled=${this.__cacheState === 'busy'}\n @click=${this.__cache}\n >\n <foxy-i18n\n class=${classMap({\n 'relative transition-opacity': true,\n 'opacity-0': this.__cacheState !== 'idle',\n })}\n lang=${this.lang}\n key=\"cache\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <div\n class=${classMap({\n 'absolute inset-0 flex transition-opacity': true,\n 'opacity-0': this.__cacheState === 'idle',\n })}\n >\n <foxy-spinner\n layout=\"no-label\"\n class=\"m-auto\"\n state=${this.__cacheState === 'fail' ? 'error' : 'busy'}\n lang=${this.lang}\n ns=${this.ns}\n >\n </foxy-spinner>\n </div>\n </vaadin-button>\n `\n : ''}\n </div>\n </div>\n\n <div slot=\"clipboard\" ?hidden=${contentChoice !== 'clipboard'}>\n <vaadin-text-area\n id=\"cached-content\"\n data-testid=\"content\"\n class=\"w-full mb-m\"\n .value=${this.form.content}\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextAreaElement).value;\n this.edit({ content: value, content_url: '' });\n }}\n >\n </vaadin-text-area>\n </div>\n </x-choice>\n </x-group>\n\n ${this.renderTemplateOrSlot('content:after')}\n </div>\n `;\n }\n\n private __renderTimestamps() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('timestamps:before')}\n\n <x-property-table\n data-testid=\"timestamps\"\n .items=${(['date_modified', 'date_created'] as const).map(field => ({\n name: this.t(field),\n value: this.data?.[field]\n ? this.t('date', { value: new Date(this.data[field] as string) })\n : '',\n }))}\n >\n </x-property-table>\n\n ${this.renderTemplateOrSlot('timestamps:after')}\n </div>\n `;\n }\n\n private __renderAction(action: string) {\n const { disabledSelector, href, lang, ns } = this;\n\n const isTemplateValid = this.in({ idle: { template: { dirty: 'valid' } } });\n const isSnapshotValid = this.in({ idle: { snapshot: { dirty: 'valid' } } });\n const isDisabled = !this.in('idle') || disabledSelector.matches(action, true);\n const isValid = isTemplateValid || isSnapshotValid;\n\n const handleClick = (evt: Event) => {\n if (action === 'delete') {\n const confirm = this.renderRoot.querySelector('#confirm');\n (confirm as InternalConfirmDialog).show(evt.currentTarget as HTMLElement);\n } else {\n this.submit();\n }\n };\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${action}:before`)}\n\n <foxy-internal-confirm-dialog\n message=\"delete_prompt\"\n confirm=\"delete\"\n cancel=\"cancel\"\n header=\"delete\"\n theme=\"primary error\"\n lang=${lang}\n ns=${ns}\n id=\"confirm\"\n data-testid=\"confirm\"\n @hide=${(evt: DialogHideEvent) => {\n if (!evt.detail.cancelled) this.delete();\n }}\n >\n </foxy-internal-confirm-dialog>\n\n <vaadin-button\n class=\"w-full\"\n theme=${this.in('idle') ? `primary ${href ? 'error' : 'success'}` : ''}\n data-testid=${action}\n ?disabled=${(this.in({ idle: 'template' }) && !isValid) || isDisabled}\n @click=${handleClick}\n >\n <foxy-i18n ns=${ns} key=${action} lang=${lang}></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot(`${action}:after`)}\n </div>\n `;\n }\n\n private async __cache(): Promise<void> {\n this.__cacheState = 'busy';\n\n try {\n const url = this.data?._links['fx:cache'].href ?? '';\n const response = await new TemplateForm.API(this).fetch(url, { method: 'POST' });\n\n this.__cacheState = response.ok ? 'idle' : 'fail';\n } catch {\n this.__cacheState = 'fail';\n }\n }\n}\n"]}
|
|
@@ -36,6 +36,7 @@ export { Table } from './Table/Table';
|
|
|
36
36
|
export { TaxCard } from './TaxCard/TaxCard';
|
|
37
37
|
export { TaxForm } from './TaxForm/TaxForm';
|
|
38
38
|
export { TemplateForm } from './TemplateForm/TemplateForm';
|
|
39
|
+
export { TemplateConfigForm } from './TemplateConfigForm/TemplateConfigForm';
|
|
39
40
|
export { TransactionCard } from './TransactionCard/TransactionCard';
|
|
40
41
|
export { TransactionsTable } from './TransactionsTable/TransactionsTable';
|
|
41
42
|
export { UserForm } from './UserForm/UserForm';
|
|
@@ -35,6 +35,7 @@ export { SubscriptionsTable } from './SubscriptionsTable/index';
|
|
|
35
35
|
export { Table } from './Table/index';
|
|
36
36
|
export { TaxCard } from './TaxCard/index';
|
|
37
37
|
export { TaxForm } from './TaxForm/index';
|
|
38
|
+
export { TemplateConfigForm } from './TemplateConfigForm/index';
|
|
38
39
|
export { TemplateForm } from './TemplateForm/index';
|
|
39
40
|
export { TransactionCard } from './TransactionCard/index';
|
|
40
41
|
export { TransactionsTable } from './TransactionsTable/index';
|
|
@@ -35,6 +35,7 @@ export { SubscriptionsTable } from "./SubscriptionsTable/index.js";
|
|
|
35
35
|
export { Table } from "./Table/index.js";
|
|
36
36
|
export { TaxCard } from "./TaxCard/index.js";
|
|
37
37
|
export { TaxForm } from "./TaxForm/index.js";
|
|
38
|
+
export { TemplateConfigForm } from "./TemplateConfigForm/index.js";
|
|
38
39
|
export { TemplateForm } from "./TemplateForm/index.js";
|
|
39
40
|
export { TransactionCard } from "./TransactionCard/index.js";
|
|
40
41
|
export { TransactionsTable } from "./TransactionsTable/index.js";
|